A message routing and distribution method and apparatus, electronic device and storage medium

By collecting service response data and link distribution weight data, the link load weight of message routing and distribution is dynamically adjusted, which solves the problem that existing technologies cannot dynamically adjust the load weight, improves the efficiency and quality of message routing and distribution, and enhances stability.

CN119520368BActive Publication Date: 2025-11-07E-SURFING DIGITAL LIFE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In existing technologies, capability bus and gateway products cannot dynamically adjust the message distribution based on the actual service situation of the server, resulting in low message routing and distribution efficiency and quality, which affects stability.

Method used

By collecting service response data, we can obtain link distribution weight data, dynamically adjust the load distribution weight of the next link, and perform message routing and distribution based on the adjusted weight. This is further adjusted dynamically in conjunction with service response time and preset standards.

Benefits of technology

It enables dynamic adjustment of link distribution weights, improving the efficiency and quality of message routing and distribution, and enhancing stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520368B_ABST
    Figure CN119520368B_ABST
Patent Text Reader

Abstract

The application discloses a message routing distribution method and device, electronic equipment and storage medium. The method comprises the following steps: collecting service response data in a first time period; obtaining link distribution weight data corresponding to the first time period; dynamically adjusting 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 the 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; obtaining a network message to be distributed; and routing and distributing the network message to be distributed in the second time period according to the next link load distribution weight. The application can dynamically adjust the link distribution weight, improve the efficiency and quality of message routing distribution, improve the stability of message routing distribution, and can be widely applied in 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 technical field of communication, in particular to a message routing distribution method and device, electronic equipment and storage medium. BACKGROUND

[0002] At present, various types of capability buses and gateway products basically have message routing distribution functions, which are usually based on pre-set algorithm values (including response time (time consumption), link number hash, weight, etc.) to perform message routing distribution, but often cannot adjust the link distribution message according to the actual service of the server, resulting in low efficiency and quality of message routing distribution, and affecting the stability of message routing distribution. SUMMARY

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

[0004] In one aspect, the present application provides a message routing distribution method, which comprises the following steps:

[0005] Collecting service response data of a first time period;

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

[0007] According to the service request response data and the link distribution weight data, dynamically adjusting a next link load distribution weight, 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] Obtaining a network message to be distributed, and performing routing distribution on the network message to be distributed in the second time period according to the next link load distribution weight.

[0009] In some embodiments, the collecting of service response data of a first time period specifically comprises:

[0010] Obtaining a plurality of message distribution links;

[0011] Collecting distribution service response time data corresponding to each message distribution link in the first time period, including a plurality of time nodes and distribution service response time corresponding to each time node;

[0012] Data preprocessing the distribution service response time data corresponding to each message distribution link to obtain target service response time data corresponding to each message distribution link;

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

[0014] In some embodiments, the link distribution weight data corresponding to the first time period is acquired, specifically including:

[0015] The current link load distribution weight corresponding to each message distribution link and a preset current gateway distribution service weight are acquired, 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, the next link load distribution weight is dynamically adjusted according to the service request response data and the link distribution weight data, specifically including:

[0017] A preset service response standard duration is acquired.

[0018] According to the service response standard duration and the service response average duration corresponding to each message distribution link, a service response duration ratio corresponding to each message distribution link is calculated.

[0019] When the service response duration ratio corresponding to each message distribution link is within a preset ratio threshold range, the next link load distribution weight is stopped from being dynamically adjusted, otherwise, the next link load distribution weight corresponding to each message distribution link is calculated according to the service response duration ratio corresponding to each message distribution link, 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] wherein NextAppWei i is the next link load distribution weight corresponding to the ith message distribution link, n is the number of message distribution links, NowTimeper i is the service response duration ratio corresponding to the ith message distribution link, NowAppWei i is the current link load distribution weight corresponding to the ith message distribution link, WeiStandard i is the current gateway distribution service weight corresponding to the ith message distribution link, q i q1, q2 and q3 are preset allocation weights.

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

[0024] determining the target network message to be distributed corresponding to each message distribution link from the network message to be distributed;

[0025] distributing the target network message to be distributed in the second time period by each message distribution link according to the next link load distribution weight corresponding to each message distribution link.

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

[0027]

[0028] wherein, NowAtime i represents the average service response time corresponding to the ith message distribution link, NowT k is the distribution service response time corresponding to the ith message distribution link when performing the kth message distribution service in the first time period, and m is the number of times of message distribution service performed by the ith message distribution link in the first time period.

[0029] In another aspect, the embodiments of the present application provide a message routing and distribution device, the device comprising:

[0030] a first module configured to collect service response data in a first time period;

[0031] a second module configured to obtain link distribution weight data corresponding to the first time period;

[0032] a third module configured to 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 the 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] a fourth module configured to obtain a network message to be distributed, and distribute the network message to be distributed in the second time period according to the next link load distribution weight.

[0034] In another aspect, the embodiments of the present application provide an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the message routing and distribution method described above when executing the computer program.

[0035] In another aspect, an embodiment of the present application provides a computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the message routing and distribution method described above.

[0036] The embodiments of the present application have at least the following beneficial effects: The message routing and distribution method, device, electronic device and storage medium provided by the present application can collect service response data of a first time period, obtain 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, and route and distribute network messages to be distributed in a second time period according to the next link load distribution weight. The present application can dynamically adjust the link distribution weight, improve the efficiency and quality of message routing and distribution, and improve the stability of message routing and distribution. BRIEF DESCRIPTION OF DRAWINGS

[0037] The accompanying drawings, which are incorporated herein and constitute part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.

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

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

[0041] Figure 3 is a storage structure diagram of the distribution service response duration data in the embodiments of the present application;

[0042] Figure 4 is a structure diagram of the distribution service response duration data list in the embodiments of the present application;

[0043] Figure 5 is a diagram of the message distribution link in the embodiments of the present application;

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

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

[0046] Figure 8 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] Figure 9 is a structural schematic diagram of a message routing and distributing device provided by an embodiment of the present application;

[0048] Figure 10 is a hardware structural schematic diagram of an electronic device provided by 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 combination with the drawings and embodiments. 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 relates to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementation described in the following exemplary embodiments does not represent all the implementations consistent with the embodiments of the present application, but is only an example of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.

[0050] It can be understood that the terms "first", "second", and the like used in the present application can be used herein to describe various concepts, but unless specifically stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present application, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "when" or "when" or "in response to determining".

[0051] The terms "at least one", "multiple", "each", "any" and the like used in the present application include one, two or more than two, multiple includes two or more than two, 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 understood by those skilled in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.

[0053] It should be noted that in various specific embodiments of the present application, when relevant processing needs to be performed on data related to the identity or characteristics of the user, such as user information, user behavior data, user history data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of such data will comply with relevant laws, regulations, and standards. In addition, when the embodiments of the present application need to obtain sensitive personal information of the user, the separate permission or separate consent of the user will be obtained through a pop-up window or a jump to a confirmation page, and after obtaining the separate permission or separate consent of the user, the necessary user-related data for the normal operation of the embodiments of the present application will be obtained.

[0054] Before the embodiments of the present application are described in detail, first, some of the terms and terminologies involved in the embodiments of the present application will be explained, and the terms and terminologies involved in the embodiments of the present application are applicable to the following explanations.

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

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

[0057] Based on this, the embodiments of the present application propose a message routing and distribution method, device, electronic equipment, and storage medium, which calculates the actual response efficiency of message distribution links according to the service response time, time period, and link distribution variable weight of message routing and distribution, and automatically adjusts the link distribution weight. Considering the current factors, preset factors, and limit factors of message routing and distribution, a more comprehensive and more actual server-specific link efficiency is considered, thereby improving the service quality. At the same time, the instant calculation and expected effect are combined with each other to achieve dynamic balance of message routing and distribution, making the message routing and distribution control more accurate and efficient, effectively improving the quality and accuracy of message routing and distribution, and providing protection for message routing and distribution services.

[0058] Referring to Figure 1 , Figure 1 is an optional flowchart of a message routing and distribution method provided by an embodiment of the present application, which can 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 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 routing and distributing the network message to be distributed in the second time period according to the next link load distribution weight.

[0063] In some embodiments, the above message routing and distribution method can solve the problems of lack of further evaluation of link distribution weight and low distribution quality in load distribution of various capability buses and gateway products, and realize enrichment of message routing and distribution means and accuracy of distribution effect.

[0064] In some embodiments, referring to Figure 2 , Figure 2 is an optional flowchart of step S101 in an embodiment of the present application, which can include but is not limited to steps S201 to S204:

[0065] Step S201, obtaining a plurality of message distribution links;

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

[0067] Step S203, data preprocessing the distribution service response duration data corresponding to each message distribution link to obtain target service response duration data corresponding to each message distribution link;

[0068] Step S204, calculating service response average duration of each message distribution link corresponding to the first time period according to the target service response duration data corresponding to each message distribution link.

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

[0070]

[0071] NowT i represents the average service response time of the ith message distribution link, NowT k represents the distribution service response time of the ith message distribution link when performing the kth message distribution service in the first time period, and m represents the number of message distribution services of the ith message distribution link in the first time period.

[0072] In some embodiments, a time period span is set, and a plurality of time periods are determined according to the time period span. For example, it is assumed that the time period span is determined to be 4 hours, which means that the start time and the end time of each time period are 4 hours apart. After 4 hours, a time period ends. For example, time period 1 is from 8 a.m. to 12 a.m. on a certain day, and time period 2 is the next time period of time period 1, which is from 12 a.m. to 4 p.m. The same applies to the subsequent time periods.

[0073] In some embodiments, the time period span is determined according to the following formula: Figure 3 Figure 3 is an optional storage structure diagram of the distribution service response time data in the embodiments 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 time response data in each time period. Message distribution link 1 has corresponding distribution service time response data 11 in time period 1, message distribution link 2 has corresponding distribution service time response data 12 in time period 1, and so on.

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

[0075] For example, the time period span is determined according to the following formula: Figure 4 Figure 4 ​​is an optional structure diagram of the distribution service response time length data list in the embodiment of the present application. The distribution service response time length data list is denoted as CT. CT stores CT1, CT2,..., CTM. CTi is the distribution service response time length data storage table of the i-th message distribution link. The value of i is 1 to M. M is the number of message distribution links. CTi stores [CTi1, CTi2,..., CTiN]. CTij is the distribution service response time length data corresponding to the i-th message distribution link at the j-th time period. The value of j is 1 to N. N is the number of time periods. CTij can include multiple distribution service response time length unit data. Each distribution service response time length unit data can include, but is not limited to, time period (such as the above-mentioned time period), time node in the time period, distribution service response time length (time consumption), system to which the message distribution link belongs, node serial number corresponding to the message distribution link, and the like.

[0076] Then, CTij corresponding to the first time period of each message distribution link is taken out from CT. For the multiple distribution service response time length unit data in CTij, data preprocessing is performed, including data cleaning, screening, processing, such as excluding records without traffic volume, removing data exceeding the limit value (such as obviously abnormal data of request interception, request timeout, and the like), and finally calculating the service response average time length NowAtime of each message distribution link in the first time period. i and storing in the 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. 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 message quantity weight ratio of the gateway assigned to each message distribution link 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, the 30 network messages to be processed will be distributed on the message distribution links 1 to 3 according to 1:1:1. Then, each message distribution link will be assigned 10 network messages, and then further message distribution is performed.

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

[0080] In some embodiments, referring to Figure 5 , Figure 5 is an optional schematic diagram of a message distribution link in an embodiment of the present application, which includes message distribution links 1 to N. A 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 traffic to each message distribution link according to the current link load distribution weight, and routes and forwards the network messages using each message distribution link.

[0081] In some embodiments, referring to Figure 6 , Figure 6 is an optional flowchart of step S103 in an embodiment of the present application. Step S103 can 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 of each message distribution link according to the service response standard duration and the service response average duration corresponding to each message distribution link;

[0084] Step S303, when the service response duration ratio of each message distribution link is within the preset ratio threshold range, stopping dynamically adjusting the next link load distribution weight, otherwise, calculating the next link load distribution weight corresponding to each message distribution link according to the service response duration ratio of 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] NowTimeper i = NowAtime i / StandardTime;

[0087] wherein, NowTimeper ia service response time length ratio corresponding to the ith message distribution link, NowTime i a service response average time length corresponding to the ith message distribution link, and StandardTime is a preset service response standard time length.

[0088] In some embodiments, when the service response time length ratios corresponding to the respective message distribution links are all within a preset ratio threshold range, it indicates that the current traffic distribution is reasonable, and the corresponding link load distribution weight does not need to be adjusted, otherwise, the next link load distribution weight is dynamically adjusted according to the service response time length ratios corresponding to the respective message distribution links, the current link load distribution weight, and the current gateway distribution service weight, and the next link load distribution weight is the link load distribution weight corresponding to the respective message distribution links in a second time period.

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

[0090]

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

[0092] In some embodiments, referring to Figure 7 , Figure 7 is an optional flowchart of step S105 in the embodiments of the present application, and step S105 can include but is not limited to including steps S401 to S402:

[0093] Step S401, determining target network messages corresponding to respective message distribution links from the network messages to be distributed;

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

[0095] In some embodiments, according to the current gateway distribution service weight, target network messages corresponding to each message distribution link are determined from the network messages to be distributed, and in the second time period, each message distribution link is allocated corresponding traffic according to the next link load distribution weight corresponding to each message distribution link, and the target network messages to be distributed are routed and distributed by using each message distribution link.

[0096] In some embodiments, referring to Figure 8 , Figure 8 is an optional schematic diagram of routing and distributing target network messages to be distributed by using message distribution links in the embodiments of the present application, which includes a message queue to be distributed and message distribution links 1 to M, target network messages to be distributed corresponding to each message distribution link are determined from the message queue to be distributed according to the current gateway distribution service weight, the target network messages to be distributed are sent to each message distribution link, and then the target network messages to be distributed are routed and distributed by using each message distribution link.

[0097] In some embodiments, taking three message distribution links of a system as an example, it is assumed that a time period is between the second time period and the first time period, that is, the first time period is A, and the second time period is A+2, and the link load distribution weight of the system is dynamically adjusted by using the message routing and distribution method provided in the embodiments of the present application, as shown in Table 1 below:

[0098] Table 1 Dynamic adjustment table of link load distribution weight

[0099]

[0100] In the table, nodes 1 to 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 rounding principle, the second time period is associated with the fourth time period, the third time period is associated with the fifth time period, the fourth time period is associated with the sixth time period, the next link load distribution weight corresponding to each message distribution link (nodes 1 to 3) is calculated according to the service response time ratio corresponding to each message distribution link in the second time period, the current link load distribution weight and the current gateway distribution service weight, that is, the current link load distribution weight corresponding to the fourth time period, and so on.

[0101] Referring to Figure 9 , Figure 9 is an optional structural schematic diagram of a message routing and distribution device provided in the embodiments of the present application, which can be used to implement the message routing and distribution method described above, and the message routing and distribution device can include:

[0102] The first module is configured to collect service response data in a first time period.

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

[0104] The third module is configured to 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.

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

[0106] It can be understood that the content in the above method embodiments is applicable to the device embodiments, the device embodiments specifically implement the same functions as the above method embodiments, and achieve the same beneficial effects as the above method embodiments.

[0107] The embodiments of the present application further provide an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor implements the above message routing and distribution method when executing the computer program. The electronic device can be any intelligent terminal such as a tablet computer.

[0108] It can be understood that the content in the above method embodiments is applicable to the device embodiments, the device embodiments specifically implement the same functions as the above method embodiments, and achieve the same beneficial effects as the above method embodiments.

[0109] Please refer to Figure 10 , Figure 10 The hardware structure of the electronic device of another embodiment is illustrated, and the electronic device includes:

[0110] The processor 901 can be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is used to execute related programs to implement the technical solutions provided by 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), etc. The memory 902 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present specification are implemented by software or firmware, the related program codes are stored in the memory 902 and are invoked and executed by the processor 901 to implement the message routing distribution method of the embodiments of the present application.

[0112] The input / output interface 903 is configured to realize information input and output.

[0113] The communication interface 904 is configured to realize the communication interaction between the device and other devices. The communication can be realized by a wired manner (for example, a USB, a network cable, etc.) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.).

[0114] The bus 905 is configured to transmit information between various components (for example, the processor 901, the memory 902, the input / output interface 903, and the communication interface 904) of the device.

[0115] The processor 901, the memory 902, the input / output interface 903, and the communication interface 904 are connected to each other through the bus 905 to realize the communication connection between the device.

[0116] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the message routing distribution method.

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

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

[0119] The message routing and distribution method and device, the electronic device and the storage medium provided by the embodiments of the present application can realize dynamic adjustment of the link distribution weight, improve the efficiency and quality of message routing and distribution, and improve the stability of message routing and distribution.

[0120] The embodiments described in the embodiments of the present application are used 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 by the embodiments of the present application. It can be understood by those skilled in the art that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0121] It can be understood by those skilled in the art that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than those shown in the figures, or combine certain steps or different steps.

[0122] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, that is, can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of the present application.

[0123] It can be understood by those skilled in the art that all or some steps in the above disclosed method, the functions of the modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.

[0124] The terms "first", "second", "third", "fourth" and the like (if any) used in the specification of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, 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 "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0125] It should be understood that, in the application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" is used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases of only A, only B, and A and B existing at the same time, wherein A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can represent a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, and c can be single or multiple.

[0126] In several embodiments provided in the 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 illustrative, for example, the division of the above units is only a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0127] The units described above as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.

[0128] In addition, the functional units in each embodiment of the application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

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

[0130] The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.

[0131] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and are not limited to the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.

Claims

1. A message routing distribution method, characterized by, The method comprises the following steps: Collect service response data of a first time period; Obtain link distribution weight data corresponding to the first time period; According to the service request response data and the link distribution weight data, dynamically adjust the next link load distribution weight, wherein the next link load distribution weight is the 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; Obtain a network message to be distributed, and according to the next link load distribution weight, route and distribute the network message to be distributed in the second time period; The collection of service response data of a first time period specifically comprises: Obtain a plurality of message distribution links; Collect distribution service response duration data corresponding to each message distribution link in the first time period, including a plurality of time nodes and distribution service response duration corresponding to each time node; Data preprocessing is performed on the distribution service response duration data corresponding to each message distribution link to obtain target service response duration data corresponding to each message distribution link; According to the target service response duration data corresponding to each message distribution link, calculate the service response average duration of each message distribution link corresponding to the first time period; The obtaining of link distribution weight data corresponding to the first time period specifically comprises: Obtain the current link load distribution weight corresponding to each message distribution link and the preset current gateway distribution service weight, wherein the current link load distribution weight is the link load distribution weight corresponding to the message distribution link in the first time period; The dynamic adjustment of the next link load distribution weight according to the service request response data and the link distribution weight data specifically comprises: Obtain a preset service response standard duration; According to the service response standard duration and the service response average duration corresponding to each message distribution link, calculate the service response duration ratio corresponding to each message distribution link; When the service response duration ratio corresponding to each message distribution link is within the preset ratio threshold range, stop dynamically adjusting the next link load distribution weight, otherwise, according to the service response duration ratio corresponding to each message distribution link, the current link load distribution weight and the current gateway distribution service weight, calculate the next link load distribution weight corresponding to each message distribution link.

2. The message routing and distribution method of claim 1, wherein, The next link load distribution weight is calculated by the following formula: ; wherein, is the next link load distribution weight corresponding to the nth message distribution link, n is the number of message distribution links, is the next link load distribution weight corresponding to the nth message distribution link, n is the number of message distribution links, is the service response time ratio corresponding to the nth message distribution link, is the service response time ratio corresponding to the nth message distribution link, is the current link load distribution weight corresponding to the nth message distribution link, is the current link load distribution weight corresponding to the nth message distribution link, is the current gateway distribution service weight corresponding to the nth message distribution link, is the current gateway distribution service weight corresponding to the nth message distribution link, , and are preset allocation weights.

3. The message routing and distribution method of claim 1, wherein, The obtaining of a network message to be distributed, and according to the next link load distribution weight, routing and distributing the network message to be distributed in the second time period specifically comprises: Determine the target network message to be distributed corresponding to each message distribution link from the network message to be distributed; According to the next link load distribution weight corresponding to each message distribution link, use each message distribution link to route and distribute the target network message to be distributed in the second time period.

4. The message routing and distribution method of claim 1, wherein, The service response average duration is calculated by the following formula: ; in, Indicates the first Average service response time for each message distribution link For the first The response time for each message distribution link when performing the k-th message distribution service in the first time period. For the first The number of times each message distribution link performs message distribution service in the first time period.

5. A message routing distribution apparatus, characterized by, The device comprises: A first module for collecting service response data of a first time period; a second module configured to acquire link distribution weight data corresponding to the first time period; a third module configured to dynamically adjust 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; a fourth module configured to acquire a 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; the service response data of the first time period is collected, and specifically includes: a plurality of message distribution links are acquired; distribution service response duration data corresponding to each of the message distribution links in the first time period is collected, including a plurality of time nodes and distribution service response duration corresponding to each of the time nodes; the distribution service response duration data corresponding to each of the message distribution links is preprocessed to obtain target service response duration data corresponding to each of the message distribution links; service response average duration of each of the message distribution links in the first time period is calculated according to the target service response duration data corresponding to each of the message distribution links; the link distribution weight data corresponding to the first time period is acquired, and specifically includes: current link load distribution weight corresponding to each of the message distribution links and a preset current gateway distribution service weight are acquired, wherein the current link load distribution weight is a link load distribution weight corresponding to the message distribution link in the first time period; the next link load distribution weight is dynamically adjusted according to the service request response data and the link distribution weight data, and specifically includes: a preset service response standard duration is acquired; service response duration ratios corresponding to each of the message distribution links are calculated according to the service response standard duration and the service response average duration corresponding to each of the message distribution links; when the service response duration ratios corresponding to each of the message distribution links are all within a preset ratio threshold range, the dynamic adjustment of the next link load distribution weight is stopped, otherwise, the next link load distribution weight corresponding to each of the message distribution links is calculated according to the service response duration ratios corresponding to each of the message distribution links, the current link load distribution weight and the current gateway distribution service weight.

6. An electronic device, comprising: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the message routing and distribution method of any one of claims 1 to 4 when executing the computer program.

7. A computer-readable storage medium storing a computer program, wherein the computer program comprises the following steps of: receiving a request for a resource from a client; determining whether the client is authorized to access the resource; and if the client is authorized to access the resource, providing the resource to the client. The computer program is executed by the processor to implement the message routing and distribution method of any one of claims 1 to 4.

Citation Information

Patent Citations

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

    CN110581804A

  • Route distribution method, device and equipment

    CN115622933A