Message routing distribution method and device, electronic equipment and storage medium

By dynamically adjusting the link distribution weight, the problem of low message routing distribution efficiency and quality in the prior art is solved, and more efficient and stable message routing distribution is achieved.

CN119520368AActive Publication Date: 2025-02-25E-SURFING DIGITAL LIFE TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411659665.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-02-25
Estimated Expiration
2044-11-19

AI Technical Summary

Technical Problem

The prior art cannot dynamically adjust link distribution messages based on the actual service situation of the server, resulting in low efficiency and quality of message routing distribution, affecting stability.

Method used

By collecting service response data, obtaining link distribution weight data, dynamically adjusting the next link load distribution weight, and routing and distributing network messages to be distributed in the second time period based on the adjusted weight.

Benefits of technology

Dynamic adjustment of link distribution weights is realized, the efficiency and quality of message routing distribution is improved, and stability is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520368A_ABST
    Figure CN119520368A_ABST
Patent Text Reader

Abstract

The invention discloses a message routing distribution method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring service response data of a first time period; obtaining link distribution weight data corresponding to the first time period; according to the service request response data and the link distribution weight data, a next link load distribution weight is dynamically adjusted, the next link load distribution weight is a link distribution weight corresponding to a second time period associated with the first time period, and the second time period is after the first time period; and obtaining a to-be-distributed network message, and performing routing distribution on the to-be-distributed network message in the second time period according to the next link load distribution weight. According to the invention, the dynamic adjustment of the link distribution weight can be realized, the efficiency and quality of message routing distribution are improved, the stability of message routing distribution is improved, and the method can be widely applied to the technical field of communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a message routing distribution method, device, electronic device and storage medium. Background Art

[0002] At present, various capability buses and gateway products basically have the function of message routing and distribution, which are usually based on pre-set algorithm values ​​(including response time (time consumption), link number hash, weight, etc.). However, they are often unable to adjust the link distribution message according to the actual service situation of the server, resulting in low efficiency and quality of message routing and distribution, affecting the stability of message routing and distribution. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to propose a message routing distribution method, device, electronic device and storage medium, which can realize dynamic adjustment of link distribution weights and improve the efficiency and quality of message routing distribution.

[0004] On the one hand, an embodiment of the present application proposes a message routing distribution method, the method comprising the following steps:

[0005] Collect service response data for the first time period;

[0006] Obtaining link distribution weight data corresponding to the first time period;

[0007] Dynamically adjust a next link load distribution weight according to the service request response data and the link distribution weight data, wherein the next link load distribution weight is a link distribution weight corresponding to a second time period associated with the first time period, and the second time period is after the first time period;

[0008] The network message to be distributed is obtained, and according to the next link load distribution weight, the network message to be distributed is routed and distributed in the second time period.

[0009] In some embodiments, collecting the service response data for the first time period specifically includes:

[0010] Get multiple message distribution links;

[0011] Collecting distribution service response duration data corresponding to each of the message distribution links in the first time period, including multiple time nodes and distribution service response durations corresponding to each of the time nodes;

[0012] Performing data preprocessing on the distribution service response time data corresponding to each of the message distribution links to obtain the target service response time data corresponding to each of the message distribution links;

[0013] According to the target service response duration data corresponding to each of the message distribution links, the average service response duration corresponding to each of the message distribution links in the first time period is calculated.

[0014] In some embodiments, obtaining the link distribution weight data corresponding to the first time period specifically includes:

[0015] The current link load distribution weight corresponding to each of the message distribution links and the preset current gateway distribution service weight are obtained, wherein the current link load distribution weight is the link load distribution weight corresponding to the message distribution link in the first time period.

[0016] In some embodiments, dynamically adjusting the next link load distribution weight according to the service request response data and the link distribution weight data specifically includes:

[0017] Get the preset standard service response time;

[0018] Calculating the service response duration ratio corresponding to each of the message distribution links according to the service response standard duration and the average service response duration corresponding to each of the message distribution links;

[0019] When the service response time ratios corresponding to each of the message distribution links are within the preset ratio threshold range, stop dynamically adjusting the next link load distribution weight; otherwise, calculate the next link load distribution weight corresponding to each of the message distribution links based on the service response time ratios corresponding to each of the message distribution links, the current link load distribution weight and the current gateway distribution service weight.

[0020] In some embodiments, the next link load distribution weight is calculated by the following formula:

[0021]

[0022] Among them, NextAppWei i is the next link load distribution weight corresponding to the i-th message distribution link, n is the number of message distribution links, NowTimeper i is the service response time ratio corresponding to the i-th message distribution link, NowAppWei i is the current link load distribution weight corresponding to the i-th message distribution link, WeiStandard i is the current gateway distribution service weight corresponding to the i-th message distribution link, q i , q2 and q3 are preset allocation weights.

[0023] In some embodiments, the obtaining of the network message to be distributed and routing distribution of the network message to be distributed in the second time period according to the next link load distribution weight specifically includes:

[0024] Determining the target network message to be distributed corresponding to each of the message distribution links from the network message to be distributed;

[0025] According to the next link load distribution weight corresponding to each message distribution link, each message distribution link is used to perform routing distribution on the target network message to be distributed in the second time period.

[0026] In some embodiments, the average service response time is calculated by the following formula:

[0027]

[0028] Among them, NowAtime i NowT represents the average service response time corresponding to the i-th message distribution link. k is the distribution service response duration corresponding to the kth message distribution service performed by the i-th message distribution link in the first time period, and m is the number of times the i-th message distribution link performs the message distribution service in the first time period.

[0029] On the other hand, an embodiment of the present application provides a message routing distribution device, the device comprising:

[0030] The first module is used to collect service response data for a first time period;

[0031] A second module is used to obtain link distribution weight data corresponding to the first time period;

[0032] A third module is used to dynamically adjust the next link load distribution weight according to the service request response data and the link distribution weight data, wherein the next link load distribution weight is a link distribution weight corresponding to a second time period associated with the first time period, and the second time period is after the first time period;

[0033] The fourth module is used to obtain the network message to be distributed, and route and distribute the network message to be distributed in the second time period according to the next link load distribution weight.

[0034] On the other hand, an embodiment of the present application provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the message routing distribution method described above when executing the computer program.

[0035] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the message routing distribution method described above is implemented.

[0036] The embodiments of the present application include at least the following beneficial effects: the present application provides a message routing distribution method, device, electronic device and storage medium, which collects service response data of a first time period, obtains link distribution weight data corresponding to the first time period, dynamically adjusts the next link load distribution weight according to the service request response data and the link distribution weight data, and performs routing distribution on the network message to be distributed in the second time period according to the next link load distribution weight. The present application can realize the dynamic adjustment of link distribution weight, improve the efficiency and quality of message routing distribution, and improve the stability of message routing distribution. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0039] Figure 1 This is an optional flowchart of a message routing distribution method provided by an embodiment of the present application;

[0040] Figure 2 is a flowchart of step S101 in an embodiment of the present application;

[0041] Figure 3 This is a schematic diagram of the storage structure of the distribution service response time data in an embodiment of the present application;

[0042] Figure 4 It is a structural diagram of a distribution service response duration data list in an embodiment of the present application;

[0043] Figure 5 It is a schematic diagram of a message distribution link in an embodiment of the present application;

[0044] Figure 6 is a flowchart of step S103 in an embodiment of the present application;

[0045] Figure 7 is a flowchart of step S105 in an embodiment of the present application;

[0046] Figure 8 It is a schematic diagram of routing and distributing a target network message to be distributed by using a message distribution link in an embodiment of the present application;

[0047] Fig. 9 It is a structural diagram of a message routing distribution device provided in an embodiment of the present application;

[0048] Fig.10 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.

[0050] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".

[0051] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0053] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0054] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.

[0055] 1) Capability bus: Capability bus is an internal structure used to connect various functional components of a computer and transmit information. In the field of informatization, it mainly serves as a gateway for capability opening, responsible for managing and coordinating various capabilities. In the transformation of enterprise IT services, capability bus (MSB) plays the role of capability gateway, connecting the capabilities of OSS (network operation support system) to the company-level capability opening platform for use by other domain applications of the company1. In addition, capability bus is also closely related to the data sharing platform, and data sharing and API calls are carried out through ESB / MSB to ensure the effective management and use of data.

[0056] At present, various capability buses and gateway products basically have the function of message routing and distribution, which are usually based on pre-set algorithm values ​​(including response time (time consumption), link number hash, weight, etc.). However, they are often unable to adjust the link distribution message according to the actual service situation of the server, resulting in low efficiency and quality of message routing and distribution, affecting the stability of message routing and distribution.

[0057] Based on this, the embodiments of the present application propose a message routing distribution method, device, electronic device and storage medium. According to the service response time, time period, link distribution variable weight and other dimensional data of the message routing distribution, the actual response efficiency of the message distribution link is calculated, and the link distribution weight is automatically adjusted. The current factors, preset factors, limit factors, etc. of the message routing distribution are taken into account, and the specific link efficiency of the actual service end is considered more comprehensively and more reflective, thereby improving the service quality. At the same time, the real-time calculation and expected effectiveness are combined with each other to achieve a dynamic balance of message routing distribution, so that the message routing distribution control is more accurate and efficient, and the quality and accuracy of the message routing distribution are effectively improved, so as to escort the message routing distribution service.

[0058] Reference Figure 1 , Figure 1 This is an optional flowchart of a message routing distribution method provided by an embodiment of the present application. The method may include but is not limited to steps S101 to S104:

[0059] Step S101, collecting service response data of a first time period;

[0060] Step S102, obtaining link distribution weight data corresponding to the first time period;

[0061] Step S103, dynamically adjusting the next link load distribution weight according to the service request response data and the link distribution weight data, wherein the next link load distribution weight is a link distribution weight corresponding to a second time period associated with the first time period, and the second time period is after the first time period;

[0062] Step S104, obtaining a network message to be distributed, and performing routing distribution on the network message to be distributed in a second time period according to the next link load distribution weight.

[0063] In some embodiments, the above-mentioned message routing and distribution method can solve the problems of lack of further evaluation of link distribution weights and low distribution quality in load methods of various capability buses and gateway products, thereby enriching the message routing and distribution means and improving the accuracy of distribution effects.

[0064] In some embodiments, reference Figure 2 , Figure 2 This is an optional flowchart of step S101 in the embodiment of the present application. Step S101 may include but is not limited to steps S201 to S204:

[0065] Step S201, obtaining multiple message distribution links;

[0066] Step S202, collecting the distribution service response duration data corresponding to each message distribution link in the first time period, including multiple time nodes and the distribution service response duration corresponding to each time node;

[0067] Step S203, pre-processing the distribution service response time data corresponding to each message distribution link to obtain the target service response time data corresponding to each message distribution link;

[0068] Step S204: Calculate the average service response duration corresponding to each message distribution link in the first time period according to the target service response duration data corresponding to each message distribution link.

[0069] In some embodiments, the average service response time is calculated by the following formula:

[0070]

[0071] Among them, NowAtime i NowT represents the average service response time corresponding to the i-th message distribution link. k is the distribution service response duration corresponding to the kth message distribution service performed by the i-th message distribution link in the first time period, and m is the number of times the i-th message distribution link performs the message distribution service in the first time period.

[0072] In some embodiments, a time period span is set, and multiple time periods are determined based on the time period span. For example, assuming that the time period span is determined to be 4 hours, it means that there is a difference of 4 hours between the start time and the end time of each time period, and a time period ends every 4 hours. For example, time period 1 is 8 a.m. to 12 a.m. on a certain day, and time period 2 is the next time period of time period 1, then time period 2 is 12 a.m. to 4 p.m., and so on.

[0073] In some embodiments, reference Figure 3 , Figure 3 It is an optional storage structure diagram of the distribution service response duration data in the embodiment of the present application, which includes time periods 1 to N and message distribution links 1 to M. Each message distribution link has corresponding distribution service duration response data in each time period. Message distribution link 1 has corresponding distribution service duration response data 11 in time period 1, message distribution link 2 has corresponding distribution service duration response data 12 in time period 1, and so on.

[0074] In some embodiments, optionally, according to a preset time interval, the distribution service response duration data of each message distribution link is periodically collected and dynamically stored in a database. Then, the distribution service response duration data of each message distribution link is obtained from the database, including the distribution service response duration of each time node in each time period. According to the distribution service response duration data of each message distribution link, a distribution service response duration data list is generated.

[0075] For example, refer to Figure 4 , Figure 4It is an optional structural diagram of a distribution service response duration data list in an embodiment of the present application. The distribution service response duration data list is recorded as CT. CT stores CT1, CT2, ..., CTM. CTi is the distribution service response duration data storage table of the i-th message distribution link. The value of i ranges from 1 to M, M is the number of message distribution links, and CTi stores [CTi1, CTi2, ..., CTiN], wherein CTij is the distribution service response duration data corresponding to the i-th message distribution link in the j-th time period, j ranges from 1 to N, N is the number of time periods, and CTij may include multiple distribution service response duration unit data, each distribution service response duration unit data may include but is not limited to information including a time period (such as the above-mentioned time period), a time node in the time period, a distribution service response duration (time consumption), a system to which the message distribution link belongs, and a node serial number corresponding to the message distribution link.

[0076] Then, the CTij corresponding to each message distribution link in the first time period is taken out from CT, and data preprocessing is performed on multiple distribution service response time unit data in CTij, including data cleaning, screening, and processing, such as excluding records with no business volume and removing data exceeding the limit value (such as request interception, request timeout and other obvious abnormal data). Finally, the average service response time NowAtime of each message distribution link in the first time period is calculated. i , and store it in cache.

[0077] In step S102 of some embodiments, specifically, the current link load distribution weight corresponding to each message distribution link and the preset current gateway distribution service weight are obtained, wherein the current link load distribution weight is the link load distribution weight corresponding to the message distribution link in the first time period.

[0078] The current gateway distribution service weight is the weight ratio of the number of messages assigned to each message distribution link by the gateway by default. For example, assuming that there are message distribution links 1 to 3, the current gateway distribution service weight is 1:1:1. Assuming that there are 30 network messages to be processed, then the 30 network messages to be processed will be distributed on message distribution links 1 to 3 according to 1:1:1. Each message distribution link will be allocated 10 network messages, and then further message distribution will be carried out.

[0079] Link load distribution weight refers to a mechanism for distributing traffic among multiple message distribution links according to the weight ratio of each message distribution link. This mechanism is usually used in network devices to evenly distribute traffic among multiple links, thereby improving network reliability and performance. The traffic allocated to each message distribution link is determined according to the link load distribution weight. Optionally, assuming that the weights of two message distribution links are 1:2 respectively, the traffic will be distributed on these two message distribution links at a ratio of 1:2.

[0080] In some embodiments, reference Figure 5 , Figure 5 It is an optional schematic diagram of the message distribution link in the embodiment of the present application, which includes message distribution links 1 to N. The business system is used to receive or generate multiple network messages, and then the business system distributes the multiple network messages to multiple message distribution links according to the current gateway service weight, distributes the traffic to each message distribution link according to the current link load distribution weight, and uses each message distribution link to route and forward the network messages.

[0081] In some embodiments, reference Figure 6 , Figure 6 This is an optional flowchart of step S103 in the embodiment of the present application. Step S103 may include but is not limited to steps S301 to S303:

[0082] Step S301, obtaining a preset service response standard duration;

[0083] Step S302, calculating the service response duration ratio corresponding to each message distribution link according to the service response standard duration and the average service response duration corresponding to each message distribution link;

[0084] Step S303: When the service response time ratios corresponding to each message distribution link are within the preset ratio threshold range, stop dynamically adjusting the next link load distribution weight; otherwise, calculate the next link load distribution weight corresponding to each message distribution link based on the service response time ratios corresponding to each message distribution link, the current link load distribution weight and the current gateway distribution service weight.

[0085] In some embodiments, the service response standard duration is a preset service response duration, and the service response duration ratio is calculated by the following formula:

[0086] NowTimer i =NowAtime i / StandardTime;

[0087] Among them, NowTimer iNowAtime is the service response time ratio corresponding to the i-th message distribution link, i It represents the average service response time corresponding to the i-th message distribution link, and StandardTime is the preset standard service response time.

[0088] In some embodiments, when the service response time ratios corresponding to each message distribution link are within a preset ratio threshold range, it indicates that the current traffic distribution is relatively reasonable and there is no need to adjust the corresponding link load distribution weight. Otherwise, the next link load distribution weight is dynamically adjusted based on the service response time ratios corresponding to each message distribution link, the current link load distribution weight and the current gateway distribution service weight. The next link load distribution weight is the link load distribution weight corresponding to each message distribution link in the second time period.

[0089] In some embodiments, the next link load distribution weight is calculated by the following formula:

[0090]

[0091] Among them, NextAppWei i is the next link load distribution weight corresponding to the i-th message distribution link, n is the number of message distribution links, NowTimeper i is the service response time ratio corresponding to the i-th message distribution link, NowAppWei i is the current link load distribution weight corresponding to the i-th message distribution link, WeiStandard i is the current gateway distribution service weight corresponding to the i-th message distribution link, q i , q2 and q3 are preset allocation weights. It should be noted that q1, q2 and q3 can be dynamically adjusted according to business needs or relevant experience, and the specific values ​​are not limited.

[0092] In some embodiments, reference Figure 7 , Figure 7 This is an optional flowchart of step S105 in the embodiment of the present application. Step S105 may include but is not limited to steps S401 to S402:

[0093] Step S401, determining the target network message to be distributed corresponding to each message distribution link from the network message to be distributed;

[0094] Step S402: routing and distributing the target network message to be distributed in the second time period by using each message distribution link according to the next link load distribution weight corresponding to each message distribution link.

[0095] In some embodiments, based on the above-mentioned current gateway distribution service weight, the target network message to be distributed corresponding to each message distribution link is determined from the network message to be distributed. In the second time period, based on the next link load distribution weight corresponding to each message distribution link, the corresponding traffic is allocated to each message distribution link, and each message distribution link is used to route and distribute the target network message to be distributed.

[0096] In some embodiments, reference Figure 8 , Figure 8 It is an optional schematic diagram of using a message distribution link to route and distribute a target network message to be distributed in an embodiment of the present application, which includes a message queue to be distributed and message distribution links 1 to M. According to the current gateway distribution service weight, the target network message to be distributed corresponding to each message distribution link is determined from the message queue to be distributed, and the target network message to be distributed is sent to each message distribution link. Then, each message distribution link is used to route and distribute the target network message to be distributed.

[0097] In some embodiments, taking three message distribution links of a system as an example, assuming that the second time period is separated from the first time period by one time period, that is, the first time period is A, then the second time period is A+2, and a message routing distribution method provided in an embodiment of the present application is applied to dynamically adjust the link load distribution weight of the system, as shown in the following Table 1:

[0098] Table 1 Link load distribution weight dynamic adjustment table

[0099]

[0100] Among them, node 1 to node 3 are three message distribution links in the system. If the calculated next link load distribution weight is not an integer, the next link load distribution weight is rounded according to the principle of rounding. The second time period is associated with the fourth time period, the third time period is associated with the fifth time period, and the fourth time period is associated with the sixth time period. According to the service response time ratio corresponding to each message distribution link (node ​​1 to node 3) in the second time period, the current link load distribution weight and the current gateway distribution service weight, the next link load distribution weight corresponding to each message distribution link is calculated, that is, the current link load distribution weight corresponding to the fourth time period, and so on.

[0101] Reference Fig. 9 , Fig. 9 : is an optional structural diagram of a message routing distribution device provided in an embodiment of the present application. The device can be used to implement the above-mentioned message routing distribution method. The message routing distribution device may include:

[0102] The first module is used to collect service response data for a first time period;

[0103] The second module is used to obtain link distribution weight data corresponding to the first time period;

[0104] A third module is used to dynamically adjust the next link load distribution weight according to the service request response data and the link distribution weight data, wherein the next link load distribution weight is a link distribution weight corresponding to a second time period associated with the first time period, and the second time period is after the first time period;

[0105] The fourth module is used to obtain the network message to be distributed, and perform routing distribution on the network message to be distributed in the second time period according to the next link load distribution weight.

[0106] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0107] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above message routing distribution method when executing the computer program. The electronic device can be any smart terminal including a tablet computer.

[0108] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0109] See also Fig.10 , Fig.10 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0110] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0111] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the message routing distribution method of the embodiment of this application;

[0112] Input / output interface 903, used to implement information input and output;

[0113] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0114] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);

[0115] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0116] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned message routing distribution method is implemented.

[0117] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0118] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0119] The embodiments of the present application provide a message routing distribution method, device, electronic device and storage medium, which collects service response data of a first time period, obtains link distribution weight data corresponding to the first time period, dynamically adjusts the next link load distribution weight according to the service request response data and the link distribution weight data, and performs routing distribution on the network message to be distributed in the second time period according to the next link load distribution weight. The embodiments of the present application can realize dynamic adjustment of link distribution weight, improve the efficiency and quality of message routing distribution, and improve the stability of message routing distribution.

[0120] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0121] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0122] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0123] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0124] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0125] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0126] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as 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 interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0127] The units described above 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.

[0128] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0129] It should be appreciated that embodiments of the present invention may be implemented or enforced by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable memory. The method may be implemented in a computer program using standard programming techniques including a non-transitory computer-readable storage medium configured with a computer program, wherein the storage medium so configured causes the computer to operate in a specific and predefined manner - according to the methods and drawings described in the specific embodiments. Each program may be implemented in a high-level procedural or object-oriented programming language to communicate with a computer system. However, if desired, the program may be implemented in an assembly or machine language. In any case, the language may be a compiled or interpreted language. In addition, the program may be run on a programmed ASIC for this purpose.

[0130] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0131] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A message routing distribution method, characterized in that: The method comprises the following steps: Collect service response data for the first time period; Obtaining link distribution weight data corresponding to the first time period; Dynamically adjust a next link load distribution weight according to the service request response data and the link distribution weight data, wherein the next link load distribution weight is a link distribution weight corresponding to a second time period associated with the first time period, and the second time period is after the first time period; The network message to be distributed is obtained, and according to the next link load distribution weight, the network message to be distributed is routed and distributed in the second time period.

2. The message routing distribution method according to claim 1, characterized in that: The collecting of service response data in the first time period specifically includes: Get multiple message distribution links; Collecting distribution service response duration data corresponding to each of the message distribution links in the first time period, including multiple time nodes and distribution service response durations corresponding to each of the time nodes; Performing data preprocessing on the distribution service response time data corresponding to each of the message distribution links to obtain the target service response time data corresponding to each of the message distribution links; According to the target service response duration data corresponding to each of the message distribution links, the average service response duration corresponding to each of the message distribution links in the first time period is calculated.

3. The message routing distribution method according to claim 2, characterized in that: The obtaining the link distribution weight data corresponding to the first time period specifically includes: The current link load distribution weight corresponding to each of the message distribution links and the preset current gateway distribution service weight are obtained, wherein the current link load distribution weight is the link load distribution weight corresponding to the message distribution link in the first time period.

4. The message routing distribution method according to claim 3, characterized in that: The dynamically adjusting the next link load distribution weight according to the service request response data and the link distribution weight data specifically includes: Get the preset standard service response time; Calculating the service response duration ratio corresponding to each of the message distribution links according to the service response standard duration and the average service response duration corresponding to each of the message distribution links; When the service response time ratios corresponding to each of the message distribution links are within the preset ratio threshold range, stop dynamically adjusting the next link load distribution weight; otherwise, calculate the next link load distribution weight corresponding to each of the message distribution links based on the service response time ratios corresponding to each of the message distribution links, the current link load distribution weight and the current gateway distribution service weight.

5. The message routing distribution method according to claim 1, characterized in that: The next link load distribution weight is calculated by the following formula: Among them, NextAppWei i is the next link load distribution weight corresponding to the i-th message distribution link, n is the number of message distribution links, NowTimeper i is the service response time ratio corresponding to the i-th message distribution link, NowAppWei i is the current link load distribution weight corresponding to the i-th message distribution link, WeiStandard i is the current gateway distribution service weight corresponding to the i-th message distribution link, and q1, q2 and q3 are preset distribution weights.

6. The message routing distribution method according to claim 4, characterized in that: The obtaining of the network message to be distributed and routing distribution of the network message to be distributed in the second time period according to the next link load distribution weight specifically includes: Determining the target network message to be distributed corresponding to each of the message distribution links from the network message to be distributed; According to the next link load distribution weight corresponding to each message distribution link, each message distribution link is used to perform routing distribution on the target network message to be distributed in the second time period.

7. The message routing distribution method according to claim 2, characterized in that: The average service response time is calculated by the following formula: Among them, NowAtime i NowT represents the average service response time corresponding to the i-th message distribution link. k is the distribution service response duration corresponding to the kth message distribution service performed by the i-th message distribution link in the first time period, and m is the number of times the i-th message distribution link performs the message distribution service in the first time period.

8. A message routing distribution device, characterized in that: The device comprises: The first module is used to collect service response data for a first time period; A second module is used to obtain link distribution weight data corresponding to the first time period; A third module is used to dynamically adjust the next link load distribution weight according to the service request response data and the link distribution weight data, wherein the next link load distribution weight is a link distribution weight corresponding to a second time period associated with the first time period, and the second time period is after the first time period; The fourth module is used to obtain the network message to be distributed, and route and distribute the network message to be distributed in the second time period according to the next link load distribution weight.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the message routing distribution method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the message routing distribution method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Heterogeneous link data translation and distribution method, system and device and storage medium

    CN110581804A

  • Computer network data adaptive distribution method

    CN114760239A

  • Route distribution method, device and equipment

    CN115622933A

  • Network aware load balancing

    CN116783874A

  • Route Determination in a Multi-Hop Network Using Multiple Routing Metrics

    US20150304207A1