CN114710448B - Message transmission method, device, electronic equipment and storage medium - Google Patents

Message transmission method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114710448B
CN114710448B CN202210406955.1A CN202210406955A CN114710448B CN 114710448 B CN114710448 B CN 114710448B CN 202210406955 A CN202210406955 A CN 202210406955A CN 114710448 B CN114710448 B CN 114710448B
Authority
CN
China
Prior art keywords
data
target
data interface
address
address information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210406955.1A
Other languages
Chinese (zh)
Other versions
CN114710448A (en
Inventor
杨凯
郭韶龙
刘涛
田娜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202210406955.1A priority Critical patent/CN114710448B/en
Publication of CN114710448A publication Critical patent/CN114710448A/en
Application granted granted Critical
Publication of CN114710448B publication Critical patent/CN114710448B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/255Maintenance or indexing of mapping tables
    • H04L61/2553Binding renewal aspects, e.g. using keep-alive messages

Abstract

The disclosure relates to a message transmission method, a message transmission device, electronic equipment and a storage medium, and relates to the field of communication. Firstly, responding to a received data service request message, and acquiring a target address information pair corresponding to the data service request message; then, under the condition that the target address information pair exists in a pre-established address corresponding relation set, acquiring a target data interface corresponding to the target address information pair according to the address corresponding relation set; and finally, transmitting the data service request message through the target data interface. Therefore, the corresponding data interfaces are determined according to the target address information pairs of the data service, so that the data service loads of the data interfaces can be balanced by fully utilizing the data interfaces, the data service range influenced by poor ISP network quality corresponding to the individual data interfaces can be reduced, and the user experience is improved.

Description

Message transmission method, device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of communications, and in particular, to a method, an apparatus, an electronic device, and a storage medium for message transmission.
Background
In order to obtain higher network bandwidth, there is an increasing need in routing devices to access the network through multiple data interfaces connecting multiple ISPs (Internet Service Provider, network service providers). In this scheme of data interface access, how to fully utilize the bandwidth of each data interface by the routing device to obtain a higher network bandwidth by connecting multiple ISPs is a problem to be solved.
In the related art, load balancing is performed on a plurality of data interfaces through a Session five-tuple, that is, through five-tuple (source address, source port, destination address, destination port, transport layer protocol) of a data service. According to the load balancing scheme of the Session five-tuple, a plurality of data packets of the same Session can be transmitted through a plurality of different data interfaces, and under the condition that the network quality of an ISP corresponding to part of the data interfaces is poor, the service quality of the whole Session is influenced by the transmission of individual data packets of the Session through the data interfaces with poor network quality, so that the user experience is greatly influenced.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a method, an apparatus, an electronic device, and a storage medium for message transmission.
According to a first aspect of embodiments of the present disclosure, there is provided a method of message transmission, the method comprising:
responding to a received data service request message, and acquiring a target address information pair corresponding to the data service request message, wherein the target address information pair comprises a source address and a target address corresponding to the data service request message;
under the condition that the target address information pair exists in a pre-established address corresponding relation set, acquiring a target data interface corresponding to the target address information pair according to the address corresponding relation set, wherein the address corresponding relation set comprises one or more corresponding relations between the address information pair and the data interface;
and transmitting the data service request message through the target data interface.
Optionally, the obtaining the destination address information pair corresponding to the data service request message includes:
and in the case that the data service request message contains the source address and the destination address, taking the source address and the destination address as the destination address information pair.
Optionally, the obtaining the destination address information pair corresponding to the data service request message includes:
determining a first data interface from the plurality of data interfaces according to preset weight parameters corresponding to the plurality of data interfaces when the data service request message contains the source address and the domain name, wherein the weight parameters represent the proportion of the number of services borne by each data interface in the total number of services borne by the plurality of data interfaces;
Acquiring a destination address corresponding to the domain name from a domain name server through the first data interface;
and taking the source address and the destination address as a target address information pair.
Optionally, the determining the first data interface from the plurality of data interfaces according to the preset weight parameter includes:
predicting undetermined weight parameters corresponding to the plurality of data interfaces under the condition that the number of services carried by the data interfaces is increased by a specified number for each data interface;
determining a target weight parameter with the minimum difference parameter with the preset weight parameter from undetermined weight parameters corresponding to the plurality of data interfaces;
and taking the data interface corresponding to the target weight parameter as the first data interface.
Optionally, the method further comprises:
and under the condition that the target corresponding relation between the target address information pair and the second data interface exists in the address corresponding relation set, if the second data interface is different from the first data interface, replacing the second data interface in the target corresponding relation with the first data interface.
Optionally, the method further comprises:
and under the condition that the target address information pair does not exist in the pre-established address corresponding relation set, establishing the corresponding relation between the target address information pair and the first data interface, and adding the corresponding relation to the address corresponding relation set.
Optionally, the method further comprises:
obtaining aging time corresponding to each corresponding relation in the address corresponding relation set;
and deleting the corresponding relation of which the aging time is greater than or equal to a preset aging time threshold value from the address corresponding relation set.
According to a second aspect of embodiments of the present disclosure, there is provided an apparatus for message transmission, the apparatus comprising:
the first acquisition module is configured to respond to receiving a data service request message and acquire a target address information pair corresponding to the data service request message, wherein the target address information pair comprises a source address and a target address corresponding to the data service request message;
the second acquisition module is configured to acquire a target data interface corresponding to the target address information pair according to the address correspondence set under the condition that the target address information pair exists in a pre-established address correspondence set, wherein the address correspondence set comprises one or more address information pairs and the corresponding relationship of the data interface;
and the transmission module is configured to transmit the data service request message through the target data interface.
Optionally, the first acquisition module is further configured to:
And in the case that the data service request message contains the source address and the destination address, taking the source address and the destination address as the destination address information pair.
Optionally, the first acquisition module is further configured to:
determining a first data interface from the plurality of data interfaces according to preset weight parameters corresponding to the plurality of data interfaces when the data service request message contains the source address and the domain name, wherein the weight parameters represent the proportion of the number of services borne by each data interface in the total number of services borne by the plurality of data interfaces;
acquiring a destination address corresponding to the domain name from a domain name server through the first data interface;
and taking the source address and the destination address as a target address information pair.
Optionally, the first acquisition module is further configured to:
predicting undetermined weight parameters corresponding to the plurality of data interfaces under the condition that the number of services carried by the data interfaces is increased by a specified number for each data interface;
determining a target weight parameter with the minimum difference parameter with the preset weight parameter from undetermined weight parameters corresponding to the plurality of data interfaces;
And taking the data interface corresponding to the target weight parameter as the first data interface.
Optionally, the apparatus further comprises:
and the updating module is configured to replace the second data interface in the target corresponding relation with the first data interface if the second data interface is different from the first data interface under the condition that the target corresponding relation between the target address information pair and the second data interface exists in the address corresponding relation set.
Optionally, the update module is further configured to:
and under the condition that the target address information pair does not exist in the pre-established address corresponding relation set, establishing the corresponding relation between the target address information pair and the first data interface, and adding the corresponding relation to the address corresponding relation set.
Optionally, the update module is further configured to:
obtaining aging time corresponding to each corresponding relation in the address corresponding relation set;
and deleting the corresponding relation of which the aging time is greater than or equal to a preset aging time threshold value from the address corresponding relation set.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device comprising:
A memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method according to any of the embodiments of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of the first aspect described above.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
in the technical scheme, firstly, a target address information pair corresponding to a data service request message is obtained in response to receiving the data service request message; then, under the condition that the target address information pair exists in a pre-established address corresponding relation set, acquiring a target data interface corresponding to the target address information pair according to the address corresponding relation set; and finally, transmitting the data service request message through the target data interface. Therefore, the corresponding data interfaces are determined according to the target address information pairs of the data service, so that the data service loads of the data interfaces can be balanced by fully utilizing the data interfaces, the data service range influenced by poor ISP network quality corresponding to the individual data interfaces can be reduced, and the user experience is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flow chart illustrating a method of message transmission according to an exemplary embodiment.
Fig. 2 is a flow chart illustrating another method of message transmission according to an exemplary embodiment.
Fig. 3 is a flow chart illustrating yet another method of message transmission according to an exemplary embodiment.
Fig. 4 is a block diagram illustrating an apparatus for message transmission according to an example embodiment.
Fig. 5 is a block diagram illustrating another message transmitting apparatus according to an example embodiment.
Fig. 6 is a block diagram of an electronic device, according to an example embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
It should be noted that, all actions for acquiring signals, information or data in the present application are performed under the condition of conforming to the corresponding data protection rule policy of the country of the location and obtaining the authorization given by the owner of the corresponding device.
First, describing an application scenario of the present disclosure, the present disclosure may be applied to a scenario of multi-data interface message transmission of a routing device, where the routing device connects multiple ISPs through multiple data interfaces, and since there is a difference between the network bandwidths and network qualities of the ISPs, it is required to determine a target data interface for transmitting the message between the multiple data interfaces, for example, the network bandwidth of ISP1 connected to data interface 1 is 700MBps, the network bandwidth of ISP2 connected to data interface 2 is 300MBps, and the routing device may determine that the data interface 1 and the data interface 2 are connected according to 7:3, in the related technical scheme, there is a scheme of carrying out load balancing by binding a terminal with a data interface, that is, determining a target data interface of the terminal through a preset corresponding relation between the terminal and the data interface, in the scheme, because internet surfing habits of different terminals are different, the load of the data interface may be unbalanced. For example, the current data service requirements of the terminal 1 and the terminal 2 corresponding to the data interface 1 are high, but the current data service requirement of the terminal 3 corresponding to the data interface 2 is low, so that the data service loads of the data interface 1 and the data interface 2 are unbalanced, and the scheme of binding the terminal and the data interface cannot realize the load balance of the data interface. In addition, in the solution of Session five-tuple load balancing in the prior art, a plurality of Session sessions may be affected due to poor network quality of a certain ISP, for example, the terminal performs HTTP web browsing service and FTP downloading service, and since both services have partial data packet load balancing to the ISP2 network with poor network quality, both web browsing service and FTP downloading service may be affected, which affects the service experience of the user.
It should be noted that, the routing device according to the present disclosure may be a router, or may be another network transmission device with a routing function, and the data interface of the present disclosure may be a WAN (Wide Area Network ) interface, which is not limited in this disclosure.
Therefore, the present disclosure provides a method, an apparatus, an electronic device, and a storage medium for message transmission, where the method determines a corresponding data interface according to a target address information pair of a data service, so that a plurality of data interfaces can be fully utilized to balance data service loads of the plurality of data interfaces, and a data service range affected by poor ISP network quality corresponding to individual data interfaces can be reduced, thereby improving user experience.
The present disclosure is described below in connection with specific embodiments.
Fig. 1 is a flowchart illustrating a method of message transmission, as shown in fig. 1, the method performed by a routing device, the method may include the steps of:
in step S101, in response to receiving the data service request message, a target address information pair corresponding to the data service request message is acquired.
The target address information pair comprises a source address and a destination address corresponding to the data service request message.
In some possible implementations, the data service request message initiated by the terminal may be received, for example, the data service request message may be a request to browse a web page, make an FTP download, send an Email, view a web video online, etc., which is not limited by the present disclosure. The terminal may be a terminal device supporting data services such as a computer, a smart phone, a tablet computer, a smart watch, a smart bracelet, a PDA (Personal Digital Assistant ), and the like, which is not limited in this disclosure.
When the routing device obtains the data service request message, the routing device first obtains a destination address information pair corresponding to the data service request message, including a source address (such as an IP address of the terminal) and a destination address (such as an IP address of a destination server corresponding to the data service request message).
It should be noted that, the source address is used to characterize different terminals, and may be an IP address or a MAC address of the terminal, which is not limited in this disclosure.
In step S102, when a target address information pair exists in the pre-established address correspondence set, a target data interface corresponding to the target address information pair is acquired according to the address correspondence set.
Wherein the address correspondence set includes correspondence of one or more address information pairs to the data interface.
For example, the address corresponding relation set may be a corresponding relation between the address information pair and the data interfaces shown in table one, and load balancing of the data service in the plurality of data interfaces according to the preset weight coefficient is achieved through the preset address corresponding relation set.
Source address Destination address Data interface
10.129.1.1 10.129.2.1 WAN1
10.129.1.2 10.129.2.2 WAN1
10.129.1.1 10.129.2.2 WAN1
10.129.1.1 10.129.2.3 WAN2
10.129.1.2 10.129.2.1 WAN2
10.129.1.2 10.129.2.4 WAN1
10.129.1.2 10.129.2.5 WAN1
10.129.1.1 10.129.2.5 WAN2
List one
For example, in the case that the target address information pair exists in the address correspondence set, it is characterized that the routing device has established a correspondence between the target address information pair and the target data interface, and after the target address information pair corresponding to the data service request message is acquired, the target data interface corresponding to the target address information pair may be acquired from the address correspondence set through the target address information pair.
In step S103, a data service request message is transmitted through the target data interface.
By adopting the scheme, the load of the data interfaces can be balanced by fully utilizing the data interfaces, the data service range influenced by poor ISP network quality corresponding to the individual data interfaces can be reduced, and the user experience is improved.
In some embodiments, for the above step S102, when the user initiates the data service request message, the user may directly input the destination address (destination IP address) of the destination server, but, considering that the IP address is inconvenient to memorize and cannot display the name and property of the address organization, so to avoid this problem, the user may also directly input the domain name of the destination server, which may be the name of a certain computer or computer group on the Internet composed of a series of names separated by dots, which is more convenient for the user to memorize than the IP address.
The destination address information pair may be obtained, for example, in different ways, depending on the difference in the information of the destination server contained in the data service request message.
In some possible implementations, in the case that the data traffic request message contains a source address and a destination address, the source address and the destination address are taken as a pair of destination address information.
In this manner, the data service request may directly carry the destination address, for example, there may be a destination address corresponding to the domain name input by the user in the cache of the terminal, after the terminal obtains the domain name input by the user, the terminal may obtain the destination address corresponding to the domain name from the cache, or the terminal may obtain the destination address of the destination server directly input by the user, so that after obtaining the destination address, the routing device receives the data service request message including the source address and the destination address sent by the terminal.
It should be noted that, in consideration of that the cache of the terminal may be cleared, so, for the case that the user inputs the domain name, the terminal cannot obtain the destination address corresponding to the domain name from the cache, where the data service request message received by the routing device includes the source address and the domain name, but does not include the destination address, in order to solve this problem, in other possible implementations, in the case that the data service request message includes the source address and the domain name, the destination address corresponding to the domain name may be obtained through the domain name server according to the domain name, and then the destination address information pair may be obtained.
For example, in the case where the data service request message contains a source address and a domain name, the pair of destination address information may be acquired through the steps shown in fig. 2 as follows.
Fig. 2 is a flowchart illustrating another method of message transmission according to an exemplary embodiment, and as shown in fig. 2, the step S101 may include the steps of:
in step S1011, a first data interface is determined from the plurality of data interfaces according to preset weight parameters corresponding to the plurality of data interfaces.
The preset weight parameter characterizes the proportion of the number of the services born by each data interface in the total number of the services born by a plurality of data interfaces.
For example, the preset weight parameter of the ith data interface may be determined by W i Characterization, where i=1 to N, N characterizes the number of the plurality of data interfaces, in one possible implementation, the preset weight may be set to the bandwidths of the plurality of data interfaces.
For example, the first data interface may be determined from the plurality of data interfaces according to preset weight parameters corresponding to the plurality of data interfaces by:
step 1, predicting undetermined weight parameters corresponding to a plurality of data interfaces under the condition that the number of services carried by the data interfaces is increased by a designated number;
for example, the specified number may be 1 and the pending weight parameter may be represented by equation one.
P ij =n i +f (j) (equation one)
Wherein P is ij Characterizing the undetermined weight coefficient, n, of the ith data interface in the event that the number of traffic carried by data interface j increases by a specified amount i The number of data services carried by the ith data interface can be obtained from a preset set of address correspondence, the preset correspondenceThe address relation set comprises the corresponding relation between one or more address information pairs and the data interface, f (j) is a specified quantity function, the value is the specified quantity when j=i, and otherwise, the value is 0.
And 2, determining a target weight parameter with the minimum difference parameter with the preset weight parameter from undetermined weight parameters corresponding to the plurality of data interfaces.
For example, the deviation parameter characterizes the deviation degree of the undetermined weight parameter from the preset weight parameter, which may be, for example, variance and standard deviation, and the disclosure is not limited to this, and in some possible implementations, the target weight parameter may be obtained through the following steps.
Firstly, respectively carrying out normalization processing on preset weight parameters and undetermined weight parameters according to the following formula II and formula III.
Wherein,is normalized preset weight parameter, W i Representing preset weight parameters of an ith data interface, wherein i=1 to N, and N represents the number of the plurality of data interfaces.
Wherein,characterizing the undetermined weight coefficient, P, of the normalized ith data interface under the condition that the number of services carried by the data interface j is increased by a designated number ij And under the condition that the number of services carried by the data interface j is increased by a specified number, the undetermined weight coefficient of the ith data interface is represented, and i=1 to N, wherein N represents the number of the plurality of data interfaces.
Then, a difference parameter of each pending weight parameter and the target weight parameter is determined.
Taking the variance as an example, the variance parameter can be determined by the following equation four.
Wherein E is j In order to increase the difference parameter (i.e. variance) between the undetermined weight parameter and the preset weight parameter under the condition that the number of the services carried by the data interface j is increased by a designated number,characterizing the undetermined weight coefficient of the normalized ith data interface in case that the number of services carried by the data interface j is increased by a specified number,/th data interface>And (5) the normalized preset weight parameters.
And finally, taking the undetermined weight parameter with the smallest difference parameter as a target weight parameter.
And step 3, taking the data interface corresponding to the target weight parameter as a first data interface.
In step S1012, a destination address corresponding to the domain name is obtained from the domain name server through the first data interface.
The step of specifically obtaining the destination address corresponding to the domain name may refer to implementation of the related art, which is not described herein again.
In step S1013, the source address and the destination address are set as a pair of destination address information.
After the destination address corresponding to the domain name is obtained from the domain name server through the first data interface, the source address and the destination address are used as a destination address information pair.
In some embodiments, after the target address information pair is acquired, the address correspondence set may be updated according to the correspondence between the first data interface and the target address information pair.
Illustratively, the address correspondence relationship set may be updated as follows:
in the first mode, under the condition that no target address information pair exists in a pre-established address corresponding relation set, the corresponding relation between the target address information pair and the first data interface is established, and the corresponding relation is added to the address corresponding relation set.
In some embodiments, the pre-established address correspondence set does not have the target address information pair, for example, the target address is obtained by the terminal through the domain name server for the first time, the correspondence between the target address information pair and the first data interface is established, and the correspondence is added to the address correspondence set, where the first data interface is the target data interface.
And if the second data interface is different from the first data interface under the condition that the target address information pair and the target corresponding relation of the second data interface exist in the address corresponding relation set, replacing the second data interface in the target corresponding relation by the first data interface.
For example, in the case where the data service request message includes a source address and a domain name, the pre-established address correspondence set may have a correspondence relationship between the target address information pair and the second data interface, but since the data service request message does not include a destination address, it is necessary to determine the first data interface through the above step S1011, and obtain the destination address corresponding to the domain name from the domain name server through the first data interface, thereby obtaining the target address pair, and in the case where the first data interface and the second data interface are different, replace the second data interface in the target correspondence relationship with the first data interface, that is, use the first data interface as the target data interface corresponding to the target address information pair. Thus, the address correspondence relation set can be updated in time.
According to the technical scheme, the address correspondence set can be updated according to the data service, the source address, the destination address acquired through the domain name server and the correspondence of the first data interface determined according to the preset weight parameter are updated into the address correspondence set, so that loads of a plurality of data interfaces are balanced according to the preset weight parameter through the address correspondence set, and user experience is improved.
In another embodiment, after the user completes the data service corresponding to the target address information pair, the user may not perform the data service corresponding to the target address information pair for a long time, and the corresponding relationship of the target address information pair in the address correspondence set may affect the accuracy of load balancing, and the corresponding relationship may be deleted from the address correspondence set by the following steps.
Step 1, obtaining aging time corresponding to each corresponding relation in the address corresponding relation set.
For example, the time of establishment of each corresponding relationship may be recorded when the corresponding relationship is established, and the difference between the current time and the time of establishment may be used as the aging time.
And 2, deleting the corresponding relation with the aging time greater than or equal to the preset aging time threshold value from the address corresponding relation set.
Through the technical scheme, the corresponding relation with the aging time greater than or equal to the preset aging time threshold value can be deleted from the address corresponding relation set, so that the address corresponding relation set can reflect the data service load more accurately, the accuracy of balancing the service loads of a plurality of data interfaces according to the preset weight parameters is further improved, and the user experience is improved.
Fig. 3 is a flow chart illustrating yet another method of message transmission, as shown in fig. 3, the method's execution subject may be a routing device, and the method may include the steps of:
in step S301, a data service request message is received.
In some possible implementations, the data service request message initiated by the terminal may be received, for example, the data service request message may be a request to browse a web page, make an FTP download, send an Email, view a web video online, etc., which is not limited by the present disclosure. The terminal may be a terminal device supporting data services such as a computer, a smart phone, a tablet computer, a smart watch, a smart bracelet, a PDA (Personal Digital Assistant ), and the like, which is not limited in this disclosure.
The data service request message may include a domain name of the destination server, or may include a destination address of the destination server. The destination address may be entered directly by the user or retrieved from the cache of the terminal based on the destination server domain name.
In step S302, it is determined whether the data service request message contains a destination address.
In step S303, the source address and the destination address are set as a pair of destination address information.
For example, in the case where the data service request message contains a source address and a destination address, the source address and the destination address of the data service request message are taken as a pair of destination address information.
In step S304, it is determined whether the target address information pair exists in the preset address correspondence set.
In step S305, in the case where the target address information pair does not exist in the address correspondence set, the target data interface is determined by the prior art scheme.
For example, a case may occur in which a destination address is included in the data service request message, but the destination address information pair does not exist in the address correspondence set.
Case 1, user directly inputs destination address of destination server to be accessed.
And 2, deleting the corresponding relation in the address relation set when the time interval of the user accessing the destination server exceeds or is equal to a preset aging time threshold value.
In this case, the target data interface may be determined according to a scheme in the prior art, for example, a load balancing scheme of Session five-tuple may be used to determine the target data interface, which is not described herein.
In step S306, when the target address information pair exists in the address correspondence set, a target data interface corresponding to the target address information pair is obtained according to the address correspondence set.
For example, in the case that the target address information pair exists in the address correspondence set, it is characterized that the routing device has established a correspondence between the target address information pair and the target data interface, and after the target address information pair corresponding to the data service request message is acquired, the target data interface corresponding to the target address information pair may be acquired from the address correspondence set through the target address information pair.
In step S307, the data service request message is transmitted through the target data interface.
In step S308, for each data interface, the pending weight parameters corresponding to the plurality of data interfaces are predicted in the case that the number of services carried by the data interface increases by a specified number.
For example, in the case that the data service request message does not include the destination address, for each data interface, the pending weight parameters corresponding to the plurality of data interfaces are predicted when the number of services carried by the data interface increases by a specified number, where the pending weight parameters may be expressed by using the formula one, and detailed description in step S1011 is omitted herein.
In step S309, a target weight parameter with the smallest difference parameter from the preset weight parameters is determined from the undetermined weight parameters corresponding to the plurality of data interfaces.
The difference parameter represents the deviation degree of the undetermined weight parameter and the preset weight parameter, for example, may be a variance and a standard deviation, and the disclosure is not limited to this. And carrying out normalization processing on the preset weight parameter and the undetermined weight parameter according to a formula II and a formula III respectively. Then, determining the difference parameter according to the fourth formula, and finally taking the undetermined weight parameter with the smallest difference parameter as the target weight parameter, please refer to the description in step S1011, which is not repeated here.
In step S310, a data interface corresponding to the target weight parameter is used as the first data interface.
In step S311, a destination address corresponding to the domain name is obtained from the domain name server through the first data interface.
The step of specifically obtaining the destination address corresponding to the domain name may refer to implementation of the related art, which is not described herein again.
In step S312, the source address and the destination address are set as a pair of destination address information.
After the destination address corresponding to the domain name is obtained from the domain name server through the first data interface, the source address and the destination address are used as a destination address information pair.
In step S313, it is determined whether the target address information pair exists in the address correspondence set.
For example, whether the target address information pair exists may be determined from the address correspondence set according to the target address information pair.
In step S314, if the second data interface is different from the first data interface in the case that the target address information pair exists in the address correspondence set and the target correspondence of the second data interface exists in the address correspondence set, the second data interface in the target correspondence is replaced with the first data interface.
For example, in the case where the data service request message includes a source address and a domain name, the pre-established address correspondence set may have a correspondence relationship between the target address information pair and the second data interface, but since the data service request message does not include a destination address, it is necessary to determine the first data interface through the above step S1011, and obtain the destination address corresponding to the domain name from the domain name server through the first data interface, thereby obtaining the target address pair, and in the case where the first data interface and the second data interface are different, replace the second data interface in the target correspondence relationship with the first data interface, that is, use the first data interface as the target data interface corresponding to the target address information pair. Thus, the address correspondence relation set can be updated in time.
In step S315, in the case where the target address information pair does not exist in the pre-established address correspondence set, the correspondence between the target address information pair and the first data interface is established, and the correspondence is added to the address correspondence set.
In some embodiments, the pre-established address correspondence set does not have the target address information pair, for example, the target address is obtained by the terminal through the domain name server for the first time, the correspondence between the target address information pair and the first data interface is established, and the correspondence is added to the address correspondence set, where the first data interface is the target data interface.
After the completion of step S314 or step S315, the above steps S306 and S307 are continued.
By the technical scheme, the load of the data interfaces can be balanced by fully utilizing the data interfaces, the data service range influenced by poor ISP network quality corresponding to the individual data interfaces can be reduced, and the user experience is improved.
Fig. 4 is a block diagram illustrating an apparatus for message transmission, as shown in fig. 4, the apparatus 400 for message transmission may include:
A first obtaining module 401, configured to obtain, in response to receiving the data service request message, a target address information pair corresponding to the data service request message, where the target address information pair includes a source address and a destination address corresponding to the data service request message;
a second obtaining module 402, configured to obtain, according to an address correspondence set, a target data interface corresponding to the target address information pair when there is a target address information pair in a pre-established address correspondence set, where the address correspondence set includes correspondence between one or more address information pairs and the data interface;
a transmission module 403 configured to transmit the data service request message over the target data interface.
Optionally, the first acquisition module 401 is further configured to:
in the case where the data service request message contains a source address and a destination address, the source address and the destination address are taken as a pair of destination address information.
Optionally, the first acquisition module 401 is further configured to:
under the condition that the data service request message comprises a source address and a domain name, determining a first data interface from a plurality of data interfaces according to preset weight parameters corresponding to the plurality of data interfaces, wherein the weight parameters represent the proportion of the number of services born by each data interface in the total number of services born by the plurality of data interfaces;
Acquiring a destination address corresponding to the domain name from a domain name server through a first data interface;
the source address and the destination address are used as a target address information pair.
Optionally, the first acquisition module 401 is further configured to:
predicting undetermined weight parameters corresponding to a plurality of data interfaces under the condition that the number of services carried by the data interfaces is increased by a designated number aiming at each data interface;
determining a target weight parameter with the minimum difference parameter with a preset weight parameter from undetermined weight parameters corresponding to a plurality of data interfaces;
and taking the data interface corresponding to the target weight parameter as a first data interface.
Fig. 5 is a block diagram illustrating another apparatus for message transmission, as shown in fig. 5, the apparatus 400 for message transmission may further include:
the updating module 404 is configured to replace the second data interface in the target correspondence with the first data interface if the second data interface is different from the first data interface in the case that the target correspondence between the target address information pair and the second data interface exists in the address correspondence set.
Optionally, the updating module 404 is further configured to:
and under the condition that the target address information pair does not exist in the pre-established address corresponding relation set, establishing the corresponding relation between the target address information pair and the first data interface, and adding the corresponding relation to the address corresponding relation set.
Optionally, the updating module 404 is further configured to:
obtaining aging time corresponding to each corresponding relation in the address corresponding relation set;
and deleting the corresponding relation with the aging time greater than or equal to the preset aging time threshold value from the address corresponding relation set.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
By adopting the device, the loads of the data interfaces can be balanced by fully utilizing the data interfaces, the data service range influenced by poor ISP network quality corresponding to the individual data interfaces can be reduced, and the user experience is improved.
Fig. 6 is a block diagram of an electronic device 600, according to an example embodiment. As shown in fig. 6, the electronic device 600 may include: a processor 601, a memory 602. The electronic device 600 may also include one or more of a multimedia component 603, an input/output (I/O) interface 604, and a communication component 605.
Wherein the processor 601 is configured to control the overall operation of the electronic device 600 to perform all or part of the steps of the message transmission method described above. The memory 602 is used to store various types of data to support operations at the electronic device 600, which may include, for example, instructions for any application or method operating on the electronic device 600, as well as application-related data, such as contact data, transceived messages, pictures, audio, video, and the like. The Memory 602 may be implemented by any type or combination of volatile or nonvolatile Memory devices, such as static random access Memory (Static Random Access Memory, SRAM for short), electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), erasable programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM for short), programmable Read-Only Memory (Programmable Read-Only Memory, PROM for short), read-Only Memory (ROM for short), magnetic Memory, flash Memory, magnetic disk, or optical disk. The multimedia component 603 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen, the audio component being for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 602 or transmitted through the communication component 605. The audio assembly further comprises at least one speaker for outputting audio signals. The I/O interface 604 provides an interface between the processor 601 and other interface modules, which may be a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 605 is used for wired or wireless communication between the electronic device 600 and other devices. Wireless communication, such as Wi-Fi, bluetooth, near field communication (Near Field Communication, NFC for short), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or one or a combination of more of them, is not limited herein. The corresponding communication component 605 may thus comprise: wi-Fi module, bluetooth module, NFC module, etc.
In another exemplary embodiment, a non-transitory computer readable storage medium is also provided that includes program instructions that, when executed by a processor, implement the steps of the method of message transmission described above. For example, the computer readable storage medium may be the memory 602 including program instructions described above that are executable by the processor 601 of the electronic device 600 to perform the method of message transmission described above.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (8)

1. A method of message transmission, the method comprising:
responding to a received data service request message, and acquiring a target address information pair corresponding to the data service request message, wherein the target address information pair comprises a source address and a target address corresponding to the data service request message;
the obtaining the target address information pair corresponding to the data service request message includes:
determining a first data interface from a plurality of data interfaces according to preset weight parameters corresponding to the plurality of data interfaces when the data service request message contains the source address and the domain name, wherein the weight parameters represent the proportion of the number of services borne by each data interface in the total number of services borne by the plurality of data interfaces;
the determining a first data interface from the plurality of data interfaces according to the preset weight parameters comprises: predicting undetermined weight parameters corresponding to the plurality of data interfaces under the condition that the number of services carried by the data interfaces is increased by a specified number for each data interface; determining a target weight parameter with the minimum difference parameter with the preset weight parameter from undetermined weight parameters corresponding to the plurality of data interfaces; taking a data interface corresponding to the target weight parameter as the first data interface;
Acquiring a destination address corresponding to the domain name from a domain name server through the first data interface; taking the source address and the destination address as a target address information pair;
under the condition that the target address information pair exists in a pre-established address corresponding relation set, acquiring a target data interface corresponding to the target address information pair according to the address corresponding relation set, wherein the address corresponding relation set comprises one or more corresponding relations between the address information pair and the data interface;
and transmitting the data service request message through the target data interface.
2. The method of claim 1, wherein the obtaining the destination address information pair corresponding to the data service request message comprises:
and in the case that the data service request message contains the source address and the destination address, taking the source address and the destination address as the destination address information pair.
3. The method according to claim 1, wherein the method further comprises:
and under the condition that the target corresponding relation between the target address information pair and the second data interface exists in the address corresponding relation set, if the second data interface is different from the first data interface, replacing the second data interface in the target corresponding relation with the first data interface.
4. The method according to claim 1, wherein the method further comprises:
and under the condition that the target address information pair does not exist in the pre-established address corresponding relation set, establishing the corresponding relation between the target address information pair and the first data interface, and adding the corresponding relation to the address corresponding relation set.
5. The method according to any one of claims 1 to 4, further comprising:
obtaining aging time corresponding to each corresponding relation in the address corresponding relation set;
and deleting the corresponding relation of which the aging time is greater than or equal to a preset aging time threshold value from the address corresponding relation set.
6. An apparatus for message transmission, the apparatus comprising:
the first acquisition module is configured to respond to receiving a data service request message and acquire a target address information pair corresponding to the data service request message, wherein the target address information pair comprises a source address and a target address corresponding to the data service request message; the obtaining the target address information pair corresponding to the data service request message includes: determining a first data interface from a plurality of data interfaces according to preset weight parameters corresponding to the plurality of data interfaces when the data service request message contains the source address and the domain name, wherein the weight parameters represent the proportion of the number of services borne by each data interface in the total number of services borne by the plurality of data interfaces; the determining a first data interface from the plurality of data interfaces according to the preset weight parameters comprises: predicting undetermined weight parameters corresponding to the plurality of data interfaces under the condition that the number of services carried by the data interfaces is increased by a specified number for each data interface; determining a target weight parameter with the minimum difference parameter with the preset weight parameter from undetermined weight parameters corresponding to the plurality of data interfaces; taking a data interface corresponding to the target weight parameter as the first data interface; acquiring a destination address corresponding to the domain name from a domain name server through the first data interface; taking the source address and the destination address as a target address information pair;
The second acquisition module is configured to acquire a target data interface corresponding to the target address information pair according to the address correspondence set under the condition that the target address information pair exists in a pre-established address correspondence set, wherein the address correspondence set comprises one or more address information pairs and the corresponding relationship of the data interface;
and the transmission module is configured to transmit the data service request message through the target data interface.
7. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any one of claims 1-5.
8. A non-transitory computer readable storage medium having stored thereon a computer program, characterized in that the program when executed by a processor realizes the steps of the method according to any of claims 1-5.
CN202210406955.1A 2022-04-18 2022-04-18 Message transmission method, device, electronic equipment and storage medium Active CN114710448B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210406955.1A CN114710448B (en) 2022-04-18 2022-04-18 Message transmission method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210406955.1A CN114710448B (en) 2022-04-18 2022-04-18 Message transmission method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114710448A CN114710448A (en) 2022-07-05
CN114710448B true CN114710448B (en) 2024-02-06

Family

ID=82175134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210406955.1A Active CN114710448B (en) 2022-04-18 2022-04-18 Message transmission method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114710448B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026589A (en) * 2007-04-05 2007-08-29 杭州华为三康技术有限公司 Route selecting method and router
CN101217465A (en) * 2007-12-28 2008-07-09 北京锐安科技有限公司 A route selecting method for multi-exit server and router
CN102647346A (en) * 2012-03-30 2012-08-22 汉柏科技有限公司 Method and system for shunting packet
CN107547509A (en) * 2017-06-27 2018-01-05 新华三技术有限公司 A kind of message forwarding method and device
CN112507008A (en) * 2020-12-02 2021-03-16 贵州航天云网科技有限公司 Data information resource sharing system and method based on dynamic interface service

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102684951B (en) * 2011-03-14 2015-08-05 鸿富锦精密工业(深圳)有限公司 The system of selection of many Wide Area Network interface networking, system and network equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026589A (en) * 2007-04-05 2007-08-29 杭州华为三康技术有限公司 Route selecting method and router
CN101217465A (en) * 2007-12-28 2008-07-09 北京锐安科技有限公司 A route selecting method for multi-exit server and router
CN102647346A (en) * 2012-03-30 2012-08-22 汉柏科技有限公司 Method and system for shunting packet
CN107547509A (en) * 2017-06-27 2018-01-05 新华三技术有限公司 A kind of message forwarding method and device
CN112507008A (en) * 2020-12-02 2021-03-16 贵州航天云网科技有限公司 Data information resource sharing system and method based on dynamic interface service

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于多级队列调度模型的研究;王琳;吉萌;;电视技术(03);全文 *

Also Published As

Publication number Publication date
CN114710448A (en) 2022-07-05

Similar Documents

Publication Publication Date Title
US9294363B2 (en) Adjusting quality of service in a cloud environment based on application usage
CN104333567B (en) It is the web cachings serviced using safety
US20140173111A1 (en) Data usage management systems and methods
US20100153568A1 (en) Methods, apparatuses, and computer program products for providing a local proxy for accessing web services
US20090083144A1 (en) Controlling receipt of electronic advertising
US20090119388A1 (en) Content relaying device and content relaying method
US10630800B2 (en) Methods and systems for handling requests regarding zero-rating
US20130223424A1 (en) Management methods and related electronic devices and machine-readable storage mediums using the same
CN109302437A (en) A kind of method and apparatus redirecting website
KR101550192B1 (en) Method, device, computer readable recording medium and computer program for connecting communication by selecting type of communicaton network
US8719927B2 (en) Data filtering by using a communication device including an interface on a display showing a domain name
RU2618943C2 (en) Method, device and system for distribution of applications
US8180857B2 (en) Method for downloading file in parallel
CN110996372A (en) Message routing method, device and system and electronic equipment
CN114710448B (en) Message transmission method, device, electronic equipment and storage medium
US10348518B2 (en) Method, apparatus, system and media for transmitting messages between networked devices in data communication with a local network access point
CN116743785A (en) Cloud network data storage method, device, equipment and medium based on fog calculation
US20180109465A1 (en) Methods and Systems for Determining and Using Characteristics of Network Carriers in Connection with Access Requests
US9363665B1 (en) Targeting insertion work-around for long term evolution (LTE) path
CN106470252B (en) The method and communication terminal of application program inquiry IP address
US9774515B2 (en) Router and resource assignment method thereof
CN103283185A (en) Prioritization of data communication
TWI723314B (en) Communication device, communication control method, and control device
JP2008502063A (en) Method and module for software for updating a gateway between an operator network and a local area network
EP2976858B1 (en) Global email identity preferences

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant