CN109451053A - Page resource request message sending method, device, medium and computer equipment - Google Patents
Page resource request message sending method, device, medium and computer equipment Download PDFInfo
- Publication number
- CN109451053A CN109451053A CN201811554906.2A CN201811554906A CN109451053A CN 109451053 A CN109451053 A CN 109451053A CN 201811554906 A CN201811554906 A CN 201811554906A CN 109451053 A CN109451053 A CN 109451053A
- Authority
- CN
- China
- Prior art keywords
- request message
- page resource
- resource request
- generation rule
- determining
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000004364 calculation method Methods 0.000 claims description 5
- 238000004590 computer program Methods 0.000 claims description 4
- 230000005540 biological transmission Effects 0.000 claims 7
- 230000015654 memory Effects 0.000 description 13
- 230000006870 function Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 3
- 230000005291 magnetic effect Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000005034 decoration Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000000386 athletic effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000002035 prolonged effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4505—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
- H04L61/4511—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present invention provides a kind of page resource request message sending method, device, computer storage medium and computer equipments;This method comprises: receiving page resource request message sends instruction;Obtain it is last send determine after page resource request message be currently generated rule for generate page resource request message;Page resource request message is generated according to the rule that is currently generated;Send the page resource request message.Technical solution through the invention can adapt to the variation of network environment, and the page resource request message to match with network environment is sent to server end, improve the request success rate of page resource request message.
Description
Technical Field
The invention relates to the field of network connection, in particular to a page resource request message sending method, a page resource request message sending device, a page resource request message sending medium and computer equipment.
Background
The client and the server are connected and interacted through HTTP (HyperText Transfer Protocol), which is a big approach for application.
However, due to the complexity and variability of the network environment, in the process of the client interacting with the server through the HTTP connection, the HTTP request sent by the client to the server fails to be connected due to the problems of the network environment, such as DNS (Domain Name System) pollution, DNS hijacking, DNS server pollution, or Domain Name problem, or the HTTP request is connected to have unstable power, so that the page data cannot be provided for the user, or the page data cannot be stably provided for the user, and the use experience of the user when using the product is reduced.
Therefore, a method for improving the success rate of HTTP requests is needed.
Disclosure of Invention
The invention provides a method, a device, a medium and a computer device for sending a page resource request message aiming at the defects of the prior art.
An embodiment of the present invention provides a method for sending a page resource request message according to a first aspect, including:
receiving a page resource request message sending instruction;
acquiring a current generation rule which is determined after the page resource request message is sent last time and is used for generating the page resource request message;
generating a page resource request message according to the current generation rule;
and sending the page resource request message.
Further, the sending the page resource request message then includes:
determining a request state and domain name information corresponding to the page resource request message;
updating a record table which is used for recording the request states of all page resource request messages and corresponds to the domain name information according to the request states, and generating a new record table;
and determining a generation rule used for sending the page resource request message next time from preset generation rules for generating the page resource request message according to the new record table.
Further, the generation rule for generating the page resource request message includes a first generation rule and a second generation rule;
the determining, according to the new record table, a generation rule used when the page resource request message is sent next time from preset generation rules for generating the page resource request message includes:
if the currently used generation rule is a first generation rule, determining a first request failure frequency corresponding to the first generation rule from the new record table, and if the first request failure frequency reaches a first preset threshold value, determining the generation rule used when the page resource request message is sent next time as a second generation rule;
and if the currently used generation rule is a second generation rule, determining a second request failure frequency corresponding to the second generation rule from the new record table, and if the second request failure frequency reaches a second preset threshold value, determining that the generation rule used when the page resource request message is sent next time is the first generation rule.
Still further, still include:
if the number of times of the second request failure does not reach a second preset threshold, determining a request sending record corresponding to the second generation rule from the new record table;
if the number of records of the request sending records reaches a preset number threshold, determining that a generation rule used when a page resource request message is sent next time is the first generation rule; or,
and if the use time of the second generation rule determined according to the request sending record reaches a preset time threshold, determining the generation rule used when the page resource request message is sent next time as the first generation rule.
Further, the preset threshold is obtained by determining the number of times of replacement between the first generation rule and the second generation rule according to the new record table, and then calculating the initial usage duration and the number of times of replacement corresponding to the second generation rule according to a preset calculation rule.
Further, after the currently used generation rule is a second generation rule, before determining, from the new record table, a number of times of failure of a second request corresponding to the second generation rule, the method further includes:
determining the number of times of replacement between the first generation rule and the second generation rule according to the new record table;
and if the replacement times reach a preset replacement threshold value, determining that the generation rule used when the page resource request message is sent next time is the second generation rule.
Further, the updating, according to the request state, the record table for recording the request states of all page resource request messages corresponding to the domain name information includes:
determining the network type of a currently used network;
acquiring a record table of request states of all page resource request messages corresponding to the network type and the domain name information;
and updating the record table according to the request state.
Further, the page resource request message sending method is applied to an iOS system, and the page resource request message includes an HTTP request or an HTTPs request.
An embodiment of the present invention provides a device for sending a page resource request message according to a second aspect, including:
the sending instruction receiving module is used for receiving a page resource request message sending instruction;
the generation rule acquisition module is used for acquiring a current generation rule which is determined after the page resource request message is sent last time and is used for generating the page resource request message;
a request message generating module, configured to generate a page resource request message according to the current generation rule;
and the request message sending module is used for sending the page resource request message.
Embodiments of the present invention provide a computer-readable storage medium according to a third aspect, on which a computer program is stored, which when executed by a processor implements the page resource request message sending method described above.
An embodiment of the present invention provides a computer device according to a fourth aspect, the computer device including:
one or more processors;
storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the page resource request message sending method.
In the embodiment of the invention, after receiving the page resource request message sending instruction, the current generation rule for generating the page resource request message determined after the last page resource request message is sent is obtained, the page resource request message is generated according to the current generation rule, and the page resource request message is sent, so that the change of a network environment can be adapted, the page resource request message matched with the network environment is sent to a server side, and the request success rate of the page resource request message is improved.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a flowchart illustrating a method for sending a page resource request message according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for sending a page resource request message according to another embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for updating a record table according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for determining a generation rule to be used when a page resource request message is sent next according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a page resource request message sending apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative only and should not be construed as limiting the invention.
It will be understood by those skilled in the art that, unless otherwise specified, the singular forms "a", "an", "the" and "the" may include the plural forms as well, and the "first" and "second" used herein are only used to distinguish one technical feature from another and are not intended to limit the order, number, etc. of the technical features. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The embodiment of the invention provides a method for sending a page resource request message, which is described in detail in the following specific implementation modes of the invention from the perspective of standing on a client terminal by combining with a figure.
As shown in fig. 1, a method for sending a page resource request message according to an embodiment of the present invention includes the following steps:
s110: and receiving a page resource request message sending instruction.
S120: and acquiring the current generation rule which is determined after the page resource request message is sent last time and is used for generating the page resource request message.
S130: and generating a page resource request message according to the current generation rule.
S140: and sending the page resource request message.
In this embodiment, a user sends the page resource request message sending instruction to the client terminal through a preset trigger operation, for example, when the user clicks a certain website link, the user sends the page resource request message sending instruction to the client terminal, and then the client terminal generates the page resource request message by using the generation rule, different generation rules can generate different types of page resource request messages, and the different types of page resource request messages are suitable for different network environments. The current generation rule used by the client terminal for generating the page resource request message at this time is determined after the page resource request message is sent last time.
Specifically, the generation rule for generating the page resource request message includes a first generation rule and a second generation rule.
The first generation rule is that after receiving a page resource request message generation instruction, a client terminal automatically generates an original page resource request message according to a protocol corresponding to a protocol type of the page resource request, for example, if the protocol type of the page resource request is HTTP, an HTTP request is generated according to the HTTP protocol, and a format of URL is a format specified by the HTTP protocol, for example, HTTP:// www.text.com/XXX.
And the second generation rule is that after receiving a page resource request message generation instruction, the client terminal generates an original page resource request message, and then modifies a URL in the original page resource request message to generate a modified page resource request message. Specifically, the host name originally having the domain name in the URL is replaced with the ip address. For example, the original URL is http:// www.text.com/XXX/XXX/XXX, which becomes http://123.345.567.789/XXX/XXX/XXX after the modification process.
Specifically, the domain name and ip address used by the client terminal to generate the page resource request message may have different obtaining manners in different application scenarios.
For example, in a possible application scenario, when it is detected that a user starts an application, the client terminal automatically establishes an independent tcp long connection with the background server, pulls a related domain name and ip configuration information from the background server, and generates an original page resource request message according to the pulled domain name, or acquires an ip address corresponding to the domain name to generate a modified page resource request message.
In another possible application scenario, the domain name may be input by the user, the client terminal sends a page resource request message to the resource server corresponding to the client terminal according to the domain name to request a page resource, if the request is successful, the client terminal stores the domain name and the corresponding ip address in an associated manner, and when the domain name is accessed again, if a second generation rule is needed to generate the page resource request message, the ip address corresponding to the domain name stored in advance is directly obtained to generate a modified page resource request message. Further, if the client terminal generates an original page resource request message according to a first generation rule, the client terminal needs to request the DNS server terminal to perform domain name resolution, specifically, an ip address matching with a host name is found in an ip address record stored in the client terminal according to the host name in the URL in the original page resource request message, for example, the URL is http:// www.text.com/, and the corresponding ip address is 123.345.567.789, and then the client terminal returns the found ip address to the client terminal, and then the client terminal requests the corresponding resource server terminal for the page resource to be requested by the client terminal according to the received ip address, and the resource server terminal finds the corresponding page resource according to the URL and feeds the page resource back to the client terminal. When a domain name resolution operation needs to be performed through a DNS server, if a DNS server end has situations such as DNS hijacking and DNS pollution, the client terminal cannot obtain an ip address corresponding to the domain name, or the received ip address does not actually correspond to the domain name, which both causes the client terminal to be unable to request a page resource from the resource server end, and thus affects the experience of the user in using the application.
If the client terminal generates the modified page resource request message by using the second generation rule, the client terminal can directly communicate with the related resource server terminal without requesting the DNS server terminal to perform domain name resolution operation, at this time, even if the DNS server terminal has the conditions of DNS hijacking, DNS pollution and the like, the communication between the client terminal and the resource server terminal cannot be influenced, and the speed of establishing connection between the client terminal and the resource server terminal can be improved because the domain name resolution operation of the DNS server is avoided.
Considering that a resource server side usually comprises a plurality of sites in an actual application scene, and when a domain name resolution operation is performed by a DNS server side, a received page resource request message can be distributed according to the load condition of each site of the resource server side, so that load balancing is realized; however, if the client terminal sends the page resource request message generated by using the second generation rule, although the domain name resolution operation of the DNS server can be bypassed, and the network connection is more stable, the generation of the page resource request message by using the second generation rule means that all the page resource request messages sent by the client terminal are sent to the site corresponding to the ip address in the resource server, which may cause the load of the site to be very high, and the loads of other sites to be very low, and the performance of the resource server cannot be fully utilized.
Therefore, in order to fully utilize the performance of the resource server side, when the network environment is good, such as the DNS server side does not have DNS hijacking, DNS pollution, and the like, the first generation rule is preferentially used to generate the page resource request message, and if the network environment is not good, such as the DNS server side has DNS hijacking, DNS pollution, and the like, the second generation rule is used to generate the page resource request message.
According to the method and the device, the page resource request message can be generated by using the generation rule determined after the page resource request message is sent last time when the page resource request message needs to be sent every time, so that the change of a network environment can be adapted, the page resource request message sent to the resource server side is generated by using the generation rule matched with the network environment, the request success rate of the page resource request message is improved, and the user experience is indirectly improved.
In one embodiment, as shown in fig. 2, the S140: sending the page resource request message, and then:
s150: and determining the request state and the domain name information corresponding to the page resource request message.
S160: and updating a record table which is used for recording the request states of all page resource request messages and corresponds to the domain name information according to the request states, and generating a new record table.
S170: and determining a generation rule used for sending the page resource request message next time from preset generation rules for generating the page resource request message according to the new record table.
In this embodiment, the client terminal records the request status and domain name information corresponding to the page resource request message after sending the page resource request message each time.
The domain name information may be extracted from a page Resource request message, and specifically may be extracted from a URL (Uniform Resource Locator) in the page Resource request message, where the URL is composed of three parts, i.e., a protocol type, a host name for storing a Resource, and a Resource file name, and in this embodiment, the host name in the URL is used as the domain name information, where the protocol type includes an HTTP protocol, an HTTPs protocol, and the like, and the host name refers to an IP address of a server for storing a Resource or a domain name corresponding to the IP address in a DNS, and the server searches for a Resource file according to the Resource file name in the URL after receiving the page Resource request message from the client terminal. For example, if the URL obtained from the page resource request message is https:// blog.huya.com/policy, blog.huya.com is used as the domain name information.
The request status of the page resource request message refers to success information or failure information after the client terminal sends the page resource request message to the server, and may be determined by feedback information received after sending the page resource request message, for example, the received feedback information is 200, which indicates that the request is successful, or 408, which indicates that the time taken for sending the page resource request message of the client terminal to the resource server is longer than the time for waiting for the server of the website, that is, the client terminal is timeout when connecting to the resource server.
In this embodiment, the client terminal sets, for each domain name requested to be accessed, a corresponding record table for recording request statuses of all page resource request messages sent by the client terminal to the server side corresponding to the domain name. After determining the request state and the domain name information of the page resource request message, the client terminal finds a record table corresponding to the domain name information, then records the request state corresponding to the page resource request message sent this time into the record table, generates a new record table, and then determines, according to the new record table and from preset generation rules, a generation rule to be used in sending the next page resource request message, for example, obtains the request state within a preset time interval from the new record table for analysis, and determines, according to an analysis result, a generation rule to be used in sending the next page resource request message.
Preferably, as shown in fig. 3, the S160: updating a record table for recording the request states of all page resource request messages corresponding to the domain name information according to the request states, wherein the record table comprises:
s161: the network type of the currently used network is determined.
S162: and acquiring a record table of the request states of all the page resource request messages corresponding to the network type and the domain name information.
S163: and updating the record table according to the request state.
Considering that in practical applications, the success and failure of sending the page resource request message by the client terminal are different using different network types, such as a 2G network, a 3G network, a 4G network or a WIFI network, in order to evaluate the network environment more accurately, for the record table corresponding to the domain name information, the record table is further subdivided into a plurality of sub-record tables according to the network type used by the client terminal, that is, the record table corresponding to both the network type and the domain name information.
After sending the page resource request message each time, the client terminal firstly determines the record table corresponding to the domain name information, then determines the sub-record table corresponding to the network type of the currently used network from the record table, and updates the subdivided record table according to the request state obtained by sending the page resource request message this time.
In the step of determining the generation rule used when the page resource request message is sent next time, the current network environment condition is analyzed according to the record table corresponding to the network type and the domain name information, and the generation rule used next time is determined according to the analysis result.
Specifically, as shown in fig. 4, the S170: determining a generation rule used for sending the page resource request message next time from preset generation rules for generating the page resource request message according to the new record table, wherein the generation rule comprises the following steps:
s171: and if the currently used generation rule is a first generation rule, determining a first request failure frequency corresponding to the first generation rule from the new record table, and if the first request failure frequency reaches a first preset threshold value, determining that the generation rule used when the page resource request message is sent next time is a second generation rule.
In this embodiment, the client terminal determines, from the new record table, a first record total of the request states corresponding to the page resource request message generated by using the first generation rule, and then determines, from the first record total of the request states, the number of times that the request state is failed, that is, the number of times that the request state is failed, where the number of times that the request state is failed is 5, where the number of times that the request state is failed is 100, for example, which is recorded in the new record table and obtained after the page resource request message generated by using the first generation rule is transmitted.
The first preset threshold is a basis for determining a network environment, and if the number of times of the first request failure reaches the first preset threshold, for example, the first preset threshold is 5 times, and the number of times of the first request failure reaches 5 times, it indicates that the current network environment is not good, and since the page resource request message cannot be requested after being sent due to the poor network environment, the page resource request message is generated by using the second generation rule when the page resource request message is sent next time.
S172: and if the currently used generation rule is a second generation rule, determining a second request failure frequency corresponding to the second generation rule from the new record table, and if the second request failure frequency reaches a second preset threshold value, determining that the generation rule used when the page resource request message is sent next time is the first generation rule.
In this embodiment, the client terminal determines, from the new record table, a second record total number of the request states corresponding to the page resource request message generated by using the second generation rule, and then determines, from the second record total number, the number of times that the request state is a failure, that is, the second request failure number of times. For example, there are 50 records of the request status obtained after the page resource request message generated by using the second generation rule is sent, where the number of times of failure in the request status is 30.
The failure reason corresponding to the second generation rule is usually that a network link corresponding to an ip address in a URL in the page resource request message fails to cause a network timeout, and if the network link is replaced with the first generation rule, the DNS server resolves the most reasonable ip address when performing domain name resolution, thereby avoiding a request failure caused by a network link failure. Therefore, by setting the second preset threshold, if the number of times of the second request failure reaches the second preset threshold, the page resource request message is generated by using the first generation rule when the page resource request message is sent next time, so that the request success rate is improved.
Further, if the number of times of the second request failure does not reach a second preset threshold, determining a request sending record corresponding to the second generation rule from the new record table;
if the number of records of the request sending records reaches a preset number threshold, determining that a generation rule used when a page resource request message is sent next time is the first generation rule; or,
and if the use time of the second generation rule determined according to the request sending record reaches a preset time threshold, determining the generation rule used when the page resource request message is sent next time as the first generation rule.
Considering that too many second generation rules are used to generate the page resource request message, some sites on the resource server side may be overloaded, and resource acquisition service may be affected. Therefore, in order to balance the load balancing situation of the resource server side, the client terminal needs to reduce the use of the second generation rule to generate the page resource request message.
Preferably, the request sending record refers to a record of a request state in the new record table, which is last changed from the first generation rule to the second generation rule. For example, 50 request status records of all page resource request messages recorded in the new record table are generated, the generation rules are switched twice in total, the first page resource request message is generated by using the first generation rule, 5 corresponding request status records are generated, then the second generation rule is used, 30 records are generated, then the first generation rule is generated, 5 generation rules are generated, and then the second generation rule is used, 10 records are generated, in this example, 10 records requested to be sent can be determined from the new record table.
Preferably, the first preset threshold and the second preset threshold may be both set as proportional thresholds, the first request failure times or the proportion of the second request failure times in the corresponding total number of records is determined, and if the obtained proportion reaches the first preset threshold or reaches the second preset threshold, the generation rule of the page resource request message is changed.
In an embodiment, the second preset threshold is obtained by determining the number of times of replacement between the first generation rule and the second generation rule according to the new record table, and then calculating the initial usage duration and the number of times of replacement corresponding to the second generation rule according to a preset calculation rule.
Specifically, the more the number of times of replacement between the first generation rule and the second generation rule is, the lower the request success rate of the page resource request message generated by the first generation rule is reflected, and therefore, the page resource request message needs to be replaced by the second generation rule, so that when the second generation rule is used again, the use time of the second generation rule can be prolonged.
The preset calculation rule can be set according to an actual application scenario. For example, the current usage duration may be set to the initial usage duration and the number of replacements. Then in the above example the number of replacements for the currently used second generation rule is 3, and if the initial usage period is 10 minutes, then it may be determined that the current usage period is equal to 30 minutes.
In an embodiment, after the determining, from the new record table, the number of times of failure of the second request corresponding to the second generation rule after the currently used generation rule is the second generation rule, the method further includes:
determining the number of times of replacement between the first generation rule and the second generation rule according to the new record table; and if the replacement times reach a preset replacement threshold value, determining that the generation rule used when the page resource request message is sent next time is the second generation rule.
In this embodiment, in an actual situation, the cases that the DNS server is hijacked or polluted are more common than the cases that the network link of a certain ip address of the resource server has a problem, and once the DNS server has a problem, there is no way to request the page resource, which greatly affects the use experience of the user.
In one embodiment, the page resource request message sending method is applied to an iOS system, and the page resource request message includes an HTTP request or an HTTPs request.
In order to better understand the technical solution of the present invention, the present invention further provides a device for sending a page resource request message, as shown in fig. 5, which specifically includes the following modules:
a sending instruction receiving module 110, configured to receive a page resource request message sending instruction.
A generating rule obtaining module 120, configured to obtain a current generating rule, which is determined after the page resource request message is sent last time, and is used for generating the page resource request message.
A request message generating module 130, configured to generate a page resource request message according to the current generation rule.
A request message sending module 140, configured to send the page resource request message.
In one embodiment, the page resource request message sending apparatus provided by the present invention, after executing the function corresponding to the request message sending module 140, further executes the functions corresponding to the following modules:
a status and domain name determining module 150, configured to determine a request status and domain name information corresponding to the page resource request message.
A new record table generating module 160, configured to update, according to the request status, a record table corresponding to the domain name information and used for recording the request status of all page resource request messages, and generate a new record table.
And a next generation rule determining module 170, configured to determine, according to the new record table, a generation rule used when the page resource request message is sent next time from preset generation rules for generating the page resource request message.
In one embodiment, the generation rule for generating the page resource request message includes a first generation rule and a second generation rule.
The next generation rule determining module 170 is further configured to determine, when the currently used generation rule is a first generation rule, a first request failure frequency corresponding to the first generation rule from the new record table, and if the first request failure frequency reaches a first preset threshold, determine that the generation rule used when the page resource request message is sent next time is the second generation rule;
and when the currently used generation rule is a second generation rule, determining a second request failure frequency corresponding to the second generation rule from the new record table, and if the second request failure frequency reaches a second preset threshold value, determining that the generation rule used when the page resource request message is sent next time is the first generation rule.
Further, the next generation rule determining module 170 is further configured to determine, if the number of times of failure of the second request does not reach a second preset threshold, a request sending record corresponding to the second generation rule from the new record table;
if the number of records of the request sending records reaches a preset number threshold, determining that a generation rule used when a page resource request message is sent next time is the first generation rule; or,
and if the use time of the second generation rule determined according to the request sending record reaches a preset time threshold, determining the generation rule used when the page resource request message is sent next time as the first generation rule.
In an embodiment, the preset threshold is obtained by determining the number of times of replacement between the first generation rule and the second generation rule according to the new record table, and then calculating the initial usage duration and the number of times of replacement corresponding to the second generation rule according to a preset calculation rule.
In an embodiment, after the executing step determines that the currently used generation rule is the second generation rule, before the executing step determines the number of times of the second request failure corresponding to the second generation rule from the new record table, the next generation rule determining module 170 further includes the following steps:
determining the number of times of replacement between the first generation rule and the second generation rule according to the new record table;
and if the replacement times reach a preset replacement threshold value, determining that the generation rule used when the page resource request message is sent next time is the second generation rule.
In one embodiment, the new record table generating module 160 includes:
the network type determination submodule is used for determining the network type of the currently used network;
a record table obtaining sub-module, configured to obtain a record table of request statuses of all page resource request messages corresponding to the network type and the domain name information;
and the updating submodule is used for updating the record table according to the request state.
It should be noted that the page resource request message sending apparatus provided in the embodiment of the present invention can implement the functions and technical effects implemented by the page resource request message sending method, and specific implementation of the functions refers to the description in the page resource request message sending method, which is not described herein again.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for sending a page resource request message. The storage medium includes, but is not limited to, any type of disk (including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks), ROMs (Read-Only memories), RAMs (Random AcceSS memories), EPROMs (EraSable Programmable Read-Only memories), EEPROMs (Electrically EraSable Programmable Read-Only memories), flash memories, magnetic cards, or optical cards. That is, a storage medium includes any medium that stores or transmits information in a form readable by a device (e.g., a computer). Which may be a read-only memory, magnetic or optical disk, or the like.
An embodiment of the present invention further provides a computer device, where the computer device includes:
one or more processors 310;
a storage 320 for storing one or more programs 300,
when the one or more programs 300 are executed by the one or more processors 310, the one or more processors 310 are enabled to implement the page resource request message sending method.
Fig. 6 is a schematic structural diagram of the computer apparatus of the present invention, which includes a processor 310, a storage device 320, an input unit 330, a display unit 340, and other devices. Those skilled in the art will appreciate that the structural elements shown in fig. 6 do not constitute a limitation of all computer devices and may include more or less components than those shown, or some of the components may be combined. The storage device 320 may be used to store the application program 300 and various functional modules, and the processor 310 executes the application program 300 stored in the storage device 320, thereby performing various functional applications of the device and data processing. The storage 320 may be an internal memory or an external memory, or include both internal and external memories. The memory may comprise read-only memory, Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), flash memory, or random access memory. The external memory may include a hard disk, a floppy disk, a ZIP disk, a usb-disk, a magnetic tape, etc. The disclosed memory devices include, but are not limited to, these types of memory devices. The memory device 320 is disclosed by way of example only and not by way of limitation.
The input unit 330 is used for receiving input of signals and receiving related requests of selecting voice files and the like input by users. The input unit 330 may include a touch panel and other input devices. The touch panel can collect touch operations of a user on or near the touch panel (for example, operations of the user on or near the touch panel by using any suitable object or accessory such as a finger, a stylus and the like) and drive the corresponding connecting device according to a preset program; other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., play control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like. The display unit 340 may be used to display information input by a user or information provided to the user and various menus of the computer device. The display unit 340 may take the form of a liquid crystal display, an organic light emitting diode, or the like. The processor 310 is a control center of the computer device, connects various parts of the entire computer using various interfaces and lines, and performs various functions and processes data by operating or executing software programs and/or modules stored in the storage device 320 and calling data stored in the storage device.
In one embodiment, a computer device includes one or more processors 310, and one or more storage devices 320, one or more applications 300, wherein the one or more applications 300 are stored in the storage device 320 and configured to be executed by the one or more processors 310, the one or more applications 300 configured to perform the athletic field information query method described in the above embodiments.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
It should be understood that each functional unit in the embodiments of the present invention may be integrated into one processing module, each unit may exist alone physically, or two or more units may be integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The foregoing is only a partial embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
Claims (11)
1. A method for sending a page resource request message is characterized by comprising the following steps:
receiving a page resource request message sending instruction;
acquiring a current generation rule which is determined after the page resource request message is sent last time and is used for generating the page resource request message;
generating a page resource request message according to the current generation rule;
and sending the page resource request message.
2. The page resource request message transmission method of claim 1,
the sending the page resource request message then comprises:
determining a request state and domain name information corresponding to the page resource request message;
updating a record table which is used for recording the request states of all page resource request messages and corresponds to the domain name information according to the request states, and generating a new record table;
and determining a generation rule used for sending the page resource request message next time from preset generation rules for generating the page resource request message according to the new record table.
3. The page resource request message transmission method of claim 2,
the generation rule for generating the page resource request message comprises a first generation rule and a second generation rule;
the determining, according to the new record table, a generation rule used when the page resource request message is sent next time from preset generation rules for generating the page resource request message includes:
if the currently used generation rule is a first generation rule, determining a first request failure frequency corresponding to the first generation rule from the new record table, and if the first request failure frequency reaches a first preset threshold value, determining the generation rule used when the page resource request message is sent next time as a second generation rule;
and if the currently used generation rule is a second generation rule, determining a second request failure frequency corresponding to the second generation rule from the new record table, and if the second request failure frequency reaches a second preset threshold value, determining that the generation rule used when the page resource request message is sent next time is the first generation rule.
4. The method for sending a page resource request message according to claim 3, further comprising:
if the number of times of the second request failure does not reach a second preset threshold, determining a request sending record corresponding to the second generation rule from the new record table;
if the number of records of the request sending records reaches a preset number threshold, determining that a generation rule used when a page resource request message is sent next time is the first generation rule; or,
and if the use time of the second generation rule determined according to the request sending record reaches a preset time threshold, determining the generation rule used when the page resource request message is sent next time as the first generation rule.
5. The page resource request message transmission method of claim 3,
and the second preset threshold is obtained by determining the replacement times between the first generation rule and the second generation rule according to the new record table and calculating the initial use time length corresponding to the second generation rule and the replacement times according to a preset calculation rule.
6. The page resource request message transmission method of claim 3,
after the currently used generation rule is a second generation rule, before determining, from the new record table, a number of times of failure of a second request corresponding to the second generation rule, the method further includes:
determining the number of times of replacement between the first generation rule and the second generation rule according to the new record table;
and if the replacement times reach a preset replacement threshold value, determining that the generation rule used when the page resource request message is sent next time is the second generation rule.
7. The page resource request message transmission method of claim 2,
the updating, according to the request state, a record table for recording request states of all page resource request messages corresponding to the domain name information includes:
determining the network type of a currently used network;
acquiring a record table of request states of all page resource request messages corresponding to the network type and the domain name information;
and updating the record table according to the request state.
8. The page resource request message transmission method of any one of claims 1 to 7,
the page resource request message sending method is applied to an iOS system, and the page resource request message comprises an HTTP request or an HTTPS request.
9. A page resource request message transmitting apparatus, comprising:
the sending instruction receiving module is used for receiving a page resource request message sending instruction;
the generation rule acquisition module is used for acquiring a current generation rule which is determined after the page resource request message is sent last time and is used for generating the page resource request message;
a request message generating module, configured to generate a page resource request message according to the current generation rule;
and the request message sending module is used for sending the page resource request message.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the page resource request message transmission method according to any one of claims 1 to 8.
11. A computer device, characterized in that the computer device comprises:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811554906.2A CN109451053B (en) | 2018-12-18 | 2018-12-18 | Page resource request message sending method, device, medium and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811554906.2A CN109451053B (en) | 2018-12-18 | 2018-12-18 | Page resource request message sending method, device, medium and computer equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109451053A true CN109451053A (en) | 2019-03-08 |
CN109451053B CN109451053B (en) | 2022-02-25 |
Family
ID=65560040
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811554906.2A Active CN109451053B (en) | 2018-12-18 | 2018-12-18 | Page resource request message sending method, device, medium and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109451053B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112632440A (en) * | 2020-12-18 | 2021-04-09 | 西安博达软件股份有限公司 | Static resource generation method for teacher personal homepage based on watermark characteristic rule string |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103581351A (en) * | 2012-07-27 | 2014-02-12 | 腾讯科技(深圳)有限公司 | Method and device for having access to network |
CN104092787A (en) * | 2014-06-24 | 2014-10-08 | 腾讯科技(深圳)有限公司 | Network access method and system based on DNS |
CN105610867A (en) * | 2016-03-01 | 2016-05-25 | 阿继琛 | DNS (Domain Name System) hijack prevention method and apparatus |
CN105656950A (en) * | 2016-04-13 | 2016-06-08 | 南京烽火软件科技有限公司 | HTTP (Hyper Text Transport Protocol) access hijack detection and purification device and method based on domain name |
WO2017004947A1 (en) * | 2015-07-07 | 2017-01-12 | 安一恒通(北京)科技有限公司 | Method and apparatus for preventing domain name hijacking |
US20170142636A1 (en) * | 2015-11-12 | 2017-05-18 | Qualcomm Incorporated | Inter-subnet and intra-subnet roaming |
CN106790743A (en) * | 2016-11-28 | 2017-05-31 | 北京小米移动软件有限公司 | Information transferring method, device and mobile terminal |
CN107094134A (en) * | 2017-03-09 | 2017-08-25 | 咪咕数字传媒有限公司 | A kind of method and client of access website |
CN107154963A (en) * | 2017-03-31 | 2017-09-12 | 北京猎豹移动科技有限公司 | A kind of request processing method, device and electronic equipment |
CN107579874A (en) * | 2017-09-01 | 2018-01-12 | 北京亚鸿世纪科技发展有限公司 | The method and device that a kind of detection flows collecting device data acquisition is failed to report |
CN108449428A (en) * | 2018-04-23 | 2018-08-24 | 深圳市分期乐网络科技有限公司 | A kind of method for connecting network, device, server and storage medium |
-
2018
- 2018-12-18 CN CN201811554906.2A patent/CN109451053B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103581351A (en) * | 2012-07-27 | 2014-02-12 | 腾讯科技(深圳)有限公司 | Method and device for having access to network |
CN104092787A (en) * | 2014-06-24 | 2014-10-08 | 腾讯科技(深圳)有限公司 | Network access method and system based on DNS |
WO2017004947A1 (en) * | 2015-07-07 | 2017-01-12 | 安一恒通(北京)科技有限公司 | Method and apparatus for preventing domain name hijacking |
US20170142636A1 (en) * | 2015-11-12 | 2017-05-18 | Qualcomm Incorporated | Inter-subnet and intra-subnet roaming |
CN105610867A (en) * | 2016-03-01 | 2016-05-25 | 阿继琛 | DNS (Domain Name System) hijack prevention method and apparatus |
CN105656950A (en) * | 2016-04-13 | 2016-06-08 | 南京烽火软件科技有限公司 | HTTP (Hyper Text Transport Protocol) access hijack detection and purification device and method based on domain name |
CN106790743A (en) * | 2016-11-28 | 2017-05-31 | 北京小米移动软件有限公司 | Information transferring method, device and mobile terminal |
CN107094134A (en) * | 2017-03-09 | 2017-08-25 | 咪咕数字传媒有限公司 | A kind of method and client of access website |
CN107154963A (en) * | 2017-03-31 | 2017-09-12 | 北京猎豹移动科技有限公司 | A kind of request processing method, device and electronic equipment |
CN107579874A (en) * | 2017-09-01 | 2018-01-12 | 北京亚鸿世纪科技发展有限公司 | The method and device that a kind of detection flows collecting device data acquisition is failed to report |
CN108449428A (en) * | 2018-04-23 | 2018-08-24 | 深圳市分期乐网络科技有限公司 | A kind of method for connecting network, device, server and storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112632440A (en) * | 2020-12-18 | 2021-04-09 | 西安博达软件股份有限公司 | Static resource generation method for teacher personal homepage based on watermark characteristic rule string |
CN112632440B (en) * | 2020-12-18 | 2023-01-24 | 西安博达软件股份有限公司 | Static resource generation method for teacher personal homepage based on watermark characteristic rule string |
Also Published As
Publication number | Publication date |
---|---|
CN109451053B (en) | 2022-02-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10374955B2 (en) | Managing network computing components utilizing request routing | |
US9836317B2 (en) | Controlling virtualization resource utilization based on network state | |
US9888089B2 (en) | Client side cache management | |
CN110351283B (en) | Data transmission method, device, equipment and storage medium | |
US9451046B2 (en) | Managing CDN registration by a storage provider | |
CN109395400B (en) | Cross-game chat information processing method and device, electronic equipment and storage medium | |
US9251112B2 (en) | Managing content delivery network service providers | |
CN109587254B (en) | Cloud server access method and device, cloud server and storage medium | |
US9338165B2 (en) | Common internet file system proxy authentication of multiple servers | |
US11711434B2 (en) | Information transmission method and device | |
CN108173976B (en) | Domain name resolution method and device | |
JP5502239B2 (en) | Access control method and system, and access terminal | |
CN105743945B (en) | Document down loading method and system based on switching loading source | |
CN110839049B (en) | Data scheduling method and system based on domain name system | |
JP2018519569A (en) | Reliable login method and apparatus | |
CN107124483A (en) | Domain name analytic method and server | |
CN113206785A (en) | Network request method and device, terminal equipment and storage medium | |
US11297131B2 (en) | Method and apparatus for multi-vendor GTM fabric | |
CN109451053B (en) | Page resource request message sending method, device, medium and computer equipment | |
CN114666245A (en) | IPv6 single stack support degree determining method of B/S system and related equipment | |
US20090109857A1 (en) | Resource connection monitor utility | |
CN113271326B (en) | Network protocol address scheduling method and device and electronic equipment | |
KR101670699B1 (en) | Method and system for communicating between web pages | |
CN105245512B (en) | A kind of unidirectional file transmission method and the server for realizing the transmission method | |
CN111083222B (en) | Data uploading method and terminal |
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 | ||
TR01 | Transfer of patent right |
Effective date of registration: 20221118 Address after: 31a, 15 / F, building 30, maple mall, bangrang Road, Brazil, Singapore Patentee after: Baiguoyuan Technology (Singapore) Co.,Ltd. Address before: Building B-1, North District, Wanda Commercial Plaza, Wanbo business district, No. 79, Wanbo 2nd Road, Nancun Town, Panyu District, Guangzhou City, Guangdong Province Patentee before: GUANGZHOU BAIGUOYUAN INFORMATION TECHNOLOGY Co.,Ltd. |
|
TR01 | Transfer of patent right |