CN112073548A - Method and apparatus for solving skylight problems - Google Patents

Method and apparatus for solving skylight problems Download PDF

Info

Publication number
CN112073548A
CN112073548A CN202010808200.5A CN202010808200A CN112073548A CN 112073548 A CN112073548 A CN 112073548A CN 202010808200 A CN202010808200 A CN 202010808200A CN 112073548 A CN112073548 A CN 112073548A
Authority
CN
China
Prior art keywords
link
server
external resource
domain name
message
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
CN202010808200.5A
Other languages
Chinese (zh)
Other versions
CN112073548B (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 Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Original Assignee
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Topsec Technology Co Ltd, Beijing Topsec Network Security Technology Co Ltd, Beijing Topsec Software Co Ltd filed Critical Beijing Topsec Technology Co Ltd
Priority to CN202010808200.5A priority Critical patent/CN112073548B/en
Publication of CN112073548A publication Critical patent/CN112073548A/en
Application granted granted Critical
Publication of CN112073548B publication Critical patent/CN112073548B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/30Managing network names, e.g. use of aliases or nicknames
    • H04L61/3005Mechanisms for avoiding name conflicts
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Abstract

The application provides a method and a device for solving a skylight problem, wherein the method comprises the following steps: acquiring response data according to the received first request message; generating a rewrite link including a first query parameter in the event that the response data includes a first external resource link; the domain name of the rewriting link is the domain name of the first server or the domain name of a third server; generating at least part of the first query parameter according to a conversion rule and according to the domain name of the first external resource link; replacing the first external resource link in the response data with the rewritten link; generating a first response message according to the response data and sending the first response message; and the destination IP address of the first response message is the IP address of the client. Because the method of the application adopts the existing domain name and parameters to construct the rewriting link, the sub-domain name authorization of the domain name of the main station does not need to be increased, the configuration amount of resources is reduced, and the problem of possible conflict of the resource links is avoided.

Description

Method and apparatus for solving skylight problems
Technical Field
The present disclosure relates to the field of network communication technologies, and in particular, to a method and an apparatus for solving a skylight problem.
Background
As IPv4 address resources are depleted, IPv6 networks are becoming increasingly popular in order to accommodate more network access points. At present, the internet is in the transition stage from IPv4 to IPv6, and the internet can use both protocols.
In order to provide a large amount of internal resources and external resources to users, a large amount of internal resource links and external resource links are stored in various service websites. If the first website has been upgraded to support the IPv6 protocol, its internal resources are linked to links corresponding to IPv6 addresses; the IPv4 protocol is still adopted because the second website corresponding to the external resource link is not upgraded; when a client upgraded to the IPv6 protocol accesses the content of the first website through an external resource link provided by the first website, the client responds slowly and the external resource cannot be displayed; the problem that the display window is incomplete in page or partially blank in content due to the content corresponding to the external resource is the skylight problem.
The first website can adopt the following method to avoid the skylight problem as much as possible.
The first method is as follows: when responding to a request of a client side to generate a response message, a first website converts an external resource link in the response message into a sub-domain name of a master station of a second website (the first website may also be the first website) and generates a rewriting link; when the client triggers the rewriting link, the DNS server returns a request of the client for the external resource to a second website server according to the rewriting link; the second website server requests the external resource of the second website by adopting an IPv4 network according to the external resource link; and after the external resource is obtained, the second website server returns to the client.
The second method is as follows: when responding to a user request and generating a response message, the first website converts an external resource link in the response message into a relative path link; triggering a relative path link at a client to generate a query request to reach a first website server; the first website server requests the external resource of the second website by adopting an IPv4 network according to the external resource link; and after the external resources are obtained, the first website is returned to the client.
The foregoing two methods have the following problems: two methods require the addition of sub-domain name authorization of the master domain name; the more external resource links provided by the first website, the more sub-domain name authorizations which need to be authorized, and the configuration time is increased; the probability of collision between the rewritten link rewritten by the external link and the existing resource link is also increased, resulting in an access error. Some users familiar with the external resource link IPv4 website may have a doubt that the rewritten link is a malicious link after seeing the rewritten link.
Disclosure of Invention
To solve the above technical problem or at least partially solve the above technical problem, the present application provides a method and apparatus for solving the sunroof problem.
In one aspect, the present application provides a method for solving a skylight problem, including a first server configured to:
acquiring response data according to the received first request message; the first request message is a request message sent by a client only supporting a first IP protocol;
generating a rewrite link including a first query parameter in the event that the response data includes a first external resource link; the first external resource link is a link representing a resource stored in a second server; the second server is a server only supporting a second IP protocol; the domain name of the rewriting link is the domain name of the first server or the domain name of a third server; generating at least part of the first query parameter according to a conversion rule and according to the domain name of the first external resource link; the first server or the third server is a server supporting the first IP protocol and the second IP protocol simultaneously;
replacing the first external resource link in the response data with the rewritten link;
generating a first response message according to the response data and sending the first response message; and the destination IP address of the first response message is the IP address of the client.
Optionally, after sending the response packet to the client, the first server or the third server is further configured to:
receiving a second request message sent by the client;
under the condition that the second request message comprises the rewritten link, restoring according to the rewritten link and the conversion rule to obtain the first external resource link;
obtaining an external resource according to the first external resource link;
generating a second response message according to the external resource and sending the second response message; and the destination address of the second response message is the address of the client.
Optionally, obtaining an external resource according to the first external link includes:
generating and sending a third request message containing the first external resource link; the destination address of the third request message is the address of the second server;
and after receiving a third response message returned by the second server, analyzing the third response message to obtain the external resource.
Optionally, the conversion rule comprises a first conversion rule and a second conversion rule;
the generating of the adapted link including the query parameters includes: in the event that the first external resource link includes a second query parameter, treating the second query parameter as part of the first query parameter according to the first transformation rule; and converting the domain name of the first external resource link into another part of the first query parameter according to the second conversion rule.
Optionally, the transformation rule comprises a third transformation rule;
the generating of the adapted link including the query parameters includes: and under the condition that the first external link does not comprise the query parameter, converting the domain name of the first external link into the first query parameter according to the third conversion rule.
In another aspect, the present application further provides a device for solving the skylight, including:
the message obtaining unit is used for obtaining response data according to the received first request message; the first request message is a request message sent by a client only supporting a first IP protocol;
a rewriting link generation unit configured to generate a rewriting link including a first query parameter in a case where the response data includes a first external resource link; the first external resource link is a link representing a resource stored in a second server; the second server is a server only supporting a second IP protocol; the domain name of the rewriting link is the domain name of the first server or the domain name of the third server; generating at least part of the first query parameter according to a conversion rule and according to the domain name of the first external resource link; the first server or the third server is a server supporting the first IP protocol and the second IP protocol simultaneously;
a replacing unit configured to replace the first external resource link in the response data with the rewrite link;
the message sending unit is used for generating a first response message according to the response data and sending the first response message; and the destination IP address of the first response message is the IP address of the client.
Optionally, the system further comprises a link restoration unit and an external resource acquisition unit;
the message acquisition unit is also used for receiving a second request message sent by the client;
the link restoration unit is configured to restore the first external resource link according to the rewritten link according to the conversion rule under the condition that the second request packet includes the rewritten link;
the external resource obtaining unit is used for obtaining an external resource according to the first external resource link;
the message sending unit is also used for generating and sending a second response message according to the external resource; and the destination address of the second response message is the address of the client.
Optionally, the external resource obtaining unit includes:
a sending subunit, configured to generate and send a third request packet including the first external resource link; the destination address of the third request message is the address of the second server;
and the receiving subunit is configured to, after receiving a third response packet returned by the second server, parse the third response packet to obtain the external resource.
Optionally, the conversion rule comprises a first conversion rule and a second conversion rule;
in a case where the first external resource link includes a second query parameter, the rewrite link generation unit takes the second query parameter as a part of the first query parameter according to the first conversion rule; and converting the domain name of the first external resource link into another part of the first query parameter according to the second conversion rule.
Optionally, the transformation rule comprises a third transformation rule;
in a case where the first external link does not include a query parameter, the rewritten link generating unit converts the domain name of the first external link into the first query parameter according to the third conversion rule.
The application also provides an electronic device comprising a processor and a memory;
the processor is operative to perform the steps of the method as previously described by calling programs or instructions stored in the memory.
The present application also provides a computer-readable storage medium storing a program or instructions for causing a computer to perform the steps of the method as described above.
According to the method for solving the skylight problem, the rewriting link replaces the first external resource link and is sent to the client. After receiving the first response message and analyzing the response data, the client actually triggers the rewrite link and generates a new request message if the client wants to check the external resource corresponding to the first external resource link. Since the domain name for which the link is rewritten is the first server, the newly generated second request message is sent to the first server. Because the method of the application adopts the existing domain name and parameters to construct the rewriting link, the sub-domain name authorization of the domain name of the main station is not required to be increased, the configuration amount of resources is reduced, and the problem of possible conflict of the resource links is avoided. Because the hyperlink viewed by the user side is the link corresponding to the domain name of the first server, the first server is the server which is visited by the user in the previous period, and the trust degree of the first server is higher, the problem that the user suspects that the rewriting of the link is a malicious link is basically eliminated.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a flow chart of a method for solving the skylight problem provided by an embodiment of the present application;
FIG. 2 is a flowchart of a method for solving the skylight problem applied to a first server in an embodiment of the present application;
FIG. 3 is a flowchart illustrating the operation steps performed by the present application after triggering a rewrite link;
FIG. 4 is a schematic structural diagram of a device for solving the problem of a skylight according to an embodiment of the present application
Fig. 5 is a schematic structural diagram of a first server according to an embodiment of the present disclosure;
the system comprises a message acquisition unit 11, a rewriting link generation unit 12, a replacement unit 13, a message sending unit 14, a link restoration unit 15 and an external resource acquisition unit 16, wherein the message acquisition unit is used for acquiring a message; 21-processor, 22-memory, 23-communication interface, 24-bus system.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
The embodiment of the application provides a method for solving the skylight problem, wherein an external resource link corresponding to a second server adopting different IP protocols is replaced by a rewriting link with a domain name serving as an existing domain name of a server according to a specific conversion rule through a special processing step in a first server, so that when the client checks the rewriting link, a corresponding request is returned to the first server, and the first server obtains resources from the second server by adopting another IP protocol.
Fig. 1 is a flowchart of a method for solving a skylight problem according to an embodiment of the present disclosure. As shown in fig. 1, the participants of the method for solving the skylight problem provided by the embodiment of the present application at least include a client and a first server.
In the embodiment of the application, the client is a client only supporting a first IP protocol; the first server is a server capable of supporting both a first IP protocol and a second IP protocol, the first IP protocol and the second IP protocol being incompatible.
In the specific application of the embodiment of the application, the first IP protocol is an IPv6 protocol, and the second IP protocol is an IPv4 protocol; alternatively, the first IP protocol is an IPv4 protocol and the second IP protocol is an IPv6 protocol.
As shown in fig. 1, the method provided by the embodiment of the present application includes steps S101-S107.
S101: and generating and sending a first request message.
As shown in fig. 1, step S101 is performed by the client.
After selecting a resource link (i.e., a hyperlink) associated with a resource in the first server, the client generates a first request message according to the first IP protocol, and sends the first request message. The destination IP address of the first request message is the IP address of the first server, and the first request message is sent to the first server by the called party after being routed by the routing equipment.
The following steps S102-S107 are performed by the first server
S102: and acquiring response data according to the received first request message.
After receiving the first request message, the first server analyzes the first request message according to the first IP protocol to obtain a resource link, and queries a server database according to the resource link to obtain response data associated with the resource link.
In practice, the response data may include text, picture files, audio files, or video files, and may also include hyperlinks. In case the response data comprises hyperlinks, this may be external resource links, i.e. hyperlinks not corresponding to the resource provided by the first server. The external resource link may be a link associated with an external server-provided resource supporting a first IP protocol or may be a link associated with an external server-provided resource supporting a second IP protocol. For convenience, a link associated with a server-provided resource externally supporting the second IP protocol is referred to as a first resource link, and a link associated with a server-provided resource externally supporting the first IP protocol is referred to as a second resource link.
As described above, if the first resource link is sent to the client, after the client generates a request message through the first resource link and sends the request message to the corresponding server, the corresponding server cannot analyze the message because of the configuration of different IP protocols.
S103: it is determined whether the response data includes a first external resource link.
If yes, go to step S104; if not, directly executing step S106.
In this embodiment, in order to implement the step of step S103, a configurable domain name table may be stored in the first server, where the domain name table stores the domain name of a server supporting only the first IP protocol or stores the domain name of a server supporting only the second IP protocol. The first server may match the domain name of the external resource link in the response data with the domain name in the domain name table, and determine whether the response data includes the first external resource link.
S104: a rewritten link is generated that includes the first query parameter.
The first query parameter is all query parameters except the domain name information in the rewriting link.
In step S104, the rule for the first server to generate the rewrite link is: (1) taking a domain name in the first server as a domain name of the rewriting link; a domain name in the first server may be a master domain name thereof or a sub-domain name thereof, which is not limited in this embodiment of the present application. (2) The domain name in the first external resource link is converted to at least a portion of the first query parameters that overwrite the link according to the conversion rules.
According to the different forms of the first external resource link, the replacement rules provided by the embodiment of the present application are different, and are divided into the following two cases.
First case
In the first case, the conversion rule comprises a first conversion rule and a second conversion rule; the conditions for adopting the first conversion rule and the second conversion rule are as follows: the first external resource link includes a second query parameter (i.e., the second query parameter is the entirety of the first external resource link and is named "second query parameter" to distinguish it from the aforementioned first query parameter).
At this time, the step of generating the first query parameter includes: (1) the second query parameter in the first external resource link is taken as part of the first query parameter. (2) The domain name in the first external resource link is converted to another portion of the first query parameters.
For example, the first server has a host domain name of www.test.com and is accessed using http protocol. In the response data, package URL is http:// www.a.com/search? A first external resource link of ie-utf-8 & key; after the first external resource link is inquired, the first server: (1) directly taking http:// www.test.com/as the domain name of the rewriting link; (2) according to the first transformation rule, will/search? ie-utf-8 & key (i.e., the second query parameter) as part of the first query parameter; (3) according to a second conversion rule, http:// www.a.com is rewritten to & convert & http & www.a.com. Followed by http:// www.test.com/? ie — utf-8& key & convert & http & www.a.com.
It should be noted that to avoid identifying parts of the content in the first query parameters as domain names, the second conversion rule comprises an identifier of "& convert &" to "&" in the first external resource link.
Second case
In a second case, the conversion rule comprises a third conversion rule; the conditions corresponding to the third conversion rule are: the first external resource section includes a second query parameter.
At this time, the step of generating the first query parameter includes: and converting the domain name of the first external parameter into the first query parameter according to a third conversion rule.
For example, the first server has a host domain name of www.test.com and is accessed using http protocol. Responding to a first external resource link with the URL being http:// www.a.com/, after the first server inquires the first external resource link: (1) directly taking http:// www.test.com/as the domain name of the rewriting link; (2) according to a third conversion rule, http:// www.a.com/is converted into? The format of convert & http & www.a.com. Followed by http:// www.test.com/? change & http & www.a.com.
It should be noted that in order to avoid identifying parts of the content in the first query parameters as domain names, the third conversion rule employs "? convert "/" in the first external resource link to "&" as an identifier.
S105: the first external resource link in the response data is replaced with the overwrite link.
When step S105 is executed, the first server replaces the first external resource link with the replacement link according to the position of the first external resource link in the response data.
In practical implementation, the foregoing steps S102-S105 may be processed in real time for all the first external resource links in the response data.
After steps S102 to S105, all the first external resource links in the response data are replaced with the rewrite link. Execution may then continue with S106.
S106: and generating a first response message according to the response data and sending the first response message.
In step S106, the first server generates a first response packet according to the first IP protocol. The destination IP address of the first response message is the IP address of the client.
In this embodiment, according to the size of the response data, the first server may generate one first response packet or may generate a plurality of first response packets. The destination address of the first response message is the address of the client, and the first response message can be sent to the client after being routed by the routing equipment, so that the client can obtain corresponding data.
With reference to the foregoing description of steps S101 to S106, it may be determined that, in the method for solving the skylight according to the solution provided by the embodiment of the present application, when the response data to be sent to the client includes the first external resource link, the first server uses the domain name of the first external resource link as an inquiry parameter corresponding to the domain name of the first server to form a rewriting link, replaces the first external resource link in the response data with the rewriting link, and then sends the response data to the client in the form of the first response packet.
After receiving the first response message and analyzing the response data, if the client wants to check the external resource corresponding to the first external resource link, the client actually triggers the rewrite link and generates a new request message (the new request message is a second request message in the following text). Since the domain name for which the link is rewritten is the first server, the newly generated second request message is sent to the first server.
In the embodiment of the application, the first server has the capability of converting the rewriting link into the first external resource link according to the conversion rule, in addition to converting the first external resource link into the rewriting link. Therefore, the first server can determine the external resource to be acquired by the user terminal.
In the foregoing steps, the sub-domain name authorization of the domain name of the primary station does not need to be added, so that the configuration amount of resources is reduced, and the problem of possible resource link conflict is avoided. Because the hyperlink viewed by the user side is the link corresponding to the domain name of the first server, the first server is the server which is visited by the user in the previous period, and the trust degree of the first server is higher, the problem that the user suspects that the rewriting of the link is a malicious link is basically eliminated.
In the foregoing description, a method for implementing the solution to the skylight problem includes a client and a first server; in the actual method flow, the execution steps of the first server are improved relative to the prior art, and the client can still adopt the prior art scheme. In order to clearly demonstrate the innovation of the embodiment of the present application, the following briefly describes the steps performed by the first server in the embodiment of the present application.
Fig. 2 is a flowchart of a method for solving the skylight problem applied to the first server in the embodiment of the present application. With reference to fig. 1 and 2, the execution steps of the first server include S201-S202.
S201: and acquiring response data according to the received first request message.
S202: it is determined whether the response data includes a first external resource link. If yes, go to S203; if not, directly executing S205.
S203: generating a rewrite link containing the first query parameter;
s204: replacing the first external resource link in the response data with the overwrite link;
s205: and generating a first response message according to the response data and sending the first response message.
The specific implementation of steps S201-S205 can be seen in steps S102-S106, and will not be repeated here.
After receiving the first response message and adopting the first IP protocol to analyze the first winning message to obtain response data, the client may click the rewriting link in the response data to inquire the corresponding resource. Fig. 3 is a flowchart of the operation steps after triggering rewriting the link according to the present application.
In steps S101 to S107, the method for solving the skylight according to the embodiment of the present application further includes steps S301 to S306 as shown in fig. 3.
It should be noted that on the basis of the two parties shown in fig. 1, the method of fig. 3 is carried out with reference to a second server; in addition, as shown in fig. 3, a third server using the first IP protocol may be involved in practical application; since this part is the same as the prior art, the embodiments of the present application will not be described.
The second server is a server that supports only the second IP protocol. Because the client and the second server do not support the same IP protocol, the client generates a request packet requesting the resource according to the resource link associated with the resource in the second server, and the request packet cannot be analyzed by the second server, so the second server cannot directly return the request packet to the client.
S301: and generating a second request message according to the link in the user trigger response data.
Step S301 is performed by the client. When the user at the client end inquires the resources corresponding to the links, the user at the client end is triggered to generate a second request message by clicking the links and other operations.
The link clicked by the user may be the first external resource link, the second external resource link, or the internal resource link.
The domain names of the first external resource link and the internal resource link are both the first server, so that if the link clicked by the user is the two links, the second request message is sent to the first server. The domain name linked with the second external resource is the domain name of other server, and the other server is the server supporting the first IP protocol, so the second request message generated by the client can be directly sent to the other server.
S302: and receiving a second request message sent by the client.
Steps S302-S306 are performed by the first server. In step S302, the first server receives the second request packet and parses the second request packet to obtain the request information therein.
S303: and judging whether the second request message comprises the rewriting link. If yes, go to step S304; if not, go to S305.
When step S303 is executed, the first server may check whether the request information includes a hyperlink by querying the request information; if a hyperlink is included and the domain name of the hyperlink is a particular domain name and the query parameters of the hyperlink include parameters in the conversion rules, the hyperlink is determined to be a rewritten link, in which case 304 is performed.
For example, in conjunction with the foregoing distance, if the domain name of the hyperlink is http:// www.test.com/, and is included in the hyperlink? And if the hyperlink is changed, the hyperlink is judged to be the rewritten link.
S304: and according to the conversion rule, restoring according to the rewritten link to obtain the first external resource link.
The conversion rule in step S304 is the conversion rule for generating the rewrite link described above. The rewritten link is restored to obtain the first external resource link according to the conversion rule, even if the above-mentioned reverse operation of step S104 is performed, which will not be repeated here.
S305: and acquiring the external resource according to the first external resource link.
After the first server acquires the first external resource link, the external resource can be determined through corresponding processing.
In the embodiment of the application, there are various ways of obtaining the external resource according to the first external resource link.
In one particular application, step S305 may include sub-steps S3051-S3052. Correspondingly, the second server performs steps S401-S402.
S3051: and generating a third request message containing the first external resource link according to the second IP protocol and sending the third request message.
In step S3051, after generating the third request packet, the first server sends the third request packet to the network device; wherein the destination IP address of the third request message is the IP address of the second server. The third request message is sent to the second server via the network device route.
After the first server executes S3051, the second server correspondingly executes steps S401-S403.
S401: and after receiving the third request message, acquiring the first external resource link.
In step S401, the second server parses the third request packet according to the second IP protocol to obtain the first external resource link.
S402: and inquiring the external resource according to the first external resource link.
S403: and generating a third response message according to the external resource and sending the third response message.
In step S403, the second server generates a third response packet according to the second IP protocol, and uses the IP address of the first server as the destination IP address of the third request packet. After the third response message is sent, the third response message is sent to the first server through the routing device.
S3052: and receiving a third response message returned by the second server, and analyzing the third return message according to the second IP protocol to obtain the external resource.
And after receiving the third response message, the first server analyzes the third return message through a second IP protocol, and determines that the data in the third request message is the external resource requested by the client.
By adopting the substeps S3051-S3052, the first server can acquire the external resource according to the actual demand of the user.
In another specific application, step S305 may include sub-steps 3053-3056.
S3053: and inquiring whether the local existing resources comprise external resources corresponding to the first external resource link. If yes, executing S3054; if not, executing S3055-S3056.
The local existing resources are resources cached locally for the purpose that the first server has previously acquired from the second server. In some specific applications, some first external resource links are viewed frequently, and in order to improve response efficiency, the first server may cache the external resource corresponding to such first external resource links locally, and use the first external resource links as the identifier.
S3054: and acquiring the external resource from the existing resource.
If the external resource corresponding to the first external resource link is cached locally, the first server can directly obtain the external resource.
S3055: and generating a third request message containing the first external resource link according to the second IP protocol so as to send the third request message to the second server.
S3056: and receiving a third response message returned by the second server, and analyzing the third return message according to the second IP protocol to obtain the external resource.
S3055 and S3056 are similar to the S3051-S3052, and detailed description is omitted here, and specific energy contents can be found in the expressions in S3051-3052.
After the execution of the completion S305, the first server may continue to execute step S306.
S306: and generating a second response message according to the external resource and sending the second response message.
In step S306, the first server generates a second response packet according to the first IP protocol, uses the IP address of the client as the destination IP address of the second response packet, and sends the second response packet.
And the second response message can be sent to the client through the route of the routing equipment, and the client obtains the external resource after analyzing the second response message.
By adopting the steps S301-S306, the client acquires the external resource, and the skylight problem is avoided.
In the foregoing embodiment, when the first server generates the rewrite link including the first query parameter in step S104 (or S203), the first server adopts its own domain name as the domain name of the rewrite link. In other embodiments, in executing S104, the first server may further adopt a domain name of a third server as the domain name of the overwriting link. The third server is also a server capable of supporting both the first IP protocol and the second IP protocol, and is configured with the aforementioned conversion rules.
In the case where the domain name of the link is rewritten to be the third server, the execution subject of the foregoing steps S302-S306 is changed from the first server to the third server. In a specific application of this embodiment, if the first server is a server with a large access amount, in order to reduce the access pressure, some query operations of the client may be performed by the third server by setting the domain name in the rewritten link as the third server in step S104, and then reducing the access amount of the first server.
It should also be noted that, in practical applications, the first server, the second server, and the third server may be a single server, or may be a server system formed by a plurality of actual server architectures.
In addition to the foregoing approaches to solving the skylight problem, embodiments of the present application also provide an apparatus for solving the skylight problem. The device for solving the skylight problem and the method for solving the skylight problem adopt the same inventive concept, can solve the same technical problem and obtain the corresponding technical effect. The following description is only about the architecture of the device for solving the skylight, and the specific implementation manner of each module, the function of each module and the technical effect of the whole device can be referred to the description of the method part.
Fig. 4 is a schematic structural diagram of a device for solving the skylight problem according to an embodiment of the present application. As shown in fig. 4, the apparatus includes a message acquisition unit 11, an overwrite link generation unit 12, a replacement unit 13, and a message transmission unit 14.
The message obtaining unit 11 is configured to obtain response data according to the received first request message; the first request message is a request message sent by a client only supporting a first IP protocol;
a rewriting link generating unit 12 for generating a rewriting link including the first query parameter in a case where the response data includes the first external resource link.
The first external resource link is a link representing a resource stored in the second server; the second server is a server only supporting a second IP protocol; rewriting the linked domain name as the domain name of the first server or the domain name of the third server; generating at least part of the first query parameter according to a conversion rule and according to a domain name of the first external resource link; the first server or the third server is a server which simultaneously supports a first IP protocol and a second IP protocol;
the replacing unit 13 is configured to replace the first external resource link in the response data with the rewritten link;
the message sending unit 14 is configured to generate a first response message according to the response data and send the first response message. The destination IP address of the first response message is the IP address of the client.
Further, the device for solving the skylight problem further comprises a link restoration unit 15 and an external resource acquisition unit 16.
Correspondingly, the message obtaining unit 11 is further configured to receive a second request message sent by the client.
The link restoring unit 15 is configured to restore the first external resource link according to the rewritten link according to the conversion rule when the second request message includes the rewritten link.
The external resource obtaining unit 16 is configured to obtain an external resource according to the first external resource link.
The message sending unit 14 is further configured to generate and send a second response message according to the external resource; the destination address of the second message is the client address.
In a specific implementation, the external resource obtaining unit 16 may include a transmitting subunit and a receiving subunit.
The sending subunit is configured to generate and send a third request packet including the first external resource link; the destination address of the third request message is the address of the second server;
and the receiving subunit is used for analyzing the third returned message after receiving the third response message returned by the second server, and acquiring the external resource.
In an embodiment of the present application, the conversion rule may include a first conversion rule and a second conversion rule. In the case where the first external resource link includes the second query parameter, the rewritten link generating unit 12 takes the second query parameter as a part of the first query parameter according to the first conversion rule; and converting the domain name of the first external resource link into another part of the first query parameter according to a second conversion rule.
In the embodiment of the present application, the conversion rule may include a third conversion rule; in the case where the first external link does not include the query parameter, the rewritten link generating unit 12 converts the domain name of the first external link into the first query parameter according to the third conversion rule.
Based on the inventive concept, the application also provides a server system. The server system includes a first server.
Fig. 5 is a schematic structural diagram of a first server according to an embodiment of the present application. As shown in fig. 5, the first server comprises at least one processor 21, at least one memory 22 and at least one communication interface 23. And a communication interface 23 for information transmission with an external device.
The various components in the first server are coupled together by a bus system 24. Understandably, the bus system 24 is used to enable connective communication between these components. The bus system 24 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, the various buses are labeled as bus system 24 in fig. 5.
It will be appreciated that the memory 22 in this embodiment may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. In some embodiments, memory 22 stores elements, executable units or data structures, or a subset thereof, or an expanded set thereof: an operating system and an application program.
The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic tasks and processing hardware-based tasks. The application programs include various application programs such as a media player (MediaPlayer), a Browser (Browser), etc. for implementing various application tasks. The program for implementing the method for calculating the number of remaining battery cycles provided by the embodiment of the present disclosure may be included in the application program.
In the embodiment of the present disclosure, the processor 21 is configured to execute the steps of the method for solving the skylight problem provided by the embodiment of the present disclosure by calling a program or an instruction stored in the memory 22, which may be specifically a program or an instruction stored in an application program.
The method for solving the skylight problem provided by the embodiment of the present disclosure may be applied to the processor 21, or implemented by the processor 21. The processor 21 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 21. The Processor 21 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The steps of the method for solving the skylight problem provided by the embodiment of the present disclosure may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software units in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in a memory 22, and the processor 21 reads the information in the memory 22 and performs the steps of the method in combination with its hardware.
The embodiments of the present disclosure also provide a non-transitory computer-readable storage medium, where a program or an instruction is stored, and the program or the instruction causes a computer to execute the steps of the embodiments of the method for solving the skylight problem, and in order to avoid repeated descriptions, the steps are not described again here.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. A method for solving a skylight problem, comprising a first server configured to:
acquiring response data according to the received first request message; the first request message is a request message sent by a client only supporting a first IP protocol;
generating a rewrite link including a first query parameter in the event that the response data includes a first external resource link; the first external resource link is a link representing a resource stored in a second server; the second server is a server only supporting a second IP protocol; the domain name of the rewriting link is the domain name of the first server or the domain name of a third server; generating at least part of the first query parameter according to a conversion rule and according to the domain name of the first external resource link; the first server or the third server is a server supporting the first IP protocol and the second IP protocol simultaneously;
replacing the first external resource link in the response data with the rewritten link;
generating a first response message according to the response data and sending the first response message; and the destination IP address of the first response message is the IP address of the client.
2. The method of claim 1, wherein after sending the reply message to the client, the first server or the third server is further configured to:
receiving a second request message sent by the client;
under the condition that the second request message comprises the rewritten link, restoring according to the rewritten link and the conversion rule to obtain the first external resource link;
obtaining an external resource according to the first external resource link;
generating a second response message according to the external resource and sending the second response message; and the destination address of the second response message is the address of the client.
3. The method of claim 2, wherein obtaining an external resource from the first external link comprises:
generating and sending a third request message containing the first external resource link; the destination address of the third request message is the address of the second server;
and after receiving a third response message returned by the second server, analyzing the third response message to obtain the external resource.
4. The method of any of claims 1-3, wherein the transformation rules comprise a first transformation rule and a second transformation rule;
the generating of the adapted link including the query parameters includes: in the event that the first external resource link includes a second query parameter, treating the second query parameter as part of the first query parameter according to the first transformation rule; and converting the domain name of the first external resource link into another part of the first query parameter according to the second conversion rule.
5. The method of any of claims 1-3, wherein the transformation rule comprises a third transformation rule;
the generating of the adapted link including the query parameters includes: and under the condition that the first external link does not comprise the query parameter, converting the domain name of the first external link into the first query parameter according to the third conversion rule.
6. A device for solving a skylight, comprising:
the message obtaining unit is used for obtaining response data according to the received first request message; the first request message is a request message sent by a client only supporting a first IP protocol;
a rewriting link generation unit configured to generate a rewriting link including a first query parameter in a case where the response data includes a first external resource link; the first external resource link is a link representing a resource stored in a second server; the second server is a server only supporting a second IP protocol; the domain name of the rewriting link is the domain name of the first server or the domain name of the third server; generating at least part of the first query parameter according to a conversion rule and according to the domain name of the first external resource link; the first server or the third server is a server supporting the first IP protocol and the second IP protocol simultaneously;
a replacing unit configured to replace the first external resource link in the response data with the rewrite link;
the message sending unit is used for generating a first response message according to the response data and sending the first response message; and the destination IP address of the first response message is the IP address of the client.
7. The apparatus of claim 6, further comprising a link restore unit and an external resource acquisition unit;
the message acquisition unit is also used for receiving a second request message sent by the client;
the link restoration unit is configured to restore the first external resource link according to the rewritten link according to the conversion rule under the condition that the second request packet includes the rewritten link;
the external resource obtaining unit is used for obtaining an external resource according to the first external resource link;
the message sending unit is also used for generating and sending a second response message according to the external resource; and the destination address of the second response message is the address of the client.
8. The apparatus of claim 7, wherein the external resource obtaining unit comprises:
a sending subunit, configured to generate and send a third request packet including the first external resource link; the destination address of the third request message is the address of the second server;
and the receiving subunit is configured to, after receiving a third response packet returned by the second server, parse the third response packet to obtain the external resource.
9. The apparatus according to any one of claims 6-8, wherein: the conversion rule comprises a first conversion rule and a second conversion rule;
in a case where the first external resource link includes a second query parameter, the rewrite link generation unit takes the second query parameter as a part of the first query parameter according to the first conversion rule; and converting the domain name of the first external resource link into another part of the first query parameter according to the second conversion rule.
10. The apparatus according to any one of claims 6-8, wherein: the conversion rule comprises a third conversion rule;
in a case where the first external link does not include a query parameter, the rewritten link generating unit converts the domain name of the first external link into the first query parameter according to the third conversion rule.
11. An electronic device comprising a processor and a memory;
the processor is adapted to perform the steps of the method of any one of claims 1 to 5 by calling a program or instructions stored in the memory.
12. A computer-readable storage medium, characterized in that it stores a program or instructions for causing a computer to carry out the steps of the method according to any one of claims 1 to 5.
CN202010808200.5A 2020-08-12 2020-08-12 Method and apparatus for solving skylight problems Active CN112073548B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010808200.5A CN112073548B (en) 2020-08-12 2020-08-12 Method and apparatus for solving skylight problems

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010808200.5A CN112073548B (en) 2020-08-12 2020-08-12 Method and apparatus for solving skylight problems

Publications (2)

Publication Number Publication Date
CN112073548A true CN112073548A (en) 2020-12-11
CN112073548B CN112073548B (en) 2022-07-12

Family

ID=73661253

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010808200.5A Active CN112073548B (en) 2020-08-12 2020-08-12 Method and apparatus for solving skylight problems

Country Status (1)

Country Link
CN (1) CN112073548B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110153831A1 (en) * 2009-12-23 2011-06-23 Rishi Mutnuru Systems and methods for mixed mode of ipv6 and ipv4 dns of global server load balancing
US20110153722A1 (en) * 2009-12-23 2011-06-23 Akshat Choudhary Systems and methods for policy based transparent client ip insertion
US20110289185A1 (en) * 2010-05-21 2011-11-24 Brian Heder Method, system, and apparatus for transitioning from ipv4 to ipv6
CN104104742A (en) * 2013-04-05 2014-10-15 瑞典爱立信有限公司 User plane traffic handling using network address translation and request redirection
US20150058469A1 (en) * 2013-08-20 2015-02-26 Futurewei Technologies, Inc. Monitoring NAT Behaviors Through URI Dereferences in Web Browsers

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110153831A1 (en) * 2009-12-23 2011-06-23 Rishi Mutnuru Systems and methods for mixed mode of ipv6 and ipv4 dns of global server load balancing
US20110153722A1 (en) * 2009-12-23 2011-06-23 Akshat Choudhary Systems and methods for policy based transparent client ip insertion
US20110289185A1 (en) * 2010-05-21 2011-11-24 Brian Heder Method, system, and apparatus for transitioning from ipv4 to ipv6
CN104104742A (en) * 2013-04-05 2014-10-15 瑞典爱立信有限公司 User plane traffic handling using network address translation and request redirection
US20150058469A1 (en) * 2013-08-20 2015-02-26 Futurewei Technologies, Inc. Monitoring NAT Behaviors Through URI Dereferences in Web Browsers

Also Published As

Publication number Publication date
CN112073548B (en) 2022-07-12

Similar Documents

Publication Publication Date Title
US10511567B2 (en) Network resource identification
US9479476B2 (en) Processing of DNS queries
US7908317B2 (en) System and method for URL compression
US9021128B2 (en) Request routing using network computing components
CN110392130B (en) Information processing method based on network, electronic equipment and network system
CN109787951B (en) Network data access method and device and electronic equipment
CN107154963B (en) Request processing method and device and electronic equipment
CN101355565B (en) Method and server for providing page service for various browsers
US9444780B1 (en) Content provided DNS resolution validation and use
CN109787952B (en) Network data access method and device and electronic equipment
WO2020206660A1 (en) Network resource request method and apparatus, electronic device and storage medium
CN111917900B (en) Domain name agent request processing method and device
US8566448B2 (en) System and method for providing device file using device identifier
CN112702425A (en) WEB application access agent method, device and system based on domain name extensive resolution
CN105279156A (en) Network information communication method and network information browsing device
JP2003141002A (en) Url length conversion system and program
US20070162704A1 (en) System and method for searching data
CN110677512B (en) Address resolution method and device
CN112073548B (en) Method and apparatus for solving skylight problems
CN103561068A (en) Method and device for improving speed of web page browsing
JP4757063B2 (en) Cache server device, cache control method, and program for cache server device
JP2007214671A (en) Client device and program
CN114650271B (en) Global load DNS neighbor site learning method and device
CN111866198A (en) Link access method, system, device and computer readable storage medium
KR20050104103A (en) Peer-to-peer communication system between terminals based on private network and method thereof

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