CN118075206A - Data transmission method and device - Google Patents

Data transmission method and device Download PDF

Info

Publication number
CN118075206A
CN118075206A CN202211466988.1A CN202211466988A CN118075206A CN 118075206 A CN118075206 A CN 118075206A CN 202211466988 A CN202211466988 A CN 202211466988A CN 118075206 A CN118075206 A CN 118075206A
Authority
CN
China
Prior art keywords
request message
internet protocol
protocol address
message
determining
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.)
Pending
Application number
CN202211466988.1A
Other languages
Chinese (zh)
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.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information Technology 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 Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202211466988.1A priority Critical patent/CN118075206A/en
Publication of CN118075206A publication Critical patent/CN118075206A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the disclosure provides a data transmission method and device. The data transmission method comprises the following steps: firstly, receiving a request message sent by an external network core, wherein the request message comprises a target Internet protocol address, then judging whether the request message meets a speed limit condition based on the target Internet protocol address in the request message, then judging whether the request message is a load balancing service message based on the message content of the request message in response to determining that the request message is the load balancing service message, replacing the target Internet protocol address in the request message with a rear end server Internet protocol address in response to determining that the request message is the load balancing service message, obtaining a new request message, and finally sending the new request message to an internal network core, thereby realizing data transmission between the external network and the internal network.

Description

Data transmission method and device
Technical Field
The embodiment of the disclosure relates to the technical field of computers and the technical field of Internet, in particular to the technical field of information communication, and particularly relates to a data transmission method and device.
Background
At present, in order to meet various demands of users, various network communication services are generally required to be provided for the clients, with the rise of new transactions such as network live broadcast and video, network bandwidth explosion is increased, network congestion problems are also increasingly prominent, user experience is affected, in order to reduce network traffic and improve user experience, CDN/5G technology is generated, and edge machine rooms for deploying CDN/5G are increased. In the edge machine room, the number of servers is small, usually around hundreds of meters, and the required network functions are relatively simple, but the bandwidth requirement is still relatively high, usually around hundreds of meters. If the gateway cluster of the core machine room is copied to the edge machine room, the gateway server cost is relatively high, and although the cost can be reduced by changing the high-configuration server into the low-configuration server and reducing the number of the servers, the provided bandwidth and functional specification are also reduced greatly, and the requirements of the edge machine room on low cost and high performance are not met.
Disclosure of Invention
Embodiments of the present disclosure provide a data transmission method, apparatus, electronic device, and computer readable medium.
In a first aspect, embodiments of the present disclosure provide a data transmission method, including: receiving a request message sent by an external network core, wherein the request message comprises a target Internet protocol address; judging whether the request message meets the speed limit condition or not based on the target internet protocol address in the request message; responding to the fact that the request message meets the speed limiting condition, and judging whether the request message is a load balancing service message or not based on the message content of the request message; in response to determining that the request message is a load balancing service message, replacing a target internet protocol address in the request message with a back-end server internet protocol address to obtain a new request message; and sending a new request message to the intranet core.
In some embodiments, determining whether the request message satisfies the speed limit condition based on the target internet protocol address in the request message includes: determining a target rate corresponding to the target internet protocol address based on the target internet protocol address in the request message; and judging whether the request message meets the speed limit condition or not based on the preset speed and the target speed.
In some embodiments, in response to determining that the request message is a load balancing service message, replacing the target internet protocol address in the request message with the backend server internet protocol address to obtain a new request message includes: responding to the determination that the request message is a load balancing service message, and determining a back-end server Internet protocol address corresponding to the request message based on a history session set corresponding to the history request message and the message content of the request message; and replacing the target internet protocol address in the request message with the internet protocol address of the back-end server to obtain a new request message.
In some embodiments, determining the backend server internet protocol address corresponding to the request message based on the historical session set corresponding to the historical request message and the message content of the request message includes: judging whether a history session corresponding to the request message exists in a history session set corresponding to the history request message based on the message content of the request message; in response to determining that there is a history session corresponding to the request message, a history server internet protocol address corresponding to the history session is determined as a backend server internet protocol address corresponding to the request message.
In some embodiments, determining the back-end server internet protocol address corresponding to the request message based on the historical session set corresponding to the historical request message and the message content of the request message further comprises: in response to determining that the historical session corresponding to the request message does not exist, carrying out hash calculation on the message content of the request message to obtain a hash value corresponding to the request message; determining a candidate server internet protocol address corresponding to the request message in a server internet protocol address set based on the hash value; in response to inserting the session generated by the candidate server internet protocol address into the historical set of sessions, the candidate server internet protocol address is determined to be the backend server internet protocol address corresponding to the request message.
In some embodiments, sending a new request message to the intranet core includes: in response to obtaining a new request message, packaging the new request message based on a preset packaging algorithm to obtain a packaged request message corresponding to the new request message; and sending an encapsulation request message to the intranet core.
In some embodiments, the method further comprises: in response to determining that the request message is not a load balancing service message, determining an intranet internet protocol address corresponding to the target internet protocol address based on the target internet protocol address of the request message and the elastic internet protocol address table; and replacing the target internet protocol address of the request message with the intranet internet protocol address to obtain a new request message.
In some embodiments, the method further comprises: responding to a received feedback message which is sent by an intranet core and corresponds to the request message, and judging whether a target Internet protocol address corresponding to the source Internet protocol address exists or not based on the source Internet protocol address in the feedback message; in response to determining that there is a target internet protocol address corresponding to the source internet protocol address, replacing the source internet protocol address in the feedback message with the target internet protocol address; judging whether the feedback message meets the speed limit condition or not based on the target internet protocol address; and transmitting the feedback message to the outer network core in response to determining that the feedback message meets the speed limit condition.
In some embodiments, in response to receiving a feedback packet sent by the intranet core and corresponding to the request packet, determining, based on the source internet protocol address in the feedback packet, whether a target internet protocol address corresponding to the source internet protocol address exists includes: responding to the received feedback message corresponding to the request message sent by the intranet core, and judging whether the packaging type of the feedback message is a preset type; in response to determining that the encapsulation type of the feedback message is a preset type, decapsulating the feedback message based on a preset encapsulation algorithm to obtain an decapsulated feedback message; and judging whether a target internet protocol address corresponding to the source internet protocol address exists or not based on the source internet protocol address in the unpacking feedback message.
In a second aspect, embodiments of the present disclosure provide a data transmission apparatus, the apparatus comprising: the receiving module is configured to receive a request message sent by an external network core, wherein the request message comprises a target internet protocol address; the first judging module is configured to judge whether the request message meets the speed limit condition or not based on the target internet protocol address in the request message; the second judging module is configured to respond to the fact that the request message meets the speed limiting condition, and judge whether the request message is a load balancing service message or not based on the message content of the request message; the replacing module is configured to replace a target internet protocol address in the request message with a back-end server internet protocol address to obtain a new request message in response to determining that the request message is a load balancing service message; and the sending module is configured to send a new request message to the intranet core.
In some embodiments, the first determination module is further configured to: determining a target rate corresponding to the target internet protocol address based on the target internet protocol address in the request message; and judging whether the request message meets the speed limit condition or not based on the preset speed and the target speed.
In some embodiments, the replacement module comprises: a determination unit configured to: responding to the determination that the request message is a load balancing service message, and determining a back-end server Internet protocol address corresponding to the request message based on a history session set corresponding to the history request message and the message content of the request message; a replacement unit configured to: and replacing the target internet protocol address in the request message with the internet protocol address of the back-end server to obtain a new request message.
In some embodiments, the determining unit is further configured to: judging whether a history session corresponding to the request message exists in a history session set corresponding to the history request message based on the message content of the request message; in response to determining that there is a history session corresponding to the request message, a history server internet protocol address corresponding to the history session is determined as a backend server internet protocol address corresponding to the request message.
In some embodiments, the determining unit is further configured to: in response to determining that the historical session corresponding to the request message does not exist, carrying out hash calculation on the message content of the request message to obtain a hash value corresponding to the request message; determining a candidate server internet protocol address corresponding to the request message in a server internet protocol address set based on the hash value; in response to inserting the session generated by the candidate server internet protocol address into the historical set of sessions, the candidate server internet protocol address is determined to be the backend server internet protocol address corresponding to the request message.
In some embodiments, the transmitting module is further configured to: in response to obtaining a new request message, packaging the new request message based on a preset packaging algorithm to obtain a packaged request message corresponding to the new request message; and sending an encapsulation request message to the intranet core.
In some embodiments, the apparatus further comprises a determination module; a determination module configured to: in response to determining that the request message is not a load balancing service message, determining an intranet internet protocol address corresponding to the target internet protocol address based on the target internet protocol address of the request message and the elastic internet protocol address table; a replacement module configured to: and replacing the target internet protocol address of the request message with the intranet internet protocol address to obtain a new request message.
In some embodiments, the second determination module is further configured to: responding to a received feedback message which is sent by an intranet core and corresponds to the request message, and judging whether a target Internet protocol address corresponding to the source Internet protocol address exists or not based on the source Internet protocol address in the feedback message; a replacement module further configured to: in response to determining that there is a target internet protocol address corresponding to the source internet protocol address, replacing the source internet protocol address in the feedback message with the target internet protocol address; the first judging module is further configured to: judging whether the feedback message meets the speed limit condition or not based on the target internet protocol address; a transmission module further configured to: and transmitting the feedback message to the outer network core in response to determining that the feedback message meets the speed limit condition.
In some embodiments, the second determination module is further configured to: responding to the received feedback message corresponding to the request message sent by the intranet core, and judging whether the packaging type of the feedback message is a preset type; in response to determining that the encapsulation type of the feedback message is a preset type, decapsulating the feedback message based on a preset encapsulation algorithm to obtain an decapsulated feedback message; and judging whether a target internet protocol address corresponding to the source internet protocol address exists or not based on the source internet protocol address in the unpacking feedback message.
In a third aspect, embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device having one or more programs stored thereon; the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the data transmission method as described in any of the embodiments of the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer readable medium having stored thereon a computer program which, when executed by a processor, implements a data transmission method as described in any of the embodiments of the first aspect.
According to the data transmission method provided by the embodiment of the disclosure, the executing body firstly receives the request message sent by the external network core, wherein the request message comprises the target internet protocol address, then judges whether the request message meets the speed limit condition based on the target internet protocol address in the request message, then responds to the fact that the request message meets the speed limit condition, judges whether the request message is a load balancing service message based on the message content of the request message, responds to the fact that the request message is the load balancing service message, replaces the target internet protocol address in the request message with the internet protocol address of the rear end server to obtain a new request message, finally sends the new request message to the internal network core, data transmission between the external network and the internal network is achieved, and based on the fusion gateway, the elastic internet protocol address, the load balancing service, the limiting speed and other related network functions between the external network and the internal network are achieved.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings:
FIG. 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
FIG. 2 is a flow chart of one embodiment of a data transmission method according to the present disclosure;
FIG. 3 is a flow chart of one embodiment of replacing a target Internet protocol address in a request message with a backend server Internet protocol address in accordance with the present disclosure;
FIG. 4 is a flow chart of one embodiment of determining a backend server Internet protocol address corresponding to a request message according to the present disclosure;
fig. 5 is a flow chart of another embodiment of a data transmission method according to the present disclosure;
Fig. 6 is a flow chart of yet another embodiment of a data transmission method according to the present disclosure;
FIG. 7 is a flow chart of one embodiment of determining whether a target Internet protocol address corresponding to a source Internet protocol address exists according to the present disclosure;
Fig. 8 is a schematic structural view of one embodiment of a data transmission device according to the present disclosure;
fig. 9 is a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the related disclosure and not limiting thereof. It should be further noted that, for convenience of description, only the portions related to the disclosure are shown in the drawings.
It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 in which the data transmission methods and apparatus of embodiments of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include clients, an extranet core, a converged gateway, an intranet core, switches, and servers.
The client may be any terminal device, and is connected to the external network core through a network. The client can receive the request operation of the user, generate a request message for accessing the server according to the request of the user, and send the generated request message to the external network core.
The external network core may be a core switch connected to the convergence gateway. The external network core can receive the request message sent by the client and send the request message to the convergence gateway.
The fusion gateway is positioned between the outer network core and the inner network core and is respectively connected with the outer network core and the inner network core. The convergence gateway may receive a request message sent by the external network core, where the request message includes a source internet protocol address (IP address), a source port, a target IP address, a target port and a transport layer protocol, then determine whether the request message meets a speed limit condition based on the target internet protocol address in the request message, if the request message meets the speed limit condition, determine whether the request message is a load balancing service message based on a message content of the request message, if the request message is determined to be the load balancing service message, replace the target internet protocol address in the request message with a back end server internet protocol address to obtain a new request message, and finally send the new request message to the internal network core.
The intranet core is positioned between the converged gateway and the switch, and the intranet core can receive a new request message sent by the converged gateway and send the request message to the switch so as to send the request message to a server corresponding to the target internet protocol address through the switch.
The server can receive the request message, execute the operation corresponding to the request according to the request message, and return the feedback message.
The intranet core receives the feedback message returned by the server through the switch and sends the feedback message to the fusion gateway.
The convergence gateway can receive a feedback message corresponding to the request message sent by the intranet core, judge whether a target internet protocol address corresponding to the source internet protocol address exists based on the source internet protocol address in the feedback message, then replace the source internet protocol address in the feedback message with the target internet protocol address in response to determining that the target internet protocol address corresponding to the source internet protocol address exists, judge whether the feedback message meets the speed limit condition based on the target internet protocol address, and send the feedback message to the extranet core in response to determining that the feedback message meets the speed limit condition.
After receiving the feedback message, the external network core can send the feedback message to the client for the user to check the returned data.
The server may be hardware or software. When the server is hardware, it may be various electronic devices that provide various services to the client. When the server is software, it may be implemented as a plurality of software or software modules providing various services to the client, or as a single software or software module providing various services to the client. The present invention is not particularly limited herein.
It should be noted that, the data transmission method provided by the embodiments of the present disclosure may be performed by the convergence gateway. Correspondingly, the data transmission device is arranged in the fusion gateway.
It should be understood that the number of clients, extranet cores, converged gateways, intranet cores, switches, and servers in fig. 1 are merely illustrative. There may be any number of clients, extranet cores, converged gateways, intranet cores, switches, and servers, as desired for implementation.
Referring to fig. 2, a flow 200 of one embodiment of a data transmission method according to the present disclosure is shown. The data transmission method comprises the following steps:
step 210, receiving a request message sent by an external network core.
In this step, a user may initiate a user request such as an access request or an operation request for data in the intranet server through the client, and the client may generate a request packet according to the user request, where the request packet may include a source internet protocol address (IP address), a source port, a target IP address, a target port, and a transport layer protocol of the packet. The client sends the request message to the external network core, and the external network core sends the request message to an execution body (for example, a convergence gateway in fig. 1) on which the data transmission method operates, where the execution body may receive the request message sent by the external network core.
Step 220, based on the target internet protocol address in the request message, it is determined whether the request message satisfies the speed limit condition.
In this step, after the executing body receives the request message sent by the external network core, the executing body may parse the request message to obtain the target internet protocol address in the request message. And then the executing body can judge whether the request message meets the speed limiting condition according to the target internet protocol address in the request message, wherein the speed limiting condition can comprise that the speed corresponding to the internet protocol address does not exceed the preset speed.
Specifically, the execution body may acquire a preset address storage table, where a plurality of internet protocol addresses exceeding a preset rate may be stored, or a plurality of internet protocol addresses not exceeding the preset rate may be stored.
If a plurality of internet protocol addresses exceeding a preset rate are stored in the address storage table, the executing body may compare the target internet protocol address in the request message with the plurality of internet protocol addresses in the address storage table, and determine whether the target internet protocol address exists in the address storage table, so as to determine whether the request message meets the speed limit condition. If the target internet protocol address is determined to exist in the address storage table, determining that the request message does not meet the speed limit condition; if the target internet protocol address is determined not to exist in the address storage table, determining that the request message meets the speed limit condition.
If a plurality of internet protocol addresses which do not exceed the preset speed are stored in the address storage table, the execution body can compare the target internet protocol address in the request message with the plurality of internet protocol addresses in the address storage table, and determine whether the target internet protocol address exists in the address storage table, so as to judge whether the request message meets the speed limit condition. If the target internet protocol address is determined to exist in the address storage table, determining that the request message meets the speed limit condition; if the target internet protocol address is determined not to exist in the address storage table, determining that the request message does not meet the speed limit condition.
As an optional implementation manner, the step 220 of determining whether the request packet meets the speed limit condition based on the target internet protocol address in the request packet may include the following steps:
First, determining a target rate corresponding to a target internet protocol address based on the target internet protocol address in the request message.
Specifically, the executing body may obtain a rate storage table, where the rate storage table includes correspondence between a plurality of internet protocol addresses and rates, and different internet protocol addresses may correspond to different rates, or some different internet protocol addresses may correspond to the same rate, and the rate storage table may be in the form of a meter_table table.
The executing body may then compare the target internet protocol address in the request message with a plurality of internet protocol addresses in the rate storage table, determine an internet protocol address in the rate storage table that is the same as the target internet protocol address, and determine a rate corresponding to the determined internet protocol address as a target rate corresponding to the target internet protocol address.
And secondly, judging whether the request message meets the speed limit condition or not based on the preset speed and the target speed.
Specifically, after the executing body obtains the target rate corresponding to the target internet protocol address, the target rate may be compared with a preset rate, where the preset rate may represent a threshold of the message that is not overspeed, and the threshold may be set according to experience, a message type, hardware setting, and the like, which is not limited in the present application.
And comparing the target rate with the preset rate by the execution body, and judging whether the target rate is smaller than the preset rate or not, thereby judging whether the request message meets the speed limit condition or not. If the target rate is smaller than the preset rate, determining that the request message meets the speed limiting condition; if the target rate is not less than the preset rate, the request message is determined to not meet the speed limiting condition.
In the implementation manner, the speed of the request message is judged by determining the target speed corresponding to the target internet protocol address based on the target internet protocol address in the request message and judging whether the request message meets the speed limit condition based on the preset speed and the target speed, and the speed judgment is carried out by utilizing the target internet protocol address in the request message, so that the speed limit function can be realized, the speed determination is carried out by utilizing the speed storage table, the speed determination efficiency is improved, and the accuracy and the judgment efficiency for speed judgment of the request message are improved.
Step 230, in response to determining that the request message meets the speed limit condition, determining whether the request message is a load balancing service message based on the message content of the request message.
In this step, after the executing body determines that the request message meets the speed limit condition, the executing body may match the source internet protocol address (IP address), the source port, the target IP address, the target port and the transport layer protocol in the request message with the source internet protocol address (IP address), the source port, the target IP address, the target port and the transport layer protocol corresponding to each address in the virtual internet protocol address table respectively, and determine whether there is a consistent virtual internet protocol address in the virtual internet protocol address table, thereby determining whether the request message is a load balancing service message.
If the comparison determines that the virtual internet protocol address table has the consistent virtual internet protocol address, the request message can be determined to be a load balancing service message; if the comparison determines that the virtual internet protocol address table does not have the consistent virtual internet protocol address, the request message can be determined not to belong to the load balancing service message.
The virtual IP address table may store a virtual IP for providing services externally through 4-layer load balancing, and may be in the form of vip_table.
In step 240, in response to determining that the request message is a load balancing service message, the target internet protocol address in the request message is replaced with the back-end server internet protocol address, so as to obtain a new request message.
In this step, after the executing body determines that the request message is a load balancing service message through message content matching, a locally stored comparison table of the internet protocol address and the internet protocol address of the back-end server may be obtained. The execution body may match the target internet protocol address in the lookup table, and search the back-end server internet protocol address corresponding to the target internet protocol address.
Then the executing body can replace the target internet protocol address in the request message with the internet protocol address of the back-end server to acquire updated message content, thereby acquiring a new request message.
Step 250, send a new request message to the intranet core.
In this step, after the executing body obtains the new request message, the executing body may send the new request message to the intranet core.
After receiving the new request message, the intranet core sends the request message to the switch to send the request message to the server corresponding to the target internet protocol address through the switch. Therefore, the server can receive the new request message, execute the operation corresponding to the request according to the new request message, and return the feedback message.
As an optional implementation, the step 250 of sending a new request packet to the intranet core may include the following steps:
The first step, in response to obtaining a new request message, packaging the new request message based on a preset packaging algorithm to obtain a packaged request message corresponding to the new request message.
Specifically, after the executing body obtains a new request message, a preset encapsulation algorithm may be used to encapsulate the new request message, where the preset encapsulation algorithm may be Vxlan encapsulation technology, encapsulate a complete header of a user datagram protocol (udp protocol, user Datagram Protocol) and a virtual extended local area network (Vxlan, virtual Extensible LAN) in an outer layer of the new request message, so that forwarding can be performed between conventional forwarding devices based on an outer layer tunnel IP, thereby achieving functions of message encapsulation and routing, and obtaining an encapsulated request message corresponding to the new request message.
And step two, sending an encapsulation request message to the intranet core.
Specifically, after the execution body obtains the encapsulation request message corresponding to the new request message through encapsulation, the encapsulation request message can be sent to the intranet core.
In the implementation mode, the new request message is packaged, so that the functions of message packaging and routing are realized, and meanwhile, the message sending efficiency and the safety are improved.
As an alternative implementation, if the request packet does not meet the speed limit condition, step 260 is executed, and the packet is lost. Specifically, after the executing body determines that the request message does not meet the speed limit condition, the executing body may execute the packet loss operation on the request message.
According to the data transmission method provided by the embodiment of the disclosure, the executing body firstly receives the request message sent by the external network core, wherein the request message comprises the target internet protocol address, then judges whether the request message meets the speed limit condition based on the target internet protocol address in the request message, then responds to the fact that the request message meets the speed limit condition, judges whether the request message is a load balancing service message based on the message content of the request message, responds to the fact that the request message is the load balancing service message, replaces the target internet protocol address in the request message with the internet protocol address of the rear end server to obtain a new request message, finally sends the new request message to the internal network core, data transmission between the external network and the internal network is achieved, and based on the fusion gateway, the elastic internet protocol address, the load balancing service, the limiting speed and other related network functions between the external network and the internal network are achieved.
Referring to fig. 3, fig. 3 shows a flowchart 300 of one embodiment of replacing a target internet protocol address in a request message with a back-end server internet protocol address, that is, step 240, in response to determining that the request message is a load balancing service message, replacing the target internet protocol address in the request message with the back-end server internet protocol address to obtain a new request message, which may include the following steps:
in step 310, in response to determining that the request message is a load balancing service message, a backend server internet protocol address corresponding to the request message is determined based on the historical session set corresponding to the historical request message and the message content of the request message.
In this step, after the execution body determines that the request message is a load balancing service message through comparison of the message content, a history session set corresponding to the history request message may be obtained, where the history session set may include history sessions corresponding to a plurality of history request messages, and each history session may correspond to an internet protocol address of a history server corresponding to the history request message. The execution body may match the request packet with a history request packet in the history session set, and determine an internet protocol address of the backend server corresponding to the request packet.
And step 320, replacing the target internet protocol address in the request message with the internet protocol address of the back-end server to obtain a new request message.
In this step, after the executing body determines the internet protocol address of the back-end server corresponding to the request message, the target internet protocol address in the request message may be replaced with the internet protocol address of the back-end server, so as to obtain updated message content, thereby obtaining a new request message.
In the implementation manner, the internet protocol address of the back-end server corresponding to the request message is determined through the history session set, and the target internet protocol address in the request message is replaced by the internet protocol address of the back-end server, so that a new request message is obtained, the internet protocol address of the back-end server can be determined by utilizing the history session on the basis of determining that the request message is a load balancing service message, and the determination efficiency and accuracy of the internet protocol address of the back-end server are improved.
Referring to fig. 4, fig. 4 shows a flowchart 400 of one embodiment of determining a back-end server internet protocol address corresponding to a request message, that is, step 310, in response to determining that the request message is a load balancing service message, determining the back-end server internet protocol address corresponding to the request message based on a history session corresponding to the history request message and a message content of the request message, may include the steps of:
Step 410, based on the message content of the request message, it is determined whether a history session corresponding to the request message exists in the history session set corresponding to the history request message.
In this step, after the executing body obtains the history session set corresponding to the history request packet, the executing body may match the packet content of the request packet with the packet content of the history request packet in the history session set, and determine whether there is a history session corresponding to the request packet in the history session set corresponding to the history request packet.
In response to determining that there is a history session corresponding to the request message, a history server internet protocol address corresponding to the history session is determined as a backend server internet protocol address corresponding to the request message, step 420.
In this step, after the execution body determines that there is a history session corresponding to the request packet through comparison, the execution body may acquire a history server internet protocol address corresponding to the history session, and determine the history server internet protocol address corresponding to the history session as a backend server internet protocol address corresponding to the request packet.
In the implementation manner, the history server internet protocol address corresponding to the history session is determined to be the back-end server internet protocol address corresponding to the request message, and the back-end server internet protocol address is determined by using the history session on the basis of determining that the request message is the load balancing service message, so that the determination efficiency and accuracy of the back-end server internet protocol address are improved.
With continued reference to fig. 4, in response to determining that the request message is a load balancing service message, the step 310 of determining the back-end server internet protocol address corresponding to the request message based on the history session corresponding to the history request message and the message content of the request message may further include the steps of:
Step 430, in response to determining that there is no history session corresponding to the request message, performing hash calculation on the message content of the request message to obtain a hash value corresponding to the request message.
In this step, after the execution body determines that there is no history session corresponding to the request message through comparison, a hash algorithm may be used to perform hash calculation on the message content of the request message, so as to obtain a hash value corresponding to the request message.
Step 440, determining a candidate server internet protocol address corresponding to the request message in the server internet protocol address set based on the hash value.
In this step, after the executing body obtains the hash value corresponding to the request packet, the executing body may obtain a locally stored server internet protocol address set, where the server internet protocol address set may include correspondence between internet protocol addresses of local multiple 4-layer load balancing back-end real servers and hash values, and different hash values may correspond to different server internet protocol addresses.
The execution body may compare the hash value corresponding to the request message with the server internet protocol address set, determine the server internet protocol address corresponding to the hash value, and determine the determined server internet protocol address as the candidate server internet protocol address corresponding to the request message.
Wherein, the server internet protocol address set can store a back-end real server with 4 layers of load balancing, and can be in the form of RS_table.
In response to inserting the session generated by the candidate server internet protocol address into the historical session set, the candidate server internet protocol address is determined to be the backend server internet protocol address corresponding to the request message, step 450.
In this step, after the executing body determines the candidate server ip address, the session generated by the candidate server ip address may be inserted into the history session set. If it is determined that the session generated by the candidate server internet protocol address is inserted into the history session set, the executing body may determine that the session insertion is successful, and determine the candidate server internet protocol address as the back-end server internet protocol address corresponding to the request message.
In the implementation manner, by determining that no history session corresponding to the request message exists, performing hash calculation on the message content of the request message to obtain a hash value corresponding to the request message, determining a candidate server internet protocol address corresponding to the request message in a server internet protocol address set based on the hash value, if the session generated by the candidate server internet protocol address is determined to be inserted into the history session set, determining the candidate server internet protocol address as a back-end server internet protocol address corresponding to the request message, determining the back-end server internet protocol address on the basis that no history session exists, performing internet protocol address matching by using the hash value, determining the corresponding back-end server internet protocol address, and improving the determination efficiency.
Referring to fig. 5, fig. 5 shows a flow chart 500 of another embodiment of a data transmission method, which may include the steps of:
step 510, receiving a request message sent by an external network core.
Step 510 of this embodiment may be performed in a similar manner to step 210 of the embodiment shown in fig. 2, and is not repeated here.
Step 520, based on the target internet protocol address in the request message, it is determined whether the request message satisfies the speed limit condition.
Step 520 of this embodiment may be performed in a similar manner to step 220 of the embodiment shown in fig. 2, and is not repeated here.
In step 530, in response to determining that the request message meets the speed limit condition, it is determined whether the request message is a load balancing service message based on the message content of the request message.
Step 530 of this embodiment may be performed in a similar manner to step 230 of the embodiment shown in fig. 2, and is not repeated here.
In response to determining that the request message is a load balancing service message, step 540 is performed, in response to determining that the request message is a load balancing service message, replacing the target internet protocol address in the request message with the backend server internet protocol address, and obtaining a new request message.
Step 540 of this embodiment may be performed in a similar manner to step 240 of the embodiment shown in fig. 2, and is not repeated here.
In response to determining that the request message is not a load balancing service message, step 550 is performed to determine an intranet internet protocol address corresponding to the target internet protocol address based on the target internet protocol address and the elastic internet protocol address table of the request message in response to determining that the request message is not a load balancing service message.
In this step, after the executing body determines that the request packet is not a load balancing service packet, the executing body may acquire an elastic internet protocol address table, where the elastic internet protocol address table may store correspondence between a plurality of elastic IP addresses and an intranet IP address.
The executing body can match the target internet protocol address of the request message with the elastic internet protocol address table, and determine the address matched with the target internet protocol address in the elastic internet protocol address table, thereby determining the corresponding intranet internet protocol address.
Step 560, replacing the target internet protocol address of the request message with the intranet internet protocol address to obtain a new request message.
In this step, after the executing body determines the intranet internet protocol address corresponding to the target internet protocol address, the target internet protocol address of the request message may be replaced with the intranet internet protocol address to obtain a new request message.
Step 570, send a new request message to the intranet core.
Step 570 of this embodiment may be performed in a similar manner to step 250 of the embodiment shown in fig. 2, and is not repeated here.
In this embodiment, after determining that the request packet is not the load balancing service packet, the intranet internet protocol address corresponding to the target internet protocol address is determined based on the target internet protocol address and the elastic internet protocol address table of the request packet, and the target internet protocol address of the request packet is replaced by the intranet internet protocol address, so that the intranet internet protocol address is replaced by the intranet internet protocol address on the basis of determining that the request packet is not the load balancing service packet, and the determination efficiency and accuracy of the intranet internet protocol address are improved.
As an optional implementation manner, if it is determined that the request packet does not meet the speed limit condition, or if there is no address matching the target internet protocol address in the elastic internet protocol address table, step 580 is performed, and the packet is lost. Specifically, after the executing body determines that the request message does not meet the speed limit condition, the executing body may execute the packet loss operation on the request message; or the execution body determines that the address matched with the target internet protocol address does not exist in the elastic internet protocol address table, and can execute the packet loss operation on the request message.
Referring to fig. 6, fig. 6 shows a flow chart 600 of yet another embodiment of a data transmission method, which may include the steps of:
in step 610, in response to receiving the feedback message corresponding to the request message sent by the intranet core, it is determined whether there is a target internet protocol address corresponding to the source internet protocol address based on the source internet protocol address in the feedback message.
In this step, the server may receive the request packet, execute an operation corresponding to the request according to the request packet, generate a feedback packet, and send the feedback packet to the intranet core. And the intranet core receives the feedback message returned by the server through the switch and sends the feedback message to the execution main body.
After the executing body receives the feedback message corresponding to the request message sent by the intranet core, the executing body can match the source internet protocol address in the internet protocol address substitution table according to the source internet protocol address in the feedback message and the prestored internet protocol address substitution table, and judges whether a target internet protocol address corresponding to the source internet protocol address exists.
The internet protocol address substitution table may include a corresponding relationship between the target internet protocol address and the internet protocol address of the back-end server in the request message, and a corresponding relationship between the target internet protocol address and the intranet internet protocol address.
In response to determining that there is a target internet protocol address corresponding to the source internet protocol address, the source internet protocol address in the feedback message is replaced with the target internet protocol address, step 620.
In this step, the executing body matches the source internet protocol address with the internet protocol address substitution table, if it is determined that the source internet protocol address exists in the internet protocol address substitution table, it is determined that a target internet protocol address corresponding to the source internet protocol address exists, and then the executing body substitutes the source internet protocol address in the feedback message for the target internet protocol address.
Step 630, based on the target internet protocol address, it is determined whether the feedback message satisfies the speed limit condition.
In this step, after the executing body replaces the source internet protocol address in the feedback packet with the target internet protocol address, the target internet protocol address may be compared with a plurality of internet protocol addresses in the rate storage table, so as to determine the internet protocol address in the rate storage table that is the same as the target internet protocol address, and determine the rate corresponding to the determined internet protocol address as the target rate corresponding to the target internet protocol address. And then the execution body can compare the target rate with a preset rate and judge whether the target rate is smaller than the preset rate, so as to judge whether the feedback message meets the speed limit condition. If the target rate is smaller than the preset rate, determining that the feedback message meets the speed limiting condition; if the target rate is not less than the preset rate, determining that the feedback message does not meet the speed limiting condition.
And step 640, in response to determining that the feedback message meets the speed limit condition, sending the feedback message to the external network core.
In this step, after the executing body determines that the feedback message meets the speed limit condition, the executing body may send the feedback message to the external network core.
The external network core can send the feedback message to the client so that the client analyzes and renders the feedback message and displays the access result to the user, thereby completing the access operation of the client to the internal network server.
In this embodiment, by replacing the source internet protocol address in the feedback packet, the feedback packet is sent to the outer network core, so that data transmission between the outer network and the inner network is realized, related network functions such as limiting rate between the outer network and the inner network are realized based on the fusion gateway, processing performance is not reduced due to long data packets, lower price cost is provided, and various network functions can be realized without reducing processing capability.
Referring to fig. 7, fig. 7 shows a flowchart 700 of one embodiment of determining whether there is a target internet protocol address corresponding to a source internet protocol address, that is, in response to receiving a feedback message sent by an intranet core and corresponding to a request message, determining whether there is a target internet protocol address corresponding to a source internet protocol address based on the source internet protocol address in the feedback message in the foregoing step 610, may include the following steps:
Step 710, in response to receiving the feedback message corresponding to the request message sent by the intranet core, determining whether the package type of the feedback message is a preset type.
In this step, after receiving the feedback message corresponding to the request message sent by the intranet core, the executing body obtains the encapsulation type of the feedback message, and judges the encapsulation type of the feedback message, to determine whether the encapsulation type of the feedback message is a preset type. The preset type may be an encapsulation type corresponding to the request message, for example, may be Vxlan encapsulation, etc.
In step 720, in response to determining that the encapsulation type of the feedback message is a preset type, decapsulating the feedback message based on a preset encapsulation algorithm to obtain an decapsulated feedback message.
In this step, after the executing body determines that the package type of the feedback message is the preset type, the executing body unpacks the feedback message according to a preset package algorithm to obtain an unpacked feedback message.
Step 710, determining whether there is a target internet protocol address corresponding to the source internet protocol address based on the source internet protocol address in the decapsulated feedback message.
In this step, after the executing body obtains the decapsulated feedback packet, the executing body may obtain a source internet protocol address in the decapsulated feedback packet, and determine whether a target internet protocol address corresponding to the source internet protocol address exists according to the source internet protocol address in the decapsulated feedback packet.
In the implementation manner, the pertinence of the feedback message is improved by judging the packaging type of the feedback message, the feedback message corresponding to the request message can be screened, and the accuracy of the feedback message is improved.
As an optional implementation manner, if it is determined that the package type of the feedback packet is not the preset type, the packet loss operation is performed.
With further reference to fig. 8, as an implementation of the method illustrated in the above figures, the present disclosure provides one embodiment of a data transmission apparatus. This embodiment of the device corresponds to the embodiment of the method shown in fig. 2.
As shown in fig. 8, the data transmission apparatus 800 of the present embodiment may include: a receiving module 810, a first judging module 820, a second judging module 830, a replacing module 840 and a transmitting module 850.
Wherein, the receiving module 810 is configured to receive a request message sent by an external network core, where the request message includes a target internet protocol address;
A first determining module 820 configured to determine whether the request message satisfies a speed limit condition based on the target internet protocol address in the request message;
A second judging module 830 configured to judge, based on the message content of the request message, whether the request message is a load balancing service message in response to determining that the request message satisfies the speed limit condition;
A replacing module 840 configured to replace the target internet protocol address in the request message with the back-end server internet protocol address in response to determining that the request message is a load balancing service message, to obtain a new request message;
A sending module 850 configured to send a new request message to the intranet core.
In some optional implementations of the present implementation, the first determining module 820 is further configured to: determining a target rate corresponding to the target internet protocol address based on the target internet protocol address in the request message; and judging whether the request message meets the speed limit condition or not based on the preset speed and the target speed.
In some alternative implementations of the present implementation, the replacement module 840 includes: a determination unit configured to: responding to the determination that the request message is a load balancing service message, and determining a back-end server Internet protocol address corresponding to the request message based on a history session set corresponding to the history request message and the message content of the request message; a replacement unit configured to: and replacing the target internet protocol address in the request message with the internet protocol address of the back-end server to obtain a new request message.
In some optional implementations of the present implementation, the determining unit is further configured to: judging whether a history session corresponding to the request message exists in a history session set corresponding to the history request message according to the message content of the request message; in response to determining that there is a history session corresponding to the request message, a history server internet protocol address corresponding to the history session is determined as a backend server internet protocol address corresponding to the request message.
In some optional implementations of the present implementation, the determining unit is further configured to: in response to determining that the historical session corresponding to the request message does not exist, carrying out hash calculation on the message content of the request message to obtain a hash value corresponding to the request message; determining a candidate server internet protocol address corresponding to the request message in a server internet protocol address set based on the hash value; in response to inserting the session generated by the candidate server internet protocol address into the historical set of sessions, the candidate server internet protocol address is determined to be the backend server internet protocol address corresponding to the request message.
In some optional implementations of the present implementation, the sending module 850 is further configured to: in response to obtaining a new request message, packaging the new request message based on a preset packaging algorithm to obtain a packaged request message corresponding to the new request message; and sending an encapsulation request message to the intranet core.
In some optional implementations of the present implementation, the apparatus further includes a determination module; a determination module configured to: in response to determining that the request message is not a load balancing service message, determining an intranet internet protocol address corresponding to the target internet protocol address based on the target internet protocol address of the request message and the elastic internet protocol address table; a replacement module configured to: and replacing the target internet protocol address of the request message with the intranet internet protocol address to obtain a new request message.
In some optional implementations of the present implementation, the second determining module 830 is further configured to: responding to a received feedback message which is sent by an intranet core and corresponds to the request message, and judging whether a target Internet protocol address corresponding to the source Internet protocol address exists or not based on the source Internet protocol address in the feedback message; the replacement module 840 is further configured to: in response to determining that there is a target internet protocol address corresponding to the source internet protocol address, replacing the source internet protocol address in the feedback message with the target internet protocol address; the first judging module 820 is further configured to: judging whether the feedback message meets the speed limit condition or not based on the target internet protocol address; the transmitting module 850 is further configured to: and transmitting the feedback message to the outer network core in response to determining that the feedback message meets the speed limit condition.
In some optional implementations of the present implementation, the second determining module 830 is further configured to: responding to the received feedback message corresponding to the request message sent by the intranet core, and judging whether the packaging type of the feedback message is a preset type; in response to determining that the encapsulation type of the feedback message is a preset type, decapsulating the feedback message based on a preset encapsulation algorithm to obtain an decapsulated feedback message; and judging whether a target internet protocol address corresponding to the source internet protocol address exists or not based on the source internet protocol address in the unpacking feedback message.
According to the data transmission device provided by the embodiment of the disclosure, the execution main body firstly receives the request message sent by the external network core, wherein the request message comprises a target internet protocol address, then judges whether the request message meets a speed limit condition based on the target internet protocol address in the request message, then responds to the request message to meet the speed limit condition, judges whether the request message is a load balancing service message based on the message content of the request message, responds to the request message to be the load balancing service message, replaces the target internet protocol address in the request message with a rear end server internet protocol address to obtain a new request message, finally sends the new request message to the internal network core, realizes data transmission between the external network and the internal network, realizes related network functions such as an elastic internet protocol address, load balancing service, a limiting rate and the like between the external network and the internal network based on the fusion gateway, does not reduce processing performance due to the length of the data packet, has lower price cost, and can realize multiple network functions without reducing processing capacity.
Those skilled in the art will appreciate that the above-described apparatus also includes some other well-known structures, such as a processor, memory, etc., which are not shown in fig. 8 in order to unnecessarily obscure embodiments of the present disclosure.
Referring now to fig. 9, a schematic diagram of an electronic device 900 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a smart screen, a notebook computer, a PAD (tablet), a PMP (portable multimedia player), an in-vehicle terminal (e.g., in-vehicle navigation terminal), etc., a fixed terminal such as a digital TV, a desktop computer, etc. The terminal device shown in fig. 9 is only one example, and should not impose any limitation on the functions and scope of use of the embodiments of the present disclosure.
As shown in fig. 9, the electronic device 900 may include a processing means (e.g., a central processor, a graphics processor, etc.) 901, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage means 908 into a Random Access Memory (RAM) 903. In the RAM903, various programs and data necessary for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM903 are connected to each other through a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
In general, the following devices may be connected to the I/O interface 905: input devices 906 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 907 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 908 including, for example, magnetic tape, hard disk, etc.; and a communication device 909. The communication means 909 may allow the electronic device 900 to communicate wirelessly or by wire with other devices to exchange data. While fig. 9 shows an electronic device 900 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 9 may represent one device or a plurality of devices as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 909, or installed from the storage device 908, or installed from the ROM 902. When executed by the processing device 901, performs the above-described functions defined in the methods of the embodiments of the present disclosure. It should be noted that the computer readable medium of the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In an embodiment of the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. Whereas in embodiments of the present disclosure, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented in software or in hardware. The described units may also be provided in a processor, for example, described as: a processor includes a receiving module, a first judging module, a second judging module, a replacing module, and a transmitting module, wherein the names of the modules do not constitute a limitation of the module itself in some cases.
As another aspect, the present application also provides a computer readable medium, which may be contained in the electronic device; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a request message sent by an external network core, wherein the request message comprises a target Internet protocol address; judging whether the request message meets the speed limit condition or not based on the target internet protocol address in the request message; responding to the fact that the request message meets the speed limiting condition, and judging whether the request message is a load balancing service message or not based on the message content of the request message; in response to determining that the request message is a load balancing service message, replacing a target internet protocol address in the request message with a back-end server internet protocol address to obtain a new request message; and sending a new request message to the intranet core.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above technical features, but encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the invention. Such as the above-described features, are mutually substituted with (but not limited to) the features having similar functions disclosed in the embodiments of the present disclosure.

Claims (20)

1. A data transmission method applied to a converged gateway, the method comprising:
receiving a request message sent by an external network core, wherein the request message comprises a target Internet protocol address;
judging whether the request message meets a speed limit condition or not based on a target internet protocol address in the request message;
Responding to the request message meeting the speed limiting condition, and judging whether the request message is a load balancing service message or not based on the message content of the request message;
in response to determining that the request message is the load balancing service message, replacing a target internet protocol address in the request message with a back-end server internet protocol address to obtain a new request message;
And sending the new request message to an intranet core.
2. The method of claim 1, wherein the determining whether the request message satisfies a speed limit condition based on a target internet protocol address in the request message comprises:
Determining a target rate corresponding to the target internet protocol address based on the target internet protocol address in the request message;
and judging whether the request message meets a speed limit condition or not based on the preset speed and the target speed.
3. The method of claim 1, wherein the replacing the target internet protocol address in the request message with the backend server internet protocol address in response to determining that the request message is the load balancing service message, obtains a new request message, comprises:
in response to determining that the request message is the load balancing service message, determining a back-end server internet protocol address corresponding to the request message based on a historical session set corresponding to a historical request message and message content of the request message;
And replacing the target internet protocol address in the request message with the internet protocol address of the back-end server to obtain a new request message.
4. The method of claim 3, wherein the determining the back-end server internet protocol address corresponding to the request message based on the historical session set corresponding to the historical request message and the message content of the request message comprises:
Judging whether a history session corresponding to the request message exists in a history session set corresponding to the history request message based on the message content of the request message;
And in response to determining that a history session corresponding to the request message exists, determining a history server internet protocol address corresponding to the history session as a back-end server internet protocol address corresponding to the request message.
5. The method of claim 4, wherein the determining the back-end server internet protocol address corresponding to the request message based on the historical session set corresponding to the historical request message and the message content of the request message further comprises:
in response to determining that a history session corresponding to the request message does not exist, carrying out hash calculation on the message content of the request message to obtain a hash value corresponding to the request message;
Determining a candidate server internet protocol address corresponding to the request message in a server internet protocol address set based on the hash value;
And in response to inserting the session generated by the candidate server internet protocol address into the historical session set, determining the candidate server internet protocol address as a backend server internet protocol address corresponding to the request message.
6. The method of claim 1, wherein the sending the new request message to an intranet core comprises:
responding to the new request message, and encapsulating the new request message based on a preset encapsulation algorithm to obtain an encapsulated request message corresponding to the new request message;
And sending the encapsulation request message to an intranet core.
7. The method of claim 1, the method further comprising:
determining an intranet internet protocol address corresponding to a target internet protocol address based on the target internet protocol address and an elastic internet protocol address table of the request message in response to determining that the request message is not the load balancing service message;
And replacing the target internet protocol address of the request message with the intranet internet protocol address to obtain a new request message.
8. The method of any of claims 1-7, the method further comprising:
responding to a feedback message which is sent by the intranet core and corresponds to the request message, and judging whether the target Internet protocol address corresponding to the source Internet protocol address exists or not based on the source Internet protocol address in the feedback message;
In response to determining that the target internet protocol address corresponding to the source internet protocol address exists, replacing the source internet protocol address in the feedback message with the target internet protocol address;
Judging whether the feedback message meets the speed limiting condition or not based on the target internet protocol address;
And responding to the fact that the feedback message meets the speed limiting condition, and sending the feedback message to the outer network core.
9. The method of claim 8, wherein the determining, in response to receiving the feedback packet corresponding to the request packet sent by the intranet core, whether the target internet protocol address corresponding to the source internet protocol address exists based on the source internet protocol address in the feedback packet includes:
Responding to the received feedback message corresponding to the request message sent by the intranet core, and judging whether the packaging type of the feedback message is a preset type or not;
in response to determining that the encapsulation type of the feedback message is the preset type, decapsulating the feedback message based on the preset encapsulation algorithm to obtain an decapsulated feedback message;
And judging whether the target internet protocol address corresponding to the source internet protocol address exists or not based on the source internet protocol address in the unpacking feedback message.
10. A data transmission apparatus, the apparatus comprising:
The receiving module is configured to receive a request message sent by an external network core, wherein the request message comprises a target internet protocol address;
the first judging module is configured to judge whether the request message meets a speed limit condition or not based on a target internet protocol address in the request message;
The second judging module is configured to respond to the fact that the request message meets the speed limiting condition, and judge whether the request message is a load balancing service message or not based on the message content of the request message;
the replacing module is configured to replace a target internet protocol address in the request message with a back-end server internet protocol address in response to determining that the request message is the load balancing service message, so as to obtain a new request message;
and the sending module is configured to send the new request message to the intranet core.
11. The apparatus of claim 10, wherein the first determination module is further configured to:
Determining a target rate corresponding to the target internet protocol address based on the target internet protocol address in the request message;
and judging whether the request message meets a speed limit condition or not based on the preset speed and the target speed.
12. The apparatus of claim 10, wherein the replacement module comprises:
a determination unit configured to: in response to determining that the request message is the load balancing service message, determining a back-end server internet protocol address corresponding to the request message based on a historical session set corresponding to a historical request message and message content of the request message;
A replacement unit configured to: and replacing the target internet protocol address in the request message with the internet protocol address of the back-end server to obtain a new request message.
13. The apparatus of claim 12, wherein the determination unit is further configured to:
Judging whether a history session corresponding to the request message exists in a history session set corresponding to the history request message based on the message content of the request message;
And in response to determining that a history session corresponding to the request message exists, determining a history server internet protocol address corresponding to the history session as a back-end server internet protocol address corresponding to the request message.
14. The apparatus of claim 13, wherein the determination unit is further configured to:
in response to determining that a history session corresponding to the request message does not exist, carrying out hash calculation on the message content of the request message to obtain a hash value corresponding to the request message;
Determining a candidate server internet protocol address corresponding to the request message in a server internet protocol address set based on the hash value;
And in response to inserting the session generated by the candidate server internet protocol address into the historical session set, determining the candidate server internet protocol address as a backend server internet protocol address corresponding to the request message.
15. The apparatus of claim 10, wherein the transmitting module is further configured to:
responding to the new request message, and encapsulating the new request message based on a preset encapsulation algorithm to obtain an encapsulated request message corresponding to the new request message;
And sending the encapsulation request message to an intranet core.
16. The apparatus of claim 10, wherein the apparatus further comprises a determination module;
The determination module is configured to: determining an intranet internet protocol address corresponding to a target internet protocol address based on the target internet protocol address and an elastic internet protocol address table of the request message in response to determining that the request message is not the load balancing service message;
The replacement module is configured to: and replacing the target internet protocol address of the request message with the intranet internet protocol address to obtain a new request message.
17. The apparatus of any of claims 8-13, wherein the second determination module is further configured to: responding to a feedback message which is sent by the intranet core and corresponds to the request message, and judging whether the target Internet protocol address corresponding to the source Internet protocol address exists or not based on the source Internet protocol address in the feedback message;
The replacement module is further configured to: in response to determining that the target internet protocol address corresponding to the source internet protocol address exists, replacing the source internet protocol address in the feedback message with the target internet protocol address;
The first judgment module is further configured to: judging whether the feedback message meets the speed limiting condition or not based on the target internet protocol address;
The transmitting module is further configured to: and responding to the fact that the feedback message meets the speed limiting condition, and sending the feedback message to the outer network core.
18. The apparatus of claim 17, wherein the second determination module is further configured to:
Responding to the received feedback message corresponding to the request message sent by the intranet core, and judging whether the packaging type of the feedback message is a preset type or not;
in response to determining that the encapsulation type of the feedback message is the preset type, decapsulating the feedback message based on the preset encapsulation algorithm to obtain an decapsulated feedback message;
And judging whether the target internet protocol address corresponding to the source internet protocol address exists or not based on the source internet protocol address in the unpacking feedback message.
19. An electronic device, comprising:
One or more processors;
Storage means for storing one or more programs,
The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-9.
20. A computer readable medium on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method according to any one of claims 1-9.
CN202211466988.1A 2022-11-22 2022-11-22 Data transmission method and device Pending CN118075206A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211466988.1A CN118075206A (en) 2022-11-22 2022-11-22 Data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211466988.1A CN118075206A (en) 2022-11-22 2022-11-22 Data transmission method and device

Publications (1)

Publication Number Publication Date
CN118075206A true CN118075206A (en) 2024-05-24

Family

ID=91104465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211466988.1A Pending CN118075206A (en) 2022-11-22 2022-11-22 Data transmission method and device

Country Status (1)

Country Link
CN (1) CN118075206A (en)

Similar Documents

Publication Publication Date Title
CN110708393B (en) Method, device and system for transmitting data
US20230118176A1 (en) Data transmission method and apparatus, computer-readable storage medium, electronic device, and computer program product
CN110177047B (en) Message sending method, device, electronic equipment and computer readable storage medium
CN111930709B (en) Data storage method, apparatus, electronic device, and computer readable medium
CN110177128B (en) Data transmission system and method for establishing VPN connection, terminal and VPN proxy thereof
CN112953850B (en) Data transmission method and device, computer readable medium and electronic equipment
CN112039796A (en) Data packet transmission method and device, storage medium and electronic equipment
CN112416632B (en) Event communication method and device, electronic equipment and computer readable medium
CN112887429A (en) Data transmission method and device, electronic equipment and storage medium
CN110545230B (en) Method and device for forwarding VXLAN message
CN114828140B (en) Service flow message forwarding method and device, storage medium and electronic equipment
CN113595927A (en) Method and device for processing mirror flow in bypass mode
CN114071544B (en) Network testing method and device and electronic equipment
CN110177288A (en) Audio/video data transmission method, device, electronic equipment and computer-readable medium
CN113422669B (en) Data transmission method, device and system, electronic equipment and storage medium
CN113765801A (en) Message processing method and device applied to data center, electronic equipment and medium
CN114640679B (en) Data packet transmission method and device, storage medium and electronic equipment
CN118075206A (en) Data transmission method and device
CN114513465A (en) Load balancing method, load balancing device, electronic device and storage medium
CN113169936B (en) Service chaining mechanism for data stream processing
WO2023169202A1 (en) Video stream data acquisition method and apparatus, and electronic device and computer-readable medium
CN110768888A (en) Data transmission device and system
CN111147520B (en) Information processing method and device executed by firewall
CN116938598B (en) Information transmission method, apparatus, electronic device, and computer-readable medium
CN112019919B (en) Video sticker adding method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication