Message processing method, electronic equipment, storage medium and computer program product

By calculating the network quality change value and transmission rate change value of the network channel, and adjusting the packet size in real time, the problem of unreasonable request processing in the existing technology is solved, and more reasonable and accurate request processing is achieved.

CN119728802APending Publication Date: 2025-03-28CHENGDU NEW HOPE FINANCIAL INFORMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411853680.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The existing traffic control methods have unreasonable problems when processing requests, and cannot effectively adjust the packet size in real time based on network channel quality and service processing quality.

Method used

By obtaining the first message transmission time and transmission rate of the target network channel, the network quality change value and transmission rate change value are calculated, these values ​​are used to determine the packet size expected to be released in the next time period, and sending packets of message size to the service service through the target network channel.

Benefits of technology

It realizes real-time adjustment of the packet size released to the service service based on the network channel quality and service service processing quality, and improves the rationality and accuracy of request processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728802A_ABST
    Figure CN119728802A_ABST
Patent Text Reader

Abstract

The invention provides a message processing method, electronic equipment, a storage medium and a computer program product, and relates to the technical field of computers. The method comprises the following steps: acquiring a first message sending duration and a first message sending rate of a target network channel in a current time period; calculating a network quality change value of the target network channel in the current time period according to the first message sending duration; calculating a sending rate change value of the target network channel in the current time period based on the first message sending rate; and determining the size of a to-be-released message of the target network channel in the next time period by using the network quality change value and the sending rate change value, and sending a message with the size of the message to the corresponding business service through the target network channel. According to the invention, the size of the message released to the business service is adjusted in real time according to the network channel quality and the corresponding business service processing quality so as to process the request more reasonably.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a message processing method, electronic equipment, storage medium and computer program product. Background Art

[0002] In the Internet era, with the continuous increase in the number of users and requests, the performance and stability of the system are facing huge challenges. In this context, many methods for controlling traffic have emerged, such as the token bucket algorithm, which controls traffic by limiting the number of tokens passing through a unit of time, maintaining system availability and stability, and preventing slow system operation or downtime caused by a surge in traffic.

[0003] However, existing flow control methods are usually only used to process a larger number of requests more efficiently, and there is a problem of unreasonable request processing. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a message processing method, an electronic device, a storage medium and a computer program product, which are used to adjust the size of the message released to the business service in real time according to the network channel quality and the corresponding business service processing quality, so as to process the request more reasonably.

[0005] In a first aspect, an embodiment of the present application provides a message processing method, the method comprising: obtaining a first message sending duration and a first message sending rate of a target network channel in a current time period; the target network channel is any network channel between a network proxy service and a plurality of business services; calculating a network quality change value of the target network channel in the current time period according to the first message sending duration; calculating a sending rate change value of the target network channel in the current time period based on the first message sending rate; the sending rate change value characterizes a change in a processing capability of a business service corresponding to the target network channel; determining a message size to be released by the target network channel in the next time period using the network quality change value and the sending rate change value, and sending a message of the message size to the corresponding business service through the target network channel.

[0006] The embodiment of the present application obtains the network quality of the target network channel by calculating the network quality change value of the target network channel, and obtains the message processing capability of the business service corresponding to the target network channel by calculating the sending rate change value, thereby combining the network quality of the target network channel and the processing capability of the corresponding business service to determine how many messages to send to the corresponding business service, thereby achieving real-time adjustment of the message size released to the business service according to the network channel quality and the corresponding business service processing quality, so as to process requests more reasonably.

[0007] In some embodiments, the network quality change value and the sending rate change value are used to determine the message size to be released by the target network channel in the next time period, including: determining the message size scaling coefficient of different priority interfaces under the target network channel in the current time period according to the network quality change value and the sending rate change value; determining the message size to be released by the target network channel in the next time period based on the message size scaling coefficient.

[0008] In the embodiment of the present application, the message size expansion coefficients of different priority interfaces under the target network channel in the current time period are determined according to the network quality change value and the transmission rate change value, and the message size to be released by the target network channel in the next time period is determined based on the message size expansion coefficient of the current time period. In this process, the message size expansion coefficient of the current time period reflects the processing of the message size of different priority interfaces under the target network channel in the current time period, and this is used to predict the message size to be released in the next time period, thereby improving the rationality and accuracy of the messages to be released in the next time period.

[0009] In some embodiments, the message size to be released by the target network channel in the next time cycle is determined based on the message size scaling coefficient, including: summing the message size scaling coefficients of different priority interfaces of all network channels in the current time period to obtain a total proportional coefficient; calculating the message size to be released based on the message size scaling coefficient, the total proportional coefficient and the physical maximum network bandwidth of the network proxy service; if the message size to be released is larger than the physical maximum network bandwidth of the target network channel, the physical maximum network bandwidth of the target network channel is used as the message size to be released in the next time cycle; otherwise, the message size to be released is used as the message size to be released in the next time cycle.

[0010] The embodiment of the present application reflects the situation of all network channels sending messages by summing up the message size expansion coefficients of different priority interfaces of all network channels. The message size to be released is calculated based on the message size expansion coefficient, the total proportional coefficient and the physical maximum network bandwidth of the network proxy service, so that the message size to be released in the next time period can be predicted based on the message processing situation in the current time period, thereby improving the rationality and accuracy of the messages to be released in the next time period. Furthermore, when determining the final message size to be released, the larger value of the physical maximum network bandwidth of the target network channel and the calculated message size to be released is taken. Therefore, on the basis of rationality, the resources of the target network channel and the corresponding business service can be used to the maximum extent.

[0011] In some embodiments, the message size scaling coefficients of different priority interfaces under the target network channel in the current time period are determined according to the network quality change value and the sending rate change value, including: if the network quality change value and the sending rate change value are both less than 0, then the message size scaling coefficients of the different priority interfaces in the previous time period are multiplied by the first coefficient to obtain the message size scaling coefficients of the different priority interfaces in the current time period; the numerical range of the first coefficient is (0, 1); if the network quality change value and the sending rate change value are both equal to 0, or the network quality change value is greater than 0, and the sending rate change value is less than 0, then the message size scaling coefficients of the different priority interfaces in the current time period are the same as the message size scaling coefficients of the previous time period; if the sending rate change value is greater than 0, then the message size scaling coefficients of the different priority interfaces in the current time period are determined according to the network quality change value and the message size scaling coefficients corresponding to the different priority interfaces in the previous time period.

[0012] In the embodiment of the present application, the message size expansion coefficients of different priority interfaces in the target network channel in the current time period are determined according to the network quality change value and the transmission rate change value, so that the message size expansion coefficients corresponding to different priority interfaces can be differentially determined based on different situations of the network quality change value and the transmission rate change value. This improves the accuracy of the calculated message size expansion coefficient, and further improves the rationality and accuracy of the messages to be released in the next time period.

[0013] In some embodiments, different priority interfaces include a first priority interface, a second priority interface, and a third priority interface; according to the network quality change value and the message size expansion coefficients corresponding to the different priority interfaces in the previous time period, the message size expansion coefficients of the different priority interfaces in the current time period are determined, including: for the first priority interface, if the network quality change value is less than 0, then the message size expansion coefficient of the first priority interface in the previous time period is multiplied by the second coefficient to obtain the message size expansion coefficient of the first priority interface in the current time period; the numerical range of the second coefficient is (0, 1), and the second coefficient is greater than the first coefficient; if the network quality change value is greater than 0, then the message size expansion coefficient of the first priority interface in the previous time period is multiplied by the third coefficient to obtain the message size expansion coefficient of the first priority interface in the current time period; the third coefficient is greater than 1; for the second priority interface, if the network quality change value is less than 0, then the message size expansion coefficient of the second priority interface in the previous time period is multiplied by the third coefficient to obtain the message size expansion coefficient of the first priority interface in the current time period; the third coefficient is greater than 1 The message size scaling coefficient is multiplied by the fourth coefficient to obtain the message size scaling coefficient of the second priority interface in the current time period; the numerical range of the fourth coefficient is (0, 1), and the fourth coefficient is less than the second coefficient; if the network quality change value is greater than 0, the message size scaling coefficient of the second priority interface in the previous time period is multiplied by the fifth coefficient to obtain the message size scaling coefficient of the second priority interface in the current time period; the fifth coefficient is greater than 1, and the fifth coefficient is less than the third coefficient; for the third priority interface, if the network quality change value is less than 0, the message size scaling coefficient of the third priority interface in the previous time period is multiplied by the sixth coefficient to obtain the message size scaling coefficient of the third priority interface in the current time period; the numerical range of the sixth coefficient is (0, 1), and the sixth coefficient is less than the fourth coefficient; if the network quality change value is greater than 0, the message size scaling coefficient of the third priority interface in the current time period is the same as the message size scaling coefficient of the third priority interface in the previous time period.

[0014] The embodiment of the present application adopts different methods to determine the corresponding message size scaling coefficients for interfaces of different priorities, thereby improving the accuracy of the calculated message size scaling coefficients, and further improving the rationality and accuracy of the messages to be released in the next time period.

[0015] In some embodiments, the method further includes: if the message size scaling factor of the target network channel in the previous time period is less than a preset coefficient threshold, setting the message size scaling factor of the current time period to a preset value; the preset value is greater than the preset coefficient threshold.

[0016] The embodiment of the present application takes into account that the message size scaling factor may become smaller and smaller over time, and the smaller message size scaling factor means that the size of released messages is getting smaller and smaller. At this time, the resources of the business service corresponding to the target network channel are in the recovery stage. Therefore, when the message size scaling factor is less than the preset coefficient threshold, it is adjusted to a preset value larger than the preset coefficient threshold, so that the business service corresponding to the target network channel can be fully utilized to more reasonably process requests.

[0017] In some embodiments, a network quality change value of a target network channel in a current time period is calculated based on a first message sending duration, including: obtaining a second message sending duration of a preset number of historical time periods of the target network channel; determining a sending duration basic value of the target network channel based on multiple second message sending durations; calculating a first deviation between the first message sending duration and the sending duration basic value, and using the ratio between the first deviation and the sending duration basic value as the network quality change value of the target network channel in the current time period.

[0018] In an embodiment of the present application, a basic value of the sending duration is determined by the second message sending duration of multiple historical time periods, which reflects the network quality of the target network channel over a period of historical time. Therefore, the network quality change value of the current time period is determined based on the first message sending duration of the current time period and the basic value of the sending duration, thereby improving the accuracy of the network quality change value and thus improving the accuracy of the calculated size of the message to be released.

[0019] In some embodiments, calculating a sending rate change value of a target network channel in a current time period based on a first message sending rate includes: obtaining a second message sending rate of the target network channel in a previous time period; calculating a second deviation between the first message sending rate and the second message sending rate, and using a ratio between the second deviation and the second message sending rate as the sending rate change value of the target network channel in the current time period.

[0020] In an embodiment of the present application, the second message sending rate reflects the processing capacity of the business service corresponding to the target network channel in the historical time period. Therefore, the sending rate change value of the current time period determined based on the first message sending rate and the second message sending rate improves the accuracy of the sending rate change value, thereby improving the accuracy of the calculated message size to be released.

[0021] In a second aspect, an embodiment of the present application provides a message processing device, which includes: an acquisition module, which is used to obtain a first message sending duration and a first message sending rate of a target network channel in a current time period; the target network channel is any network channel between a network proxy service and a plurality of business services; a first calculation module, which is used to calculate a network quality change value of the target network channel in the current time period according to the first message sending duration; a second calculation module, which is used to calculate a sending rate change value of the target network channel in the current time period based on the first message sending rate; the sending rate change value represents a change in the processing capacity of the business service corresponding to the target network channel; a determination module, which is used to determine a message size to be released by the target network channel in the next time period using the network quality change value and the sending rate change value, and send a message of the message size to the corresponding business service through the target network channel.

[0022] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, the method steps of the first aspect can be executed.

[0023] In a fourth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium, comprising: computer program instructions are stored on the computer-readable storage medium, and when the computer program instructions are executed by a processor, the method steps of the first aspect are executed.

[0024] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising: computer program instructions, which, when executed by a processor, execute the method steps of the first aspect.

[0025] Other features and advantages of the present application will be described in the subsequent description, and in part will become apparent from the description, or will be understood by implementing the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0027] Figure 1 A flowchart of a message processing method provided in an embodiment of the present application;

[0028] Figure 2 A schematic diagram of the structure of a message processing device provided in an embodiment of the present application;

[0029] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.

[0031] It should be noted that all technical and scientific terms used in this document have the same meanings as those generally understood by technicians in the technical field to which this application belongs; the terms used in this document are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.

[0032] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order, or primary and secondary relationship of the indicated technical features, unless otherwise clearly and specifically defined. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.

[0033] Before introducing the specific plan, some basic concepts involved in the plan are introduced.

[0034] A network proxy service is a service that receives a request sent by a sender and forwards the received request to a receiving end indicated by the request. A network proxy service can be a service deployed on a physical gateway, or a service deployed on a router, switch, or firewall. For ease of understanding, the application scenario of this application is introduced by taking the network proxy service as a service deployed on a physical gateway as an example.

[0035] Business services are services that receive requests from network proxy services and provide request processing capabilities.

[0036] In actual scenarios, a network proxy service usually connects to multiple business services, and the data transmission channel between each business service and the network proxy service is called a network channel.

[0037] Therefore, a network proxy service has multiple network channels to transmit data with different business services through different network channels.

[0038] The basic components of a request include: IP, port, request path and message.

[0039] Among them, IP (Internet Protocol address) is the unique identifier of a device in the network, which is used to locate and identify the device at the network layer.

[0040] Port is a logical concept in network communication, which is used to distinguish different services or applications on the same computer. Each port corresponds to a specific service or application. For example, the default port of HTTP service is 80, and the default port of HTTPS service is 443.

[0041] The request path refers to the specific location of the resource that the client wants to obtain from the server in the HTTP request, which is used to identify a specific interface. It is usually located after the host name of the URL, starting with a slash ( / ), followed by the name or path of the resource. For example, in the URL: http: / / www.example.com / index.html, " / index.html" is the request path. Therefore, one "IP+port" can correspond to multiple request paths, that is, one "IP+port" can correspond to multiple interfaces.

[0042] A message is a unit of data transmitted over a network, containing all the necessary information for a request. In an HTTP request, a message usually consists of a request line, a request header, a blank line, and a request body (optional). Therefore, the size of a request can be considered the message size of the request.

[0043] Figure 1 A flow chart of a message processing method provided in an embodiment of the present application. It is understandable that the network proxy service can run on a terminal device (also referred to as an electronic device) and a server, in which case the terminal device or server can be regarded as a gateway; wherein the terminal device can specifically be a smart phone, a tablet computer, a computer, a personal digital assistant (PDA), etc.; the server can specifically be an application server or a Web server. To facilitate understanding of the technical solution provided in an embodiment of the present application, the application scenario of the message processing method provided in an embodiment of the present application is introduced below, taking the server as an example of the execution subject.

[0044] like Figure 1 As shown, the method includes:

[0045] Step S101: The server obtains a first message sending duration and a first message sending rate of a target network channel in a current time period.

[0046] In step S101, the current time period refers to the most recently completed time unit traced back from the current time point. That is, looking back from the current time point, the most recently completed complete time unit period. For example, if the current time point is 12:00 and the time period length is 1 minute, then the one minute from 11:59 to 12:00 is the current time period.

[0047] The target network channel is any network channel between the network proxy service and multiple business services.

[0048] The transmission efficiency of requests in a network channel is usually affected by the stability of the network channel, and the stability of the network channel depends on many aspects, such as bandwidth, latency, packet loss rate, signal interference, equipment failure, etc. Therefore, in order to understand the network quality of the network channel, the network quality of the network channel is detected in a cycle according to a certain time period (for example, 1S is a time period). It should be known that the length of the time period can be specifically set according to actual conditions.

[0049] When detecting the network quality of the target network channel, the network proxy service sends an empty message or a very small message to the business service corresponding to the target network channel at the beginning of each time period, and receives the response result, and determines the message sending time by the sending time and the response time. Specifically, the message sending time = (response time-sending time) / 2.

[0050] Optionally, the received response result may include a receiving timestamp when the peer service receives the request. In this case, the message sending time = receiving timestamp - sending time.

[0051] Using data structure LinkedHashMap <String,List <integer>>Record the message sending duration for each time period, where String is used to represent "IP+port", List <integer>Indicates the time it takes to send a message.

[0052] The server queries the data structure LinkedHashMap through "IP+port" and time period to obtain the first message sending duration of the target network channel in the current time period.

[0053] Each request that passes through the network proxy service will be recorded. When recording, the message size of each request is recorded with "IP+port" as the key value. The message sending rate in each time period is calculated according to a certain time period (for example, 1S is a time period). It should be noted that the length of the time period here is the same as the length of the time period for calculating the message sending time.

[0054] In this process, since one "IP+port" can have multiple request paths, the message sending rate in the corresponding time period is calculated by dividing the message size of all requests for the "IP+port" in a time period by the length of the time period.

[0055] Using data structure Map<String,Double> Stores the message sending rate, where String is used to store "IP+port" and Double is used to store the message sending rate for each time period.

[0056] The server queries the data structure Map through "IP+port" and time period to obtain the first message sending rate of the target network channel in the current time period.

[0057] Step S102: The server calculates a network quality change value of the target network channel in the current time period according to the first message sending duration.

[0058] Step S103, the server calculates a sending rate change value of the target network channel in the current time period based on the first message sending rate; the sending rate change value represents a change in the processing capacity of the business service corresponding to the target network channel.

[0059] In actual scenarios, the time it takes to send a request message depends on the size of the message. The larger the message, the longer it takes to send and the more network resources it occupies. The time it takes to wait for the peer's response depends partly on whether the bandwidth of the network channel is sufficient and partly on whether the peer's service processing speed is fast enough. Therefore, factors that affect the entire processing time of a request include the network quality of the network channel and the processing capacity of the peer's service.

[0060] Based on this, the server calculates the network quality change value of the target network channel in the current time period according to the first message sending duration. The sending rate change value of the target network channel in the current time period is calculated based on the first message sending rate. Among them, the network quality change value reflects the network quality change of the target network channel in different time periods; the sending rate change value represents the change in the processing capacity of the business service corresponding to the target network channel in different time periods. Therefore, the processing capacity of the target network channel and the corresponding business service is evaluated by the network quality change value and the sending rate change value.

[0061] The server calculates a network quality change value of a target network channel in a current time period based on a first message sending duration, including: obtaining a second message sending duration of a preset number of historical time periods of the target network channel; determining a sending duration basic value of the target network channel based on multiple second message sending durations; calculating a first deviation between the first message sending duration and the sending duration basic value, and using a ratio between the first deviation and the sending duration basic value as the network quality change value of the target network channel in the current time period.

[0062] The "preset number" is a preset value, which can be specifically set according to the actual situation. For example, 20, 30 or 40 can be taken.

[0063] In order to save server resources, only the message sending duration of the most recent 60 time periods can be recorded. The subscript starts from 0, List[0] represents the message sending duration of the first 60 time periods of the current period, and List

[59] represents the message sending duration of the current time period.

[0064] The second message sending duration of the preset number of historical time periods can refer to the message sending duration of the 30 historical time periods closest to the current time period, that is, List

[29] -List

[58] , or it can refer to the message sending duration of the 30 historical time periods farthest from the current time period among the 60 time periods, that is, List[0]-List

[29] .

[0065] The server queries the data structure LinkedHashMap through "IP+port" and time period to obtain the second message sending duration of multiple historical time periods of the target network channel.

[0066] The basic value of the target network channel's sending duration is determined based on the sending durations of multiple second messages. This can be: using the median of multiple second message sending durations as the target network channel's sending duration basic value; it can also be: using the maximum value of multiple second message sending durations as the target network channel's sending duration basic value; it can also be: using the average of multiple second message sending durations as the target network channel's sending duration basic value. How to determine the sending duration basic value can be set specifically according to actual conditions, and this application does not make specific restrictions on this.

[0067] After determining the basic value of the sending duration, calculate the first deviation between the sending duration of the first message and the basic value of the sending duration, and use the ratio between the first deviation and the basic value of the sending duration as the network quality change value of the target network channel in the current time period. The formula is as follows:

[0068] increaseTime=(currentTime-baseTime) / baseTime

[0069] Wherein, increaseTime represents the change value of network quality, currentTime represents the duration of sending the first message, and baseTime represents the basic value of sending duration.

[0070] The basic value of the sending duration is determined by the second message sending duration of multiple historical time periods, which reflects the network quality of the target network channel in a historical period. Therefore, the network quality change value of the current time period is determined according to the first message sending duration of the current time period and the basic value of the sending duration, which improves the accuracy of the network quality change value and thus improves the accuracy of the calculated size of the message to be released.

[0071] Optionally, the server calculates the network quality change value of the target network channel in the current time period according to the first message sending duration, including: obtaining the third message sending duration of the target network channel in the previous time period; calculating the third deviation between the first message sending duration and the third message sending duration, and taking the ratio between the third deviation and the third message sending duration as the network quality change value of the target network channel in the current time period. The formula is as follows:

[0072] increaseTime=(currentTime-lastcurrentTime) / lastcurrentTime

[0073] Wherein, increaseTime represents the change value of network quality, currentTime represents the time duration of sending the first message, and lastcurrentTime represents the time duration of sending the third message.

[0074] The server calculates the change value of the sending rate of the target network channel in the current time period based on the first message sending rate, including: obtaining the second message sending rate of the target network channel in the previous time period; calculating the second deviation between the first message sending rate and the second message sending rate, and taking the ratio between the second deviation and the second message sending rate as the change value of the sending rate of the target network channel in the current time period. The formula is as follows:

[0075] increaseSpeed=(currentSpeed-lastCurrentSpeed) / lastCurrentSpeed

[0076] Among them, increaseSpeed ​​represents the change value of the sending rate, currentSpeed ​​represents the first message sending rate, and lastCurrentSpeed ​​represents the second message sending rate.

[0077] The second message sending rate reflects the processing capacity of the business service corresponding to the target network channel in the historical time period. Therefore, the sending rate change value of the current time period determined based on the first message sending rate and the second message sending rate improves the accuracy of the sending rate change value, thereby improving the accuracy of the calculated message size to be released.

[0078] Optionally, the server calculates the change value of the sending rate of the target network channel in the current time period based on the first message sending rate, including: obtaining the third message sending rate of the target network channel in a preset number of historical time periods, determining the basic value of the sending rate of the target network channel according to the multiple third message sending rates, calculating the fourth deviation between the first message sending rate and the basic value of the sending rate, and taking the ratio between the fourth deviation and the third message sending rate as the change value of the sending rate of the target network channel in the current time period. The formula is as follows:

[0079] increaseSpeed=(currentSpeed-baseCurrentSpeed) / baseCurrentSpeed

[0080] Among them, increaseSpeed ​​represents the change value of the sending rate, currentSpeed ​​represents the first message sending rate, and baseCurrentSpeed ​​represents the basic value of the sending rate.

[0081] Among them, the process of setting a preset number of historical time periods and determining the basic value of the sending rate can refer to the above-mentioned embodiment of determining the basic value of the sending duration, which will not be repeated here.

[0082] Step S104, the server determines the size of the message to be released by the target network channel in the next week by using the network quality change value and the sending rate change value, and sends the message of the message size to the corresponding business service through the target network channel.

[0083] The process of the server using the network quality change value and the sending rate change value to determine the message size to be released in the next time period of the target network channel can be found in the following embodiment and will not be repeated here.

[0084] The embodiment of the present application obtains the network quality of the target network channel by calculating the network quality change value of the target network channel, and obtains the message processing capability of the business service corresponding to the target network channel by calculating the sending rate change value, thereby combining the network quality of the target network channel and the processing capability of the corresponding business service to determine how many messages to send to the corresponding business service, thereby achieving real-time adjustment of the message size released to the business service according to the network channel quality and the corresponding business service processing quality, so as to process requests more reasonably.

[0085] In some embodiments, the server uses the network quality change value and the sending rate change value to determine the message size to be released by the target network channel in the next time cycle, including: the server determines the message size scaling coefficient of different priority interfaces under the target network channel in the current time period according to the network quality change value and the sending rate change value; the server determines the message size to be released by the target network channel in the next time cycle based on the message size scaling coefficient.

[0086] Based on the above embodiments, it can be known that one target network channel corresponds to one business service, and one business service can implement multiple functions, each function corresponds to an interface, therefore, one target network channel corresponds to multiple interfaces.

[0087] Based on the basic elements contained in the request, it can be known that the request includes a request path, and the request path is used to identify the interface. Therefore, a request ultimately accesses a certain interface of the corresponding business service through the target network channel.

[0088] In actual business scenarios, requests also have business attributes. When prioritizing requests, they are usually prioritized based on their business attributes. For example, if request 1 implements a loan business and request 2 implements a balance inquiry business, request 1 has a higher priority than request 2.

[0089] Business services include loan functions and query functions. Mapping from the business attributes of the request to the functions of the business service, the priority of the loan function for implementing the loan business is higher than the priority of the query function for implementing the balance query. On this basis, based on the mapping relationship between functions and interfaces, it can be seen that the priority of the interface corresponding to the loan function is higher than the priority of the interface corresponding to the query function. Therefore, the target network channel corresponds to interfaces of different priorities.

[0090] The packet size expansion factor is used to indicate the change in the packet size received by interfaces of different priorities in each time period. That is, the change in the packet size received by an interface in a certain time period compared with the packet size received in the previous time period.

[0091] Therefore, the server determines the message size scaling coefficients of different priority interfaces under the target network channel in the current time period according to the network quality change value and the sending rate change value. For the specific process of determining the message size scaling coefficients of different priority interfaces under the target network channel in the current time period according to the network quality change value and the sending rate change value, please refer to the following embodiment.

[0092] After determining the message size scaling coefficients of interfaces with different priorities in the current time period, because the messages received by interfaces with different priorities under the target network channel are transmitted by the network proxy service through the target network channel, the message size to be released by the target network channel in the next time period determined based on the message size scaling coefficient is the total value of the message sizes received by all interfaces corresponding to the target network channel.

[0093] In the embodiment of the present application, the message size expansion coefficients of different priority interfaces under the target network channel in the current time period are determined according to the network quality change value and the transmission rate change value, and the message size to be released by the target network channel in the next time period is determined based on the message size expansion coefficient of the current time period. In this process, the message size expansion coefficient of the current time period reflects the processing of the message size of different priority interfaces under the target network channel in the current time period, and this is used to predict the message size to be released in the next time period, thereby improving the rationality and accuracy of the messages to be released in the next time period.

[0094] In some embodiments, the server determines the message size to be released by the target network channel in the next time cycle based on the message size scaling coefficient, including: the server sums the message size scaling coefficients of different priority interfaces of all network channels in the current time period to obtain a total proportional coefficient; the server calculates the message size to be released based on the message size scaling coefficient, the total proportional coefficient and the physical maximum network bandwidth of the network proxy service; if the message size to be released is larger than the physical maximum network bandwidth of the target network channel, the physical maximum network bandwidth of the target network channel is used as the message size to be released in the next time cycle; otherwise, the message size to be released is used as the message size to be released in the next time cycle.

[0095] During the execution process, since the network proxy service corresponds to multiple network channels, which are connected to different business services respectively, the requests sent by the sender are forwarded by the network proxy service.

[0096] Therefore, in order to calculate the message size to be released by the target network channel in the next time period, it is necessary to first calculate the sum of the message size expansion coefficients of the interfaces of different priorities of all network channels corresponding to the network proxy service in the current time period to obtain the total proportional coefficient.

[0097] Because the physical maximum network bandwidth of the network proxy service refers to the upper limit of the data transmission rate that the hardware of the network proxy server can support when it is in an ideal state and is not affected by other external factors. Therefore, the maximum physical bandwidth of the network proxy service directly reflects the maximum message size that the network proxy service can handle. It should be noted that the physical maximum network bandwidth of the network proxy service is a pre-set fixed value.

[0098] Therefore, the server calculates the message size to be released based on the message size scaling factor, the total proportionality factor and the physical maximum network bandwidth of the network proxy service. The message size to be released reflects the maximum message size that the network proxy service can allocate to the target network channel.

[0099] In one embodiment, the server calculates the size of the message to be released based on the message size scaling factor, the total proportional factor and the physical maximum network bandwidth of the network proxy service, including: using the message size scaling factor of a certain interface under the target network channel as the numerator and the total proportional factor as the denominator to form a ratio, and multiplying the maximum physical bandwidth of the network proxy service by the ratio to calculate the message size that needs to be released by the interface. Then, the message sizes that need to be released by all interfaces corresponding to the target network channel are summed to obtain the message size that needs to be released by the target network channel in the next time period. The formula is as follows:

[0100]

[0101] Among them, nextSoftSpeed ​​indicates the size of the message to be released in the next time period, ∑ indicates the summation symbol, n indicates the number of interfaces corresponding to the target network channel, and allowRatio i It indicates the packet size scaling factor of the i-th interface under the target network channel, allAllowRatio indicates the total scaling factor, and maxSpeed ​​indicates the physical maximum network bandwidth of the network proxy service.

[0102] Optionally, after summing up the message sizes that need to be released by all interfaces corresponding to the target network channel, multiply it by a proportional coefficient to obtain the message size that needs to be released by the target network channel in the next time period. The formula is as follows:

[0103]

[0104] Among them, κ represents the proportional coefficient, nextSoftSpeed ​​represents the size of the message to be released in the next time period, ∑ represents the summation symbol, n represents the number of interfaces corresponding to the target network channel, allowRatio i It indicates the packet size scaling factor of the i-th interface under the target network channel, allAllowRatio indicates the total scaling factor, and maxSpeed ​​indicates the physical maximum network bandwidth of the network proxy service.

[0105] Because each network channel has its own physical maximum network bandwidth ipMaxSpeed, the size of the message to be released is compared with the physical maximum network bandwidth of the target network channel. If the size of the message to be released is larger than the physical maximum network bandwidth of the target network channel, the physical maximum network bandwidth of the target network channel is used as the size of the message to be released in the next time period; otherwise, the size of the message to be released is used as the size of the message to be released in the next time period. The conditional expression that the size of the message to be released and the physical maximum network bandwidth of the target network channel meet is as follows:

[0106] nextSoftSpeed>ipMaxSpeed? ipMaxSpeed:nextSoftSpeed

[0107] This allows the resources of the target network channel and the corresponding business services to be used to the maximum extent.

[0108] The embodiment of the present application reflects the situation of all network channels sending messages by summing up the message size expansion coefficients of different priority interfaces of all network channels. The message size to be released is calculated based on the message size expansion coefficient, the total proportional coefficient and the physical maximum network bandwidth of the network proxy service, so that the message size to be released in the next time period can be predicted based on the message processing situation in the current time period, thereby improving the rationality and accuracy of the messages to be released in the next time period. Furthermore, when determining the final message size to be released, the larger value of the physical maximum network bandwidth of the target network channel and the calculated message size to be released is taken. Therefore, on the basis of rationality, the resources of the target network channel and the corresponding business service can be used to the maximum extent.

[0109] In some embodiments, the message size scaling coefficients of different priority interfaces under the target network channel in the current time period are determined according to the network quality change value and the sending rate change value, including: if the network quality change value and the sending rate change value are both less than 0, then the message size scaling coefficients of the different priority interfaces in the previous time period are multiplied by the first coefficient to obtain the message size scaling coefficients of the different priority interfaces in the current time period; the numerical range of the first coefficient is (0, 1); if the network quality change value and the sending rate change value are both equal to 0, or the network quality change value is greater than 0, and the sending rate change value is less than 0, then the message size scaling coefficients of the different priority interfaces in the current time period are the same as the message size scaling coefficients of the previous time period; if the sending rate change value is greater than 0, then the message size scaling coefficients of the different priority interfaces in the current time period are determined according to the network quality change value and the message size scaling coefficients corresponding to the different priority interfaces in the previous time period.

[0110] If the network quality change value and the transmission rate change value are both less than 0, that is, increaseSpeed<0, and increaseTime<0, it indicates that the business service processing speed corresponding to the target network channel has slowed down relative to the previous time period, and the network transmission quality of the target network channel has deteriorated relative to the previous time period. At this time, the size of the released message should be reduced. Therefore, the message size expansion coefficient of the interface with different priorities in the previous time period is multiplied by the first coefficient to obtain the message size expansion coefficient of the interface with different priorities in the current time period. The value range of the first coefficient is (0, 1). It should be noted that the first coefficient is a pre-set value, which can be specifically set according to the actual situation.

[0111] For example, the first coefficient is 0.8, then the message size expansion coefficient of each interface under the target network channel in the previous time period is multiplied by the first coefficient, that is, allowRatio i =lastAllowRatio i *0.8.

[0112] If the network quality change value and the sending rate change value are both equal to 0, that is, increaseSpeed ​​= 0, and increaseTime = 0, it indicates that the business service processing speed and network transmission quality corresponding to the target network channel remain unchanged relative to the previous time period. At this time, the message size scaling coefficients of different priority interfaces in the current time period are the same as the message size scaling coefficients of the previous time period.

[0113] If the sending rate change value is less than 0, and the network quality change value is greater than 0, that is, increaseSpeed<0, and increaseTime>0, it indicates that the business service processing speed corresponding to the target network channel is slower than that of the previous time period, but the network transmission quality is better than that of the previous time period. However, the network channel is only used to transmit requests, and the business service is used to process requests. If the size of the transmitted message is increased, it will also cause a burden on the corresponding business service. Therefore, the message size scaling factor of the interfaces with different priorities in the current time period is the same as the message size scaling factor of the previous time period.

[0114] If the sending rate change value is greater than 0, that is, increaseSpeed>0, it indicates that the service processing speed corresponding to the target network channel is faster than that of the previous time period. At this time, according to the network quality change value and the message size scaling coefficients corresponding to the interfaces of different priorities in the previous time period, the message size scaling coefficients of the interfaces of different priorities in the current time period are determined. For the specific process, please refer to the following embodiment, which will not be repeated here.

[0115] It should be noted that, for each interface of each business service, the initial message size scaling factor is 1.

[0116] In the embodiment of the present application, the message size expansion coefficients of different priority interfaces in the target network channel in the current time period are determined according to the network quality change value and the transmission rate change value, so that the message size expansion coefficients corresponding to different priority interfaces can be differentially determined based on different situations of the network quality change value and the transmission rate change value. This improves the accuracy of the calculated message size expansion coefficient, and further improves the rationality and accuracy of the messages to be released in the next time period.

[0117] In some embodiments, the different priority interfaces include a first priority interface, a second priority interface, and a third priority interface; determining the message size scaling coefficients of the different priority interfaces in the current time period according to the network quality change value and the message size scaling coefficients corresponding to the different priority interfaces in the previous time period includes:

[0118] For the first priority interface, if the network quality change value is less than 0, that is, increaseTime<0, it indicates that the network transmission quality has deteriorated relative to the previous time period. At this time, the message size expansion coefficient of the first priority interface in the previous time period is multiplied by the second coefficient to obtain the message size expansion coefficient of the first priority interface in the current time period; the value range of the second coefficient is (0, 1), and the second coefficient is greater than the first coefficient. The second coefficient is a preset value, which can be specifically set according to actual conditions. For example, the second coefficient is 0.9, or 0.85, etc.

[0119] If the network quality change value is greater than 0, that is, increaseTime>0, it indicates that the network transmission quality has improved relative to the previous time period. At this time, the message size expansion coefficient of the first priority interface in the previous time period is multiplied by the third coefficient to obtain the message size expansion coefficient of the first priority interface in the current time period; the third coefficient is greater than 1. The third coefficient is a preset value, which can be specifically set according to actual conditions. For example, the third coefficient is 1.4, or 1.45, etc.

[0120] For the second priority interface, if the network quality change value is less than 0, that is, increaseTime<0, it indicates that the network transmission quality has deteriorated relative to the previous time period. At this time, the message size expansion coefficient of the second priority interface in the previous time period is multiplied by the fourth coefficient to obtain the message size expansion coefficient of the second priority interface in the current time period; the value range of the fourth coefficient is (0, 1), and the fourth coefficient is less than the second coefficient. The fourth coefficient is a preset value, which can be specifically set according to actual conditions. Exemplarily, the fourth coefficient is 0.7, or 0.75, etc.

[0121] If the network quality change value is greater than 0, that is, increaseTime>0, it indicates that the network transmission quality has improved relative to the previous time period. At this time, the message size expansion coefficient of the second priority interface in the previous time period is multiplied by the fifth coefficient to obtain the message size expansion coefficient of the second priority interface in the current time period; the fifth coefficient is greater than 1, and the fifth coefficient is less than the third coefficient. The fifth coefficient is a preset value, which can be specifically set according to actual conditions. Exemplarily, the fifth coefficient is 1.2, or 1.3, etc.

[0122] For the third priority interface, if the network quality change value is less than 0, that is, increaseTime<0, it indicates that the network transmission quality has deteriorated relative to the previous time period. At this time, the message size expansion coefficient of the third priority interface in the previous time period is multiplied by the sixth coefficient to obtain the message size expansion coefficient of the third priority interface in the current time period; the value range of the sixth coefficient is (0, 1), and the sixth coefficient is less than the fourth coefficient. The sixth coefficient is a preset value, which can be specifically set according to actual conditions. Exemplarily, the sixth coefficient is 0.6, or 0.65, etc.

[0123] If the network quality change value is greater than 0, that is, increaseTime>0, it indicates that the network transmission quality has improved relative to the previous time period. At this time, the message size scaling factor of the third priority interface in the current time period is the same as the message size scaling factor of the third priority interface in the previous time period.

[0124] It should be noted that the first priority is greater than the second priority, and the second priority is greater than the third priority. Therefore, no matter whether the network transmission quality is getting worse or worse compared to the previous time period, the change ratio of the message size scaling factor corresponding to the higher priority interface is greater than the change ratio of the message size scaling factor corresponding to the lower priority interface. This ensures that requests with higher priorities are always processed in a timely manner.

[0125] The embodiment of the present application adopts different methods to determine the corresponding message size scaling coefficients for interfaces of different priorities, thereby improving the accuracy of the calculated message size scaling coefficients, and further improving the rationality and accuracy of the messages to be released in the next time period.

[0126] In some embodiments, the method further includes: if the message size scaling factor of the target network channel in the previous time period is less than a preset coefficient threshold, setting the message size scaling factor of the current time period to a preset value; the preset value is greater than the preset coefficient threshold.

[0127] As time goes by, the message size scaling factor corresponding to the interface may become smaller and smaller, indicating that the interface processes fewer and fewer messages. In actual business scenarios, it is not possible to reject all requests of a certain type. Therefore, if the message size scaling factor of the target network channel in the previous time period is less than the preset coefficient threshold, the message size scaling factor of the current time period is set to the preset value, so that requests of this type can be processed normally.

[0128] The preset coefficient threshold is a preset value, for example, it is set to 0.3 or 0.4, etc. The preset value is also a preset value, for example, it can be set to 0.9 or 1.2, etc. It can be set according to actual conditions.

[0129] The embodiment of the present application takes into account that the message size scaling factor may become smaller and smaller over time, and the smaller message size scaling factor means that the size of released messages is getting smaller and smaller. At this time, the resources of the business service corresponding to the target network channel are in the recovery stage. Therefore, when the message size scaling factor is less than the preset coefficient threshold, it is adjusted to a preset value larger than the preset coefficient threshold, so that the business service corresponding to the target network channel can be fully utilized to more reasonably process requests.

[0130] In some embodiments, if the target network channel is accessed for the first time, indicating that the network channel resources and the resources of the corresponding business service are sufficient, at this time, the message size scaling factor of the first priority interface in the business service corresponding to the target network channel is set to 1.2 times or 1.5 times the initial message size scaling factor, the message size scaling factor of the second priority interface remains unchanged and is still the initial message size scaling factor, and the message size scaling factor of the third priority interface is set to 0.8 times or 0.7 times the initial message size scaling factor. In this way, requests with higher priorities are processed more preferentially.

[0131] Figure 2 A schematic diagram of the structure of a message processing device provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the device includes: an acquisition module 201, a first calculation module 202, a second calculation module 203 and a determination module 204; wherein,

[0132] The acquisition module 201 is used to obtain the first message sending duration and the first message sending rate of the target network channel in the current time period; the target network channel is any network channel between the network proxy service and multiple business services; the first calculation module 202 is used to calculate the network quality change value of the target network channel in the current time period according to the first message sending duration; the second calculation module 203 is used to calculate the sending rate change value of the target network channel in the current time period based on the first message sending rate; the sending rate change value represents the change in the processing capacity of the business service corresponding to the target network channel; the determination module 204 is used to use the network quality change value and the sending rate change value to determine the message size to be released by the target network channel in the next time period, and send a message of the message size to the corresponding business service through the target network channel

[0133] Based on the above embodiment, the determination module 204 is specifically used to: determine the message size scaling coefficient of different priority interfaces under the target network channel in the current time period according to the network quality change value and the sending rate change value; determine the message size to be released by the target network channel in the next time period based on the message size scaling coefficient.

[0134] On the basis of the above-mentioned embodiment, the determination module 204 is specifically used for: summing up the message size scaling coefficients of different priority interfaces of all network channels in the current time period to obtain a total proportional coefficient; calculating the message size to be released based on the message size scaling coefficient, the total proportional coefficient and the physical maximum network bandwidth of the network proxy service; if the message size to be released is larger than the physical maximum network bandwidth of the target network channel, the physical maximum network bandwidth of the target network channel is used as the message size to be released in the next time cycle; otherwise, the message size to be released is used as the message size to be released in the next time cycle.

[0135] On the basis of the above embodiment, the determination module 204 is specifically used for: if the network quality change value and the sending rate change value are both less than 0, then the message size scaling coefficients of the different priority interfaces in the previous time period are multiplied by the first coefficient to obtain the message size scaling coefficients of the different priority interfaces in the current time period; the numerical range of the first coefficient is (0, 1); if the network quality change value and the sending rate change value are both equal to 0, or the network quality change value is greater than 0, and the sending rate change value is less than 0, then the message size scaling coefficients of the different priority interfaces in the current time period are the same as the message size scaling coefficients of the previous time period; if the sending rate change value is greater than 0, then the message size scaling coefficients of the different priority interfaces in the current time period are determined according to the network quality change value and the message size scaling coefficients corresponding to the different priority interfaces in the previous time period.

[0136] On the basis of the above embodiment, different priority interfaces include a first priority interface, a second priority interface and a third priority interface; the determination module 204 is specifically used for: for the first priority interface, if the network quality change value is less than 0, then the message size scaling coefficient of the first priority interface in the previous time period is multiplied by the second coefficient to obtain the message size scaling coefficient of the first priority interface in the current time period; the numerical range of the second coefficient is (0, 1), and the second coefficient is greater than the first coefficient; if the network quality change value is greater than 0, then the message size scaling coefficient of the first priority interface in the previous time period is multiplied by the third coefficient to obtain the message size scaling coefficient of the first priority interface in the current time period; the third coefficient is greater than 1; for the second priority interface, if the network quality change value is less than 0, then the message size scaling coefficient of the second priority interface in the previous time period is multiplied by the fourth coefficient to obtain the message size scaling coefficient of the second priority interface in the current time period. the message size scaling coefficient of the current time period; the numerical range of the fourth coefficient is (0, 1), and the fourth coefficient is less than the second coefficient; if the network quality change value is greater than 0, the message size scaling coefficient of the second priority interface in the previous time period is multiplied by the fifth coefficient to obtain the message size scaling coefficient of the second priority interface in the current time period; the fifth coefficient is greater than 1, and the fifth coefficient is less than the third coefficient; for the third priority interface, if the network quality change value is less than 0, the message size scaling coefficient of the third priority interface in the previous time period is multiplied by the sixth coefficient to obtain the message size scaling coefficient of the third priority interface in the current time period; the numerical range of the sixth coefficient is (0, 1), and the sixth coefficient is less than the fourth coefficient; if the network quality change value is greater than 0, the message size scaling coefficient of the third priority interface in the current time period is the same as the message size scaling coefficient of the third priority interface in the previous time period.

[0137] Based on the above embodiment, the determination module 204 is specifically used to: if the message size scaling factor of the target network channel in the previous time period is less than the preset coefficient threshold, then set the message size scaling factor of the current time period to a preset value; the preset value is greater than the preset coefficient threshold.

[0138] Based on the above embodiment, the first calculation module 202 is specifically used to: obtain the second message sending duration of a preset number of historical time periods of the target network channel; determine the basic value of the sending duration of the target network channel based on multiple second message sending durations; calculate the first deviation between the first message sending duration and the basic value of the sending duration, and use the ratio between the first deviation and the basic value of the sending duration as the network quality change value of the target network channel in the current time period.

[0139] Based on the above embodiment, the second calculation module 203 is specifically used to: obtain the second message sending rate of the target network channel in the previous time period; calculate the second deviation between the first message sending rate and the second message sending rate, and use the ratio between the second deviation and the second message sending rate as the sending rate change value of the target network channel in the current time period.

[0140] It should be understood that the device corresponds to the above-mentioned message processing method embodiment and can execute the various steps involved in the above-mentioned method embodiment. The specific functions of the device can be referred to in the above description. To avoid repetition, the detailed description is appropriately omitted here. The device includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the operating system (OS) of the device.

[0141] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 3 As shown, the electronic device includes a processor 301 (processor), a memory 302 (memory) and a bus 303; wherein the processor 301 and the memory 302 communicate with each other through the bus 303. The processor 301 is used to call the program instructions in the memory 302 to execute the methods provided by the above-mentioned method embodiments.

[0142] The processor 301 can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor 301 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. It can implement or execute various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0143] The memory 302 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.

[0144] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments.

[0145] This embodiment provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable the computer to execute the methods provided by the above-mentioned method embodiments.

[0146] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0147] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0148] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0149] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.< / integer> < / integer>

Claims

1. A message processing method, characterized in that: The method comprises: Acquire a first message sending duration and a first message sending rate of a target network channel in a current time period; the target network channel is any network channel between a network proxy service and a plurality of business services; Calculate the network quality change value of the target network channel in the current time period according to the first message sending duration; Calculating a sending rate change value of the target network channel in a current time period based on the first message sending rate; the sending rate change value represents a change in the processing capacity of the business service corresponding to the target network channel; The network quality change value and the sending rate change value are used to determine the message size to be released by the target network channel in the next time cycle, and a message of the message size is sent to the corresponding business service through the target network channel.

2. The method according to claim 1, characterized in that: The determining the size of the message to be released by the target network channel in the next time cycle by using the network quality change value and the sending rate change value includes: Determine the message size scaling coefficient of different priority interfaces under the target network channel in the current time period according to the network quality change value and the sending rate change value; The message size to be released by the target network channel in the next time cycle is determined based on the message size scaling factor.

3. The method according to claim 2, characterized in that The determining, based on the message size scaling factor, the message size to be released by the target network channel in the next time period includes: The message size scaling coefficients of interfaces with different priorities of all network channels in the current time period are summed to obtain a total scaling coefficient; Calculating the size of the message to be released based on the message size scaling factor, the total proportionality factor and the physical maximum network bandwidth of the network proxy service; If the size of the message to be released is larger than the physical maximum network bandwidth of the target network channel, the physical maximum network bandwidth of the target network channel is used as the size of the message to be released in the next time cycle; otherwise, the size of the message to be released is used as the size of the message to be released in the next time cycle.

4. The method according to claim 2, characterized in that: The determining, according to the network quality change value and the sending rate change value, of the message size scaling coefficients of the different priority interfaces under the target network channel in the current time period includes: If the network quality change value and the sending rate change value are both less than 0, multiplying the message size scaling coefficients of the interfaces with different priorities in the previous time period by a first coefficient to obtain message size scaling coefficients of the interfaces with different priorities in the current time period; the value range of the first coefficient is (0, 1); If the network quality change value and the sending rate change value are both equal to 0, or the network quality change value is greater than 0 and the sending rate change value is less than 0, the message size scaling coefficients of the interfaces of different priorities in the current time period are the same as the message size scaling coefficients of the previous time period; If the sending rate change value is greater than 0, the message size scaling coefficients of the different priority interfaces in the current time period are determined according to the network quality change value and the message size scaling coefficients corresponding to the different priority interfaces in the previous time period.

5. The method according to claim 4, characterized in that The different priority interfaces include a first priority interface, a second priority interface, and a third priority interface; the determining, according to the network quality change value and the message size scaling coefficients corresponding to the different priority interfaces in the previous time period, the message size scaling coefficients of the different priority interfaces in the current time period includes: For the first priority interface, if the network quality change value is less than 0, the message size scaling coefficient of the first priority interface in the previous time period is multiplied by the second coefficient to obtain the message size scaling coefficient of the first priority interface in the current time period; the value range of the second coefficient is (0, 1), and the second coefficient is greater than the first coefficient; if the network quality change value is greater than 0, the message size scaling coefficient of the first priority interface in the previous time period is multiplied by the third coefficient to obtain the message size scaling coefficient of the first priority interface in the current time period; the third coefficient is greater than 1; For the second priority interface, if the network quality change value is less than 0, the message size scaling coefficient of the second priority interface in the previous time period is multiplied by the fourth coefficient to obtain the message size scaling coefficient of the second priority interface in the current time period; the value range of the fourth coefficient is (0, 1), and the fourth coefficient is less than the second coefficient; if the network quality change value is greater than 0, the message size scaling coefficient of the second priority interface in the previous time period is multiplied by the fifth coefficient to obtain the message size scaling coefficient of the second priority interface in the current time period; the fifth coefficient is greater than 1, and the fifth coefficient is less than the third coefficient; For the third priority interface, if the network quality change value is less than 0, the message size scaling coefficient of the third priority interface in the previous time period is multiplied by the sixth coefficient to obtain the message size scaling coefficient of the third priority interface in the current time period; the numerical range of the sixth coefficient is (0, 1), and the sixth coefficient is less than the fourth coefficient; if the network quality change value is greater than 0, the message size scaling coefficient of the third priority interface in the current time period is the same as the message size scaling coefficient of the third priority interface in the previous time period.

6. The method according to claim 4, characterized in that The method further comprises: If the message size scaling factor of the target network channel in the previous time period is less than the preset coefficient threshold, the message size scaling factor of the current time period is set to a preset value; the preset value is greater than the preset coefficient threshold.

7. The method according to any one of claims 1 to 6, characterized in that: The calculating the network quality change value of the target network channel in the current time period according to the first message sending duration includes: Obtaining a second message sending duration of a preset number of historical time periods of the target network channel; Determine a basic value of the sending duration of the target network channel based on a plurality of sending durations of the second messages; A first deviation between the first message sending duration and the sending duration base value is calculated, and a ratio between the first deviation and the sending duration base value is used as a network quality change value of the target network channel in the current time period.

8. The method according to any one of claims 1 to 6, characterized in that: The calculating, based on the first message sending rate, a change value of the sending rate of the target network channel in the current time period includes: Obtaining a second message sending rate of the target network channel in the previous time period; A second deviation between the first message sending rate and the second message sending rate is calculated, and a ratio between the second deviation and the second message sending rate is used as a sending rate change value of the target network channel in the current time period.

9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, the method according to any one of claims 1 to 8 is performed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 8 is executed.

11. A computer program product, characterized in that include: Computer program instructions, when executed by a processor, perform the method according to any one of claims 1 to 8.