A multi-threaded data processing service method and system based on port multiplexing

By building a communication client profile database and optimizing algorithm to generate port communication strategies, the problems of low single thread efficiency and multi-thread memory overflow in UDP network communication are solved, and efficient communication between multi-communication clients and servers are achieved.

CN120263741BActive Publication Date: 2025-08-05GHOSTCLOUD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510733301.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-08-05
Estimated Expiration
2045-06-04

AI Technical Summary

Technical Problem

In UDP network communication, single threading is inefficient in handling multiple clients. Multi-threading binding multiple ports will cause memory overflow, and the multi-port method is not commonly used in engineering applications. How to achieve efficient communication between multi-communication clients and servers.

Method used

By building a communication client portrait database, classifying requirements based on the communication feature set, combining the resource information of the communication server, using an optimization algorithm to generate port communication strategies, flexibly switch single-port single-threaded and multi-threaded communication methods, and optimizing port thread communication methods and client objects.

Benefits of technology

It improves the communication efficiency and quality under large-scale group communication, solves the problems of low single-thread efficiency and multi-thread memory overflow, and realizes efficient communication between multi-communication clients and servers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120263741B_ABST
    Figure CN120263741B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of network communication technology, and discloses a multi-threaded data processing service method and system based on port multiplexing. By building a communication client portrait database, the communication requirements of each communication client in each unit communication cycle within a target communication period are classified, and the thread stack space resources to be allocated and the communication data processing resources of the communication server are considered. A constraint condition set is constructed based on the total thread stack space size, the communication data processing speed and the communication quality. With the optimization target determined by the number of server communication switching, the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle are optimized and solved. By integrating resources and requirements, flexible switching and selection of single-port single-thread communication and single-port multi-thread communication are adopted, taking into account both communication quality and communication efficiency, and realizing efficient communication between multiple communication clients and multiple communication servers in large-scale group communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network communications, and in particular to a multi-threaded data processing service method and system based on port multiplexing. Background Art

[0002] In UDP network communication, the data interaction process is generally that the data receiver (server) uses a port as the data receiving port and uses a socket to bind the interface to receive data. The data sender (client) binds its own IP and port through the socket and uses UDP for network communication.

[0003] However, for the UDP usage of the server that needs to interact with multiple clients, the efficiency of a single thread in processing data from multiple clients is relatively low, and there will be a certain time delay; using multiple threads to bind multiple data receiving ports can solve the problem of slow single-thread data receiving rate, but multiple data receiving ports will cause inconvenience to the client. In engineering applications, the multi-port method is rarely used except in special circumstances; using multiple threads to bind a single data receiving port to process data from multiple clients will require independent stack space to be allocated to each thread, which will result in high thread resource overhead in high-concurrency communication scenarios and easily lead to memory overflow problems.

[0004] Therefore, how to achieve efficient communication between multiple communication clients and multiple communication servers in large-scale group communication, adopt the optimal communication access strategy between communication clients and communication servers based on the reasonable selection of the port thread communication method of the communication server, and improve the overall communication efficiency and communication quality is a technical problem that needs to be solved urgently. Summary of the Invention

[0005] The main purpose of the present invention is to provide a multi-threaded data processing service method and system based on port multiplexing, aiming to solve at least one of the above technical problems.

[0006] To achieve the above object, the present invention provides a multi-threaded data processing service method based on port multiplexing, the method comprising the following steps:

[0007] S1: Obtain historical communication records between a communication client and a communication server, and extract communication service association information of each communication client in the historical communication records;

[0008] S2: generating a client profile of each communication client based on the communication service association information, and constructing a communication client profile database; wherein the communication client profile database stores a communication feature set consisting of a plurality of communication features of each communication client;

[0009] S3: Based on the communication feature set of each communication client, classify the communication demand of the communication client within the target communication period to obtain the communication demand category of each communication client in each unit communication cycle within the target communication period;

[0010] S4: Acquire communication resource information of a plurality of communication servers within a target communication period, and generate a port communication strategy for each communication client and each communication server for each unit communication cycle within the target communication period based on the communication resource information and the communication demand category of each communication client;

[0011] S5: extracting the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle in the port communication strategy, and controlling the communication client and the communication server to perform service communication according to the corresponding port thread communication mode during the target communication period.

[0012] Optionally, step S1: obtaining historical communication records between the communication client and the communication server, and extracting communication service association information of each communication client in the historical communication records, specifically includes:

[0013] S11: Acquire historical communication records between the communication client and the communication server; wherein the historical communication records include communication request information and communication time period information for each service type when executing historical communication services between the communication client and the communication server;

[0014] S12: Generate communication service association information of each communication client based on the communication request information and communication time period information of each service type in the historical communication records.

[0015] Optionally, step S2: generating a client profile of each communication client according to the communication service association information and building a communication client profile database, specifically including:

[0016] S21: extracting the service quality parameters of the communication request information of each service type in the communication service association information, and using the service quality parameters to query the delay tolerance threshold corresponding to each service type;

[0017] S22: extracting communication period information of each service type from the communication service association information, and determining the execution period of each service type by using the mapping relationship between the communication period information and the period of each unit communication cycle;

[0018] S23: Based on the delay tolerance threshold and execution cycle period of each service type, a communication feature set of each communication client is generated, and a communication client portrait database is constructed.

[0019] Optionally, step S3: classifying the communication requirements of the communication clients within the target communication period based on the communication feature set of each communication client, and obtaining the communication requirement category of each communication client in each unit communication cycle within the target communication period, specifically includes:

[0020] S31: Based on the communication feature set of each communication client, using a pre-built communication demand prediction model, predict the communication demand of each communication client within the target communication period;

[0021] S32: Classifying the communication requirements of the communication clients within the target communication period according to the communication requirements of each communication client within the target communication period, and obtaining a communication requirement category of each communication client in each unit communication cycle within the target communication period.

[0022] Optionally, based on the communication feature set of each communication client, a pre-built communication demand prediction model is used to predict the communication demand of each communication client during the target communication period, specifically including:

[0023] S311: Build an initial LSTM model architecture consisting of an input layer, a bidirectional LSTM layer, a dropout layer, a unidirectional LSTM layer, and a fully connected layer. Configure key parameters of the initial LSTM model architecture, including the time step, the number of neurons in the LSTM layer, the optimizer type, and the loss function.

[0024] S312: Divide the communication feature set of each communication client into a training set and a validation set, and train the initial LSTM model architecture using the training set and the validation set to obtain a trained communication demand prediction model;

[0025] S313: Predicting the communication demand of each communication client within the target communication period using the communication demand prediction model and the communication feature set extracted from the historical communication records of each communication client.

[0026] Optionally, step S32: classifying the communication requirements of the communication clients within the target communication period according to the communication requirements of each communication client within the target communication period, and obtaining a communication requirement category of each communication client in each unit communication cycle within the target communication period, specifically including:

[0027] S321: extracting the communication requirements of each communication client within the target communication period; wherein the communication requirements include a delay tolerance threshold for each unit communication cycle within the target communication period;

[0028] S322: According to the communication requirement category segment to which the delay tolerance threshold belongs in the preset standard, assign a label corresponding to the communication requirement category segment to which the delay tolerance threshold belongs to each communication client in each unit communication cycle within the target communication time period.

[0029] Optionally, step S4: obtaining communication resource information of several communication servers within the target communication period, and generating a port communication strategy for each communication client and each communication server for each unit communication cycle within the target communication period based on the communication resource information and the communication demand category of each communication client, specifically including:

[0030] S41: Acquire communication resource information of several communication servers within a target communication period; wherein the communication resource information includes the total thread stack space size corresponding to the thread stack space resources to be allocated and the communication data processing speed corresponding to the communication data processing resources;

[0031] S42: Based on the communication resource information of each communication server and the communication requirement category of each communication client, a constraint condition set is constructed based on the total thread stack space size, communication data processing speed, and communication quality. The optimization target is determined based on the number of server communication switching times. An optimization algorithm is used to solve the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle.

[0032] S43: Based on the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle, generate a port communication strategy for each communication client and each communication server in each unit communication cycle within the target communication period.

[0033] Optionally, step S42: based on the communication resource information of each communication server and the communication requirement category of each communication client, a constraint condition set is constructed based on the total thread stack space size, communication data processing speed, and communication quality, and the optimization target is determined based on the number of server communication switching times. An optimization algorithm is used to solve the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle, specifically including:

[0034] S421: considering the communication demand category of each communication client in each unit communication cycle within the target communication period based on the thread stack memory size and communication data processing speed of each communication server;

[0035] S422: The first constraint condition is that the product of the number of communication clients allocated to each communication server divided into a single-port multi-threaded communication mode in each unit communication cycle and the standard thread stack space size is less than the total thread stack space size corresponding to the communication server; the second constraint condition is that each communication server divided into a single-port single-threaded communication mode has at least one unit communication cycle in a target number of consecutive unit communication cycles that satisfies: the sum of the standard data communication volumes of all allocated communication clients is less than the data communication processing volume determined by the product of the communication data processing speed and the unit communication cycle; the third constraint condition is that the proportion of each communication client allocated to the port thread communication mode corresponding to the communication demand category of each unit communication cycle within the target communication period exceeds the preset communication quality threshold proportion; the optimization goal is that the number of times all communication servers switch communication servers within the target communication period is minimized;

[0036] S423: Using an optimization algorithm, optimizing and solving the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle.

[0037] Optionally, step S5: extracting the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle in the port communication strategy, and controlling the communication client and the communication server to perform service communication according to the corresponding port thread communication mode during the target communication period, specifically including:

[0038] S51: extracting the port thread communication mode of each communication server in the port communication strategy and controlling each communication server to select the corresponding port thread communication mode in the target communication period;

[0039] S52: extracting the port communication object of each communication client in each unit communication cycle in the port communication strategy, and controlling the communication client to switch the communication server with which it communicates in the corresponding unit communication cycle to complete the service communication process.

[0040] In addition, in order to achieve the above-mentioned purpose, the present invention also provides a multi-threaded data processing service system based on port multiplexing, comprising:

[0041] An acquisition module is used to acquire historical communication records between a communication client and a communication server, and extract communication service association information of each communication client in the historical communication records;

[0042] A construction module, configured to generate a client portrait of each communication client based on the communication service association information, and construct a communication client portrait database; wherein the communication client portrait database stores a communication feature set consisting of a plurality of communication features of each communication client;

[0043] a classification module, configured to classify the communication demands of the communication clients within the target communication period based on the communication feature set of each communication client, and obtain the communication demand category of each communication client in each unit communication cycle within the target communication period;

[0044] a generation module configured to obtain communication resource information of a plurality of communication servers within a target communication period, and generate a port communication strategy for each communication client and each communication server for each unit communication cycle within the target communication period based on the communication resource information and the communication demand category of each communication client;

[0045] The communication module is used to extract the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle in the port communication strategy, and control the communication client and the communication server to perform business communication according to the corresponding port thread communication mode during the target communication period.

[0046] The beneficial effects of the present invention are: a multi-threaded data processing service method and system based on port reuse are proposed, by obtaining historical communication records between a communication client and a communication server, extracting communication service related information, building a communication client portrait database, and classifying its communication requirements for each unit communication cycle within a target communication time period based on the communication feature set of each communication client in the communication client portrait database, according to the communication resource information of the communication server and the communication demand category of the communication client, considering the total thread stack space size corresponding to the thread stack space resources to be allocated in the communication resource information of the communication server and the communication data processing speed corresponding to the communication data processing resources, constructing a constraint condition set with the total thread stack space size, communication data processing speed and communication quality, determining the optimization target with the number of server communication switching times, using an optimization algorithm to solve the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle, generating a port communication strategy, thereby controlling the port thread communication mode of the communication server within the target communication time period and the communication client switching to the optimal port communication object to perform business communication in each unit communication cycle. Therefore, by integrating the communication resource information of all communication servers and the communication demand categories of communication clients, flexible switching and selection of single-port single-thread communication and single-port multi-thread communication are adopted, taking into account both communication quality and communication efficiency. On the basis of reasonably selecting the port thread communication method of the communication server, the optimal communication access strategy between the communication client and the communication server is adopted to improve the overall communication efficiency and communication quality, and realize efficient communication between multiple communication clients and multiple communication servers under large-scale group communication. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1This is a flow chart of the multi-threaded data processing service method based on port multiplexing of the present invention;

[0048] Figure 2 This is a structural diagram of the multi-threaded data processing service system based on port multiplexing of the present invention. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0050] The embodiment of the present invention provides a multi-threaded data processing service method based on port multiplexing, referring to Figure 1 , Figure 1 The figure is a flow chart of an embodiment of a multi-threaded data processing service method based on port multiplexing of the present invention.

[0051] In this embodiment, a multi-threaded data processing service method based on port multiplexing is provided, the method comprising the following steps:

[0052] S1: Obtain historical communication records between a communication client and a communication server, and extract communication service association information of each communication client in the historical communication records;

[0053] S2: generating a client profile of each communication client based on the communication service association information, and constructing a communication client profile database; wherein the communication client profile database stores a communication feature set consisting of a plurality of communication features of each communication client;

[0054] S3: Based on the communication feature set of each communication client, classify the communication demand of the communication client within the target communication period to obtain the communication demand category of each communication client in each unit communication cycle within the target communication period;

[0055] S4: Acquire communication resource information of a plurality of communication servers within a target communication period, and generate a port communication strategy for each communication client and each communication server for each unit communication cycle within the target communication period based on the communication resource information and the communication demand category of each communication client;

[0056] S5: extracting the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle in the port communication strategy, and controlling the communication client and the communication server to perform service communication according to the corresponding port thread communication mode during the target communication period.

[0057] It should be noted that for the UDP usage of the server that needs to interact with multiple clients, the efficiency of a single thread in processing data from multiple clients is relatively low, and there will be a certain time delay; using multiple threads to bind multiple data receiving ports can solve the problem of slow single-thread data receiving rate, but multiple data receiving ports will cause inconvenience to the client. In engineering applications, the multi-port method is rarely used except in special circumstances; using multiple threads to bind a single data receiving port to process data from multiple clients will require independent stack space to be allocated to each thread, which will result in high thread resource overhead in high-concurrency communication scenarios and easily lead to memory overflow problems.

[0058] In order to solve the above problems, this embodiment constructs a communication client portrait database, classifies the communication needs of each communication client in each unit communication cycle within the target communication time period, considers the thread stack space resources to be allocated and the communication data processing resources of the communication server, constructs a constraint condition set based on the total thread stack space size, communication data processing speed and communication quality, and optimizes the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle based on the optimization goal determined by the number of server communication switching. By integrating resources and needs, flexible switching and selection of single-port single-thread communication and single-port multi-thread communication are adopted, taking into account both communication quality and communication efficiency, and realizing efficient communication between multiple communication clients and multiple communication servers under large-scale group communication.

[0059] In a preferred embodiment, step S1: obtaining historical communication records between a communication client and a communication server, and extracting communication service association information of each communication client in the historical communication records, specifically includes:

[0060] S11: Acquire historical communication records between the communication client and the communication server; wherein the historical communication records include communication request information and communication time period information for each service type when executing historical communication services between the communication client and the communication server;

[0061] S12: Generate communication service association information of each communication client based on the communication request information and communication time period information of each service type in the historical communication records.

[0062] On this basis, step S2: generating a client profile of each communication client according to the communication service association information, and building a communication client profile database, specifically including:

[0063] S21: extracting the service quality parameters of the communication request information of each service type in the communication service association information, and using the service quality parameters to query the delay tolerance threshold corresponding to each service type;

[0064] S22: extracting communication period information of each service type from the communication service association information, and determining the execution period of each service type by using the mapping relationship between the communication period information and the period of each unit communication cycle;

[0065] S23: Based on the delay tolerance threshold and execution cycle period of each service type, a communication feature set of each communication client is generated, and a communication client portrait database is constructed.

[0066] In this embodiment, the historical communication records between the communication client and the communication server are obtained, and the communication request information and communication time period information of each service type when the historical communication services are executed between the communication client and the communication server are extracted from the historical communication records. Then, the corresponding delay allowance threshold (for example, ≤100ms) is determined by extracting service quality parameters (for example, QoS parameters), and the communication time period of each service type is extracted to determine the execution cycle period (for example, 9:00-11:00 every day), so as to generate a communication feature set for each communication client and then construct a communication client portrait database.

[0067] In a preferred embodiment, step S3: classifying the communication requirements of the communication clients within the target communication period based on the communication feature set of each communication client, and obtaining the communication requirement category of each communication client in each unit communication cycle within the target communication period, specifically includes:

[0068] S31: Based on the communication feature set of each communication client, using a pre-built communication demand prediction model, predict the communication demand of each communication client within the target communication period;

[0069] S32: Classifying the communication requirements of the communication clients within the target communication period according to the communication requirements of each communication client within the target communication period, and obtaining a communication requirement category of each communication client in each unit communication cycle within the target communication period.

[0070] Furthermore, based on the communication feature set of each communication client, a pre-built communication demand prediction model is used to predict the communication demand of each communication client during the target communication period, specifically including:

[0071] S311: Build an initial LSTM model architecture consisting of an input layer, a bidirectional LSTM layer, a dropout layer, a unidirectional LSTM layer, and a fully connected layer. Configure key parameters of the initial LSTM model architecture, including the time step, the number of neurons in the LSTM layer, the optimizer type, and the loss function.

[0072] S312: Divide the communication feature set of each communication client into a training set and a validation set, and train the initial LSTM model architecture using the training set and the validation set to obtain a trained communication demand prediction model;

[0073] S313: Predicting the communication demand of each communication client within the target communication period using the communication demand prediction model and the communication feature set extracted from the historical communication records of each communication client.

[0074] Furthermore, step S32: classifying the communication requirements of the communication clients within the target communication period according to the communication requirements of each communication client within the target communication period, and obtaining the communication requirement category of each communication client in each unit communication cycle within the target communication period, specifically including:

[0075] S321: extracting the communication requirements of each communication client within the target communication period; wherein the communication requirements include a delay tolerance threshold for each unit communication cycle within the target communication period;

[0076] S322: According to the communication requirement category segment to which the delay tolerance threshold belongs in the preset standard, assign a label corresponding to the communication requirement category segment to which the delay tolerance threshold belongs to each communication client in each unit communication cycle within the target communication time period.

[0077] In this embodiment, the communication feature set of each communication client is used, and a pre-built communication demand prediction model based on the LSTM model architecture is used to predict the communication demand of each communication client during the target communication period, and the communication demand of the communication client in each unit communication cycle during the target communication period is classified. The classification process is used to integrate resources and demand, and adopt flexible switching and selection of single-port single-thread communication and single-port multi-thread communication to take into account both communication quality and communication efficiency.

[0078] In a preferred embodiment, step S4: obtaining communication resource information of several communication servers within the target communication period, and generating a port communication strategy for each communication client and each communication server in each unit communication cycle within the target communication period based on the communication resource information and the communication demand category of each communication client, specifically including:

[0079] S41: Acquire communication resource information of several communication servers within a target communication period; wherein the communication resource information includes the total thread stack space size corresponding to the thread stack space resources to be allocated and the communication data processing speed corresponding to the communication data processing resources;

[0080] S42: Based on the communication resource information of each communication server and the communication requirement category of each communication client, a constraint condition set is constructed based on the total thread stack space size, communication data processing speed, and communication quality. The optimization target is determined based on the number of server communication switching times. An optimization algorithm is used to solve the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle.

[0081] S43: Based on the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle, generate a port communication strategy for each communication client and each communication server in each unit communication cycle within the target communication period.

[0082] Furthermore, step S42: based on the communication resource information of each communication server and the communication requirement category of each communication client, a constraint condition set is constructed based on the total thread stack space size, communication data processing speed and communication quality, and the optimization target is determined based on the number of server communication switching times. An optimization algorithm is used to solve the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle, specifically including:

[0083] S421: considering the communication demand category of each communication client in each unit communication cycle within the target communication period based on the thread stack memory size and communication data processing speed of each communication server;

[0084] S422: The first constraint condition is that the product of the number of communication clients allocated to each communication server divided into a single-port multi-threaded communication mode in each unit communication cycle and the standard thread stack space size is less than the total thread stack space size corresponding to the communication server; the second constraint condition is that each communication server divided into a single-port single-threaded communication mode has at least one unit communication cycle in a target number of consecutive unit communication cycles that satisfies: the sum of the standard data communication volumes of all allocated communication clients is less than the data communication processing volume determined by the product of the communication data processing speed and the unit communication cycle; the third constraint condition is that the proportion of each communication client allocated to the port thread communication mode corresponding to the communication demand category of each unit communication cycle within the target communication period exceeds the preset communication quality threshold proportion; the optimization goal is that the number of times all communication servers switch communication servers within the target communication period is minimized;

[0085] S423: Using an optimization algorithm, optimizing and solving the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle.

[0086] In this embodiment, based on the communication resource information of the communication server and the communication demand category of the communication client, the total thread stack space size corresponding to the thread stack space resources to be allocated in the communication resource information of the communication server and the communication data processing speed corresponding to the communication data processing resources are considered, a constraint condition set is constructed with the total thread stack space size, communication data processing speed and communication quality, the optimization target is determined with the number of server communication switching times, an optimization algorithm is used to solve the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle, and a port communication strategy is generated to control the port thread communication mode of the communication server within the target communication period and the communication client to switch to the optimal port communication object in each unit communication cycle to perform business communication.

[0087] In a preferred embodiment, step S5: extracting the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle in the port communication strategy, and controlling the communication client and the communication server to perform service communication according to the corresponding port thread communication mode during the target communication period, specifically includes:

[0088] S51: extracting the port thread communication mode of each communication server in the port communication strategy and controlling each communication server to select the corresponding port thread communication mode in the target communication period;

[0089] S52: extracting the port communication object of each communication client in each unit communication cycle in the port communication strategy, and controlling the communication client to switch the communication server with which it communicates in the corresponding unit communication cycle to complete the service communication process.

[0090] In this embodiment, by integrating the communication resource information of all communication servers and the communication demand categories of the communication clients, flexible switching and selection of single-port single-thread communication and single-port multi-thread communication are adopted to take into account both communication quality and communication efficiency. On the basis of reasonably selecting the port thread communication method of the communication server, the optimal communication access strategy between the communication client and the communication server is adopted to improve the overall communication efficiency and communication quality, and realize efficient communication between multiple communication clients and multiple communication servers under large-scale group communication.

[0091] Reference Figure 2 , Figure 2 This is a structural block diagram of an embodiment of a multi-threaded data processing service system based on port multiplexing of the present invention.

[0092] like Figure 2 As shown, the multi-threaded data processing service system based on port multiplexing proposed in an embodiment of the present invention includes:

[0093] An acquisition module 10 is configured to acquire historical communication records between a communication client and a communication server, and extract communication service association information of each communication client from the historical communication records;

[0094] A construction module 20 is configured to generate a client profile of each communication client based on the communication service association information, and to construct a communication client profile database; wherein the communication client profile database stores a communication feature set consisting of a plurality of communication features of each communication client;

[0095] a classification module 30 for classifying the communication demands of the communication clients within the target communication period based on the communication feature set of each communication client, and obtaining a communication demand category of each communication client in each unit communication cycle within the target communication period;

[0096] A generating module 40 is configured to obtain communication resource information of a plurality of communication servers within a target communication period, and generate a port communication strategy for each communication client and each communication server for each unit communication cycle within the target communication period based on the communication resource information and the communication demand category of each communication client;

[0097] The communication module 50 is used to extract the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle in the port communication strategy, and control the communication client and the communication server to perform business communication according to the corresponding port thread communication mode during the target communication period.

[0098] Other embodiments or specific implementations of the multi-threaded data processing service system based on port multiplexing of the present invention can refer to the above-mentioned method embodiments and will not be described in detail here.

[0099] It should be understood that, in the description of this specification, reference to terms such as "one embodiment," "another embodiment," "other embodiments," or "first to Nth embodiments" means that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any appropriate manner in any one or more embodiments or examples.

[0100] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.

[0101] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A multi-threaded data processing service method based on port multiplexing, characterized in that: The method comprises the following steps: S1: Obtain historical communication records between a communication client and a communication server, and extract communication service association information of each communication client in the historical communication records; S2: generating a client profile of each communication client based on the communication service association information, and constructing a communication client profile database; wherein the communication client profile database stores a communication feature set consisting of a plurality of communication features of each communication client; S3: Based on the communication feature set of each communication client, classify the communication demand of the communication client within the target communication period to obtain the communication demand category of each communication client in each unit communication cycle within the target communication period; S4: Acquire communication resource information of a plurality of communication servers within a target communication period, and generate a port communication strategy for each communication client and each communication server for each unit communication cycle within the target communication period based on the communication resource information and the communication demand category of each communication client; S5: extracting the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle in the port communication strategy, and controlling the communication client and the communication server to perform service communication according to the corresponding port thread communication mode during the target communication period.

2. The multi-threaded data processing service method based on port multiplexing according to claim 1, characterized in that: Step S1: Obtain historical communication records between a communication client and a communication server, and extract communication service association information of each communication client in the historical communication records, specifically including: S11: Acquire historical communication records between the communication client and the communication server; wherein the historical communication records include communication request information and communication time period information for each service type when executing historical communication services between the communication client and the communication server; S12: Generate communication service association information of each communication client based on the communication request information and communication time period information of each service type in the historical communication records.

3. The multi-threaded data processing service method based on port multiplexing according to claim 1, characterized in that: Step S2: Generate a client profile for each communication client based on the communication service association information and build a communication client profile database, specifically including: S21: extracting the service quality parameters of the communication request information of each service type in the communication service association information, and using the service quality parameters to query the delay tolerance threshold corresponding to each service type; S22: extracting communication period information of each service type from the communication service association information, and determining the execution period of each service type by using the mapping relationship between the communication period information and the period of each unit communication cycle; S23: Based on the delay tolerance threshold and execution cycle period of each service type, a communication feature set of each communication client is generated, and a communication client portrait database is constructed.

4. The multi-threaded data processing service method based on port multiplexing according to claim 1, characterized in that: Step S3: Based on the communication feature set of each communication client, classify the communication demand of the communication client within the target communication period to obtain the communication demand category of each communication client in each unit communication cycle within the target communication period, specifically including: S31: Based on the communication feature set of each communication client, using a pre-built communication demand prediction model, predict the communication demand of each communication client within the target communication period; S32: Classifying the communication requirements of the communication clients within the target communication period according to the communication requirements of each communication client within the target communication period, and obtaining a communication requirement category of each communication client in each unit communication cycle within the target communication period.

5. The multi-threaded data processing service method based on port multiplexing according to claim 4, characterized in that: Based on the communication feature set of each communication client, the communication demand of each communication client within the target communication period is predicted using a pre-built communication demand prediction model, specifically including: S311: Build an initial LSTM model architecture consisting of an input layer, a bidirectional LSTM layer, a dropout layer, a unidirectional LSTM layer, and a fully connected layer. Configure key parameters of the initial LSTM model architecture, including the time step, the number of neurons in the LSTM layer, the optimizer type, and the loss function. S312: Divide the communication feature set of each communication client into a training set and a validation set, and train the initial LSTM model architecture using the training set and the validation set to obtain a trained communication demand prediction model; S313: Predicting the communication demand of each communication client within the target communication period using the communication demand prediction model and the communication feature set extracted from the historical communication records of each communication client.

6. The multi-threaded data processing service method based on port multiplexing according to claim 4, characterized in that: Step S32: Classifying the communication requirements of each communication client within the target communication period according to the communication requirements of each communication client within the target communication period, and obtaining the communication requirement category of each communication client in each unit communication cycle within the target communication period, specifically including: S321: extracting the communication requirements of each communication client within the target communication period; wherein the communication requirements include a delay tolerance threshold for each unit communication cycle within the target communication period; S322: According to the communication requirement category segment to which the delay tolerance threshold belongs in the preset standard, assign a label corresponding to the communication requirement category segment to which the delay tolerance threshold belongs to each communication client in each unit communication cycle within the target communication time period.

7. The multi-threaded data processing service method based on port multiplexing according to claim 1, characterized in that: Step S4: Acquire communication resource information of several communication servers within the target communication period, and generate a port communication strategy for each communication client and each communication server for each unit communication cycle within the target communication period based on the communication resource information and the communication demand category of each communication client, specifically including: S41: Acquire communication resource information of several communication servers within a target communication period; wherein the communication resource information includes the total thread stack space size corresponding to the thread stack space resources to be allocated and the communication data processing speed corresponding to the communication data processing resources; S42: Based on the communication resource information of each communication server and the communication requirement category of each communication client, a constraint condition set is constructed based on the total thread stack space size, communication data processing speed, and communication quality. The optimization target is determined based on the number of server communication switching times. An optimization algorithm is used to solve the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle. S43: Based on the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle, generate a port communication strategy for each communication client and each communication server in each unit communication cycle within the target communication period.

8. The multi-threaded data processing service method based on port multiplexing according to claim 7, characterized in that: Step S42: Based on the communication resource information of each communication server and the communication requirement category of each communication client, a constraint condition set is constructed based on the total thread stack space size, communication data processing speed, and communication quality. The optimization target is determined based on the number of server communication switching times. An optimization algorithm is used to solve the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle, specifically including: S421: considering the communication demand category of each communication client in each unit communication cycle within the target communication period based on the thread stack memory size and communication data processing speed of each communication server; S422: The first constraint condition is that the product of the number of communication clients allocated to each communication server divided into a single-port multi-threaded communication mode in each unit communication cycle and the standard thread stack space size is less than the total thread stack space size corresponding to the communication server; the second constraint condition is that each communication server divided into a single-port single-threaded communication mode has at least one unit communication cycle in a target number of consecutive unit communication cycles that satisfies: the sum of the standard data communication volumes of all allocated communication clients is less than the data communication processing volume determined by the product of the communication data processing speed and the unit communication cycle; the third constraint condition is that the proportion of each communication client allocated to the port thread communication mode corresponding to the communication demand category of each unit communication cycle within the target communication period exceeds the preset communication quality threshold proportion; the optimization goal is that the number of times all communication servers switch communication servers within the target communication period is minimized; S423: Using an optimization algorithm, optimizing and solving the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle.

9. The multi-threaded data processing service method based on port multiplexing according to claim 1, characterized in that: Step S5: extracting the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle in the port communication strategy, and controlling the communication client and the communication server to perform service communication according to the corresponding port thread communication mode during the target communication period, specifically including: S51: extracting the port thread communication mode of each communication server in the port communication strategy and controlling each communication server to select the corresponding port thread communication mode in the target communication period; S52: extracting the port communication object of each communication client in each unit communication cycle in the port communication strategy, and controlling the communication client to switch the communication server with which it communicates in the corresponding unit communication cycle to complete the service communication process.

10. A multi-threaded data processing service system based on port multiplexing, characterized in that: include: An acquisition module is used to acquire historical communication records between a communication client and a communication server, and extract communication service association information of each communication client in the historical communication records; A construction module, configured to generate a client portrait of each communication client based on the communication service association information, and construct a communication client portrait database; wherein the communication client portrait database stores a communication feature set consisting of a plurality of communication features of each communication client; a classification module, configured to classify the communication demands of the communication clients within the target communication period based on the communication feature set of each communication client, and obtain the communication demand category of each communication client in each unit communication cycle within the target communication period; a generation module configured to obtain communication resource information of a plurality of communication servers within a target communication period, and generate a port communication strategy for each communication client and each communication server for each unit communication cycle within the target communication period based on the communication resource information and the communication demand category of each communication client; The communication module is used to extract the port thread communication mode of each communication server and the port communication object of each communication client in each unit communication cycle in the port communication strategy, and control the communication client and the communication server to perform business communication according to the corresponding port thread communication mode during the target communication period.

Citation Information

Patent Citations

  • Data communication method, device and system

    CN104079398A

  • Video stream processing method and device, nonvolatile storage medium and electronic equipment

    CN118337764A