Data request processing method and device, program product and storage medium

Through the collaboration of the pre-scheduler and the post-scheduler, the priority of data requests is calculated and the flow control frames are generated, which solves the problem of resource waste and response delay under high concurrent requests in the banking system, and realizes efficient data request processing.

CN120499124APending Publication Date: 2025-08-15INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510843185.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In the scenario of high concurrent data requests, the existing technology improves processing capabilities by increasing the number of containers, resulting in server overload or idleness, waste of resources, increase response delays, and reduces request processing efficiency.

Method used

The pre-scheduler is used to calculate the initial priority of data requests, and the post-scheduler considers the request type and server load, generates flow control frames for traffic control, dynamically adjusts the data transmission speed, and ensures that high-priority requests are processed first.

Benefits of technology

It improves the system's response efficiency and resource utilization, optimizes the system stability and user experience in high concurrency scenarios, and reduces the processing pressure on clients and servers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120499124A_ABST
    Figure CN120499124A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data request processing method and device, a program product and a storage medium, relates to the field of artificial intelligence and is also applicable to the field of financial science and technology, and the method comprises the following steps: receiving each data request sent by a client; calculating an initial request priority of each data request based on a front scheduler of the server; calculating the total priority of each data request according to the request type of each data request, the initial request priority and a rear scheduler of the server; generating a flow control frame and response data corresponding to each data request based on the total priority of each data request and each data request, and sending the flow control frame to the client; and receiving a response signal sent by the client based on the flow control frame, and if the response signal is a confirmation signal, sending response data to the client, so that the client completes the data request based on the response data. According to the method, the high-concurrency data request can be effectively processed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of artificial intelligence and may also be applicable to the field of financial technology, and in particular, relate to a data request processing method, device, program product, and storage medium. Background Art

[0002] With the acceleration of digital transformation, intelligent data processing models in banking systems, such as intelligent question-and-answer models, are facing an increasing number of concurrent data requests. These requests encompass not only traditional account inquiries and transfers, but also complex financial analysis, risk assessment, intelligent customer service, and other services. Especially during peak hours, banking systems must handle a massive influx of concurrent requests, placing extremely high demands on system response efficiency and service quality.

[0003] Currently, the primary approach to handling concurrent data requests is to increase processing capacity by increasing the number of containers. However, in high-concurrency scenarios, this approach can overload some servers while leaving others idle, resulting in wasted resources. Consequently, when processing massive and complex requests, resource allocation often cannot be adjusted in a timely manner, increasing response latency and reducing request processing efficiency. Summary of the Invention

[0004] The embodiments of the present invention provide a data request processing method, device, program product and storage medium, which can effectively process high-concurrency data requests, improve the response efficiency and service quality of the system, and ensure the stable operation of the system and intelligent data processing model.

[0005] In a first aspect, an embodiment of the present invention provides a data request processing method, comprising:

[0006] Receive each data request sent by the client; and calculate the initial request priority of each data request based on the front-end scheduler of the server;

[0007] Calculating the total priority of each data request according to the request type of each data request, the initial request priority, and the post-scheduler of the server;

[0008] generating a flow control frame and response data corresponding to each data request based on the total priority of each data request and each data request, and sending the flow control frame to the client;

[0009] A response signal sent by the client based on the flow control frame is received, and if the response signal is a confirmation signal, the response data is sent to the client, so that the client completes the data request based on the response data.

[0010] In a second aspect, an embodiment of the present invention provides a data request processing device, the device comprising:

[0011] A first scheduling module is configured to receive each data request sent by the client; and calculate the initial request priority of each data request based on the front-end scheduler of the server;

[0012] A second scheduling module, configured to calculate the total priority of each data request according to the request type of each data request, the initial request priority, and the post-scheduler of the server;

[0013] a data sending module, configured to generate a flow control frame and response data corresponding to each data request based on the total priority of each data request and each data request, and send the flow control frame to the client;

[0014] The request response module is used to receive a response signal sent by the client based on the flow control frame, and if the response signal is a confirmation signal, send the response data to the client, so that the client completes the data request based on the response data.

[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, the data request processing method as described in any one of the embodiments of the present invention is implemented.

[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data request processing method as described in any one of the embodiments of the present invention.

[0017] In a fifth aspect, an embodiment of the present invention provides a computer program product, comprising a computer program, which, when executed by a processor, implements the data request processing method as described in any one of the embodiments of the present invention.

[0018] In an embodiment of the present invention, each data request sent by the client is received; and the initial request priority of each data request is calculated based on the front-scheduler of the server; the total priority of each data request is calculated according to the request type, initial request priority and the back-scheduler of the server; the flow control frame and response data corresponding to each data request are generated based on the total priority of each data request and each data request, and the flow control frame is sent to the client; the response signal sent by the client based on the flow control frame is received, and if the response signal is a confirmation signal, the response data is sent to the client, so that the client completes the data request based on the response data. The method of the embodiment of the present invention ensures that high-priority requests can be processed first through the collaborative work of the front-scheduler and the back-scheduler, thereby improving the overall response efficiency of the system. By generating flow control frames and performing flow control transmission according to the response signal of the client, the system can dynamically adjust the speed of data transmission, effectively reducing the processing pressure of the client and the server. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0020] Figure 1 A first flow chart of a data request processing method provided by an embodiment of the present invention;

[0021] Figure 2 A second flow chart of a data request processing method provided by an embodiment of the present invention;

[0022] Figure 3 A schematic diagram of segmented transmission provided by an embodiment of the present invention;

[0023] Figure 4 A schematic diagram of a flow control transmission process provided by an embodiment of the invention;

[0024] Figure 5 A schematic structural diagram of a data request processing device provided by an embodiment of the present invention;

[0025] Figure 6 A schematic structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.

[0027] Figure 1 This is the first flow chart of a data request processing method provided by an embodiment of the present invention. The method of the embodiment of the present invention can effectively handle high-concurrency data requests, improve the response efficiency and service quality of the system, and ensure the stable operation of the system and the intelligent data processing model. The information collected in the method of the embodiment of the present invention is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data comply with the relevant laws, regulations and standards of relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse. The method can be executed by a data request processing device provided by an embodiment of the present invention, and the device can be implemented in software and / or hardware. The following embodiments will be described by taking the device integrated in an electronic device as an example. The electronic device can be a server or computer device that carries a banking system, etc., with reference to Figure 1 , the method may specifically include the following steps:

[0028] Step 101: Receive each data request sent by the client; and calculate the initial request priority of each data request based on the front-end scheduler of the server.

[0029] Among them, the data request is a request sent by the client (such as a user device or application, etc.) to the server (such as a banking system). The data request is used to instruct the server to perform certain operations or provide certain information, such as a request to query certain data. The front-end scheduler is a component on the server side, responsible for receiving data requests sent by the client, and performing preliminary processing and scheduling on these requests. The data request is transmitted to the front-end scheduler in the form of a request frame. The front-end scheduler can parse the request frame to obtain the initial request priority of each data request. The request frame includes a request identifier, a client identifier, a request priority, a request frame size identifier, a request timestamp, the actual data requested, and the number of retries. In this solution, optionally, the initial request priority of each data request is calculated based on the front-end scheduler on the server side, including the following steps A1-A2:

[0030] Step A1: parse each data request through the front-end scheduler to obtain various key information of each data request; normalize the various key information of each data request to obtain various calculation parameters of each data request.

[0031] Among them, each key information is information used to calculate the priority of the initial request, and each key information includes request identifier, client identifier, request content type (such as query data or upload data, etc.), request timestamp, user level (used to indicate the importance of different users), number of retries and request size, etc. Calculation parameters include user level value, request type value and number of retries value. Normalization is to convert data of different ranges into a unified range for comparison and calculation. Specifically, when the client sends a large number of concurrent data requests to the server, the front-end scheduler can first parse each data request to obtain each key information of each data request. The key information is normalized, and the calculation parameters are obtained based on the normalized key information.

[0032] For example, the following formula is used to normalize each key information:

[0033] Among them, N represents the normalized key information, V is the data (key information) value with unified dimension, V max and V min It is the maximum and minimum value range of the (key information) value.

[0034] For example, use represents the normalized user level, i represents the i-th request, f2(U i ) represents the user level value in the calculation parameter, and f2(U i ): Where β is a predetermined adjustment coefficient used to control the impact of user level on the initial priority.

[0035] For example, Indicates the normalized request type, and determines the request type value f3(T i )for: Here, γ is a predetermined adjustment coefficient used to control the impact of request type on priority.

[0036] For example, the number of retries in the calculation parameter is determined to be f4 (R i ,P i )for:

[0037] Where θ is a predetermined adjustment coefficient, R max and P max is the maximum value of the number of retries and the penalty coefficient.

[0038] Step A2: Obtaining the initial request priority of each data request based on various calculation parameters of each data request and a preset priority calculation formula.

[0039] Among them, the priority calculation method is used to calculate the initial request priority. At this time, the service node that is most suitable for executing each data request has not yet been determined. Therefore, the influence of the service node load is not considered in the initial request priority. In this solution, the server includes a load balancer, and the front scheduler of the load balancer includes a clock component. The clock component is used to determine when to calculate the initial request priority. For example, a front scheduling period is set in the front scheduler. and pre-scheduled time slots When the current scheduler time runs for the nth current scheduling cycle When , the pre-request scheduling is started (that is, the data request is processed), and the scheduling duration is That is, the pre-scheduling time interval is The pre-scheduler can calculate the initial priority of each data request in the pre-scheduling time interval, where The size of depends on the longest response delay expected by the client. Further, the initial priority of the i-th data request is calculated as for: Calculate After the initial priorities of all data requests in the scheduling time slot are determined, each data request is stored in a pre-established buffer queue in the server according to the initial priority of each data request, so that each data request can be processed according to the buffer queue later.

[0040] By normalizing key information such as user level, request type, and number of retries, the initial request priority can be accurately obtained, ensuring that the request can enter the buffer queue in time for processing, reducing the waiting time for data requests and improving the system's response speed.

[0041] Step 102: Calculate the total priority of each data request based on the request type, initial request priority, and the post-scheduler of the server.

[0042] Among them, the request type includes a non-full-duplex communication request type or a full-duplex communication request type. The non-full-duplex communication request type indicates that the data transmission between the client and the server is unidirectional, that is, data can only be transmitted in one direction at a time. The full-duplex communication request type indicates that the data transmission between the client and the server is bidirectional, that is, the client and the server can send and receive data at the same time. The total priority is the priority of factors affecting the load of the service node that executes the data request. Specifically, the server includes an application service node cluster and various business function service nodes, and the application service node cluster is used to process data requests of the full-duplex communication request type. Each business function service node is used to process data requests of the non-full-duplex communication request type. The characteristic of the full-duplex communication request is that data can be transmitted between the client and the server at the same time.

[0043] Specifically, full-duplex communication requests typically have high real-time requirements, such as real-time chat requests. After storing each data request in a buffer queue, the post-scheduler can obtain the current load status of the application service node cluster for all full-duplex communication requests in the buffer queue, including CPU and memory usage. Based on the initial priority of the request and the load status of each service node, the post-scheduler adjusts the initial priority of the full-duplex communication request to obtain the total priority of the full-duplex communication request. For all non-full-duplex communication requests, the post-scheduler uses a classification distributor to distribute the non-full-duplex communication requests to the corresponding business function service node based on the requested service of the data request. The post-scheduler obtains the current load status of each business function service node and, based on the load status of the business function service node, adjusts the initial priority of the non-full-duplex communication request in combination with the initial priority of the request and the load status of the business function service node to obtain the total priority of the non-full-duplex communication request.

[0044] Step 103: Generate a flow control frame and response data corresponding to each data request based on the total priority of each data request and each data request, and send the flow control frame to the client.

[0045] Among them, the flow control frame is a special communication frame used to control the flow between the client and the server. The flow control frame is used to manage the rhythm of data transmission to ensure that data can be transmitted efficiently and stably between the client and the server, while avoiding resource overload or data loss caused by too fast data transmission. The flow control frame includes a response identifier, a request identifier, a client identifier, a flow control status, a data block size, an error code, and a check bit. The flow control status is used to indicate the load status of the service node executing the data request; the data block size is used to indicate the number of data segments of the response data that can be transmitted by the service node executing the data request. The response data consists of multiple response frames, and the response frame includes a response identifier, a request identifier, a client identifier, a segment response sequence number, a total number of segments, segment response data, and a check bit.

[0046] Specifically, the post-scheduler allocates the data request to the appropriate service node (business function service node or application service node) according to the total priority of the data request. The service node processes the data request according to its own current load status and the total priority of the data request, and obtains the flow control frame and response data of the data request.

[0047] Exemplarily, after the service node determines the data request that needs to be executed, it determines the flow control status of the flow control frame based on the load status and service resources of the service node. The flow control status is indicated by the flowStatus (field name), Continue indicates Continue, and blockSize indicates the data block size. If the load status of the service node is good, the flowStatus field is set to Continue and the blockSize (such as 3 segments) is specified. During data transmission, the service node can dynamically adjust the flowStatus and blockSize according to the real-time load conditions. If the service node load is high, the flowStatus is set to Wait or Stop.

[0048] In this solution, the server can process the response data in segments to obtain multiple response frames corresponding to the response data, and generate a frame sending status flag (token) corresponding to the response frame. The token is used to identify the sending status of the current response frame. The token in this solution is used to manage and control the streaming control mechanism of the intelligent data processing model (such as the intelligent question-and-answer model, etc.). For example, the token can be a context token generated by the streaming response mechanism of the intelligent question-and-answer model. Streaming control is to output the tokens generated by the model one by one or in batches in real time during the reasoning process of the intelligent data processing model, rather than waiting for all tokens to be generated before returning the results uniformly. For example, in this solution, the server that needs streaming response data can use tokens as the logical connection between responses of different orders, and use tokens to maintain logical continuity and consistency between multiple responses to avoid logical loopholes.

[0049] Step 104: Receive a response signal sent by the client based on the flow control frame. If the response signal is a confirmation signal, send response data to the client, so that the client completes the data request based on the response data.

[0050] The response signal is a signal sent by the client to the service node after receiving a flow control frame, confirming whether to accept the response data. Specifically, after receiving the flow control frame sent by the service node, the client can analyze the flow control frame and determine how to receive the response data based on the flow control status and data block size in the flow control frame.

[0051] Exemplarily, the client decides whether to continue receiving data based on flowStatus: If flowStatus is Continue, the client is ready to receive blockSize segmented responses. The service node gradually generates and sends response frames based on the blockSize in the flow control frame, and the client can complete the data request based on the received response frames. After sending blockSize response frames, the service node sends a new flow control frame and determines the new flowStatus and blockSize. If flowStatus is Wait or Stop, the client suspends receiving data and waits for further instructions from the service node. If the flow control frame includes an error code (errorCode) and errorCode is not 0, the client takes corresponding measures based on the error type, such as retrying or terminating the request.

[0052] Through flow control frames, the server can dynamically control the speed and order of data transmission, ensuring stable system operation in high-concurrency scenarios. The client receives response data according to the flow control frame's instructions and completes the entire request processing after receiving all segmented responses. This not only improves the system's response efficiency, but also optimizes resource utilization and enhances the user experience.

[0053] The technical solution of this embodiment receives each data request sent by the client; and calculates the initial request priority of each data request based on the front-scheduler of the server; calculates the total priority of each data request according to the request type, initial request priority and the back-scheduler of the server; generates the flow control frame and response data corresponding to each data request based on the total priority of each data request and each data request, and sends the flow control frame to the client; receives the response signal sent by the client based on the flow control frame, and if the response signal is a confirmation signal, sends the response data to the client, so that the client completes the data request based on the response data. The technical solution of this embodiment can effectively handle high-concurrency data requests through the collaborative work of the front-scheduler and the back-scheduler, ensuring that high-priority requests can be processed first, thereby improving the overall response efficiency of the system. By generating flow control frames and performing flow control transmission according to the response signal of the client, the system can dynamically adjust the speed of data transmission, effectively reducing the processing pressure of the client and the server.

[0054] Figure 2 This is a second flow chart of a data request processing method provided by an embodiment of the present invention. This embodiment is a refinement based on the above embodiment. The specific method can be as follows Figure 2 As shown, the method may include the following steps:

[0055] Step 201: Receive each data request sent by the client; and calculate the initial request priority of each data request based on the front-end scheduler of the server.

[0056] Step 202: Classify each data request based on the request type to obtain data requests of each type.

[0057] Each data request type includes either a non-full-duplex communication request or a full-duplex communication request. A non-full-duplex communication request type indicates that data transmission between the client and server is unidirectional, meaning that data can only be transmitted in one direction at a time. A full-duplex communication request type indicates that data transmission between the client and server is bidirectional, meaning that both the client and server can send and receive data simultaneously. After receiving each data request, the server classifies it according to its request type, resulting in non-full-duplex communication requests and full-duplex communication requests.

[0058] Step 203: All full-duplex communication requests are distributed to the post-dispatcher through the server-side load balancer, and the service resources of the application service node cluster are obtained through the post-dispatcher.

[0059] Among them, the load balancer is used to distribute data requests to the post-scheduler in a reasonable manner. The full-duplex communication request type indicates that the data transmission between the client and the server is bidirectional, that is, the client and the server can send and receive data at the same time. Therefore, in this solution, after the load balancer distributes all full-duplex communication requests to the post-scheduler, the client establishes full-duplex communication with the system's proxy server. The post-scheduler and the proxy server run independently of the application service node cluster. The post-scheduler is set with a post-scheduling cycle and post-scheduled time slots When the post-scheduler runs out of m When, in the post-scheduling time interval The service resources of the application service node cluster are obtained in order to calculate the total priority of each full-duplex communication request based on the service resources.

[0060] Step 204 : Calculate the total priority of each full-duplex communication request according to a preset load priority calculation method, the initial request priority of each full-duplex communication request, and the service resources.

[0061] Specifically, the initial request priority for data requests does not consider the impact of service node load. After obtaining the service resources of the application service node cluster, the post-scheduler can assign appropriate application service nodes to each full-duplex communication request based on the principle of low load first. At this point, the load weight of each request is calculated based on the impact of application service node load and accumulated to calculate the total priority.

[0062] For example, the initial priority of the i-th full-duplex communication data request is The total priority of the i-th full-duplex communication request is: Among them, f1(L i ) represents the nonlinear weight function of the consumption node load, and B represents the pre-determined load weight. α is the adjustment factor used to control the impact of load on the overall priority. Indicates the normalized value of the CPU indicator of the application service node. Represents the normalized value of the memory indicator, where ω cpu +ω mem =1,ω cpu represents the CPU indicator weight, ω mem Indicates the memory indicator weight, and its value depends on the actual business needs. For example, for CPU-intensive intelligent data processing model applications, cpu >ω mem .

[0063] Step 205: The classification distributor of the server distributes each non-full-duplex communication request to a corresponding business function service node based on the service type of each non-full-duplex communication request.

[0064] The classification distributor is part of the load balancer and is used to distribute non-full-duplex communication requests to different business function service nodes. Business function service nodes are responsible for processing non-full-duplex communication requests of specific service types. Specifically, after receiving each non-full-duplex communication request and each full-duplex communication request, the classification distributor distributes each full-duplex communication request to the corresponding business function service node based on the specific service type of the non-full-duplex communication request.

[0065] Step 206: Obtain the load status of each business function service node through the post-scheduler; calculate the total priority of each non-full-duplex communication request corresponding to each business function service node according to the load priority calculation method and the load status.

[0066] Specifically, the post-scheduler is provided with a post-scheduling period and post-scheduled time slots When the internal operation scheduler of the business function service node has run the mth When the post-scheduler is started, the post-scheduler is in the post-scheduling time interval The load status of each business function service node is obtained in order to calculate the total priority of each non-full-duplex communication request based on the load status. Furthermore, the total priority of each non-full-duplex communication request corresponding to each business function service node is calculated using the same load priority calculation method as that used to calculate the total priority of each full-duplex communication request: Among them, f1(L i ) represents the nonlinear weight function of the consumption node load, and B represents the pre-determined load weight. α is the adjustment factor used to control the impact of load on the overall priority. Indicates the normalized value of the CPU indicator of the business function service node, Represents the normalized value of the memory indicator, where ω cpu +ω mem =1,ω cpu represents the CPU indicator weight, ω mem Indicates the memory indicator weight.

[0067] Step 207: Generate a flow control frame and response data corresponding to each data request based on the total priority of each data request and each data request.

[0068] Among them, the flow control frame is a special communication frame used to control the flow between the client and the server. The flow control frame is used to manage the rhythm of data transmission, ensuring that data can be transmitted efficiently and stably between the client and the server, while avoiding resource overload or data loss caused by too fast data transmission. Specifically, whether it is flow control between the server and the client under non-full-duplex communication, or flow control between the proxy server and the client under full-duplex communication, flow control transmission is required in the final response stage. For each non-full-duplex communication request, after determining the total priority of each non-full-duplex communication request, the intelligent data processing model inside the business function service node begins to process the non-full-duplex communication request according to the total priority, and obtains the response data of the non-full-duplex communication request.

[0069] For each full-duplex communication request, after determining its overall priority, the execution service node for each full-duplex communication request is determined based on the service resources of the application server cluster. The execution service node generates the flow control frame and response data for each full-duplex communication request. Based on the overall priority of the full-duplex communication request, the appropriate service node in the application server cluster is selected to handle the data request, ensuring that high-priority requests are preferentially assigned to service nodes with sufficient resources, thereby optimizing resource utilization efficiency for the entire system.

[0070] Step 208: Send the flow control frame to the client, receive a response signal sent by the client based on the flow control frame, and if the response signal is a confirmation signal, send response data to the client, so that the client completes the data request based on the response data.

[0071] After obtaining the response data and flow control frame, the response data can be sent to the client in a segmented manner. In this solution, optionally, sending the response data to the client includes: segmenting the response data according to the load status of the service node that executes the data request, obtaining each response frame of the response data, and storing the response frames in a response frame queue; sending each response frame to the client based on the response frame queue; when there are unsent response frames in the response frame queue, selecting the first response frame from the response frame queue as the current response frame, sending the current response frame to the client, and generating a current frame sending status flag based on the sending status of the current response frame, determining the next response frame according to the current frame sending status flag, using the next response frame as the current response frame, and repeating the step of sending the current response frame to the client until there are no unsent response frames in the response frame queue.

[0072] The response frame queue is a first-in, first-out queue used to store and manage response frames. Specifically, the response data may be very large, and sending it all at once may put pressure on the resources of the client and server. Therefore, the response data can be divided into multiple smaller segments (response frames) for transmission. After obtaining the response data, the response data is segmented according to the load status of the service node executing the data request to obtain individual response frames of the response data. The response frame may include the sequence number of the segmented response, the total number of segments of the segmented response, the actual response data, and the frame transmission status flag. The generated response frames are stored in the response frame queue for sequential transmission. After the response frames are stored in the response frame queue, the first response frame is selected from the response frame queue in queue order as the current response frame, and the current response frame is sent to the client. Based on the transmission status of the current response frame, a current frame transmission status flag is generated and stored in the frame transmission status flag. The next response frame is determined based on the current frame transmission status flag, and the next response frame is used as the current response frame. The step of sending the current response frame to the client is repeated until there are no unsent response frames in the response frame queue.

[0073] For example, Figure 3 Schematic diagram of segmented transmission provided by an embodiment of the present invention. Figure 3 As shown in the figure, the client sends a request frame to the server, and the server sends a flow control frame to the client according to the request frame. The server schedules the response signal of the client to the flow control frame and sends a response frame to the client ( Figure 3In the two response frames in the first flow control frame), assuming that the client is informed in the first flow control frame that two response frames need to be sent, after sending two response frames to the client, the next flow control frame will continue to be sent until the data request is processed.

[0074] In this solution, for full-duplex communication requests, the post-scheduler assigns the full-duplex communication request to the application service node. After receiving the response frame, it generates a frame transmission status token for each response frame. This token is used in subsequent inference. The token identifies the request status, allowing the server to determine when to proceed with the next segment. Therefore, the generated token can be resent to the application service node cluster for continued inference. If further transmission is required, the application service node can proceed with processing the next segment and generate a new response frame. The generated response frame is stored in a distributed cache queue (the response frame queue). Furthermore, the proxy server, which has established bidirectional communication with the client, pulls the corresponding response frame from the response frame queue and proactively pushes it to the client. After receiving the response frame, the client sends a feedback signal to the server. If the feedback signal is an acknowledgment, the server continues to send the next response frame. If the client does not send an acknowledgment or sends a pause signal, the server pauses sending response frames and awaits further instructions. Once all response frames have been generated and sent, and the client has received all response frames, the entire data request is processed.

[0075] For non-full-duplex communication requests, after receiving the response data, the generated response data is similarly encapsulated into response frames, and a token is generated for each response frame. The response frames are sequentially stored in a response frame queue, and the next response inference is generated based on the token. The business function service node determines whether to continue processing the next response frame based on the token status. The business function service node sends response frames to the client incrementally using a streaming response method. This allows the business function service node to send data incrementally during processing, without having to wait until all data is processed before sending. The business function service node sequentially selects response frames from the response frame queue and sends them to the client. After receiving the response frame, the client sends a feedback signal to the server. If the feedback signal is an acknowledgment, the server continues to send the next response frame. If the client does not send an acknowledgment or sends a pause signal, the server pauses sending response frames and waits for further instructions. Once all response frames have been generated and sent, and the client has received all response frames, the entire data request is processed.

[0076] For example, Figure 4 The following is a schematic diagram of the flow control transmission process provided by the embodiment of the invention. Figure 4As shown in Figure 1, the server initializes the pre-scheduling period, pre-scheduling time slot, post-scheduling period, and post-scheduling time slot. The server receives a large number of concurrent data requests from clients. When the pre-scheduling timer runs for the nth pre-scheduling period, the pre-scheduling timer calculates the initial request priority for each data request within the pre-scheduling time interval. Each data request is stored in a pre-established buffer queue on the server.

[0077] For all full-duplex communication requests, the load balancer distributes all full-duplex communication requests to the post-scheduler. At the same time, the client establishes full-duplex communication with the system's proxy server. When the post-scheduler runs for the mth post-scheduling cycle, it starts the post-scheduler. Within the post-scheduling time interval, the post-scheduler assigns application service nodes to data requests based on the low-load priority principle and calculates the total priority of the data requests. The data requests are distributed and processed according to the assigned application service nodes to obtain response frames and tokens. The token re-enters the application service node cluster to generate the next response frame. The response frame enters the distributed cache queue. The proxy server pulls the corresponding response frame from the response frame queue and completes the flow control transmission with the client.

[0078] For all non-full-duplex communication requests, the classification distributor distributes the data requests to different business function service nodes. Each business function service node runs the scheduler. When the scheduler has run for the mth post-scheduling cycle, the post-scheduler is started. The post-scheduler calculates the total priority of the data request based on the load during the post-scheduling time interval. The business function service node processes the data request, obtains a response frame and token, and stores the response frame in the response frame queue. The response frames are gradually sent to the client via a streaming response method, completing the flow control transmission between the business function service node and the client.

[0079] Through segmented responses and dynamic flow control state management, the server can dynamically adjust data transmission status based on real-time load, effectively reducing processing pressure on both the client and server. Furthermore, the flow control frame design takes into account the adaptability of embedded IoT devices, ensuring cross-platform compatibility and providing flexibility for the deployment of intelligent data processing models in diverse application scenarios.

[0080] In the technical solution of this embodiment, each data request sent by a client is received; an initial request priority for each data request is calculated based on a server-side front-end scheduler. Each data request is classified based on the request type to obtain data requests of different types. A server-side load balancer distributes all full-duplex communication requests to a back-end scheduler, which then obtains service resources from the application service node cluster. The total priority of each full-duplex communication request is calculated based on a pre-defined load priority calculation method and service resources. A classification distributor on the server distributes each non-full-duplex communication request to the corresponding business function service node based on the service type of each non-full-duplex communication request. The back-end scheduler obtains the load status of each business function service node; and the total priority of each non-full-duplex communication request corresponding to each business function service node is calculated based on the load priority calculation method and load status. Based on the total priority of each data request and each data request, a flow control frame and response data corresponding to each data request are generated, and the flow control frame is sent to the client. A response signal sent by the client based on the flow control frame is received. If the response signal is an acknowledgment signal, the response data is sent to the client, allowing the client to complete the data request based on the response data. In the technical solution of this embodiment, the front-end scheduler performs preliminary sorting based on the initial priority of the requests, and the back-end scheduler further adjusts the priority based on the real-time load of the server. The collaborative operation of the front-end scheduler and the back-end scheduler ensures that high-priority requests are processed first, thereby improving the overall response efficiency of the system. The back-end scheduler dynamically adjusts the priority of requests based on the server load, ensuring that when resources are limited, high-priority requests are preferentially allocated to server nodes with lower loads, optimizing resource allocation and improving the system's response speed. The system divides response data into multiple segments for transmission, avoiding the pressure on the server and client caused by transmitting large amounts of data at once. This not only reduces the server load but also improves the stability of data transmission. By generating flow control frames and performing flow control transmission based on the client's response signal, the data transmission speed can be dynamically adjusted to avoid network congestion and timeouts, significantly enhancing system stability, especially under unstable network conditions. Through distributed cache queues and proxy servers, not only the system's response speed is improved, but also horizontal scalability is supported, capable of handling high-concurrency requests, and optimizing flow control transmission efficiency under various communication methods.

[0081] Figure 5 This is a schematic diagram of the structure of a data request processing device provided by an embodiment of the present invention, which is suitable for executing the data request processing method provided by an embodiment of the present invention. Figure 5 As shown, the device may specifically include:

[0082] The first scheduling module 501 is configured to receive data requests sent by the client and calculate the initial request priority of each data request based on the front-end scheduler of the server.

[0083] A second scheduling module 502 is configured to calculate the total priority of each data request according to the request type of each data request, the initial request priority, and the post-scheduler of the server;

[0084] A data sending module 503 is configured to generate a flow control frame and response data corresponding to each data request based on the total priority of each data request and each data request, and send the flow control frame to the client;

[0085] The request response module 504 is configured to receive a response signal sent by the client based on the flow control frame, and if the response signal is a confirmation signal, send the response data to the client, so that the client completes the data request based on the response data.

[0086] Optionally, the first scheduling module 501 is specifically configured to: parse each data request through the front scheduler to obtain key information of each data request;

[0087] Normalizing the key information of each data request to obtain calculation parameters of each data request; wherein the calculation parameters include a user level value, a request type value, and a retry count value;

[0088] The initial request priority of each data request is obtained based on the calculation parameters of each data request and a preset priority calculation formula.

[0089] Optionally, the second scheduling module 502 is specifically configured to: classify the data requests based on the request type to obtain data requests of various types; wherein the data requests of various types include non-full-duplex communication requests or full-duplex communication requests;

[0090] Distribute all full-duplex communication requests to the post-dispatcher through the server-side load balancer, and obtain service resources of the application service node cluster through the post-dispatcher;

[0091] The total priority of each full-duplex communication request is calculated according to a preset load priority calculation method, the initial request priority of each full-duplex communication request and the service resource.

[0092] Optionally, the second scheduling module 502 is further configured to: distribute each non-full-duplex communication request to a corresponding business function service node based on the service type of each non-full-duplex communication request through the classification distributor of the server;

[0093] Obtaining the load status of each business function service node through the post-scheduler;

[0094] The total priority of each non-full-duplex communication request corresponding to each business function service node is calculated according to the load priority calculation method, the initial request priority of each non-full-duplex communication request and the load status.

[0095] Optionally, the data sending module 503 is specifically configured to: determine, according to the total priority of each full-duplex communication request, and in turn according to the service resources of the application server cluster, an execution service node for each full-duplex communication request;

[0096] The flow control frame and response data of each full-duplex communication request are generated by the execution service node of each full-duplex communication request.

[0097] Optionally, the flow control frame includes a flow control status and a data block size; the flow control status is used to indicate the load status of the service node executing the data request; the data block size is used to indicate the number of data segments of the response data that can be transmitted by the service node executing the data request.

[0098] Optionally, the request response module 504 is specifically configured to: segment the response data according to the load status of the service node executing the data request, obtain individual response frames of the response data, and store the response frames in a response frame queue;

[0099] Sending each response frame to the client based on the response frame queue;

[0100] When there are unsent response frames in the response frame queue, the first response frame is selected from the response frame queue as the current response frame, the current response frame is sent to the client, and a current frame sending status flag is generated based on the sending status of the current response frame. The next response frame is determined according to the current frame sending status flag, and the next response frame is used as the current response frame. The step of sending the current response frame to the client is repeated until there are no unsent response frames in the response frame queue.

[0101] The data request processing device provided in the embodiment of the present invention can execute the data request processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For the contents not described in detail in this embodiment, reference can be made to the description of any method embodiment of the present invention.

[0102] An embodiment of the present invention also provides a computer program product.

[0103] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer program products, which can include one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0104] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, referring to Figure 6 , Figure 6 The electronic device 12 shown is only an example and should not limit the functions and scope of use of the embodiments of the present application. Figure 6 As shown, electronic device 12 is implemented as a general-purpose computing device. Components of electronic device 12 may include, but are not limited to, one or more processors or processing units 16, system memory 28, and a bus 18 that connects various system components (including system memory 28 and processing unit 16).

[0105] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0106] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0107] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be configured to read and write non-removable, non-volatile magnetic media ( Figure 6 Not shown, often called a "hard drive"). Although Figure 6 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the various embodiments of the present application.

[0108] A program / utility 40 having a set (at least one) of program modules 46 may be stored, for example, in memory 28. Such program modules 46 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 46 generally implement the functions and / or methods of the embodiments described herein.

[0109] The electronic device 12 may also communicate with one or more external devices 14 (e.g., a keyboard, a pointing device, a display 24, etc.), one or more devices that enable a user to interact with the electronic device 12, and / or any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed through an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 20. As shown, the network adapter 20 communicates with the other modules of the electronic device 12 via the bus 18. It should be understood that although Figure 6 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RA identification systems, tape drives, and data backup storage systems.

[0110] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, such as implementing a data request processing method provided by an embodiment of the present invention: receiving various data requests sent by the client; and calculating the initial request priority of each data request based on the front-end scheduler of the server; calculating the total priority of each data request according to the request type of each data request, the initial request priority and the back-end scheduler of the server; generating a flow control frame and response data corresponding to each data request based on the total priority of each data request and each data request, and sending the flow control frame to the client; receiving a response signal sent by the client based on the flow control frame, and if the response signal is a confirmation signal, sending the response data to the client, so that the client completes the data request based on the response data.

[0111] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, a data request processing method as provided in all embodiments of the present invention is implemented: receiving each data request sent by a client; and calculating the initial request priority of each data request based on the front-end scheduler of the server; calculating the total priority of each data request based on the request type of each data request, the initial request priority, and the back-end scheduler of the server; generating a flow control frame and response data corresponding to each data request based on the total priority of each data request and each data request, and sending the flow control frame to the client; receiving a response signal sent by the client based on the flow control frame, and if the response signal is an acknowledgment signal, sending the response data to the client, so that the client completes the data request based on the response data. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electronic device, device, or component of electrical, magnetic, optical, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction-executing electronic device, apparatus, or device.

[0112] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction-executing electronic device, apparatus, or device.

[0113] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0114] Computer program code for performing the operations of the present invention can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0115] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will appreciate that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments, and substitutions are possible for those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the scope of the present invention. The scope of the present invention is determined by the scope of the appended claims.

Claims

1. A data request processing method, characterized in that: The method comprises: Receive each data request sent by the client; and calculate the initial request priority of each data request based on the front-end scheduler of the server; Calculating the total priority of each data request according to the request type of each data request, the initial request priority, and the post-scheduler of the server; generating a flow control frame and response data corresponding to each data request based on the total priority of each data request and each data request, and sending the flow control frame to the client; A response signal sent by the client based on the flow control frame is received, and if the response signal is a confirmation signal, the response data is sent to the client, so that the client completes the data request based on the response data.

2. The method according to claim 1, characterized in that The server-side front-end scheduler calculates the initial request priority of each data request, including: Parsing each of the data requests through the front-end scheduler to obtain key information of each of the data requests; Normalizing the key information of each data request to obtain calculation parameters of each data request; wherein the calculation parameters include a user level value, a request type value, and a retry count value; The initial request priority of each data request is obtained based on the calculation parameters of each data request and a preset priority calculation formula.

3. The method according to claim 1, characterized in that Calculating the total priority of each data request according to the request type of each data request, the initial request priority, and the post-scheduler of the server, including: Classifying the data requests based on the request type to obtain data requests of various types; wherein the data requests of various types include non-full-duplex communication requests or full-duplex communication requests; Distribute all full-duplex communication requests to the post-dispatcher through the server-side load balancer, and obtain service resources of the application service node cluster through the post-dispatcher; The total priority of each full-duplex communication request is calculated according to a preset load priority calculation method, the initial request priority of each full-duplex communication request and the service resource.

4. The method according to claim 3, characterized in that The method further comprises: Distributing each non-full-duplex communication request to a corresponding business function service node based on the business type of each non-full-duplex communication request through the classification distributor of the server; Obtaining the load status of each business function service node through the post-scheduler; The total priority of each non-full-duplex communication request corresponding to each business function service node is calculated according to the load priority calculation method, the initial request priority of each non-full-duplex communication request and the load status.

5. The method according to claim 3, characterized in that Generate a flow control frame and response data corresponding to each data request based on the total priority of each data request and each data request; including: Determining, according to the total priority of each full-duplex communication request, an execution service node for each full-duplex communication request based on the service resources of the application server cluster; The flow control frame and response data of each full-duplex communication request are generated by the execution service node of each full-duplex communication request.

6. The method according to claim 1, characterized in that The flow control frame includes a flow control state and a data block size; the flow control state is used to indicate the load state of the service node executing the data request; the data block size is used to indicate the number of data segments of the response data that can be transmitted by the service node executing the data request.

7. The method according to claim 1, characterized in that Sending the response data to the client includes: Segmenting the response data according to a load state of a service node executing the data request to obtain individual response frames of the response data, and storing the response frames in a response frame queue; Sending each response frame to the client based on the response frame queue; When there are unsent response frames in the response frame queue, the first response frame is selected from the response frame queue as the current response frame, the current response frame is sent to the client, and a current frame sending status flag is generated based on the sending status of the current response frame. The next response frame is determined according to the current frame sending status flag, and the next response frame is used as the current response frame. The step of sending the current response frame to the client is repeated until there are no unsent response frames in the response frame queue.

8. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements a data request processing method according to any one of claims 1 to 7.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the data request processing method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the data request processing method according to any one of claims 1 to 7 is implemented.