CN109005250A - Method and apparatus for accessing server-side - Google Patents

Method and apparatus for accessing server-side Download PDF

Info

Publication number
CN109005250A
CN109005250A CN201810864435.9A CN201810864435A CN109005250A CN 109005250 A CN109005250 A CN 109005250A CN 201810864435 A CN201810864435 A CN 201810864435A CN 109005250 A CN109005250 A CN 109005250A
Authority
CN
China
Prior art keywords
message
address
ipv4
ipv6
network
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.)
Granted
Application number
CN201810864435.9A
Other languages
Chinese (zh)
Other versions
CN109005250B (en
Inventor
周磊
雷思源
姜琳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201810864435.9A priority Critical patent/CN109005250B/en
Publication of CN109005250A publication Critical patent/CN109005250A/en
Application granted granted Critical
Publication of CN109005250B publication Critical patent/CN109005250B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/251Translation of Internet protocol [IP] addresses between different IP versions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the present application discloses the method and apparatus for accessing server-side.One specific embodiment of this method includes: the 6th edition IPv6 message of interchanger received internet protocol from communication connection as the first IPv6 message;Based on the address IPv6 in the first IPv6 message to the conversion of the 4th edition address IPv4 of Internet protocol, the first IPv4 message is generated, wherein the address IPv6 and the address IPv4 are public network IP address;First IPv4 message is sent to the network address translation apparatus of communication connection, wherein, network address translation apparatus generates the 2nd IPv4 message based on the conversion of the public network IP address to the first IPv4 message to IP address of internal network, and the 2nd IPv4 message is sent to server-side.The embodiment improves the flexibility of access server-side by the address IPv4 of public network and the IPv6 address conversion of public network.

Description

Method and apparatus for accessing server-side
Technical field
The invention relates to field of computer technology, and in particular to the method and apparatus for accessing server-side.
Background technique
With the fast development of Internet technology, global ip v4 (The forth version of Internet Protocol, Internet protocol fourth edition) number of users also sharp increase, IPv4 address space deficiency is not able to satisfy Global Subscriber To the great demand of internet address resource.Using IPv6 (The sixth version of Internet Protocol, mutually Networking protocol sixth version) the problem of not only can solve network address resources quantity, but also solve a variety of access devices and be connected into The obstacle of internet.Existing technical solution provides the service supported the terminal of IPv4 network by public network and support IPv4 network End communication.
Summary of the invention
The embodiment of the present application proposes the method and apparatus for accessing server-side.
In a first aspect, the embodiment of the present application provides a kind of method for accessing server-side, this method comprises: from communication The 6th edition IPv6 message of interchanger received internet protocol of connection is as the first IPv6 message;Based in the first IPv6 message The address IPv6 generates the first IPv4 message, wherein the address IPv6 and IPv4 to the conversion of the 4th edition address IPv4 of Internet protocol Address is public network IP address;First IPv4 message is sent to the network address translation apparatus of communication connection, wherein network address Conversion equipment generates the 2nd IPv4 message based on the conversion of the public network IP address to the first IPv4 message to IP address of internal network, and 2nd IPv4 message is sent to server-side.
In some embodiments, after the first IPv4 message is sent to the network address translation apparatus of communication connection, This method further include: obtain the 4th IPv4 message that network address translation apparatus is sent, wherein the 4th IPv4 message is network Location conversion equipment generates as follows: obtaining the IPv4 message that server-side is sent in response to receiving the 2nd IPv4 message As the 3rd IPv4 message;Conversion based on the IP address of internal network to the 3rd IPv4 message to public network IP address generates the 4th IPv4 Message;Based on the conversion of the address IPv4 in the 4th IPv4 message to the address IPv6, the 2nd IPv6 message is generated;By the 2nd IPv6 Message is sent to interchanger, wherein interchanger by the 2nd IPv6 message by public network be sent to the first IPv6 message from Terminal.
In some embodiments, interchanger is configured with the flow statistical system for counting messages.
In some embodiments, terminal supports IPv6 network.
In some embodiments, the first IPv6 message is the message that terminal is sent to interchanger by public network.
Second aspect, the embodiment of the present application provide a kind of for accessing the device of server-side, which includes: that information connects Unit is received, is configured to the 6th edition IPv6 message of interchanger received internet protocol from communication connection as the first IPv6 message; Network address translation unit is configured to based on the address IPv6 in the first IPv6 message to the 4th edition IPv4 of Internet protocol The conversion of location generates the first IPv4 message, wherein the address IPv6 and the address IPv4 are public network IP address;Network address translation and Transmission unit is configured to for the first IPv4 message being sent to the network address translation apparatus of communication connection, wherein network address Conversion equipment generates the 2nd IPv4 message based on the conversion of the public network IP address to the first IPv4 message to IP address of internal network, and 2nd IPv4 message is sent to server-side.
In some embodiments, device further include: information acquisition unit is configured to network address translation apparatus transmission The 4th IPv4 message, wherein the 4th IPv4 message is that network address translation apparatus generates as follows: obtain service Hold the IPv4 message sent in response to receiving the 2nd IPv4 message as the 3rd IPv4 message;Based on to the 3rd IPv4 message The conversion of IP address of internal network to public network IP address generates the 4th IPv4 message;Address conversioning unit is configured to based on the 4th The address IPv4 in IPv4 message generates the 2nd IPv6 message to the conversion of the address IPv6;Information transmitting unit, be configured to by 2nd IPv6 message is sent to interchanger, wherein the 2nd IPv6 message is sent to the first IPv6 message by public network by interchanger From terminal.
In some embodiments, interchanger is configured with the flow statistical system for counting messages.
In some embodiments, terminal supports IPv6 network.
In some embodiments, the first IPv6 message is the message that terminal is sent to interchanger by public network.
The third aspect, the embodiment of the present application provide a kind of server, which includes: one or more processors; Storage device is stored thereon with one or more programs;When one or more programs are executed by one or more processors, so that One or more processors realize the method as described in implementation any in first aspect.
Fourth aspect, the embodiment of the present application provide a kind of computer-readable medium, are stored thereon with computer program, should The method as described in implementation any in first aspect is realized when program is executed by processor.
Method and apparatus provided by the embodiments of the present application for accessing server-side are received from the interchanger of communication connection IPv6 message is as the first IPv6 message, then, raw based on the conversion of the address IPv6 in the first IPv6 message to the address IPv4 At the first IPv4 message, the first IPv4 message is finally sent to the network address translation apparatus of communication connection, wherein network Location conversion equipment generates the 2nd IPv4 message based on the conversion of the public network IP address to the first IPv4 message to IP address of internal network, with And the 2nd IPv4 message is sent to server-side.This method and device pass through the address IPv4 of public network and the address IPv6 of public network Conversion improves the flexibility of access server-side.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that one embodiment of the application can be applied to exemplary system architecture figure therein;
Fig. 2 is the flow chart according to one embodiment of the method for accessing server-side of the application;
Fig. 3 is the schematic diagram according to an application scenarios of the method for accessing server-side of the embodiment of the present application;
Fig. 4 is the flow chart according to another embodiment of the method for accessing server-side of the application;
Fig. 5 is the structural schematic diagram according to one embodiment of the device for accessing server-side of the application;
Fig. 6 is adapted for the structural schematic diagram for the computer system for realizing the server of the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the application for accessing showing for server-side method or device for accessing server-side Example property framework 100.
As shown in Figure 1, system architecture 100 may include interchanger 101, network 102,104, server 103 and network Location conversion equipment 105.Wherein, network 102 between interchanger 101 and server 103 to provide the medium of communication link.Net Network 104 to server 103 and network address translation apparatus 105 and between provide communication link medium.Network 102,104 It may include various connection types, such as wired, wireless communication link or fiber optic cables etc..
Interchanger 101 can be interacted by network 102 with server 103, to receive or send message etc..Interchanger 101 IPv6 message can be transmitted to server 103.
Server 103 can be to provide the server of various services, such as carry out to the IPv6 message that interchanger 101 is sent The background server of the processing such as parsing.Background server can be turned based on the address IPv6 in IPv6 message to the address IPv4 It changes, generates IPv4 message, IPv4 message can also be sent to network address translation apparatus 105.
Network address translation apparatus 105 can be interacted by network 104 with server 103, to receive or send message etc.. Network address translation apparatus 105 can receive the IPv4 message of the transmission of server 103.
It should be noted that for accessing the method for server-side generally by server 103 provided by the embodiment of the present application It executes, correspondingly, the device for accessing server-side is generally positioned in server 103.
It should be noted that server can be hardware, it is also possible to software.When server is hardware, may be implemented At the distributed server cluster that multiple servers form, individual server also may be implemented into.It, can when server is software To be implemented as multiple softwares or software module (such as providing Distributed Services), single software or software also may be implemented into Module.It is not specifically limited herein.
It should be understood that interchanger, network, server in Fig. 1, the number of network address translation apparatus are only schematic 's.According to needs are realized, any number of interchanger, network, server, network address translation apparatus can have.
With continued reference to Fig. 2, the process of one embodiment of the method for accessing server-side according to the application is shown 200.This be used for access server-side method the following steps are included:
Step 201, it is reported from the 6th edition IPv6 message of the interchanger received internet protocol of communication connection as the first IPv6 Text.
It in the present embodiment, can for accessing the executing subject (such as server 103 shown in FIG. 1) of the method for server-side IPv6 message is received as the first IPv6 message using the interchanger (such as interchanger 101 shown in FIG. 1) from communication connection.It is above-mentioned Interchanger and the communication connection of above-mentioned executing subject, above-mentioned interchanger are used to IPv6 message being forwarded to above-mentioned executing subject.It is above-mentioned Message is the data cell exchanged in network with transmission, contains complete data information to be sent.
Step 202, the conversion based on the address IPv6 in the first IPv6 message to the address IPv4 generates the first IPv4 report Text.
In the present embodiment, after the IPv6 address conversion in the first IPv6 message is the address IPv4, above-mentioned execution master The first IPv4 message can be generated in body.Wherein, above-mentioned first IPv6 message is the IPv6 report of the interchanger forwarding through communicating to connect Text, above-mentioned first IPv4 message are that executing subject parses the IPv4 message generated after above-mentioned first IPv6 message.IPv6 message turns Following steps can be passed through by being changed to IPv4 message: above-mentioned executing subject receives IPv6 message, with obtaining the IPv6 of IPv6 message Location;Modify the address IPv4 in IPV4 header and message length;And the IPV4 header of modification is carried to the IPv6 received Message front end, and the double byte of identification information is revised as switch signs ID (Identity, identity number), so that receiving IPv6 message be converted into IPv4 message.
Step 203, the first IPv4 message is sent to the network address translation apparatus of communication connection.
In the present embodiment, the network address that the first IPv4 message can be sent to communication connection by above-mentioned executing subject turns Exchange device.Network address translation apparatus and the communication connection of above-mentioned executing subject.
It should be noted that above-mentioned network address translation apparatus is based on the public network IP address to the first IPv4 message to Intranet The conversion of IP address generates the 2nd IPv4 message, and the 2nd IPv4 message is sent to server-side.Optionally, above-mentioned execution master First IPv4 message can be sent to other network address translation apparatus (not shown)s of communication connection by body.Above-mentioned service End and the communication connection of above-mentioned network address translation apparatus.Above-mentioned 2nd IPv4 message can be network address translation apparatus be based on pair The public network IP address of first IPv4 message to IP address of internal network conversion and the IPv4 message that generates.It should be noted that network Location conversion equipment is the well-known technique studied and applied extensively at present to the processing of above-mentioned message, and details are not described herein.
It is that one of the application scenarios of the method according to the present embodiment for accessing server-side shows with continued reference to Fig. 3, Fig. 3 It is intended to.In the application scenarios of Fig. 3, firstly, the first IPv6 message 301 is sent to background server by interchanger, herein, first IPv6 message 301 is the message for carrying the request of " search english composition ".Then, background server parses the first IPv6 report Text generates the first IPv4 message 302, and herein, the first IPv4 message 302 is the report for carrying the request of " search english composition " Text.First IPv4 message 302 is sent to network address translation apparatus by background server.Later, network address translation apparatus pair The processing of first IPv4 message 302, will treated IPv4 message as the 2nd IPv4 message 303, herein, the 2nd IPv4 message 303 be the message for carrying the request of " search english composition ".2nd IPv4 message 303 is sent to by network address translation apparatus Database server.Finally, database server parses above-mentioned 2nd IPv4 message 303, and inquire english composition document 304。
The method provided by the above embodiment of the application, first by obtaining the IPv6 message sent of interchanger, then base The address IPv6 in IPv6 message generates IPv4 message, and then visit through network address translation apparatus to the conversion of the address IPv4 Ask server-side.The method achieve mutually convert and forward corresponding message access logical by the address IPv6 and the address IPv4 Believe the server-side of connection.
With further reference to Fig. 4, it illustrates the processes 400 of another embodiment for accessing server-side method.The visit Ask the process 400 of server-side method, comprising the following steps:
Step 401, IPv6 message is received as the first IPv6 message from the interchanger of communication connection.
It in the present embodiment, can for accessing the executing subject (such as server 103 shown in FIG. 1) of the method for server-side IPv6 message is received as the first IPv6 message using the interchanger (such as interchanger 101 shown in FIG. 1) from communication connection.It is above-mentioned Interchanger and the communication connection of above-mentioned executing subject, above-mentioned interchanger are used to IPv6 message being forwarded to above-mentioned executing subject.It is optional Ground, above-mentioned executing subject can receive IPv6 message from other interchanger (not shown)s of communication connection.
Step 402, the conversion based on the address IPv6 in the first IPv6 message to the address IPv4 generates the first IPv4 report Text.
In the present embodiment, after the IPv6 address conversion in the first IPv6 message is the address IPv4, above-mentioned execution master The first IPv4 message can be generated in body.Wherein, above-mentioned first IPv6 message is the IPv6 report of the interchanger forwarding through communicating to connect Text, above-mentioned first IPv4 message are that executing subject parses the IPv4 message generated after above-mentioned first IPv6 message.IPv6 message turns Following steps can be passed through by being changed to IPv4 message: above-mentioned executing subject receives IPv6 message, with obtaining the IPv6 of IPv6 message Location;Modify the address IPv4 in IPV4 header and message length;And the IPV4 header of modification is carried to the IPv6 received Message front end, and the double byte of identification information is revised as switch signs ID, so that the IPv6 message received is converted into IPv4 Message.Wherein, the address IPv4 includes the address source IP v4 and the address destination IP v4.
Step 403, the first IPv4 message is sent to the network address translation apparatus of communication connection.
In the present embodiment, the network address that the first IPv4 message can be sent to communication connection by above-mentioned executing subject turns Exchange device.Network address translation apparatus and the communication connection of above-mentioned executing subject.
It should be noted that above-mentioned network address translation apparatus is based on the public network IP address to the first IPv4 message to Intranet The conversion of IP address generates the 2nd IPv4 message, and the 2nd IPv4 message is sent to server-side.Optionally, above-mentioned execution master First IPv4 message can be sent to other network address translation apparatus (not shown)s of communication connection by body.Above-mentioned service End and the communication connection of above-mentioned network address translation apparatus.Optionally, above-mentioned server-side can be Cloud Server, database server Deng.Above-mentioned 2nd IPv4 message be network address translation apparatus based on the public network IP address to the first IPv4 message to Intranet IP The conversion of location and the IPv4 message generated.It should be noted that network address translation apparatus is wide at present to the processing of above-mentioned message The well-known technique of general research and application, details are not described herein.
Step 404, the 4th IPv4 message that network address translation apparatus is sent is obtained.
In the present embodiment, the 4th IPv4 message that the available network address translation apparatus of above-mentioned executing subject is sent.
It should be noted that above-mentioned 4th IPv4 message can be network address translation apparatus and generate as follows : the first step, the IPv4 message that acquisition server-side is sent in response to receiving the 2nd IPv4 message is as the 3rd IPv4 message.The Two steps, the conversion based on the IP address of internal network to the 3rd IPv4 message to public network IP address generate the 4th IPv4 message.It needs Bright is the parsing of above-mentioned message and encapsulation is the well-known technique studied and applied extensively at present, and details are not described herein.
Step 405, the conversion based on the address IPv4 in the 4th IPv4 message to the address IPv6 generates the 2nd IPv6 report Text.
In the present embodiment, after the IPv4 address conversion in above-mentioned 4th IPv4 message is the address IPv6, above-mentioned execution The 2nd IPv6 message can be generated in main body.Wherein, above-mentioned 2nd IPv6 message is the IPv4 address conversion in the 4th IPv4 message The IPv6 message generated for the address IPv6.
It should be noted that the concrete mode that IPv4 message is converted to IPv6 message can be with are as follows: obtain above-mentioned receive The address IPv6 in ipv6 header and message length are modified, and the ipv6 header of modification is carried in the address IPv4 of IPv4 message To the IPv4 message front end received, and the double byte of identification information is revised as switch signs ID, so that the IPv4 received Message is converted into IPv6 message;Wherein, the address IPv6 includes the address source IP v6 and the address destination IP v6.
Step 406, the 2nd IPv6 message is sent to interchanger.
In the present embodiment, the 2nd IPv6 message can be sent to interchanger by above-mentioned executing subject.It should be noted that Above-mentioned interchanger can by the 2nd IPv6 message by public network be sent to the first IPv6 message from terminal.Optionally, One IPv6 message from terminal can be mobile terminal, such as plate, mobile phone is also possible to PC (Personal Computer, PC) end, such as desktop computer and notebook.
Figure 4, it is seen that the side for being used to access server-side compared with the corresponding embodiment of Fig. 2, in the present embodiment The process 400 of method highlights the 4th IPv4 message and send the 2nd IPv6 message for obtaining that network address translation apparatus is sent The step of to interchanger.The 2nd IPv6 message is sent to above-mentioned interchanger by above-mentioned executing subject as a result, not only has accessed service End also receives the feedback of server-side.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides for accessing server-side Device one embodiment, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which can specifically apply In various servers.
As shown in figure 5, the device 500 provided in this embodiment for accessing server-side includes information receiving unit 501, net Network address conversioning unit 502 and network address translation and transmission unit 503.Wherein, information receiving unit 501, be configured to from The interchanger of communication connection receives IPv6 message as the first IPv6 message;Network address translation unit 502 is configured to be based on The address IPv6 in first IPv6 message generates the first IPv4 message, wherein the address IPv6 and IPv4 to the conversion of the address Pv4 Address is public network IP address;Network address translation and transmission unit 503 are configured to the first IPv4 message being sent to communication link The network address translation apparatus connect, wherein network address translation apparatus is based on the public network IP address to the first IPv4 message in The conversion of net IP address generates the 2nd IPv4 message, and the 2nd IPv4 message is sent to server-side.
In the present embodiment, in the device 500 for accessing server-side, information receiving unit 501, network address translation list The specific processing of member 502 and network address translation and transmission unit 503 and its brought technical effect can refer to Fig. 2 pairs respectively Step 201, the related description of step 202 and step 203 in embodiment are answered, details are not described herein.
It can also include information for accessing the device of server-side in some optional implementations of the present embodiment Acquiring unit (not shown), address conversioning unit (not shown) and information transmitting unit (not shown).Wherein, Information acquisition unit may be configured to obtain the 4th IPv4 message that network address translation apparatus is sent.4th IPv4 message can To be that network address translation apparatus generates as follows: obtaining server-side and sent in response to receiving the 2nd IPv4 message IPv4 message as the 3rd IPv4 message;Conversion based on the IP address of internal network to the 3rd IPv4 message to public network IP address is raw At the 4th IPv4 message.Address conversioning unit is configured to the address IPv4 to the address IPv6 in the 4th IPv4 message Conversion, generate the 2nd IPv6 message.Transmission unit may be configured to the 2nd IPv6 message being sent to interchanger, wherein Interchanger can by the 2nd IPv6 message by public network be sent to the first IPv6 message from terminal.
In some optional implementations of the present embodiment, interchanger is configured with the traffic statistics system for counting messages System.
In some optional implementations of the present embodiment, terminal can support IPv6 network.
In some optional implementations of the present embodiment, the first IPv6 message can be terminal and is sent to by public network The message of interchanger.
The device provided by the above embodiment of the application obtains the exchange from communication connection by information receiving unit first Machine receives IPv6 message as the first IPv6 message, then by network address translation unit based in the first IPv6 message The address IPv6 generates the first IPv4 message to the conversion of the address IPv4, finally by network address translation and transmission unit by the One IPv4 message is sent to the network address translation apparatus of communication connection and is sent to clothes after network address translation apparatus is handled Business end, the arrangement achieves access server-sides, improve the flexibility of access server-side.
Below with reference to Fig. 6, it illustrates the computer systems 600 for the server for being suitable for being used to realize the embodiment of the present application Structural schematic diagram.Server shown in Fig. 6 is only an example, should not function and use scope band to the embodiment of the present application Carry out any restrictions.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and Execute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data. CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always Line 604.
I/O interface 605 is connected to lower component: the importation 606 including keyboard, mouse etc.;Including such as liquid crystal Show the output par, c 607 of device (LCD) and loudspeaker etc.;Storage section 608 including hard disk etc.;And including such as LAN card, The communications portion 609 of the network interface card of modem etc..Communications portion 609 executes communication via the network of such as internet Processing.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such as disk, CD, magneto-optic disk, Semiconductor memory etc. is mounted on as needed on driver 610, in order to from the computer program read thereon according to need It is mounted into storage section 608.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communications portion 609, and/or from detachable media 611 are mounted.When the computer program is executed by central processing unit (CPU) 601, limited in execution the present processes Above-mentioned function.
It should be noted that the computer-readable medium of the application can be computer-readable signal media or computer Readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but it is unlimited In system, device or the device of --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or any above combination.It calculates The more specific example of machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, portable of one or more conducting wires Formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device or The above-mentioned any appropriate combination of person.In this application, computer readable storage medium can be it is any include or storage program Tangible medium, which can be commanded execution system, device or device use or in connection.And in this Shen Please in, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable Any computer-readable medium other than storage medium, the computer-readable medium can send, propagate or transmit for by Instruction execution system, device or device use or program in connection.The journey for including on computer-readable medium Sequence code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor, packet Include information receiving unit, network address translation unit, network address translation and transmission unit.Wherein, the title of these units exists The restriction to the unit itself is not constituted in the case of certain, for example, network address translation unit is also described as " being based on The address IPv6 in the first IPv6 message generates the first IPv4 message to the conversion of the 4th edition address IPv4 of Internet protocol Unit ".
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be Included in server described in above-described embodiment;It is also possible to individualism, and without in the supplying server.It is above-mentioned Computer-readable medium carries one or more program, when said one or multiple programs are executed by the server, So that the server receives IPv6 message as the first IPv6 message from the interchanger of communication connection;Based in the first IPv6 message The address IPv6 to the address IPv4 conversion, generate the first IPv4 message, wherein the address IPv6 and the address IPv4 are for public network IP Location;First IPv4 message is sent to the network address translation apparatus of communication connection, wherein network address translation apparatus be based on pair The conversion of the public network IP address of first IPv4 message to IP address of internal network generates the 2nd IPv4 message, and by the 2nd IPv4 message It is sent to server-side.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (12)

1. a kind of method for accessing server-side, comprising:
From the 6th edition IPv6 message of interchanger received internet protocol of communication connection as the first IPv6 message;
Based on the conversion of the address IPv6 in the first IPv6 message to the 4th edition address IPv4 of Internet protocol, first is generated IPv4 message, wherein the address IPv6 and the address IPv4 are public network IP address;
The first IPv4 message is sent to the network address translation apparatus of communication connection, wherein the network address translation Equipment generates the 2nd IPv4 message based on the conversion of the public network IP address to the first IPv4 message to IP address of internal network, and The 2nd IPv4 message is sent to server-side.
2. according to the method described in claim 1, wherein, in the net that the first IPv4 message is sent to communication connection After network address-translating device, the method also includes:
Obtain the 4th IPv4 message that the network address translation apparatus is sent, wherein the 4th IPv4 message is the net Network address-translating device generates as follows: obtaining the server-side and sends out in response to receiving the 2nd IPv4 message The IPv4 message sent is as the 3rd IPv4 message;Based on the IP address of internal network to the 3rd IPv4 message to public network IP address Conversion generates the 4th IPv4 message;
Based on the conversion of the address IPv4 in the 4th IPv4 message to the address IPv6, the 2nd IPv6 message is generated;
The 2nd IPv6 message is sent to the interchanger, wherein the 2nd IPv6 message is passed through public network by the interchanger Be sent to the first IPv6 message from terminal.
3. according to the method described in claim 1, wherein, the interchanger is configured with the traffic statistics system for counting messages System.
4. according to the method described in claim 2, wherein, the terminal supports IPv6 network.
5. method described in one of -4 according to claim 1, wherein the first IPv6 message is that terminal is sent to by public network The message of the interchanger.
6. a kind of for accessing the device of server-side, comprising:
Information receiving unit is configured to the 6th edition IPv6 message of interchanger received internet protocol from communication connection as One IPv6 message;
Network address translation unit is configured to based on the address IPv6 in the first IPv6 message to Internet protocol the 4th The conversion of the address version IPv4, generates the first IPv4 message, wherein the address IPv6 and the address IPv4 are for public network IP Location;
Network address translation and transmission unit are configured to for the first IPv4 message being sent to the network address of communication connection Conversion equipment, wherein the network address translation apparatus is based on the public network IP address to the first IPv4 message to Intranet IP The conversion of address generates the 2nd IPv4 message, and the 2nd IPv4 message is sent to server-side.
7. according to claim 6 for accessing the device of server-side, wherein described device further include:
Information acquisition unit is configured to obtain the 4th IPv4 message that the network address translation apparatus is sent, wherein described 4th IPv4 message is that the network address translation apparatus generates as follows: obtaining the server-side in response to receiving The 2nd IPv4 message and the IPv4 message sent are as the 3rd IPv4 message;Based on the Intranet to the 3rd IPv4 message The conversion of IP address to public network IP address generates the 4th IPv4 message;
Address conversioning unit is configured to the conversion based on the address IPv4 in the 4th IPv4 message to the address IPv6, raw At the 2nd IPv6 message;
Information transmitting unit is configured to the 2nd IPv6 message being sent to the interchanger, wherein the interchanger will 2nd IPv6 message by public network be sent to the first IPv6 message from terminal.
8. according to claim 6 for accessing the device of server-side, wherein the interchanger is configured with unites for message The flow statistical system of meter.
9. according to claim 7 for accessing the device of server-side, wherein the terminal supports IPv6 network.
10. for accessing the device of server-side according to one of claim 6-9, wherein the first IPv6 message is Terminal is sent to the message of the interchanger by public network.
11. a kind of server, comprising:
One or more processors;
Storage device is stored thereon with one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now such as method as claimed in any one of claims 1 to 5.
12. a kind of computer-readable medium, is stored thereon with computer program, wherein the realization when program is executed by processor Such as method as claimed in any one of claims 1 to 5.
CN201810864435.9A 2018-08-01 2018-08-01 Method and device for accessing server Active CN109005250B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810864435.9A CN109005250B (en) 2018-08-01 2018-08-01 Method and device for accessing server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810864435.9A CN109005250B (en) 2018-08-01 2018-08-01 Method and device for accessing server

Publications (2)

Publication Number Publication Date
CN109005250A true CN109005250A (en) 2018-12-14
CN109005250B CN109005250B (en) 2021-07-16

Family

ID=64594188

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810864435.9A Active CN109005250B (en) 2018-08-01 2018-08-01 Method and device for accessing server

Country Status (1)

Country Link
CN (1) CN109005250B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113163024A (en) * 2021-03-12 2021-07-23 网宿科技股份有限公司 Message processing method, server and storage medium
CN115428415A (en) * 2020-04-16 2022-12-02 华为技术有限公司 System and method for forwarding packets in a hierarchical network architecture using variable length addresses

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102148767A (en) * 2011-05-12 2011-08-10 杭州华三通信技术有限公司 Network address translation (NAT)-based data routing method and device
CN102209121A (en) * 2010-03-29 2011-10-05 杭州华三通信技术有限公司 Method and device for intercommunication between Internet protocol version 6 (IPv6) network and Internet protocol version 4 (IPv4) network
CN103856580A (en) * 2014-03-26 2014-06-11 清华大学 Access method for IPv6 client to IPv4 server
CN104333612A (en) * 2014-10-29 2015-02-04 中国联合网络通信集团有限公司 Network address translation method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102209121A (en) * 2010-03-29 2011-10-05 杭州华三通信技术有限公司 Method and device for intercommunication between Internet protocol version 6 (IPv6) network and Internet protocol version 4 (IPv4) network
CN102148767A (en) * 2011-05-12 2011-08-10 杭州华三通信技术有限公司 Network address translation (NAT)-based data routing method and device
CN103856580A (en) * 2014-03-26 2014-06-11 清华大学 Access method for IPv6 client to IPv4 server
CN104333612A (en) * 2014-10-29 2015-02-04 中国联合网络通信集团有限公司 Network address translation method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115428415A (en) * 2020-04-16 2022-12-02 华为技术有限公司 System and method for forwarding packets in a hierarchical network architecture using variable length addresses
CN113163024A (en) * 2021-03-12 2021-07-23 网宿科技股份有限公司 Message processing method, server and storage medium

Also Published As

Publication number Publication date
CN109005250B (en) 2021-07-16

Similar Documents

Publication Publication Date Title
CN108494860B (en) WEB access system, WEB access method and device for client
CN108989362A (en) A kind for the treatment of method and apparatus of static resource
CN109714332A (en) The method for converting protocol and device parsed based on Thrift and syntax tree
CN110209315A (en) The display methods of character, device, electronic equipment and storage medium in user interface
CN109992406A (en) The method and client that picture requesting method, response picture are requested
CN109104368B (en) Connection request method, device, server and computer readable storage medium
CN110007936A (en) Data processing method and device
CN108924183A (en) For handling the method and device of information
CN109005250A (en) Method and apparatus for accessing server-side
CN108880923A (en) The method and apparatus that policer operation applied to application server is requested
CN113778499B (en) Method, apparatus, device and computer readable medium for publishing services
CN110019539A (en) A kind of method and apparatus that the data of data warehouse are synchronous
US20190370293A1 (en) Method and apparatus for processing information
CN114500481A (en) Service request processing method, system and device
CN112995005B (en) Virtual network data exchange method and device
CN107222365B (en) Data processing method and device and server
CN109981546A (en) The method and apparatus for obtaining the far call relationship between application module
CN109471713A (en) Method and apparatus for query information
CN108989157A (en) Method, apparatus for smart machine control
CN109783201A (en) Method for interchanging data and its system
CN111953718A (en) Page debugging method and device
CN109783409A (en) Method and apparatus for handling data
CN113992641A (en) Data processing method, device, equipment and storage medium
CN109992330A (en) The method and apparatus for realizing the localization of modularization engineering
CN110780915B (en) Data processing method, device and storage medium

Legal Events

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