Client request scheduling and communication method and system based on communication connection pool

By employing a communication connection pool between the client and server, an initial communication connection channel is pre-created and its validity is verified before connection allocation, thus solving the problem of frequent creation and destruction of TCP connections and achieving efficient, stable, and controllable bidirectional communication.

CN121967510APending Publication Date: 2026-05-01深圳鼎匠科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
深圳鼎匠科技有限公司
Filing Date
2025-12-12
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Traditional TCP communication methods lead to frequent creation and destruction of TCP connections in high-concurrency scenarios, resulting in high resource consumption, response delays, and system anomalies, affecting system real-time performance and throughput.

Method used

A client request scheduling method based on a communication connection pool is adopted. Multiple initial communication connection channels are pre-created. After receiving and verifying the business request, a connection is allocated according to the connection pool information. The request is sent to the server through the target communication connection channel to trigger the business processing logic.

Benefits of technology

It improves the accuracy and efficiency of client service request allocation, and realizes efficient, stable and controllable two-way communication between the client and the server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121967510A_ABST
    Figure CN121967510A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, and discloses a client request scheduling and communication method and system based on a communication connection pool, and the method comprises the steps: building a plurality of initial communication connection channels in a pre-built communication connection pool through a communication scheduling system; receiving a service request sent by a client, and carrying out request legality verification on the service request; when the request validity verification is passed, according to the obtained connection pool information of the communication connection pool, executing a connection distribution operation on the service request to obtain a target communication connection channel matched with the service request; and sending the service request to the server through the target communication connection channel, and triggering the server to analyze the service request and execute the service processing logic corresponding to the service request so as to complete the service request. According to the invention, efficient, stable and controllable two-way communication between the client request and the back-end service can be realized by establishing the communication connection pool and combining distribution control.
Need to check novelty before this filing date? Find Prior Art

Description

A Client Request Scheduling and Communication Method and System Based on Connection Pooling Technical Field

[0001] This invention relates to the field of communication technology, and in particular to a client request scheduling and communication method and system based on a communication connection pool. Background Technology

[0002] In traditional client-server communication architectures, the client needs to frequently communicate with the server via TCP. The common TCP communication method currently involves establishing a temporary TCP connection for each client request to exchange data with the server, and closing the connection after the request is completed.

[0003] However, practice has shown that traditional TCP communication methods, under high concurrency, lead to frequent creation and destruction of TCP connections, resulting in significant resource consumption, connection exhaustion, response delays, and even server-side anomalies. This is particularly problematic in scenarios requiring stable communication with the server; frequent TCP connection establishment and release severely impacts the system's real-time performance and throughput, increasing system complexity and memory usage. Therefore, proposing a new communication scheme to achieve efficient, stable, and controllable bidirectional communication between the client and server is crucial. Summary of the Invention This invention provides a client request scheduling and communication method and system based on a communication connection pool, which can realize efficient, stable and controllable bidirectional communication between the client and the server.

[0004] To address the aforementioned technical problems, the first aspect of this invention discloses a client request scheduling and communication method based on a communication connection pool. This method is applied to a communication scheduling system used to implement communication scheduling between a client and a server. The method includes: the communication scheduling system creating multiple initial communication connection channels in a pre-created communication connection pool; the communication scheduling system receiving a service request sent by the client and verifying the request's validity; when the request validity verification passes, the communication scheduling system performing a connection allocation operation on the service request based on the obtained connection pool information of the communication connection pool, obtaining a target communication connection channel matching the service request; and the communication scheduling system sending the service request to the server through the target communication connection channel, triggering the server to parse the service request and execute the corresponding business processing logic to complete the service request.

[0005] As an optional implementation, in the first aspect of the present invention, the communication scheduling system performs a connection allocation operation on the service request based on the obtained connection pool information of the communication connection pool to obtain a target communication connection channel matching the service request, including: the communication scheduling system determines whether the communication connection pool meets preset connection scheduling conditions based on the obtained connection pool information of the communication connection pool; when it is determined that the communication connection pool does not meet the connection scheduling conditions, the communication scheduling system creates a target communication connection channel matching the service request by analyzing the service request; when it is determined that the communication connection pool meets the connection scheduling conditions, the communication scheduling system calculates and determines a target communication connection channel matching the service request based on a preset multi-factor connection adaptability scoring mechanism. The system determines whether at least one of the idle connection channels meets the preset scheduling test conditions based on the compatibility values ​​between all the idle connection channels and the service request. If it is determined that none of the idle connection channels meet the scheduling test conditions, the system triggers the operation of creating a target communication connection channel matching the service request by analyzing the service request. If it is determined that at least one idle connection channel meets the scheduling test conditions, the system identifies one of the idle connection channels that meets the scheduling test conditions as the target communication connection channel matching the service request.

[0006] As an optional implementation, in a first aspect of the present invention, the communication scheduling system determines whether the communication connection pool meets preset connection scheduling conditions based on the obtained connection pool information of the communication connection pool, including: the communication scheduling system determines whether there is at least one idle connection channel in a preset idle state among all initial communication connection channels of the communication connection pool based on the obtained connection pool information; when it is determined that there is at least one idle connection channel in the idle state among all initial communication connection channels of the communication connection pool, the communication scheduling system determines that the communication connection pool meets the preset connection scheduling conditions; when it is determined that none of the initial communication connection channels of the communication connection pool are in the idle state, the communication scheduling system determines whether the communication connection pool meets a preset connection number exceeding condition based on the number of connections of the communication connection pool included in the connection pool information; when it is determined that the communication connection pool does not meet the connection number exceeding condition, the communication scheduling system determines that the communication connection pool meets the preset connection scheduling conditions.

[0007] As an optional implementation, in the first aspect of the present invention, the communication scheduling system calculates the fit value between each determined idle connection channel and the service request based on a preset multi-factor connection adaptability scoring mechanism, including: the communication scheduling system acquiring operation-related parameters of each determined idle connection channel, the operation-related parameters including at least one of historical operation time parameters, connection failure rate, and communication latency parameters; the communication scheduling system extracting feature parameters of the service request; the communication scheduling system determining the fit coefficient of each idle connection channel with respect to the feature parameters based on the feature parameters; and for each idle connection channel, the communication scheduling system, based on the preset multi-factor connection adaptability scoring mechanism, calculates the fit value between the idle connection channel and the service request based on the operation-related parameters of the idle connection channel, the fit coefficient of the idle connection channel, a first weight factor corresponding to the pre-determined operation-related parameters, and a second weight factor corresponding to the fit coefficient.

[0008] As an optional implementation, in the first aspect of the present invention, the communication scheduling system determines whether at least one of the idle connection channels satisfies a preset scheduling test condition based on the compatibility value between all the idle connection channels and the service request. This includes: the communication scheduling system sorting all the idle connection channels in descending order based on the compatibility value between all the idle connection channels and the service request to obtain idle connection channel queue information; within a preset response time period, the communication scheduling system performs scheduling tests on a determined target number of idle connection channels according to the idle connection channel queue information; when the test fails, the communication scheduling system determines that the idle connection channel does not meet the preset scheduling test condition, deletes the idle connection channel from the idle connection channel queue information, and re-executes the operation of performing scheduling tests on the determined target number of idle connection channels according to the idle connection channel queue information; when the test passes, the communication scheduling system determines that each idle connection channel that passed the test satisfies the preset scheduling test condition.

[0009] As an optional implementation, in a first aspect of the present invention, the communication scheduling system verifies the legality of the service request, including: the communication scheduling system verifies the identity of the client that triggered the service request; when the identity verification fails, the communication scheduling system determines that the request legality verification has failed; when the identity verification passes, the communication scheduling system verifies the parameter integrity of the service request; and when the parameter integrity verification fails, the communication scheduling system determines that the request legality verification has failed; when both the identity verification and the parameter integrity verification pass, the communication scheduling system determines that the request legality verification has passed.

[0010] As an optional implementation, in a first aspect of the present invention, the communication scheduling system sends the service request to the server through the target communication connection channel, comprising: the communication scheduling system generating interaction identification information corresponding to the service request and determining the service processor object corresponding to the service request; the communication scheduling system establishing a target mapping relationship corresponding to the service request based on a key-value mapping data structure, using the interaction identification information as the key and the service processor object as the value; the communication scheduling system sending the service request and the target mapping relationship corresponding to the service request to the server through the target communication connection channel; and the service processing logic being executed in the following manner: the server parses the interaction identification information corresponding to the service request according to the target mapping relationship to obtain the service processor object corresponding to the service request; and the server executes the service processing logic corresponding to the service request based on the service processor object corresponding to the service request.

[0011] A second aspect of this invention discloses a client request scheduling and communication system based on a communication connection pool. The method is applied to a communication scheduling system used to implement communication scheduling between a client and a server. The system includes: a creation module for creating multiple initial communication connection channels in a pre-created communication connection pool; a verification module for receiving a service request sent by the client and verifying the validity of the service request; an allocation module for performing a connection allocation operation on the service request based on the obtained connection pool information when the request validity verification passes, thereby obtaining a target communication connection channel matching the service request; and a processing module for sending the service request to the server through the target communication connection channel, triggering the server to parse the service request and execute the corresponding business processing logic to complete the service request.

[0012] As an optional implementation, in a second aspect of the present invention, the specific method by which the allocation module performs a connection allocation operation on the service request based on the obtained connection pool information of the communication connection pool to obtain a target communication connection channel matching the service request includes: determining whether the communication connection pool meets preset connection scheduling conditions based on the obtained connection pool information of the communication connection pool; when it is determined that the communication connection pool does not meet the connection scheduling conditions, creating a target communication connection channel matching the service request by analyzing the service request; when it is determined that the communication connection pool meets the connection scheduling conditions, calculating and determining a target communication connection channel matching the service request based on a preset multi-factor connection adaptability scoring mechanism. The system calculates the compatibility value between each idle connection channel and the service request; based on the compatibility values ​​between all idle connection channels and the service request, it determines whether at least one of the idle connection channels meets the preset scheduling test conditions; and when it is determined that none of the idle connection channels meet the scheduling test conditions, it triggers the operation of creating a target communication connection channel matching the service request by analyzing the service request; when it is determined that at least one of the idle connection channels meets the scheduling test conditions, one of the idle connection channels that meets the scheduling test conditions is determined as the target communication connection channel matching the service request.

[0013] As an optional implementation, in a second aspect of the present invention, the specific method by which the allocation module determines whether the communication connection pool meets the preset connection scheduling conditions based on the obtained connection pool information of the communication connection pool includes: determining, based on the obtained connection pool information of the communication connection pool, whether there is at least one idle connection channel in a preset idle state among all initial communication connection channels of the communication connection pool; when it is determined that there is at least one idle connection channel in the idle state among all initial communication connection channels of the communication connection pool, determining that the communication connection pool meets the preset connection scheduling conditions; when it is determined that none of the initial communication connection channels of the communication connection pool are in the idle state, determining whether the communication connection pool meets the preset connection number exceeding condition based on the connection number of the communication connection pool contained in the connection pool information; when it is determined that the communication connection pool does not meet the connection number exceeding condition, determining that the communication connection pool meets the preset connection scheduling conditions.

[0014] As an optional implementation, in a second aspect of the present invention, the specific method by which the allocation module calculates the fit value between each determined idle connection channel and the service request based on a preset multi-factor connection adaptability scoring mechanism includes: obtaining the operation-related parameters of each determined idle connection channel, wherein the operation-related parameters include at least one of historical operation time parameters, connection failure rate, and communication latency parameters; extracting the feature parameters of the service request; determining the fit coefficient of each idle connection channel with respect to the feature parameters based on the feature parameters; and for each idle connection channel, calculating the fit value between the idle connection channel and the service request based on the preset multi-factor connection adaptability scoring mechanism, according to the operation-related parameters of the idle connection channel, the fit coefficient of the idle connection channel, a first weight factor corresponding to the pre-determined operation-related parameters, and a second weight factor corresponding to the fit coefficient.

[0015] As an optional implementation, in a second aspect of the present invention, the specific method by which the allocation module determines whether at least one of the idle connection channels satisfies the preset scheduling test conditions based on the compatibility value between all the idle connection channels and the service request includes: sorting all the idle connection channels in descending order according to the compatibility value between all the idle connection channels and the service request to obtain idle connection channel queue information; performing scheduling tests on a determined target number of idle connection channels according to the idle connection channel queue information within a preset response time period; determining that the idle connection channel does not meet the preset scheduling test conditions when the test fails, deleting the idle connection channel from the idle connection channel queue information, and re-executing the operation of performing scheduling tests on the determined target number of idle connection channels according to the idle connection channel queue information; and determining that each idle connection channel that passed the test satisfies the preset scheduling test conditions when the test passes.

[0016] As an optional implementation, in a second aspect of the present invention, the verification module performs request validity verification on the business request in the following specific ways: verifying the identity of the client that triggered the business request; if the identity verification fails, determining that the request validity verification fails; if the identity verification passes, performing parameter integrity verification on the business request; and if the parameter integrity verification fails, determining that the request validity verification fails; and if both the identity verification and the parameter integrity verification pass, determining that the request validity verification passes.

[0017] As an optional implementation, in the second aspect of the present invention, the specific method by which the processing module sends the service request to the server through the target communication connection channel includes: generating interaction identification information corresponding to the service request and determining the service processor object corresponding to the service request; establishing a target mapping relationship corresponding to the service request based on a key-value mapping data structure, using the interaction identification information as the key and the service processor object as the value; sending the service request and the target mapping relationship corresponding to the service request to the server through the target communication connection channel; and the service processing logic is executed in the following manner: the server parses the interaction identification information corresponding to the service request according to the target mapping relationship to obtain the service processor object corresponding to the service request; and the server executes the service processing logic corresponding to the service request based on the service processor object corresponding to the service request.

[0018] The third aspect of the present invention discloses another client request scheduling and communication system based on a communication connection pool, the system comprising: a memory storing executable program code; a processor coupled to the memory; the processor calling the executable program code stored in the memory to execute the client request scheduling and communication method based on a communication connection pool disclosed in the first aspect of the present invention.

[0019] The fourth aspect of the present invention discloses a computer storage medium storing computer instructions, which, when invoked, are used to execute the client request scheduling and communication method based on a communication connection pool disclosed in the first aspect of the present invention.

[0020] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: The embodiments of the present invention provide a communication scheduling system for implementing communication scheduling between a client and a server. Specifically, the communication scheduling system creates multiple initial communication connection channels in a pre-created communication connection pool; the communication scheduling system receives service requests sent by the client and verifies the legality of the service requests; when the legality verification is successful, the communication scheduling system performs a connection allocation operation on the service request based on the connection pool information obtained from the communication connection pool, obtaining a target communication connection channel matching the service request; the communication scheduling system sends the service request to the server through the target communication connection channel, triggering the server to parse the service request and execute the corresponding business processing logic to complete the service request. As can be seen, implementing this invention can create a communication connection pool to store multiple initial communication connection channels, and verify the legality of the business requests sent by the client. When the verification is successful, a connection allocation operation is performed on the business request based on the connection pool information obtained from the communication connection pool, thereby obtaining a target communication connection channel that matches the business request. This can improve the accuracy and efficiency of allocating client business requests, and also improve the accuracy and efficiency of matching client business requests with target communication connection channels. Thus, through the accurately allocated target communication connection channel, the business request is sent to the server, triggering the server to execute the corresponding business processing logic. By creating a communication connection pool and combining allocation control, efficient, stable, and controllable bidirectional communication between client requests and backend services can be achieved. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 is a flowchart illustrating a client request scheduling and communication method based on a communication connection pool according to an embodiment of the present invention; Figure 2 is a flowchart illustrating another client request scheduling and communication method based on a communication connection pool according to an embodiment of the present invention; Figure 3 is a structural diagram illustrating a client request scheduling and communication system based on a communication connection pool according to an embodiment of the present invention; Figure 4 is a structural diagram illustrating another client request scheduling and communication system based on a communication connection pool according to an embodiment of the present invention; Figure 5 is a structural diagram illustrating yet another client request scheduling and communication system based on a communication connection pool according to an embodiment of the present invention. Detailed Implementation

[0023] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. 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 end that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or ends.

[0025] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0026] This invention discloses a client request scheduling and communication method and system based on a communication connection pool. It can create a communication connection pool to store multiple initial communication connection channels and verify the validity of received business requests from clients. When verification is successful, a connection allocation operation is performed on the business request based on the obtained connection pool information, obtaining a target communication connection channel matching the business request. This improves the accuracy and efficiency of client business request allocation and the accuracy and efficiency of matching client business requests with target communication connection channels. Through the accurately allocated target communication connection channel, the business request is sent to the server, triggering the server to execute corresponding business processing logic. This method achieves efficient, stable, and controllable bidirectional communication between client requests and backend services by creating a communication connection pool and combining allocation control. Detailed descriptions follow.

[0027] Please refer to Figure 1 for Embodiment 1. Figure 1 is a flowchart illustrating a client request scheduling and communication method based on a communication connection pool, as disclosed in this embodiment of the invention. The client request scheduling and communication method based on a communication connection pool described in Figure 1 can be applied to a communication scheduling system. This system is used to implement communication scheduling between the client and the server. The method can be applied to a client request scheduling and communication system based on a communication connection pool. This system may include a communication device or a communication server, which may include a cloud server or a local server; this embodiment of the invention does not impose any limitations. As shown in Figure 1, the client request scheduling and communication method based on a communication connection pool may include the following operations: 101. The communication scheduling system creates multiple initial communication connection channels in a pre-created communication connection pool.

[0028] In this embodiment of the invention, specifically, after the communication scheduling system starts, it initializes the idle connection queue in the pre-created communication connection pool; creates multiple communication connection channels (TCP Channels) and sets them to an available state; and employs a concurrency control mechanism to manage the maximum number of connections. Specifically, whenever a new communication connection channel is successfully established, an acquire operation is performed through the semaphore controller, and an atomic counter is incremented by 1. When the counter value reaches the set maximum connection limit (e.g., 30), the system will refuse to continue creating connection channels and will handle subsequent connection requests by blocking and waiting or returning a failed request; after the connection channel is returned, a release operation is performed, and the counter is decremented by 1, ensuring dynamic release and controllable growth of resources.

[0029] 102. The communication dispatch system receives service requests sent by clients and verifies the validity of the service requests.

[0030] In this embodiment of the invention, the request validity verification may optionally include identity verification or parameter integrity verification; this embodiment of the invention does not impose any limitations.

[0031] Optionally, in this embodiment of the invention, when the request validity verification fails, the process can be terminated. Alternatively, the communication scheduling system can send a request verification error message to the client to indicate that the user to which the client is facing has failed the service request verification. This embodiment of the invention does not impose any limitations.

[0032] 103. When the validity of the request is verified, the communication scheduling system performs a connection allocation operation on the service request based on the connection pool information of the obtained communication connection pool, and obtains the target communication connection channel that matches the service request.

[0033] In this embodiment of the invention, optionally, the connection pool information may include the channel status of each initial communication connection channel in the communication connection pool. The channel status of each initial communication connection channel may include an idle state, a loaned state, an abnormal state, or a failed state. The idle state indicates that the same communication connection channel is not occupied and can participate in connection scheduling; the loaned state indicates that the corresponding communication connection channel has been allocated to other service requests and is not currently participating in other request scheduling; the abnormal state indicates that the corresponding communication connection channel has encountered an error during reception or transmission and needs to enter the error handling process; the failed state indicates that the corresponding communication connection channel has been determined to be unavailable and enters the connection recycling and replacement phase. Optionally, the connection pool information may also include the number of connections in the communication connection pool, which represents the number of initial communication connection channels in the communication connection pool; this is not limited in this embodiment of the invention.

[0034] In this embodiment of the invention, specifically, the communication scheduling system can perform lifecycle management of communication connection channels and update the channel status in a timely manner. Specifically, the system background thread periodically polls the status of idle connection channels; if a connection channel fails (e.g., heartbeat failure), it is immediately destroyed and an attempt is made to replenish it; if the idle status of a connection channel times out (e.g., it has not been used for 10 minutes), the resources of the connection channel are released.

[0035] In this embodiment of the invention, specifically, the communication scheduling system selects one of the idle connection channels in the communication connection pool that is in an idle state as the target communication connection channel matching the service request based on the connection pool information of the communication connection pool; or, the communication scheduling system determines the compatibility between each initial communication connection channel in the communication connection pool and the service request based on the connection pool information of the communication connection pool, and selects one of the channels with the highest compatibility as the target communication connection channel matching the service request.

[0036] 104. The communication scheduling system sends the business request to the server through the target communication connection channel, triggering the server to parse the business request and execute the corresponding business processing logic to complete the business request.

[0037] In this embodiment of the invention, the communication scheduling system sets up a timeout and retry mechanism. Specifically, when a service request is sent to the server through the target communication connection channel, the system checks whether the server responds in a timely manner according to a preset timeout threshold (e.g., 2 seconds). If the server does not respond in a timely manner, the following steps are taken: the retry logic is triggered on the first attempt, and a new channel is selected to resend the request; if the request still fails, a retry failure event is triggered, and the client is notified that the request has failed.

[0038] As can be seen, the client request scheduling and communication method based on the communication connection pool described in Figure 1 can store multiple initial communication connection channels by creating a communication connection pool, and verify the legality of the business requests sent by the client. When the verification is successful, the connection allocation operation is performed on the business request according to the connection pool information obtained, and the target communication connection channel matching the business request is obtained. This can improve the accuracy and efficiency of the allocation of client business requests, and improve the accuracy and efficiency of matching client business requests with target communication connection channels. Thus, the business request is sent to the server through the accurately allocated target communication connection channel, triggering the server to execute the corresponding business processing logic. It can achieve efficient, stable and controllable bidirectional communication between client requests and backend services by creating a communication connection pool and combining allocation control.

[0039] In an optional embodiment, the communication scheduling system performing request validity verification on the service request in step 102 above may include: the communication scheduling system verifying the identity of the client that triggered the service request; when the identity verification fails, the communication scheduling system determines that the request validity verification has failed; when the identity verification passes, the communication scheduling system performs parameter integrity verification on the service request; and when the parameter integrity verification fails, the communication scheduling system determines that the request validity verification has failed; when both the identity verification and the parameter integrity verification pass, the communication scheduling system determines that the request validity verification has passed.

[0040] In this embodiment of the invention, specifically, the client initiates a business request through a unified entry point (API interface). The request scheduling module of the communication scheduling system performs a request validity verification. If the request is valid, an idle connection channel is obtained from the communication connection pool. If there is no idle connection and the number of connections has not exceeded the limit, a connection is dynamically created. If the number of connections has reached the limit, the request is suspended or a rate limiting prompt is returned.

[0041] In this embodiment of the invention, specifically, after receiving a service request, the system first verifies the identity of the client that initiated the request. The identity verification includes, but is not limited to, verifying whether the user has passed authentication, whether the identity token carried is valid, and whether the session state has timed out. After the identity verification is passed, the system further verifies the integrity of the parameters related to the service request. Only after all verifications are passed is the subsequent connection allocation and request sending process allowed.

[0042] As can be seen, this optional embodiment can verify the identity of the client that triggers the business request; and when the identity verification fails, it directly determines that the request's legality verification has failed, improving the speed and efficiency of determining that the request's legality verification has failed; and when the identity verification passes, it further verifies the parameter integrity of the business request; when the parameter integrity verification fails, it determines that the request's legality verification has failed, improving the accuracy of determining that the request's legality verification has failed; only when both the identity verification and the parameter integrity verification pass is the request's legality verification determined to be successful, improving the accuracy and reliability of determining that the request's legality verification has passed. This dual verification helps to improve the accuracy and reliability of the subsequent connection allocation process.

[0043] In another optional embodiment, the communication scheduling system sends a service request to the server through a target communication connection channel, including: the communication scheduling system generating interaction identification information corresponding to the service request and determining the service processor object corresponding to the service request; the communication scheduling system establishing a target mapping relationship corresponding to the service request based on a key-value mapping data structure, using the interaction identification information as the key and the service processor object as the value; the communication scheduling system sending the service request and the target mapping relationship corresponding to the service request to the server through the target communication connection channel; and the service processing logic being executed in the following manner: the server parses the interaction identification information corresponding to the service request according to the target mapping relationship to obtain the service processor object corresponding to the service request; and the server executes the service processing logic corresponding to the service request based on the service processor object corresponding to the service request.

[0044] In this embodiment of the invention, the communication scheduling system specifically adopts a key-value mapping-based data structure, using the interaction identification information of the business request (including information such as type, source, channel number, and sequence number) as the key and the business processor object (such as a callback interface or response waiting container) as the value to establish the target association relationship corresponding to the business request; the binding object maintains the request context data, including but not limited to request source information, user identity data, business parameters, and session context, for accurate matching and processing after the asynchronous response arrives.

[0045] In this embodiment of the invention, specifically, the request is encapsulated into a communication protocol format and sent to the server (such as an algorithm service) through a channel. The server's response matching process for the business request specifically includes: after the server returns data to the communication scheduling system, the communication scheduling system extracts the interaction identifier through decoding logic; and finds the request context based on the identifier and triggers the corresponding callback; if the binding times out or is lost, the response is discarded and an alarm log is recorded; after the business processing logic is completed, the target communication connection is returned to the communication connection pool.

[0046] As can be seen, this optional embodiment can generate interaction identification information corresponding to a business request and determine the business processor object corresponding to the business request. Based on a key-value mapping data structure, using the interaction identification information as the key and the business processor object as the value, a target mapping relationship corresponding to the business request is established. This improves the accuracy and reliability of establishing the target mapping relationship. Subsequently, the business request and its corresponding target mapping relationship are sent to the server through the target communication connection channel. This triggers the server to parse the interaction identification information corresponding to the business request based on the target mapping relationship, obtain the business processor object corresponding to the business request, and then execute the corresponding business processing logic based on the business processor object. By establishing the target mapping relationship for the business request in advance, the accuracy and timeliness of subsequent parsing of the business request can be improved, thereby enhancing the accuracy and timeliness of the server executing the business processing logic required by the client.

[0047] Example 2: Please refer to Figure 2, which is a flowchart illustrating another client request scheduling and communication method based on a communication connection pool disclosed in this embodiment of the invention. The client request scheduling and communication method based on a communication connection pool described in Figure 2 can be applied to a communication scheduling system. This system is used to implement communication scheduling between the client and the server. The method can be applied to a client request scheduling and communication system based on a communication connection pool. This system may include a communication device or a communication server, which may include a cloud server or a local server; this embodiment of the invention does not impose any limitations. As shown in Figure 2, the client request scheduling and communication method based on a communication connection pool may include the following operation: 201. The communication scheduling system creates multiple initial communication connection channels in a pre-created communication connection pool.

[0048] 202. The communication dispatch system receives service requests sent by clients and verifies the validity of the service requests.

[0049] 203. When the request validity verification is successful, the communication scheduling system determines whether the communication connection pool meets the preset connection scheduling conditions based on the obtained connection pool information.

[0050] In this embodiment of the invention, the connection scheduling condition can be used to represent the condition under which at least one initial communication connection channel in the communication connection pool can be scheduled.

[0051] In this embodiment of the invention, when the judgment result is negative, that is, when it is determined that the communication connection pool does not meet the connection scheduling conditions, step 204 is triggered; when the judgment result is positive, that is, when it is determined that the communication connection pool meets the connection scheduling conditions, step 205 is triggered.

[0052] 204. The communication scheduling system analyzes service requests and creates target communication connection channels that match the service requests.

[0053] 205. The communication scheduling system calculates the compatibility value between each idle connection channel and the service request based on a preset multi-factor connection adaptability scoring mechanism.

[0054] In this embodiment of the invention, an idle connection channel is a communication connection channel among all the initial communication connection channels in the communication connection pool that enables the communication connection pool to meet the connection scheduling conditions.

[0055] In this embodiment of the invention, the fit value between each idle connection channel and the service request is used to represent the degree of fit between each idle connection channel and the service request.

[0056] 206. The communication scheduling system determines whether there is at least one idle connection channel that meets the preset scheduling test conditions based on the compatibility value between all idle connection channels and service requests.

[0057] In this embodiment of the invention, the scheduling test condition can be used to represent the condition for successful scheduling of the corresponding idle connection channel.

[0058] In this embodiment of the invention, when the judgment result is negative, that is, when it is determined that all idle connection channels do not meet the scheduling test conditions, the communication scheduling system in step 204 is triggered to perform the operation of creating a target communication connection channel that matches the service request by analyzing the service request; when the judgment result is positive, that is, when it is determined that at least one idle connection channel meets the scheduling test conditions, step 207 is triggered.

[0059] 207. The communication scheduling system will identify one of the idle connection channels that meets the scheduling test conditions as the target communication connection channel that matches the service request.

[0060] 208. The communication scheduling system sends the business request to the server through the target communication connection channel, triggering the server to parse the business request and execute the corresponding business processing logic to complete the business request.

[0061] In this embodiment of the invention, for other descriptions of steps 201, 202 and 208, please refer to the detailed description of steps 101, 102 and 104 in Embodiment 1. These descriptions will not be repeated in this embodiment of the invention.

[0062] As can be seen, the client request scheduling and communication method based on the communication connection pool described in Figure 2 can store multiple initial communication connection channels by creating a communication connection pool, and verify the legality of the business requests sent by the client. When the verification is successful, the connection allocation operation is performed on the business request according to the connection pool information obtained, so as to obtain the target communication connection channel that matches the business request. This can improve the accuracy and efficiency of the allocation of client business requests, and improve the accuracy and efficiency of matching client business requests with target communication connection channels. Thus, the business request is sent to the server through the accurately allocated target communication connection channel, triggering the server to execute the corresponding business processing logic. It can achieve efficient, stable and controllable bidirectional communication between client requests and backend services by creating a communication connection pool and combining allocation control. Furthermore, when the request's legitimacy verification passes, the system first determines whether the communication connection pool meets the preset connection scheduling conditions based on the obtained connection pool information. If the connection scheduling conditions are not met, a new target communication connection channel is created by analyzing the business request. Conversely, if the connection scheduling conditions are met, the system directly determines the compatibility value between each idle connection channel and the business request and performs scheduling tests. Only when all scheduling tests fail is the operation of creating a new target communication connection channel triggered. This improves the accuracy and reliability of the target communication connection channel created that matches the business request. When an idle connection channel passes the test, it is directly identified as the target communication connection channel that matches the business request, thus improving the matching efficiency, accuracy, and reliability of the business request and the idle connection channel.

[0063] In an optional embodiment, the communication scheduling system in step 203 above determines whether the communication connection pool meets the preset connection scheduling conditions based on the obtained connection pool information. This may include: the communication scheduling system determining whether there is at least one idle connection channel in a preset idle state among all the initial communication connection channels of the communication connection pool; when it is determined that there is at least one idle connection channel in a preset idle state among all the initial communication connection channels of the communication connection pool, the communication scheduling system determines that the communication connection pool meets the preset connection scheduling conditions; when it is determined that none of the initial communication connection channels of the communication connection pool are in an idle state, the communication scheduling system determines whether the communication connection pool meets the preset connection number exceeding condition based on the number of connections in the communication connection pool contained in the connection pool information; when it is determined that the communication connection pool does not meet the connection number exceeding condition, the communication scheduling system determines that the communication connection pool meets the preset connection scheduling conditions.

[0064] In this embodiment of the invention, the connection limit exceeding condition can be used to indicate that the number of connections in the communication connection pool is greater than or equal to a preset connection threshold. Specifically, the communication scheduling system is configured with the following connection allocation logic: It prioritizes attempting to obtain an idle connection channel from the communication connection pool (i.e., the idle connection pool); if there is no idle connection channel and the number of connections has not reached the upper limit, it triggers the dynamic creation of a new communication connection channel; if the number of connections reaches the upper limit and there is no idle connection channel, it can block the service request or return it to the client and display a communication failure message to prevent connection overload.

[0065] As can be seen, this optional embodiment can determine whether there is at least one idle connection channel in a preset idle state among all the initial communication connection channels of the communication connection pool based on the obtained connection pool information. When it is determined that there is at least one idle connection channel, it is directly determined that the communication connection pool meets the preset connection scheduling conditions, which can improve the efficiency and speed of determining whether the communication connection pool meets the connection scheduling conditions. When it is determined that all the initial communication connection channels of the communication connection pool are not in an idle state, it is further determined whether the communication connection pool meets the preset connection number over-limit condition based on the number of connections in the communication connection pool contained in the connection pool information. And when it is determined that the communication connection pool does not meet the connection number over-limit condition, it is determined that the communication connection pool meets the preset connection scheduling conditions. This can improve the accuracy and reliability of determining whether the communication connection pool meets the connection scheduling conditions. Moreover, by analyzing the idle state and the connection number over-limit situation, the accuracy, flexibility and diversity of the judgment method of whether the communication connection pool meets the connection scheduling conditions can be improved.

[0066] In another optional embodiment, the communication scheduling system in step 205 above calculates the fit value between each determined idle connection channel and the service request based on a preset multi-factor connection adaptability scoring mechanism. This may include: the communication scheduling system acquiring the operation-related parameters of each determined idle connection channel; the communication scheduling system extracting the feature parameters of the service request; the communication scheduling system determining the fit coefficient of each idle connection channel with respect to the feature parameters based on the feature parameters; and for each idle connection channel, the communication scheduling system, based on the preset multi-factor connection adaptability scoring mechanism, calculates the fit value between the idle connection channel and the service request based on the operation-related parameters of the idle connection channel, the fit coefficient of the idle connection channel, the first weight factor corresponding to the pre-determined operation-related parameters, and the second weight factor corresponding to the fit coefficient.

[0067] In this embodiment of the invention, optional running-related parameters include at least one of the following: historical running time parameters (such as the last time of use), connection failure rate (the connection failure rate can be the ratio of the number of failures to the number of calls per unit time), and communication delay parameters (such as the average delay of the most recent communications). This embodiment of the invention does not limit the parameters.

[0068] In this embodiment of the invention, optionally, the characteristic parameters of the service request may include at least one of parameters such as target type and real-time requirements, and this embodiment of the invention does not limit them.

[0069] In this embodiment of the invention, optionally, the communication scheduling system may introduce a dynamic adjustment mechanism to dynamically adjust the weight factors in order to improve scheduling efficiency.

[0070] In this embodiment of the invention, the formula for calculating the adaptability value of each idle connection channel is as follows: S_score=W1*(1 / (1+L_latency_avg))+W2*(1-F_fail_rate)+W3*I_target_match+W4*(1 / (1+now()-T_last_use)); where S_score represents the adaptability value between the corresponding idle connection channel and the service request; L_latency_avg represents the communication latency parameter of the corresponding idle connection channel; F_fail_rate represents the connection failure rate of the corresponding idle connection channel; I_target_match represents the adaptability coefficient of the corresponding idle connection channel, which is 1 if the idle connection channel is used for the target type a lot, otherwise it is zero; T_last_use represents the last use time of the corresponding idle connection channel; W1, W2, W3, and W4 represent the weighting factors of the communication latency parameter, connection failure rate, adaptability coefficient, and last use time of the corresponding idle connection channel, respectively; now() represents the current timestamp of the communication scheduling system.

[0071] As can be seen, this optional embodiment can obtain the operation-related parameters of each identified idle connection channel, and accurately determine the adaptation coefficient of each idle connection channel with respect to the feature parameters based on the extracted service request feature parameters. Thus, based on the preset multi-factor connection adaptability scoring mechanism, the adaptation degree value between the idle connection channel and the service request is calculated according to the operation-related parameters of each idle connection channel, the adaptation coefficient of the idle connection channel, the first weight factor corresponding to the preset operation-related parameters, and the second weight factor corresponding to the adaptation coefficient. This improves the accuracy and reliability of the calculation of the adaptation degree value between each idle connection channel and the service request.

[0072] In another optional embodiment, the communication scheduling system in step 206 above determines whether at least one idle connection channel among all idle connection channels meets the preset scheduling test conditions based on the compatibility value between all idle connection channels and service requests. This can include: the communication scheduling system sorting all idle connection channels in descending order according to the compatibility value between all idle connection channels and service requests to obtain idle connection channel queue information; within a preset response time period, the communication scheduling system performs scheduling tests on the determined target number of idle connection channels according to the idle connection channel queue information; when the test fails, the communication scheduling system determines that the idle connection channel does not meet the preset scheduling test conditions, deletes the idle connection channel from the idle connection channel queue information, and re-executes the operation of performing scheduling tests on the determined target number of idle connection channels according to the idle connection channel queue information; when the test passes, the communication scheduling system determines that each idle connection channel that passed the test meets the preset scheduling test conditions.

[0073] In this embodiment of the invention, specifically, the communication scheduling system sets up a connection selection and fallback mechanism, sorts all idle connection channels in descending order of their adaptability value, and attempts to call the top N (e.g., N=3) connection channels with the highest scores. If all of them fail or time out (e.g., no response for more than 10ms), an automatic expansion mechanism is triggered to create new connection channels to fill the gaps.

[0074] As can be seen, this optional embodiment can sort all idle connection channels in descending order based on the fit value between all idle connection channels and service requests to obtain idle connection channel queue information. This improves the accuracy and efficiency of sorting idle connection channels based on the fit value. Within a preset response time period, it performs scheduling tests on a target number of idle connection channels according to the idle connection channel queue information. If the test fails, it directly determines that the idle connection channel does not meet the preset scheduling test conditions, removes the idle connection channel from the idle connection channel queue information, and re-executes the operation of scheduling tests on the target number of idle connection channels according to the idle connection channel queue information. Only when the test passes is it determined that each idle connection channel that passed the test meets the preset scheduling test conditions, thus improving the accuracy and reliability of determining whether at least one idle connection channel meets the preset scheduling test conditions.

[0075] For example, as shown in Figure 3, which is a schematic diagram of the system architecture of a client request scheduling and communication system based on a communication connection pool disclosed in an embodiment of the present invention, the system architecture of the client request scheduling and communication system based on a communication connection pool consists of a communication scheduling system, a client, and a server. Optionally, the communication scheduling system includes, but is not limited to, a connection pool management module, a request scheduling module, a request-response binding module, a timeout and retry module, and a connection health detection and lifecycle management module. The connection pool management module is responsible for managing all communication connections (TCP Socket or communication channel) established with the backend service, and specifically includes at least one of the following functions: connection initialization mechanism, idle connection pool (IdlePool), record borrowed connection set (BorrowedSet), connection maximum limit mechanism, and connection state maintenance. Among them, the connection initialization mechanism can pre-establish a predefined number of communication connections (e.g., 3) at system startup and add them to the connection pool as basic available connections; the idle connection pool (IdlePool) can maintain all unoccupied connections using a thread-safe queue; the borrowed connection set (BorrowedSet) can record the connections currently occupied by business requests, ensuring the separation of concurrent scheduling and resource management; the connection maximum limit mechanism can limit the maximum number of connections in the pool (e.g., 30) through concurrent semaphores or atomic counters, and refuse to create new connections if the limit is exceeded, thus avoiding resource overload; the connection state maintenance can maintain a state identifier (idle, borrowed, abnormal, invalid) for each connection channel, which is used to mark the current life cycle state of the connection channel and is used as the basis for scheduling and reconstruction.

[0076] The request scheduling module is responsible for handling the access, validity verification, and forwarding of frontend business requests to backend services. Its specific logic includes: frontend access method abstraction, request validity verification, connection allocation logic, and data encapsulation and sending. Frontend access method abstraction means that regardless of whether it's a browser, an app, or a desktop client, all data requests are initiated through a unified access module. Request validity verification refers to the system performing identity verification (such as tokens and sessions) and parameter integrity checks on requests to prevent malicious or unauthorized requests. Data encapsulation and sending refers to converting requests into a custom communication protocol format and sending them to the backend service through the selected connection.

[0077] The request-response binding module addresses the issue of matching requests and responses in asynchronous communication. Specifically, it implements an interaction identifier generation mechanism to generate a unique interaction identifier for each request. This identifier consists of a request type field, a source identifier field, a communication channel number field, and a request sequence number field. The module also includes a binding management container to maintain the mapping between request identifiers and callback handlers or Future objects based on a key-value mapping cache structure. Furthermore, it sets up response processing logic to parse the interaction identifier upon receiving a response, locate the corresponding request context, and execute the bound business logic. Finally, it includes an expiration mechanism to clear binding information for requests that have not responded within the timeout period, preventing memory leaks or request mismatches.

[0078] The timeout and retry module is designed to improve the system's fault tolerance in the face of network fluctuations or occasional backend anomalies by designing timeout control and retry strategies. Specifically, a timer is started after a request is sent: it monitors whether the request completes within the set time; if no response is received and the system is in the first attempt state, it retryes by selecting another connection from the connection pool; if the retry still fails, it reports an error to the frontend and records the failure event; furthermore, the timeout and retry module sets retry limits and debouncing mechanisms to control the maximum number of retries and the time interval, preventing frequent retries from causing a cascading failure.

[0079] The connection health monitoring and lifecycle management module ensures that connections in the connection pool are always available. Specific logic includes: a periodic health check thread, an abnormal connection handling mechanism, and an idle connection recycling strategy. Specifically, the periodic health check thread sends heartbeat packets or probe requests to each idle connection and determines the connection's viability based on the response status. The abnormal connection handling mechanism marks a communication connection channel as invalid and removes it from the connection pool when it is unresponsive or experiences an I / O error. The idle connection recycling strategy closes an idle connection channel when it exceeds a set time limit to conserve system resources.

[0080] Optionally, the communication scheduling system may further include a custom protocol encapsulation and decoding module and an exception handling and monitoring module. The custom protocol encapsulation and decoding module is used to ensure the reliability and scalability of inter-system communication by setting a binary communication protocol. Specifically, it includes: designing a unified data frame structure, including frame header fields, service type fields, data length fields, payload data fields, communication channel number fields, and integrity verification fields; implementing protocol data encapsulation and decoding logic for request sending and response parsing; and designing a verification mechanism to ensure the integrity and correctness of communication data.

[0081] The exception handling and monitoring module is used for exception recording and alarms: real-time recording of information such as connection creation failure, sending exceptions, and response errors; it is also used for link monitoring data statistics: including the number of connections, borrowing frequency, request time, failure rate, etc.; and it is also used for interface instrumentation and audit logs, thereby facilitating problem localization and operational status analysis.

[0082] Please refer to Figure 4 for Embodiment 3. Figure 4 is a schematic diagram of another client request scheduling and communication system based on a communication connection pool disclosed in this embodiment of the invention. The client request scheduling and communication system based on a communication connection pool described in Figure 4 can be applied to a communication scheduling system. The communication scheduling system is used to implement communication scheduling between the client and the server. This client request scheduling and communication system based on a communication connection pool may include a communication device or a communication server. The communication server may include a cloud server or a local server; this embodiment of the invention does not impose any limitations. As shown in Figure 4, this client request scheduling and communication system based on a communication connection pool may include: a creation module 301, used to create multiple initial communication connection channels in a pre-created communication connection pool.

[0083] The verification module 302 is used to receive business requests sent by the client and verify the validity of the business requests.

[0084] The allocation module 303 is used to perform a connection allocation operation on the business request based on the connection pool information of the obtained communication connection pool when the request validity verification is passed, so as to obtain the target communication connection channel that matches the business request.

[0085] The processing module 304 is used to send the business request to the server through the target communication connection channel, triggering the server to parse the business request and execute the corresponding business processing logic to complete the business request.

[0086] As can be seen, the client request scheduling and communication system based on the communication connection pool described in Figure 4 can store multiple initial communication connection channels by creating a communication connection pool, and verify the legality of the business requests sent by the client. When the verification is successful, the system performs connection allocation operations on the business request based on the connection pool information obtained from the communication connection pool, thereby obtaining the target communication connection channel that matches the business request. This can improve the accuracy and efficiency of allocating client business requests, and also improve the accuracy and efficiency of matching client business requests with target communication connection channels. Thus, the business request is sent to the server through the accurately allocated target communication connection channel, triggering the server to execute the corresponding business processing logic. By creating a communication connection pool and combining allocation control, efficient, stable, and controllable bidirectional communication between client requests and backend services can be achieved.

[0087] In an optional embodiment, the allocation module 303 performs a connection allocation operation on the service request based on the obtained connection pool information of the communication connection pool. The specific method for obtaining the target communication connection channel matching the service request may include: determining whether the communication connection pool meets the preset connection scheduling conditions based on the obtained connection pool information; when it is determined that the communication connection pool does not meet the connection scheduling conditions, creating a target communication connection channel matching the service request by analyzing the service request; when it is determined that the communication connection pool meets the connection scheduling conditions, calculating the fit value between each idle connection channel and the service request based on the preset multi-factor connection adaptability scoring mechanism; determining whether at least one idle connection channel among all idle connection channels meets the preset scheduling test conditions based on the fit values ​​between all idle connection channels and the service request; and when it is determined that none of the idle connection channels meet the scheduling test conditions, triggering the operation of creating a target communication connection channel matching the service request by analyzing the service request; and when it is determined that at least one idle connection channel meets the scheduling test conditions, determining one of the idle connection channels that meets the scheduling test conditions as the target communication connection channel matching the service request.

[0088] As can be seen, this optional embodiment, when the request's legitimacy verification passes, first determines whether the communication connection pool meets the preset connection scheduling conditions based on the obtained connection pool information. If the connection scheduling conditions are not met, a new target communication connection channel is created by analyzing the service request. If the connection scheduling conditions are met, the fit value between each idle connection channel and the service request is directly determined and a scheduling test is performed. Only when all scheduling tests fail is the operation of creating a new target communication connection channel triggered. This can improve the accuracy and reliability of the target communication connection channel created that matches the service request. When there is an idle connection channel that has passed the test, it is directly determined as the target communication connection channel that matches the service request, which can improve the matching efficiency, accuracy, and reliability of the service request and the idle connection channel.

[0089] In this optional embodiment, as an optional implementation method, the specific way in which the allocation module 303 determines whether the communication connection pool meets the preset connection scheduling conditions based on the obtained connection pool information may include: determining whether there is at least one idle connection channel in a preset idle state among all the initial communication connection channels of the communication connection pool based on the obtained connection pool information; when it is determined that there is at least one idle connection channel in a preset idle state among all the initial communication connection channels of the communication connection pool, determining that the communication connection pool meets the preset connection scheduling conditions; when it is determined that none of the initial communication connection channels of the communication connection pool are in an idle state, determining whether the communication connection pool meets the preset connection number exceeding condition based on the number of connections of the communication connection pool contained in the connection pool information; when it is determined that the communication connection pool does not meet the connection number exceeding condition, determining that the communication connection pool meets the preset connection scheduling conditions.

[0090] As can be seen, this optional implementation can determine whether there is at least one idle connection channel in a preset idle state among all the initial communication connection channels of the communication connection pool based on the obtained connection pool information. When it is determined that there is at least one idle connection channel, it is directly determined that the communication connection pool meets the preset connection scheduling conditions, which can improve the efficiency and speed of determining whether the communication connection pool meets the connection scheduling conditions. When it is determined that none of the initial communication connection channels of the communication connection pool are in an idle state, it is further determined whether the communication connection pool meets the preset connection number over-limit condition based on the number of connections in the communication connection pool contained in the connection pool information. Only when it is determined that the communication connection pool does not meet the connection number over-limit condition is it determined that the communication connection pool meets the preset connection scheduling conditions. This can improve the accuracy and reliability of determining whether the communication connection pool meets the connection scheduling conditions. Furthermore, by analyzing the idle state and connection number over-limit situation, the accuracy, flexibility, and diversity of the judgment method for whether the communication connection pool meets the connection scheduling conditions can be improved.

[0091] In this optional embodiment, as another optional implementation, the allocation module 303 calculates the adaptation value between each determined idle connection channel and the service request based on a preset multi-factor connection adaptability scoring mechanism in the following specific ways: obtaining the operation-related parameters of each determined idle connection channel, including at least one of historical operation time parameters, connection failure rate, and communication latency parameters; extracting the feature parameters of the service request; determining the adaptation coefficient of each idle connection channel with respect to the feature parameters based on the feature parameters; and for each idle connection channel, calculating the adaptation value between the idle connection channel and the service request based on the preset multi-factor connection adaptability scoring mechanism, according to the operation-related parameters of the idle connection channel, the adaptation coefficient of the idle connection channel, the first weight factor corresponding to the pre-determined operation-related parameters, and the second weight factor corresponding to the adaptation coefficient.

[0092] As can be seen, this optional implementation can obtain the operation-related parameters of each identified idle connection channel, and accurately determine the adaptation coefficient of each idle connection channel with respect to the feature parameters based on the extracted service request feature parameters. Thus, based on the preset multi-factor connection adaptability scoring mechanism, the adaptation degree value between the idle connection channel and the service request is calculated according to the operation-related parameters of each idle connection channel, the adaptation coefficient of the idle connection channel, the first weight factor corresponding to the preset operation-related parameters, and the second weight factor corresponding to the adaptation coefficient. This improves the accuracy and reliability of the calculation of the adaptation degree value between each idle connection channel and the service request.

[0093] In this optional embodiment, as another optional implementation, the allocation module 303 determines whether at least one idle connection channel among all idle connection channels meets the preset scheduling test conditions based on the compatibility values ​​between all idle connection channels and service requests. This determination may include: sorting all idle connection channels in descending order according to the compatibility values ​​between all idle connection channels and service requests to obtain idle connection channel queue information; performing scheduling tests on a target number of idle connection channels according to the idle connection channel queue information within a preset response time period; determining that the idle connection channel does not meet the preset scheduling test conditions when the test fails, deleting the idle connection channel from the idle connection channel queue information, and re-executing the operation of performing scheduling tests on the target number of idle connection channels according to the idle connection channel queue information; and determining that each idle connection channel that passed the test meets the preset scheduling test conditions when the test passes.

[0094] As can be seen, this optional implementation can sort all idle connection channels in descending order based on the fit value between all idle connection channels and service requests to obtain idle connection channel queue information. This improves the accuracy and efficiency of sorting idle connection channels based on the fit value. Within a preset response time period, it performs scheduling tests on a target number of idle connection channels according to the idle connection channel queue information. If the test fails, it directly determines that the idle connection channel does not meet the preset scheduling test conditions, removes the idle connection channel from the idle connection channel queue information, and re-executes the operation of scheduling tests on the target number of idle connection channels according to the idle connection channel queue information. Only when the test passes is it determined that each idle connection channel that passed the test meets the preset scheduling test conditions, thus improving the accuracy and reliability of determining whether at least one idle connection channel meets the preset scheduling test conditions.

[0095] In another optional embodiment, the specific method by which the verification module 302 verifies the legality of the business request may include: verifying the identity of the client that triggered the business request; determining that the request legality verification failed when the identity verification failed; verifying the integrity of parameters in the business request when the identity verification passed; determining that the request legality verification failed when the parameter integrity verification failed; and determining that the request legality verification passed when both the identity verification and the parameter integrity verification passed.

[0096] As can be seen, this optional embodiment can verify the identity of the client that triggers the business request; and when the identity verification fails, it directly determines that the request's legality verification has failed, improving the speed and efficiency of determining that the request's legality verification has failed; and when the identity verification passes, it further verifies the parameter integrity of the business request; when the parameter integrity verification fails, it determines that the request's legality verification has failed, improving the accuracy of determining that the request's legality verification has failed; only when both the identity verification and the parameter integrity verification pass is the request's legality verification determined to be successful, improving the accuracy and reliability of determining that the request's legality verification has passed. This dual verification helps to improve the accuracy and reliability of the subsequent connection allocation process.

[0097] In another optional embodiment, the specific method by which the processing module 304 sends the service request to the server through the target communication connection channel may include: generating interaction identification information corresponding to the service request and determining the service processor object corresponding to the service request; establishing a target mapping relationship corresponding to the service request based on a key-value mapping data structure, using the interaction identification information as the key and the service processor object as the value; sending the service request and the target mapping relationship corresponding to the service request to the server through the target communication connection channel; and the service processing logic being executed in the following manner: the server parses the interaction identification information corresponding to the service request according to the target mapping relationship to obtain the service processor object corresponding to the service request; and the server executes the service processing logic corresponding to the service request based on the service processor object corresponding to the service request.

[0098] As can be seen, this optional embodiment can generate interaction identification information corresponding to a business request and determine the business processor object corresponding to the business request. Based on a key-value mapping data structure, using the interaction identification information as the key and the business processor object as the value, a target mapping relationship corresponding to the business request is established. This improves the accuracy and reliability of establishing the target mapping relationship. Subsequently, the business request and its corresponding target mapping relationship are sent to the server through the target communication connection channel. This triggers the server to parse the interaction identification information corresponding to the business request based on the target mapping relationship, obtain the business processor object corresponding to the business request, and then execute the corresponding business processing logic based on the business processor object. By establishing the target mapping relationship for the business request in advance, the accuracy and timeliness of subsequent parsing of the business request can be improved, thereby enhancing the accuracy and timeliness of the server executing the business processing logic required by the client.

[0099] Please refer to Figure 5 for Embodiment 4. Figure 5 is a schematic diagram of another client request scheduling and communication system based on a communication connection pool disclosed in this embodiment of the invention. As shown in Figure 5, the client request scheduling and communication system based on a communication connection pool may include: a memory 401 storing executable program code; a processor 402 coupled to the memory 401; the processor 402 calls the executable program code stored in the memory 401 to execute the steps in the client request scheduling and communication method based on a communication connection pool described in Embodiment 1 or Embodiment 2 of the present invention.

[0100] Example 5: This embodiment of the invention discloses a computer storage medium storing computer instructions. When these computer instructions are invoked, they are used to execute the steps in the client request scheduling and communication method based on a communication connection pool as described in Example 1 or Example 2 of the invention.

[0101] Example 6: This embodiment of the invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the steps in the client request scheduling and communication method based on a communication connection pool described in Example 1 or Example 2.

[0102] The system embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0103] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0104] Finally, it should be noted that the client request scheduling and communication method and system based on communication connection pool disclosed in the embodiments of the present invention are merely preferred embodiments of the present invention, and are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features therein; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A client request scheduling and communication method based on a communication connection pool, characterized in that, The method is applied to a communication scheduling system, which is used to implement communication scheduling between a client and a server. The method includes: the communication scheduling system creating multiple initial communication connection channels in a pre-created communication connection pool; the communication scheduling system receiving a service request sent by the client and verifying the validity of the service request; when the validity verification is successful, the communication scheduling system performing a connection allocation operation on the service request based on the connection pool information obtained from the communication connection pool, obtaining a target communication connection channel matching the service request; the communication scheduling system sending the service request to the server through the target communication connection channel, triggering the server to parse the service request and execute the corresponding business processing logic to complete the service request.

2. The client request scheduling and communication method based on a communication connection pool according to claim 1, characterized in that, The communication scheduling system performs connection allocation operations on the service request based on the obtained connection pool information of the communication connection pool, obtaining a target communication connection channel matching the service request. This includes: the communication scheduling system determining whether the communication connection pool meets preset connection scheduling conditions based on the obtained connection pool information; when it is determined that the communication connection pool does not meet the connection scheduling conditions, the communication scheduling system analyzes the service request and creates a target communication connection channel matching the service request; when it is determined that the communication connection pool meets the connection scheduling conditions, the communication scheduling system calculates the matching of each determined idle connection channel with the target communication connection channel based on a preset multi-factor connection adaptability scoring mechanism. The system determines whether at least one of the idle connection channels meets the preset scheduling test conditions based on the compatibility values ​​between all the idle connection channels and the service requests. If it is determined that none of the idle connection channels meet the scheduling test conditions, the system triggers the operation of creating a target communication connection channel matching the service request by analyzing the service request. If it is determined that at least one idle connection channel meets the scheduling test conditions, the system identifies one of the idle connection channels that meets the scheduling test conditions as the target communication connection channel matching the service request.

3. The client request scheduling and communication method based on a communication connection pool according to claim 2, characterized in that, The communication scheduling system determines whether the communication connection pool meets preset connection scheduling conditions based on the obtained connection pool information. This includes: the communication scheduling system determining whether at least one idle connection channel in the communication connection pool is in a preset idle state among all initial communication connection channels; when it is determined that at least one idle connection channel in the communication connection pool is in the idle state, the communication scheduling system determines that the communication connection pool meets the preset connection scheduling conditions; when it is determined that none of the initial communication connection channels in the communication connection pool are in the idle state, the communication scheduling system determines whether the communication connection pool meets a preset connection number exceeding condition based on the connection pool number included in the connection pool information; when it is determined that the communication connection pool does not meet the connection number exceeding condition, the communication scheduling system determines that the communication connection pool meets the preset connection scheduling conditions.

4. The client request scheduling and communication method based on a communication connection pool according to claim 2, characterized in that, The communication scheduling system, based on a preset multi-factor connection adaptability scoring mechanism, calculates the adaptability value between each determined idle connection channel and the service request. This includes: the communication scheduling system acquiring operational-related parameters for each determined idle connection channel, including at least one of historical running time parameters, connection failure rate, and communication latency parameters; the communication scheduling system extracting feature parameters of the service request; the communication scheduling system determining an adaptability coefficient for each idle connection channel with respect to the feature parameters; and for each idle connection channel, the communication scheduling system, based on the preset multi-factor connection adaptability scoring mechanism, calculating the adaptability value between the idle connection channel and the service request based on the operational-related parameters of the idle connection channel, the adaptability coefficient of the idle connection channel, a pre-determined first weighting factor corresponding to the operational-related parameters, and a second weighting factor corresponding to the adaptability coefficient.

5. The client request scheduling and communication method based on a communication connection pool according to any one of claims 2-4, characterized in that, The communication scheduling system determines whether at least one of the idle connection channels meets a preset scheduling test condition based on the compatibility value between all the idle connection channels and the service request. This includes: the communication scheduling system sorting all the idle connection channels in descending order based on the compatibility value between all the idle connection channels and the service request to obtain idle connection channel queue information; within a preset response time period, the communication scheduling system performs scheduling tests on a target number of idle connection channels according to the idle connection channel queue information; when the test fails, the communication scheduling system determines that the idle connection channel does not meet the preset scheduling test condition, deletes the idle connection channel from the idle connection channel queue information, and re-executes the operation of performing scheduling tests on the target number of idle connection channels according to the idle connection channel queue information; when the test passes, the communication scheduling system determines that each idle connection channel that passed the test meets the preset scheduling test condition.

6. The client request scheduling and communication method based on a communication connection pool according to any one of claims 1-4, characterized in that, The communication scheduling system verifies the legality of the service request, including: the communication scheduling system verifies the identity of the client that triggered the service request; when the identity verification fails, the communication scheduling system determines that the request legality verification has failed; when the identity verification passes, the communication scheduling system verifies the parameter integrity of the service request; and when the parameter integrity verification fails, the communication scheduling system determines that the request legality verification has failed; when both the identity verification and the parameter integrity verification pass, the communication scheduling system determines that the request legality verification has passed.

7. The client request scheduling and communication method based on a communication connection pool according to any one of claims 1-4, characterized in that, The communication scheduling system sends the service request to the server through the target communication connection channel, including: the communication scheduling system generating interaction identification information corresponding to the service request and determining the service processor object corresponding to the service request; the communication scheduling system establishing a target mapping relationship corresponding to the service request based on a key-value mapping data structure, using the interaction identification information as the key and the service processor object as the value; the communication scheduling system sending the service request and the target mapping relationship corresponding to the service request to the server through the target communication connection channel; and the service processing logic being executed in the following manner: the server parses the interaction identification information corresponding to the service request according to the target mapping relationship to obtain the service processor object corresponding to the service request; and the server executes the service processing logic corresponding to the service request based on the service processor object corresponding to the service request.

8. A client request scheduling and communication system based on a communication connection pool, characterized in that, The method is applied to a communication scheduling system, which is used to implement communication scheduling between a client and a server. The system includes: a creation module, used to create multiple initial communication connection channels in a pre-created communication connection pool; a verification module, used to receive a service request sent by the client and verify the validity of the service request; an allocation module, used to perform a connection allocation operation on the service request according to the obtained connection pool information of the communication connection pool when the request validity verification is successful, to obtain a target communication connection channel matching the service request; and a processing module, used to send the service request to the server through the target communication connection channel, triggering the server to parse the service request and execute the corresponding business processing logic to complete the service request.

9. A client request scheduling and communication system based on a communication connection pool, characterized in that, The system includes: a memory storing executable program code; a processor coupled to the memory; the processor calling the executable program code stored in the memory to execute the client request scheduling and communication method based on a communication connection pool as described in any one of claims 1-7.

10. A computer storage medium, characterized in that, The computer storage medium stores computer instructions, which, when invoked, are used to execute the client request scheduling and communication method based on a communication connection pool as described in any one of claims 1-7.