CN107832329B - Page resource obtaining method and terminal equipment - Google Patents

Page resource obtaining method and terminal equipment Download PDF

Info

Publication number
CN107832329B
CN107832329B CN201710882749.7A CN201710882749A CN107832329B CN 107832329 B CN107832329 B CN 107832329B CN 201710882749 A CN201710882749 A CN 201710882749A CN 107832329 B CN107832329 B CN 107832329B
Authority
CN
China
Prior art keywords
resource address
page
page resource
address
webpage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710882749.7A
Other languages
Chinese (zh)
Other versions
CN107832329A (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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201710882749.7A priority Critical patent/CN107832329B/en
Publication of CN107832329A publication Critical patent/CN107832329A/en
Application granted granted Critical
Publication of CN107832329B publication Critical patent/CN107832329B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a page resource acquisition method and terminal equipment, which are suitable for the technical field of mobile application, and the method comprises the following steps: acquiring a resource address set corresponding to the selected control according to the received control selection instruction, wherein the resource address set comprises a plurality of page resource addresses; acquiring a page resource address in the resource address set through a preset matching algorithm, and sending a webpage access request based on the page resource address; receiving response information based on the webpage access request; and if the response information carries a webpage error code, returning to execute the acquisition of one webpage resource address in the resource address set, and sending a webpage access request based on the webpage resource address. The method and the device for acquiring the page resources enable the mobile application to quickly acquire the page resources required by the user without continuously waiting for the recovery of the abnormal page resources, improve the acquisition efficiency of the page resources and enhance the reliability of the mobile application.

Description

Page resource obtaining method and terminal equipment
Technical Field
The invention belongs to the technical field of mobile application, and particularly relates to a page resource obtaining method and terminal equipment.
Background
When the existing mobile application client runs, the existing mobile application client generally needs to be connected with a background server so as to access page resources in the background server. However, if a certain page resource is abnormal, the background server cannot return the data information of the page resource, and at this time, the client can only display prompt information such as a page access error on the terminal interface. If the page resource in the background server is abnormal continuously, the client can continue to access only after passively waiting for the page resource to recover to normal. The client cannot actively solve the problem of abnormal page resources of the background server, and the time consumption for waiting for the page resources to recover to normal is long, so that the efficiency of acquiring the page resources of the mobile application is low, and the reliability of the mobile application is reduced.
Disclosure of Invention
In view of this, embodiments of the present invention provide a page resource obtaining method and a terminal device, so as to solve the problems of low page resource obtaining efficiency and low reliability of mobile applications in the prior art.
A first aspect of an embodiment of the present invention provides a method for acquiring a page resource, including:
acquiring a resource address set corresponding to a selected control according to a received control selection instruction, wherein the resource address set comprises a plurality of page resource addresses, and the storage paths pointed by the page resource addresses are different but the page resources are the same;
acquiring one page resource address in the resource address set, and sending a webpage access request based on the page resource address;
receiving response information about the web page access request;
if the response information carries a webpage error code, returning to execute the acquisition of one page resource address in the resource address set, and sending a webpage access request based on the page resource address;
and if the response information does not carry the webpage error code, rendering the webpage resources in the terminal interface based on the response information.
A second aspect of the embodiments of the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the following steps when executing the computer program:
acquiring a resource address set corresponding to a selected control according to a received control selection instruction, wherein the resource address set comprises a plurality of page resource addresses, and the storage paths pointed by the page resource addresses are different but the page resources are the same;
acquiring one page resource address in the resource address set, and sending a webpage access request based on the page resource address;
receiving response information about the web page access request;
if the response information carries a webpage error code, returning to execute the acquisition of one page resource address in the resource address set, and sending a webpage access request based on the page resource address;
and if the response information does not carry the webpage error code, rendering the webpage resources in the terminal interface based on the response information.
A third aspect of embodiments of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of:
acquiring a resource address set corresponding to a selected control according to a received control selection instruction, wherein the resource address set comprises a plurality of page resource addresses, and the storage paths pointed by the page resource addresses are different but the page resources are the same;
acquiring one page resource address in the resource address set, and sending a webpage access request based on the page resource address;
receiving response information about the web page access request;
if the response information carries a webpage error code, returning to execute the acquisition of one page resource address in the resource address set, and sending a webpage access request based on the page resource address;
and if the response information does not carry the webpage error code, rendering the webpage resources in the terminal interface based on the response information.
When a user selects a control in the mobile application, the embodiment of the invention obtains the resource address set corresponding to the control and sends out a webpage access request based on one page resource address, when response information carrying a webpage error code is received, a webpage access request based on another page resource address in the resource address set is sent out again, so that the client can also actively request another page resource when one page resource of the background server is abnormal, switching access to the standby page resource in the background server is realized, therefore, the mobile application can quickly acquire the page resources required by the user without continuously waiting for the recovery of the abnormal page resources, and the time consumed for downloading the page resources under the abnormal condition is reduced, so that the acquisition efficiency of the page resources is improved, and the reliability of the mobile application is enhanced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart illustrating an implementation of a method for acquiring a page resource according to an embodiment of the present invention;
fig. 2 is a flowchart of a specific implementation of the page resource obtaining method S102 according to the embodiment of the present invention;
FIG. 3 is a flowchart illustrating an implementation of a method for obtaining page resources according to another embodiment of the present invention;
FIG. 4 is a flowchart illustrating an implementation of a method for obtaining page resources according to yet another embodiment of the present invention;
fig. 5 is a block diagram of a structure of a page resource obtaining apparatus according to an embodiment of the present invention;
fig. 6 is a block diagram of a page resource acquiring apparatus according to another embodiment of the present invention;
fig. 7 is a block diagram of a page resource acquiring apparatus according to another embodiment of the present invention;
fig. 8 is a block diagram illustrating a structure of a page resource obtaining apparatus according to still another embodiment of the present invention;
fig. 9 is a schematic diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 1 shows an implementation process of a page resource obtaining method provided by an embodiment of the present invention, where the method process includes steps S101 to S105. The specific realization principle of each step is as follows:
s101: and acquiring a resource address set corresponding to the selected control according to the received control selection instruction, wherein the resource address set comprises a plurality of page resource addresses, and the storage paths pointed by the page resource addresses are different but the page resources are the same.
The application program page run by the mobile terminal comprises a plurality of controls, the controls comprise but are not limited to a user interface control, an image processing control, a document processing control and the like, each control is used for providing a page jump function for a user, namely, when the user selects any one control, the mobile application jumps to a new page or pops up a new sub-window to display the page resource requested at the latest moment.
In the embodiment of the invention, when a control selection instruction sent by a user in an application program page is detected, the control selected by the user is determined. Each control has a related resource address set, the resource address set comprises at least two page resource addresses, and each page resource address is a storage path of a page resource in the background server. In the development process of the mobile application, the resource address set associated with the default function option control of the mobile application can be directly stored in the local mobile terminal after the mobile application is installed. And when the control selected by the user is the control for jumping to the third-party platform, sending a resource address set downloading request to a preset third-party service, wherein the resource address set downloading request comprises the identification number of the control selected by the user, so that the third-party platform returns a resource address set matched with the identification number.
For example, if the application is a microblog and the control selected by the user is a "home page", the control is a default function option control of the microblog, so that the corresponding resource address set can be preset locally in the mobile terminal, and when a control selection instruction related to the "home page" is detected, the pre-stored resource address set can be directly called. And if the control selected by the user in the microblog is the picture control jumping to the A forum, sending a resource address set downloading request corresponding to the picture control to a preset A forum server, and acquiring a resource address set returned by the A forum server.
Each page resource address in each resource address set points to different page resource storage paths, but the page resources existing under each page resource storage path are the same. That is, in a normal state, the web page generated based on any page resource address is the same.
S102: and acquiring one page resource address in the resource address set, and sending a webpage access request based on the page resource address.
And selecting one page resource address from a resource address set containing a plurality of page resource addresses through a preset algorithm so as to output the page resource address as a webpage address linked with the control selected by the user at the current moment. The preset matching algorithm may be, for example, a random matching algorithm or the like.
For example, if there are 2 page resource addresses in the resource address set, which are http:// www.abc.com/456 and http:// www.abc.com/123 respectively, and the selected page resource address is http:// www.abc.com/123, the mobile application will send a web page access request to the site server of www.abc.com and request to acquire the page resource under its directory/123.
As an embodiment of the present invention, as shown in fig. 2, the S102 specifically includes:
s1021: and determining the page resource address bound with a main address identifier in the resource address set, wherein the main address identifier is used for marking the page resource address required to be read at the current moment.
In the embodiment of the invention, the pre-downloaded resource address set carries a main address identifier, and the main address identifier is bound with one page resource address in the resource address set.
If the resource address set corresponds to the default function control of the application program, the page resource address bound by the main address identifier in the resource address set is preset by an application developer and then is packaged into an installation package of the application program, so that after the application program is installed, the mobile application can identify the main address identifier in the resource address set and determine the page resource address bound with the main address identifier. If the resource address set corresponds to a control related to the third-party platform, the page resource address bound by the main address identifier can be preset by a page resource maintainer of the third-party platform, so that the mobile application can identify the main address identifier in the resource address set and determine the page resource address bound with the main address identifier after downloading the resource address set returned by the third-party platform.
S1022: after a webpage access request based on the page resource address is sent out, the main address identification is bound to another page resource address except the page resource address in the resource address set again.
And generating a webpage access request based on the page resource address according to the page resource address bound with the main address identifier in the resource address set, so as to send the webpage access request to a background server corresponding to the page resource address through a network, and request to acquire the page resource matched with the storage path corresponding to the page resource address in the background server.
After a webpage access request based on a page resource address is sent, in the obtained resource address set, the binding relationship between the main address identifier and the page resource address is released, and another page resource address except the page resource address in the resource address set is obtained, so that the another page resource address obtained at the current moment is bound with the main address identifier.
When the page resource address is bound again, each page resource address can be bound with the main address identifier in sequence according to the arrangement sequence of each page resource address in the resource address set.
In the embodiment of the invention, the page resource address bound with the main address identifier in the resource address set is determined, and the webpage access request based on the page resource address is sent out, so that after a user sends out a control selection instruction, the mobile application can accurately determine the current moment as a main webpage resource address from a plurality of standby webpage resource addresses; by rebinding the page resource address associated with the main address identifier when sending the webpage access request, the webpage access request based on the standby page resource address can be sent again when the response result of the webpage access request is detected to be abnormal subsequently, and the standby effect among a plurality of page resource addresses is realized.
S103: and receiving response information about the webpage access request.
The method for sending the webpage access request to the background server corresponding to the webpage access request so as to enable the background server to execute response operation based on the webpage access request comprises the following steps: and the background server acquires the page resource from the storage path corresponding to the page resource address according to the page resource address carried by the webpage access request. And in a normal state, the background server returns the page resource as response information to the mobile application. And if the read page resource is abnormal or the page resource cannot be read, the background server returns response information carrying the webpage error code.
The above-mentioned situation that the page resource cannot be read includes: the page resource is prohibited from accessing, the identity authentication fails, and the storage directory does not exist.
S104: and judging whether the response information carries a webpage error code.
The webpage error code is a state code of an http protocol generated when the webpage has an error. For example, http404.0, http 414, http 502, http 403.2, and so on.
In the embodiment of the invention, whether the response information returned by the background server contains the webpage error code is detected. If yes, returning to execute the step S102; otherwise, step S105 is performed.
S105: and rendering page resources in the terminal interface based on the response information.
And if the response information does not carry the webpage error code, directly rendering a functional page which is used for corresponding to the control and is required by the user according to the received response information. At this time, the page resource address bound by the primary address identifier is stopped being determined again in the resource address set, and the transfer of the primary address identifier to another page resource address is stopped.
When a user selects a control in the mobile application, the embodiment of the invention obtains the resource address set corresponding to the control and sends out a webpage access request based on one page resource address, when response information carrying a webpage error code is received, a webpage access request based on another page resource address in the resource address set is sent out again, so that the client can also actively request another page resource when one page resource of the background server is abnormal, switching access to the standby page resource in the background server is realized, therefore, the mobile application can quickly acquire the page resources required by the user without continuously waiting for the recovery of the abnormal page resources, and the time consumed for downloading the page resources under the abnormal condition is reduced, so that the acquisition efficiency of the page resources is improved, and the reliability of the mobile application is enhanced.
Fig. 3 shows an implementation flow of a page resource obtaining method according to another embodiment of the present invention, as shown in fig. 3, after the foregoing S101 and before S1021, the method further includes:
s1023: and reading the successful access times of each page resource address in the resource address set, wherein the successful access times of each page resource address represent the accumulation times of rendering of the corresponding page resource in the terminal interface.
After a page access request is sent out based on a certain page resource address, if response information returned according to the page access request comprises a page error code, determining that the page resource address fails to be accessed, and adding one to the number of failed access times. And if the response information returned according to the page access request comprises a webpage error code, determining that the page resource address is successfully accessed, and adding one to the number of successful accesses.
And updating the successful access times of each page resource address in the local mobile terminal in real time.
S1024: and determining the page resource address with the maximum number of successful accesses in the resource address set.
S1025: and binding the main address identification with the page resource address with the maximum number of successful accesses.
When a prestored resource address set is obtained for the first time after a control selection instruction sent by a user is received, the successful access times of each page resource address are read so as to identify one page resource address with the highest successful access times.
And determining the page resource address with the maximum number of successful accesses as the first page resource address bound with the main address identifier in the resource address set.
The embodiment of the invention is suitable for the condition that the pre-stored resource address set is not bound with the main address identifier, by reading each page resource address and binding the page resource address with the largest successful access times with the main address identifier, the mobile application can acquire the page resource with the largest successful access probability when sending the page access request for the first time, and complete the page resource acquisition operation after one request as much as possible, thereby reducing the repeated sending of the page access requests based on different page resource addresses, and improving the acquisition efficiency of the page resource
As another embodiment of the present invention, if the response information returned based on each page resource address carries a webpage error code, the step S102 is returned to be executed after the network connection mode at the current time is switched.
In the above S104, if the response information received by the mobile application carries a webpage error code, returning to obtain another page resource address in the resource address set, so as to resend the webpage access request based on the page resource address. After a control selection instruction sent by a user is received, the mobile application records the number of times of sending a webpage access request in real time. If the number of times of sending the webpage access request reaches the total number of the page resource addresses in the resource address set, the response information returned based on each page resource address is indicated to carry a webpage error code, and at this time, the mobile terminal switches the network connection mode.
Specifically, if the network connection mode before switching is a cellular network connection mode, switching the network connection mode to a wireless local area network connection mode; if the network connection mode before switching is the wireless local area network connection mode, switching the network connection mode to the cellular network connection mode. For example, if the network connection mode of the mobile terminal is 4G signal connection, the network connection mode after switching may be WIFI connection.
After the network connection mode of the mobile terminal is switched, the mobile application records the number of times of sending out the webpage access request in real time and resets to zero, and returns to execute the step S102. And then, if the number of times of sending the webpage access request reaches the total number of the page resource addresses in the resource address set again, namely, the response information returned based on each page resource address carries a webpage error code, stopping sending the webpage access request, and generating page resource abnormity prompt information to prompt a user that the page resource is abnormal at the current moment and no standby page resource exists.
In the embodiment of the invention, the response information received by the mobile terminal is the response information returned by other equipment, such as a gateway, because the webpage access request may not reach the target server. At this time, the response information returned based on each page resource address carries a webpage error code, and the generation reason may be that the network cannot be connected but the page resource itself is abnormal, so when the response information returned based on each page resource address carries a webpage error code, the automatic troubleshooting of the page resource fault is realized by switching the network connection mode at the current moment and re-executing the step S102, and the response information of the webpage error code is prevented from being received due to the abnormal network connection of the mobile terminal, so that the mobile terminal can accurately send the webpage access request to the background server again based on each page resource address in the resource address set, thereby ensuring that the page resource required by the user can be obtained as much as possible, and enhancing the reliability of the mobile application.
As another embodiment of the present invention, as shown in fig. 4, after S104, the method further includes:
s106: and judging whether the response information of each page resource address in the resource address set is acquired completely.
If yes, executing step S107; otherwise, the step S102 is executed back.
S107: and acquiring a preset mailbox address.
And if the response information returned based on each page resource address carries a webpage error code, acquiring an operation and maintenance management mailbox address preset in a code of the mobile application by a developer. When the user has a question and needs consultation, the question which the user needs consultation can be sent to the operation and maintenance management mailbox address.
Preferably, the step S107 is executed only after the network connection mode of the mobile terminal is switched and when it is detected again that the response information returned based on each page resource address carries a webpage error code.
S108: generating alarm information regarding the set of resource addresses.
In the embodiment of the invention, a mail client interface in the mobile terminal is called to newly build a mail in the mail client and generate the mail body content, wherein the mail body content comprises alarm information related to the resource address set, such as each page resource address in the resource address set, a control corresponding to the resource address set and a mail sending reason. The reason for sending the e-mail is that if the response information returned based on each page resource address carries a webpage error code, that is, the page resource pointed by each page resource address in the resource address set is abnormal.
S109: and sending the alarm information to the mailbox address, wherein the alarm information is used for notifying operation and maintenance personnel of the mobile application to carry out troubleshooting on each page resource corresponding to the resource address set.
And sending the newly-built mail containing the alarm information to an operation and maintenance management mailbox address, so that operation and maintenance personnel of the mobile application can receive the alarm information from the operation and maintenance management mailbox and know which resource address sets are abnormal at the current moment, and troubleshooting is performed on each page resource pointed by the resource address set.
In the embodiment of the invention, when response information which does not carry a webpage error code cannot be returned based on each page resource address, the alarm information about the resource address set is generated and sent to the operation and maintenance management mailbox of the mobile application, so that operation and maintenance personnel of the mobile application can timely know the abnormal page resources and timely process the abnormal page resources, the time consumption for recovering the page resources to be normal is prolonged to a certain extent, and the page resource acquisition efficiency of the mobile application is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Corresponding to the page resource obtaining method described in the foregoing embodiment, fig. 5 shows a structural block diagram of the page resource obtaining apparatus provided in the embodiment of the present invention, and for convenience of description, only the relevant parts to the embodiment of the present invention are shown.
Referring to fig. 5, the apparatus includes:
a first obtaining unit 501, configured to obtain, according to a received control selection instruction, a resource address set corresponding to a selected control, where the resource address set includes multiple page resource addresses, and each page resource address points to a different storage path but has the same page resource.
A second obtaining unit 502, configured to obtain one page resource address in the resource address set, and send a web page access request based on the page resource address.
A receiving unit 503, configured to receive response information about the web page access request.
A first returning unit 504, configured to return to execute the obtaining of one page resource address in the resource address set and send a web access request based on the page resource address if the response information carries a web error code.
And the display unit 505 is configured to render page resources in a terminal interface based on the response information if the response information does not carry the webpage error code.
Optionally, the second obtaining unit 502 includes:
and the determining subunit is configured to determine, in the resource address set, the page resource address bound with a main address identifier, where the main address identifier is used to mark a page resource address that needs to be read at the current time.
And the sending subunit is configured to, after sending the web page access request based on the page resource address, rebind the primary address identifier to another page resource address in the resource address set except the page resource address.
Optionally, as shown in fig. 6, the page resource obtaining apparatus further includes:
a reading unit 506, configured to read successful access times of each page resource address in the resource address set, where the successful access times of each page resource address represent an accumulated time for which a corresponding page resource is rendered in the terminal interface.
A determining unit 507, configured to determine, in the resource address set, one of the page resource addresses with the largest number of successful accesses.
A binding unit 508, configured to bind the primary address identifier with the page resource address with the largest number of successful accesses.
Optionally, as shown in fig. 7, the page resource obtaining apparatus further includes:
a switching unit 509, configured to switch the network connection mode at the current time if the response information returned based on each page resource address carries a webpage error code.
A second returning unit 510, configured to return to execute the obtaining of one page resource address in the resource address set, and issue a web page access request based on the page resource address.
Optionally, as shown in fig. 8, the page resource obtaining apparatus further includes:
a third obtaining unit 511, configured to obtain a preset mailbox address if the response information returned based on each page resource address all carries a webpage error code.
A generating unit 512, configured to generate alarm information about the set of resource addresses.
A sending unit 513, configured to send the alarm information to the mailbox address, where the alarm information is used to notify the operation and maintenance staff of the mobile application to perform troubleshooting on each page resource corresponding to the resource address set.
Fig. 9 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 9, the terminal device 9 of this embodiment includes: a processor 90, a memory 91 and a computer program 92, such as a page resource acquisition program, stored in said memory 91 and operable on said processor 90. The processor 90, when executing the computer program 92, implements the steps in the above-described embodiments of the page resource obtaining method, such as the steps 101 to 105 shown in fig. 1. Alternatively, the processor 90, when executing the computer program 92, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the units 501 to 505 shown in fig. 5.
Illustratively, the computer program 92 may be partitioned into one or more modules/units that are stored in the memory 91 and executed by the processor 90 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 92 in the terminal device 9.
The terminal device 9 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 90, a memory 91. Those skilled in the art will appreciate that fig. 9 is only an example of a terminal device 9, and does not constitute a limitation to the terminal device 9, and may include more or less components than those shown, or combine some components, or different components, for example, the terminal device may also include an input-output device, a network access device, a bus, etc.
The Processor 90 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 91 may be an internal storage unit of the terminal device 9, such as a hard disk or a memory of the terminal device 9. The memory 91 may also be an external storage device of the terminal device 9, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 9. Further, the memory 91 may also include both an internal storage unit and an external storage device of the terminal device 9. The memory 91 is used for storing the computer program and other programs and data required by the terminal device. The memory 91 may also be used to temporarily store data that has been output or is to be output.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (6)

1. A method for acquiring page resources is characterized by comprising the following steps:
acquiring a resource address set corresponding to a selected control according to a received control selection instruction, wherein the resource address set comprises a plurality of page resource addresses, and the storage paths pointed by the page resource addresses are different but the page resources are the same; the method comprises the following steps that an application program page operated by the mobile terminal comprises a plurality of controls, and each control is used for providing a page jump function for a user;
acquiring one page resource address in the resource address set, and sending a webpage access request based on the page resource address, wherein the method comprises the following steps: determining the page resource address bound with a main address identifier in the resource address set, wherein the main address identifier is used for marking the page resource address required to be read at the current moment; after a webpage access request based on the page resource address is sent out, the main address identification is bound to another page resource address except the page resource address in the resource address set again; when the page resource address is bound again, sequentially binding each page resource address with the main address identifier according to the arrangement sequence of each page resource address in the resource address set;
receiving response information about the web page access request;
if the response information carries a webpage error code, returning to execute the acquisition of one page resource address in the resource address set, and sending a webpage access request based on the page resource address;
if the response information does not carry the webpage error code, rendering the webpage resources in a terminal interface based on the response information;
after the obtaining of the resource address set corresponding to the selected control according to the received control selection instruction and before the obtaining of one page resource address in the resource address set, the method further includes:
reading the successful access times of each page resource address in the resource address set, wherein the successful access times of each page resource address represent the accumulation times of rendering of the corresponding page resource in the terminal interface;
determining one page resource address with the maximum number of successful accesses in the resource address set;
and binding the main address identification with the page resource address with the maximum number of successful accesses.
2. The page resource acquisition method of claim 1, further comprising:
if the response information returned based on each page resource address carries a webpage error code, switching the network connection mode at the current moment;
and returning and executing the acquired page resource address in the resource address set, and sending a webpage access request based on the page resource address.
3. The page resource acquisition method of claim 1, further comprising:
if the response information returned based on each page resource address carries a webpage error code, acquiring a preset mailbox address;
generating alarm information about the set of resource addresses;
and sending the alarm information to the mailbox address, wherein the alarm information is used for notifying operation and maintenance personnel of the mobile application to carry out troubleshooting on each page resource corresponding to the resource address set.
4. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
acquiring a resource address set corresponding to a selected control according to a received control selection instruction, wherein the resource address set comprises a plurality of page resource addresses, and the storage paths pointed by the page resource addresses are different but the page resources are the same; the method comprises the following steps that an application program page operated by the mobile terminal comprises a plurality of controls, and each control is used for providing a page jump function for a user;
acquiring one page resource address in the resource address set, and sending a webpage access request based on the page resource address, wherein the method comprises the following steps: determining the page resource address bound with a main address identifier in the resource address set, wherein the main address identifier is used for marking the page resource address required to be read at the current moment; after a webpage access request based on the page resource address is sent out, the main address identification is bound to another page resource address except the page resource address in the resource address set again; when the page resource address is bound again, sequentially binding each page resource address with the main address identifier according to the arrangement sequence of each page resource address in the resource address set;
receiving response information about the web page access request;
if the response information carries a webpage error code, returning to execute the acquisition of one page resource address in the resource address set, and sending a webpage access request based on the page resource address;
if the response information does not carry the webpage error code, rendering the webpage resources in a terminal interface based on the response information;
when the processor executes the computer program, the following steps are also realized:
reading the successful access times of each page resource address in the resource address set, wherein the successful access times of each page resource address represent the accumulation times of rendering of the corresponding page resource in the terminal interface;
determining one page resource address with the maximum number of successful accesses in the resource address set;
and binding the main address identification with the page resource address with the maximum number of successful accesses.
5. The terminal device of claim 4, wherein the processor, when executing the computer program, further performs the steps of:
if the response information returned based on each page resource address carries a webpage error code, switching the network connection mode at the current moment;
and returning and executing the acquired page resource address in the resource address set, and sending a webpage access request based on the page resource address.
6. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 3.
CN201710882749.7A 2017-09-26 2017-09-26 Page resource obtaining method and terminal equipment Active CN107832329B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710882749.7A CN107832329B (en) 2017-09-26 2017-09-26 Page resource obtaining method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710882749.7A CN107832329B (en) 2017-09-26 2017-09-26 Page resource obtaining method and terminal equipment

Publications (2)

Publication Number Publication Date
CN107832329A CN107832329A (en) 2018-03-23
CN107832329B true CN107832329B (en) 2020-11-13

Family

ID=61643508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710882749.7A Active CN107832329B (en) 2017-09-26 2017-09-26 Page resource obtaining method and terminal equipment

Country Status (1)

Country Link
CN (1) CN107832329B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109086207B (en) * 2018-08-02 2023-04-14 平安科技(深圳)有限公司 Page response fault analysis method, computer readable storage medium and terminal device
CN109242977B (en) * 2018-08-06 2024-01-16 百度在线网络技术(北京)有限公司 Webpage rendering method, device and storage medium
CN109544267B (en) * 2018-10-19 2024-04-26 中国平安人寿保险股份有限公司 Resource acquisition method, device, computer equipment and storage medium
CN109522124B (en) * 2018-11-19 2021-12-17 郑州云海信息技术有限公司 Storage management system loading method, device, equipment and readable storage medium
CN109981595B (en) * 2019-03-05 2022-04-12 网宿科技股份有限公司 Resource acquisition method, resource return method, server and storage medium
CN110096659B (en) * 2019-03-27 2021-08-20 北京三快在线科技有限公司 Page display method, device and equipment and readable storage medium
CN112218131A (en) * 2019-07-09 2021-01-12 中国移动通信集团吉林有限公司 Set top box working method and device, electronic equipment and computer readable storage medium
CN110839066B (en) * 2019-10-30 2022-07-15 金蝶软件(中国)有限公司 Data processing method and related equipment
CN111552900B (en) * 2020-04-30 2023-11-21 北京大米科技有限公司 Access control method, device, readable storage medium and electronic equipment
CN113703780B (en) * 2020-05-22 2024-04-19 广州虎牙科技有限公司 Decompilation detection and webpage resource data sending method, device, equipment and medium
CN112035339A (en) * 2020-07-28 2020-12-04 长沙市到家悠享网络科技有限公司 Page testing method, device and equipment
CN114281459B (en) * 2021-12-22 2024-04-16 南京欧珀软件科技有限公司 Resource acquisition method and related product

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103166980A (en) * 2011-12-08 2013-06-19 腾讯科技(深圳)有限公司 Internet data pulling method and system
CN105915639A (en) * 2016-06-06 2016-08-31 腾讯科技(深圳)有限公司 Page access method and apparatus thereof

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188293B (en) * 2011-12-28 2014-12-24 腾讯科技(深圳)有限公司 Method and system for allowing mobile terminal to access webpage
US9059938B1 (en) * 2012-09-17 2015-06-16 Amazon Technologies, Inc. Managing requests of website servers
CN103124265A (en) * 2013-01-31 2013-05-29 深信服网络科技(深圳)有限公司 Method for visiting websites and gateway device
CN104184762B (en) * 2013-05-23 2019-02-15 腾讯科技(深圳)有限公司 A kind of server failure information feedback method and system
US10063617B2 (en) * 2015-09-22 2018-08-28 Facebook, Inc. Error correction using state information of data
CN106851758B (en) * 2017-03-17 2021-03-23 Oppo广东移动通信有限公司 Communication network switching method and terminal equipment
CN107154963B (en) * 2017-03-31 2021-01-29 北京猎豹移动科技有限公司 Request processing method and device and electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103166980A (en) * 2011-12-08 2013-06-19 腾讯科技(深圳)有限公司 Internet data pulling method and system
CN105915639A (en) * 2016-06-06 2016-08-31 腾讯科技(深圳)有限公司 Page access method and apparatus thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于 Web 用户浏览行为的统计异常检测";谢 逸 等;《软件学报》;20070430;第18卷(第4期);第967-977页 *

Also Published As

Publication number Publication date
CN107832329A (en) 2018-03-23

Similar Documents

Publication Publication Date Title
CN107832329B (en) Page resource obtaining method and terminal equipment
EP3968677B1 (en) Profile download method and system, and related device
CN111464355A (en) Method and device for controlling expansion capacity of Kubernetes container cluster and network equipment
KR101781339B1 (en) Method and device for updating client
US9705977B2 (en) Load balancing for network devices
CN104333548B (en) The method and system of local service are accessed in https webpages
US10567492B1 (en) Methods for load balancing in a federated identity environment and devices thereof
CN110213331B (en) Service request processing method, terminal device, electronic device and storage medium
CN112039710B (en) Service fault processing method, terminal equipment and readable storage medium
CN111752770A (en) Service request processing method, system, computer device and storage medium
US9344363B2 (en) Information processing system, relay device, information processing device, and information processing method
CN112818270B (en) Data cross-domain transfer method and device and computer equipment
CN110870286B (en) Fault tolerance processing method and device and server
EP3682328A1 (en) Alternative service pathway for service application
CN117591294A (en) Service dynamic load access method and device, internet of things platform and medium
CN109479214B (en) Load balancing method and related device
CN113596105B (en) Content acquisition method, edge node and computer readable storage medium
CN110769016A (en) File uploading method and computer storage medium
CN113676894B (en) Service processing method and equipment
CN114912097A (en) Certificate verification method and device, electronic equipment and storage medium
CN110474787B (en) Node fault detection method and device
CN113239396A (en) Data access system, method, device, computer equipment and medium
CN105142130B (en) A kind of information processing method and electronic equipment
CN111506846A (en) Web page generation method and device, electronic equipment and storage medium
CN110224973B (en) Multi-server parallel implementation method based on programming game, electronic equipment and medium

Legal Events

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