Webpage access method and related equipment
By configuring and associated storage-adapted target agents for the target web page and sending them to the web page server when the user accesses, the problem of user access inconvenience caused by the web page server being only adapted to the old environment is solved, and access convenience for users' diverse browser selection is achieved.
Patent Information
- Application Number
- CN202311603474.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-28
- Publication Date
- 2025-05-30
AI Technical Summary
In the prior art, some web servers only adapt to old business environments, resulting in users being unable to access web pages normally using newer browsers or environments, resulting in inconvenience to users' access.
By configuring the target agent corresponding to each destination web page and storing it with the domain name of the destination web page, the adapted target agent is sent to the web server when responding to user access to ensure that the web server returns normal web page data.
It enables users to access web pages that are only suitable for old environments without using a specific browser, bringing users more browser choices and solving the problem of inconvenience in access by users.
Smart Images

Figure CN120067471A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer and communication technologies. Specifically, it relates to a web page access method and related devices. Background Art
[0002] On the Internet, there are many different types of browsers, including desktop browsers, mobile browsers, screen readers, etc. To ensure that web pages can run properly on various browsers, different user agents are needed to adapt to different clients and operating ends.
[0003] The current problem is that the user agent of the browser needs to match the environment of the web server in order to achieve normal access. Otherwise, the web server cannot return normal web page data. However, some web servers only adapt to relatively old business environments, and it is impossible to access the corresponding web pages normally using other newer business environments, resulting in inconvenient user access. Summary of the Invention
[0004] Embodiments of this application provide a web page access method and related devices, which can at least to some extent overcome the problem that some web servers in the prior art only adapt to old environments, resulting in inconvenient user access.
[0005] Other features and advantages of this application will become apparent through the following detailed description, or be learned in part through the practice of this application.
[0006] According to one aspect of the embodiments of this application, a web page access method is provided, including: configuring a target proxy corresponding to each target web page, and associatively storing it, where the target proxy is a user agent compatible with the target web page; in response to a user's access to a web page, sending the corresponding target proxy to the web server and receiving the information returned by the web server.
[0007] In some embodiments of this application, the configuring a compatible proxy corresponding to each target web page and associatively storing it specifically includes: determining a target proxy corresponding to each target web page; associatively storing the domain name of the target web page with the corresponding target proxy.
[0008] In some embodiments of this application, the determining a target proxy corresponding to each target web page specifically includes: accessing each of the target web pages, crawling the web page information of the target web page; and determining the target proxy corresponding to the target web page according to the web page information of the target web page.
[0009] In some embodiments of the present application, the determining of the target proxy corresponding to each target web page specifically includes: configuring a plurality of different compatible proxies, where the compatible proxies are respectively used to be compatible with different access environments; accessing the target web page, sequentially sending different compatible proxies to the target web page, and obtaining the information returned by the target web page; determining the corresponding target proxy according to the information returned by the target web page.
[0010] In some embodiments of the present application, the access environment includes an operating system and / or a browser kernel.
[0011] In some embodiments of the present application, the responding to the user's access to a web page, sending the corresponding target proxy to the web server, and receiving the information returned by the web server specifically includes:
[0012] Responding to the user's access to a web page, determining the target proxy corresponding to the web page; sending the target proxy corresponding to the web page to the web server; receiving the information returned by the web server.
[0013] In some embodiments of the present application, the responding to the user's access to a web page and determining the target proxy corresponding to the web page specifically includes: responding to the user's access to a web page, determining whether the web page is a target web page; if the web page is a target web page, determining the user agent associated and stored with the web page as the target proxy; if the web page is not a target web page, determining the default user agent as the target proxy.
[0014] According to one aspect of the embodiments of the present application, there is provided a web page access device, where the web page access device includes: a target proxy configuration module, configured to configure the target proxy corresponding to each target web page and associate and store it, where the target proxy is a user agent compatible with the target web page; a target proxy sending module, configured to, in response to the user's access to a web page, send the corresponding target proxy to the web server and receive the information returned by the web server.
[0015] In some embodiments of the present application, the target proxy configuration module specifically includes: a target proxy pairing sub-module, configured to determine the target proxy corresponding to each target web page; a domain name proxy association sub-module, configured to associate and store the domain name of the target web page with the corresponding target proxy.
[0016] In some embodiments of the present application, the target proxy pairing sub-module specifically includes: a web page information crawling unit, configured to access each of the target web pages and crawl the web page information of the target web page; a web page information analysis unit, configured to determine the target proxy corresponding to the target web page according to the web page information of the target web page.
[0017] In some embodiments of the present application, the target proxy pairing sub-module specifically includes: a compatible proxy configuration unit, configured to configure a plurality of different compatible proxies, and the compatible proxies are respectively used to be compatible with different access environments; a target web page access unit, configured to access the target web page, and sequentially send different compatible proxies to the target web page to obtain information returned by the target web page; a target proxy determination unit, configured to determine a corresponding target proxy according to the information returned by the target web page.
[0018] In some embodiments of the present application, the access environment includes an operating system and / or a browser kernel.
[0019] In some embodiments of the present application, the target proxy sending module specifically includes: a target proxy determination sub-module, configured to determine a target proxy corresponding to the web page in response to a user's access to the web page; a target proxy sending sub-module, configured to send the target proxy corresponding to the web page to the web page server; a return information receiving sub-module, configured to receive information returned by the web page server.
[0020] In some embodiments of the present application, the target proxy determination sub-module specifically includes: a target web page confirmation unit, configured to determine whether the web page is a target web page in response to a user's access to the web page; a first target proxy unit, configured to, if the web page is a target web page, determine the user agent associated with and stored for the web page as the target proxy; a second target proxy unit, configured to, if the web page is not a target web page, determine the default user agent as the target proxy.
[0021] According to one aspect of the embodiments of the present application, there is provided a computer-readable medium, on which a computer program is stored, and when the computer program is executed by a processor, the web page access method as described in the above embodiments is implemented.
[0022] According to one aspect of the embodiments of the present application, there is provided an electronic device, including: one or more processors; a storage device, configured to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the web page access method as described in the above embodiments.
[0023] In the technical solutions provided by some embodiments of the present application, by pre-configuring the most suitable and most compatible target proxy for the target web page and associating it for storage. When accessing the target web page, the pre-configured target proxy is sent to the web server, so that the web server can return normal web page data, enabling users to normally access web pages that are only adapted to a specified environment (such as an old environment), that is, it is possible to access an old business system without using a fixed browser, bringing more browser usage options to users, and solving the problem in the prior art that some web servers are only adapted to old environments, resulting in inconvenient user access. At the same time, during use, users can simulate the user agent on a specific device to meet their diverse web access needs.
[0024] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application and used together with the specification to explain the principles of the present application. Obviously, the accompanying drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts. In the drawings:
[0026] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied is shown.
[0027] Figure 2 A flowchart of a web page access method provided by an embodiment of the present application is shown.
[0028] Figure 3 Shows according to Figure 2 A specific implementation flowchart of step S100 in the web page access method shown in the corresponding embodiment is shown.
[0029] Figure 4 Shows according to Figure 2 A specific implementation flowchart of step S200 in the web page access method shown in the corresponding embodiment is shown.
[0030] Figure 5 A schematic diagram of the structure of a web page access device provided by an embodiment of the present application is shown.
[0031] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present application is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0032] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more complete and comprehensive, and will fully convey the concept of the example embodiments to those skilled in the art.
[0033] In addition, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of this application. However, those skilled in the art will realize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be used. In other cases, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of this application.
[0034] The block diagrams shown in the drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0035] The flowcharts shown in the drawings are merely illustrative and do not necessarily include all the content and operations / steps, nor do they necessarily need to be executed in the described order. For example, some operations / steps can be decomposed, while some operations / steps can be combined or partially combined, so the actual execution order may change according to the actual situation.
[0036] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of this application can be applied is shown. As Figure 1 shown, the system architecture may include a client 100 and a server 200.
[0037] A browser is installed on the client 100, which is a terminal device for the user to operate the browser. It can be a mobile terminal, a notebook, a desktop computer, a wearable device, a digital camera, or any other terminal device with a browser installed. The server 200 is a server for running web pages. It is used to receive access requests from the client 100 and return web page data to the client. It can be a data center, a server cluster, a server, or a desktop workstation, etc.
[0038] The user can configure the browser installed on the client 100, configure the target proxy corresponding to each target web page, and then associate and store it in the Preferences file in the user data directory of the browser. The storage form can be key-value pairs. When the user needs to access a target web page, the user performs an operation to access the web page on the client 100 (such as entering the web page URL, entering the web page domain name, clicking on a web page link, and triggering web page jumps through actions such as swiping, double-clicking, and shaking). In response to the user's operation to access the web page, the client 100 determines the target proxy corresponding to the web page and sends it to the server 200 together with the access request. After receiving the access request, the server 200 returns the corresponding web page information to the client 100 according to the received target proxy. After receiving the server 200, the client 100 displays it to the user through the output device.
[0039] It should be noted that the client 100 and the server 200 can be smartphones, tablet computers, laptop computers, desktop computers, etc., but are not limited thereto. The client 100 and the server 200 can be connected through Bluetooth, USB (Universal Serial Bus), or other communication connection methods, and the present invention does not make any restrictions here.
[0040] The following elaborates in detail on the implementation details of the technical solution of the embodiments of the present application:
[0041] Figure 2 The flowchart of a web page access method according to an embodiment of the present application is shown. This web page access method can be executed by a server, and the server can be Figure 1 the server shown in
[0042] Referring to Figure 2 shown, this web page access method at least includes:
[0043] Step S100, configure the target proxy corresponding to each target web page, and associate and store it. The target proxy is a user agent compatible with the target web page.
[0044] Step S200, in response to the user's access to the web page, send the corresponding target proxy to the web server, and receive the information returned by the web server.
[0045] In an embodiment of the present application, by pre-configuring a target proxy that is most suitable and compatible with the target web page and associating it for storage. When accessing the target web page, the pre-configured target proxy is sent to the web server, enabling the web server to return normal web page data, allowing users to access web pages that are only adapted to a specified environment (such as an old environment) normally, that is, accessing the old business system without using a fixed browser, which brings more browser usage options to users and solves the problem in the prior art that some web servers only adapt to old environments, resulting in inconvenient access for users. At the same time, during use, users can simulate the user agent on a specific device to meet their diverse web access needs.
[0046] In step S100, for a target web page that requires a specific environment to access, a corresponding target proxy is pre-configured for it, that is, simulating the user agent of the corresponding specific environment, so that the web server believes that the access end has the characteristic environment and meets its requirements.
[0047] Specifically, in some embodiments, the specific implementation manner of step S100 can refer to Figure 3 . Figure 3 is the detailed description of step S100 in the web access method shown in the corresponding embodiment. In the web access method, step S100 may include the following steps: Figure 2
[0048] Step S110, determine the target proxy corresponding to each target web page.
[0049] Step S120, associate and store the domain name of the target web page with the corresponding target proxy.
[0050] In an embodiment of the present application, first determine the user agent that can simulate the specific operating environment required by the server of the target web page, that is, the corresponding target proxy, and then associate and store the domain name of the target web page and the corresponding target proxy to achieve the binding of the target web page and the corresponding target proxy.
[0051] In step S110, there are various ways to determine the target proxy corresponding to each target web page. Specifically, the following embodiments can be referred to.
[0052] Figure 3 Specifically, in some embodiments, the specific implementation manner of step S110 can refer to the following embodiments. This embodiment is the detailed description of step S110 in the web access method shown in the corresponding embodiment. In the web access method, step S110 may include the following steps:
[0053]
[0054] Access each of the target web pages and crawl the web page information of the target web page.
[0054] Determine the target proxy corresponding to the target web page according to the web page information of the target web page.
[0055] In an embodiment of the present application, the web page information of the target web page may be crawled first, and then according to its web page information, the required operating environment is determined, and then the target proxy corresponding to the target web page is determined.
[0056] For the specific determination method of the operating environment required by the target web page, a neural network model may be adopted, and the neural network model is used to learn the association between the web page information and the required operating environment, so as to realize the judgment of the operating environment required by each target web page, and then determine the target proxy corresponding to the target web page.
[0057] Specifically, the method of using the neural network model to determine the operating environment may be that after the web page information of the crawled target web page is vectorized into a web page information vector, it is input into the operating environment judgment model, and the user agent model outputs the corresponding operating environment, and then the corresponding target proxy is determined according to the operating environment.
[0058] Specifically, the training method of the above-mentioned environment judgment model specifically includes:
[0059] Obtain a web page information vector sample set, the web page information vector sample set contains a plurality of web page information vector samples, and each web page information vector sample is labeled with the corresponding operating environment.
[0060] Input the web page information vector samples in the web page information vector sample set into the environment judgment model one by one, and obtain the operating environment output by the environment judgment model.
[0061] According to the output operating environment and the labeled operating environment, perform parameter update until a predetermined condition is met, stop training, and obtain a trained environment judgment model.
[0062] In this embodiment, in order to analyze and learn the web page information vector, the convolutional neural network can well capture various environmental features contained in the web page information vector itself, mine the correlation between web page information vectors, and then more comprehensively and meticulously analyze and judge various environmental factors required by the target web page, and has strong generalization ability and robustness. When training, there can be various conditions for marking the stop of training, that is, the conditions for the model to be trained well. Specifically, the following embodiments can be referred to.
[0063] Specifically, in some embodiments, the specific implementation manner of the training of the above-mentioned environment judgment model can refer to the following embodiments. In this embodiment, according to the output operating environment and the output operating environment, perform parameter update until a predetermined condition is met, stop training, and obtain a trained environment judgment model, which may include the following steps:
[0064] If in the web page information vector sample set, only less than a predetermined number of web page information vector samples are input into the environment judgment model and the output running environment is consistent with the marked running environment, then parameter update is performed on the environment judgment model.
[0065] If in the web page information vector sample set, more than a predetermined number of web page information vector samples are input into the environment judgment model and the output running environment is consistent with the marked running environment, then a predetermined end condition is reached, training is ended, and a trained environment judgment model is obtained.
[0066] Specifically, in some other embodiments, the specific implementation manner of the above-mentioned environment judgment model training can refer to the following embodiments. In this embodiment, according to the output running environment and the output running environment, parameter update is performed until a predetermined condition is met, training is stopped, and a trained environment judgment model is obtained, which may include the following steps:
[0067] Determine a loss function according to the running environment output by the model and the marked running environment.
[0068] Perform parameter update on the environment judgment model according to the loss function until a predetermined end condition is reached, training is ended, and a trained environment judgment model is obtained.
[0069] In this embodiment, the loss function reaching the predetermined end condition may be that the loss function converges or the loss function is less than a predetermined loss (for example, 0.001).
[0070] In the above embodiment, log text recognition is performed through a neural network model obtained through multiple trainings to obtain corresponding judgment results. The neural network model is obtained through multiple trainings. The more samples it is trained with, the more accurate the results are. It basically does not require maintenance during operation, also reduces the maintenance cost, improves the efficiency and accuracy of traffic recognition, and reduces the false alarm rate.
[0071] It should be noted that in some other embodiments, the web page information vector sample set can also be divided into a training set, a test set, and a validation set for training, and the number of folds of K-fold cross-validation is taken.
[0072] Specifically, in some other embodiments, the specific implementation manner of step S110 can refer to the following embodiments. This embodiment is based on Figure 3 The detailed description of step S110 in the web page access method shown in the corresponding embodiment. In the web page access method, step S110 may include the following steps:
[0073] Configure a plurality of different compatible proxies, and the compatible proxies are respectively used to be compatible with different access environments.
[0074] Access the target web page, and sequentially send different compatible proxies to the target web page to obtain the information returned by the target web page.
[0075] Determine the corresponding target proxy according to the information returned by the target web page.
[0076] In an embodiment of the present application, by configuring multiple compatible proxies for a target web page to be compatible with different access environments, and then using the method of continuous trial and error with multiple compatible proxies to determine the corresponding target proxy. Specifically, first configure multiple compatible proxies for the target web page, and then send the multiple compatible proxies to the server of the target web page one by one. The web server will perform corresponding processing according to the compatible proxy and return the corresponding information. At this time, obtain the information returned by the web server, and select an optimal user agent from the compatible proxies according to the information returned by the target web page, and determine it as the corresponding target proxy.
[0077] In an embodiment of the present application, the specific method of selecting an optimal user agent from the compatible proxies according to the information returned by the target web page and determining it as the corresponding target proxy can be to use the compatible proxy that obtains the most information returned by the server of the target web page as the corresponding target proxy. This implementation method only needs to count the amount of information returned (by the target web page) corresponding to each compatible proxy, and can more accurately determine the corresponding target proxy. The determination process is simple and efficient, which can improve the efficiency of the configuration process and save the resources and time consumed in the configuration process.
[0078] In another embodiment of the present application, the specific method of selecting an optimal user agent from the compatible proxies according to the information returned by the target web page and determining it as the corresponding target proxy can also be to first crawl the web information of the target web page, and then compare it with the information returned by the target web page corresponding to each compatible proxy to determine the information similarity, and determine the compatible proxy corresponding to the returned information with the highest similarity as the corresponding target proxy.
[0079] The determination of information similarity can be specifically compared according to dimensions such as the amount of information and the content of the information, and the similarity is comprehensively determined. By determining the corresponding target proxy through similarity, the optimal user agent can be obtained more accurately, and excessive redundant information such as advertisement information and malicious information in the returned information can be avoided.
[0080] In yet another embodiment of the present application, the specific method of selecting an optimal user agent from the compatible proxies according to the information returned by the target web page and determining it as the corresponding target proxy can also be to use a neural network model to learn the optimal returned information of each target website through the neural network model to realize the selection of the optimal target proxy.
[0081] Specifically, the method for determining a target proxy using a neural network model may be as follows: The return information corresponding to each compatible proxy of a target web page is formed into a return information group. After vectorizing the return information group into a return information matrix, it is input into the user agent model. After the user agent model determines the adaptation degree of each compatible proxy, the corresponding target proxy is determined according to the adaptation degree.
[0082] Specifically, the training method of the above user agent model specifically includes:
[0083] Obtain the return information matrix sample set, where the return information matrix sample set contains multiple return information matrix samples, and each return information matrix sample is marked with a corresponding target proxy.
[0084] Input each of the return information matrix samples into the user agent model to obtain the target proxy.
[0085] According to the output target proxy and the marked target proxy, update the parameters of the user agent model until a predetermined end condition is reached, end the training, and obtain the trained user agent model.
[0086] In the embodiments of the present application, during training, a return information matrix sample set containing multiple return information matrix samples can be obtained first, and each return information matrix sample is marked with a corresponding target proxy; then the multiple return information matrix samples are divided into a training set, a validation set, and a test set according to a predetermined ratio, and then the parameters of the user agent model are adjusted and determined according to the return information matrix samples included in the training set, the validation set, and the test set to obtain the trained user agent model.
[0087] During model training, the return information matrix sample set can be divided into a training set, a validation set, and a test set, and then training is performed based on the training set, validation is performed based on the validation set, and testing is performed based on the test set to obtain the trained user agent model.
[0088] Before training based on the training set, the return information matrix samples in the training set can be preprocessed first. The preprocessing includes processing such as normalization, data augmentation, and category encoding.
[0089] After obtaining the enhanced training set, the user agent model can be trained based on the enhanced training set to update the parameters and weights in the network.
[0090] Specifically, the return information matrix samples in the training set are input into the user agent model to obtain the target agent output by the user agent model. The target agent is compared with the target agent, and the loss function is calculated. Then, the stochastic gradient descent method is used to minimize the loss function, and the parameters and weights in the user agent model are updated by backpropagation until the loss function meets the predetermined conditions, such as convergence or being less than a predetermined threshold.
[0091] In some embodiments, the target agent includes a target profile and target profile parameters, and the target agent may include at least one of a profile label and a profile parameter label. When calculating the loss function, it is obtained by comparing the target profile with the profile label and / or comparing the target profile parameters with the profile parameter labels.
[0092] After training, the user agent network with updated parameters based on the training set can be verified based on the validation set. Specifically, the user agent network is debugged based on the validation set data. When the loss function meets the predetermined conditions, the model parameters at this stage are output. If the loss function does not meet the predetermined conditions, hyperparameters such as the learning rate are automatically adjusted, and the next round of network model training is performed.
[0093] When the loss function calculated on the validation set meets the predetermined conditions, the parameters and weights can be retained, and then the retained parameters are tested based on the test set. Specifically, the test set data is input so that the user agent network with retained parameters and weights can output the target agent and the model weights. According to the comparison of the model losses and the corresponding weights in multiple rounds, the model weights with the minimum loss are output to determine the trained user agent model.
[0094] After obtaining the trained user agent model, the segmentation of the three-dimensional organ model can be completed based on the user agent model.
[0095] In addition, data augmentation may not be performed for the data input in the validation set and the test set.
[0096] It should be noted that in the above embodiments, the access environment includes an operating system and / or a browser kernel.
[0097] In some embodiments of the present application, in addition to being related to conventional access environments such as operating systems and browser kernels, the determination of the target agent is also closely related to the network security requirements of enterprises, institutions, and relevant departments. For users with high network security requirements, the access to the web server requires a dedicated user agent, that is, the target agent is also closely related to network security requirements.
[0098] For web pages that require a dedicated user agent, the configuration of its target agent cannot be carried out by crawling web page information and trying multiple accesses for error correction, and can only be carried out in a special way.
[0099] Specifically, in some embodiments, its configuration can be directly configured by professional operation and maintenance personnel in a browser; it can also be configured by connecting to a dedicated management platform, and the management platform issues the corresponding target proxy. The browser stores the associated target proxy and the domain name of the target web page; it can also obtain the corresponding target proxy through a dedicated storage medium (such as an optical disc, a floppy disk, and a USB flash drive, etc.) and store it in association with the domain name of the target web page.
[0100] In step S120, through the associated storage of the web page domain name and the target proxy, the binding between the web page and the target proxy is achieved. The domain name is the unique address of the web page server. Through the associated storage of the domain name and the target proxy, the accuracy of the target proxy sent to the web page server can be ensured, and the inconvenience caused by changes such as the website address can be avoided.
[0101] In step S200, when accessing the target web page, the pre-configured target proxy is sent to the web page server, so that the web page server can return normal web page data, enabling the user to access various web pages that are only adapted to a specific environment normally. That is, during use, the user can simulate the user agent on a specific device to meet their diverse web page access needs.
[0102] Specifically, in some embodiments, the specific implementation manner of step S200 can refer to Figure 4 。 Figure 4 is based on Figure 2 the detailed description of step S200 in the web page access method shown in the corresponding embodiment. In the web page access method, step S200 may include the following steps:
[0103] Step S210, in response to the user's access to the web page, determine the target proxy corresponding to the web page.
[0104] Step S220, send the target proxy corresponding to the web page to the web page server.
[0105] Step S230, receive the information returned by the web page server.
[0106] In the embodiments of the present application, when the user operates to access a certain web page, first determine the target proxy corresponding to the web page, and then send the corresponding target proxy to the web page server. The web page server returns the corresponding web page information to the browser according to the target proxy. At this time, the browser receives the information returned by the web page server.
[0107] In step S210, the web page accessed by the user is not necessarily a web page that requires a specific environment. For different web pages, different target proxies need to be sent to the web page server to adapt to different environments.
[0108] Specifically, in some embodiments, the specific implementation of step S210 can be referred to the following embodiments. This embodiment is based on Figure 4 the detailed description of step S210 in the web access method shown in the corresponding embodiment. In the web access method, step S210 may include the following steps:
[0109] In response to the user's access to a web page, determine whether the web page is a target web page.
[0110] If the web page is a target web page, determine the user agent associated with the web page as the target agent.
[0111] If the web page is not a target web page, determine the default user agent as the target agent.
[0112] In the embodiments of the present application, after the user operates to access a certain web page, first determine whether the web page is a target web page. For a target web page, it is necessary to find the user agent associated with it (i.e., the target agent specifically configured for it) as the target agent. For a non-target web page, only the default user agent needs to be determined as the target agent. The default user agent is the default user agent of the browser, which is more suitable for the browser itself and the running environment where the browser is located, and can obtain the content most suitable for the browser to the greatest extent.
[0113] When determining whether the web page accessed by the user is a target web page, it can be determined by the web page domain name. In the above embodiment, the target agent corresponding to the target web page is stored in association with the domain name of the target web page. Therefore, in this embodiment, directly determining whether the web page accessed by the user is a target web page through the web page domain name will be simpler and more efficient. First, as long as the associated web page domain names are traversed to determine whether there is a web page accessed by the user, it can be determined whether it is a target web page. Second, whether the user jumps to the link by entering the website address, clicking the link or shaking the device, etc., before accessing the web page, it needs to be converted into a domain name through the domain name system before accessing. Therefore, determining whether the web page accessed by the user is a target web page through the domain name does not complicate the process of accessing the web page and reduces the burden on the browser.
[0114] After determining the target agent corresponding to the web page, the target agent corresponding to the web page can be sent to the web server, and the web server processes it according to the target agent and then returns the corresponding web page information to the browser. The browser receives the web page information returned by the web server and displays it.
[0115] The following introduces the device embodiments of the present application, which can be used to execute the web access method in the above embodiments of the present application. For the details not disclosed in the device embodiments of the present application, please refer to the embodiments of the above web access method of the present application.
[0116] Figure 5 The block diagram of a web access device according to an embodiment of the present application is shown.
[0117] Referring to Figure 5 As shown, a web access device 500 according to an embodiment of the present application includes: a target proxy configuration module 510 and a target proxy sending module 520.
[0118] Among them, the target proxy configuration module 510 is used to configure the target proxy corresponding to each target web page and store it in an associated manner. The target proxy is a user agent compatible with the target web page. The target proxy sending module 520 is used to, in response to a user's access to a web page, send the corresponding target proxy to the web server and receive the information returned by the web server.
[0119] In some embodiments of the present application, the target proxy configuration module 510 specifically includes: a target proxy pairing sub-module, which is used to determine the target proxy corresponding to each target web page; a domain name proxy association sub-module, which is used to store the domain name of the target web page and the corresponding target proxy in an associated manner.
[0120] In some embodiments of the present application, the target proxy pairing sub-module specifically includes: a web page information crawling unit, which is used to access each of the target web pages and crawl the web page information of the target web page; a web page information analysis unit, which is used to determine the target proxy corresponding to the target web page according to the web page information of the target web page.
[0121] In some embodiments of the present application, the target proxy pairing sub-module specifically includes: a compatible proxy configuration unit, which is used to configure multiple different compatible proxies, and the compatible proxies are respectively used to be compatible with different access environments; a target web page access unit, which is used to access the target web page and sequentially send different compatible proxies to the target web page to obtain the information returned by the target web page; a target proxy determination unit, which is used to determine the corresponding target proxy according to the information returned by the target web page.
[0122] In some embodiments of the present application, the access environment includes an operating system and / or a browser kernel.
[0123] In some embodiments of the present application, the target proxy sending module 520 specifically includes: a target proxy determination sub-module, which is used to, in response to a user's access to a web page, determine the target proxy corresponding to the web page; a target proxy sending sub-module, which is used to send the target proxy corresponding to the web page to the web server; a returned information receiving sub-module, which is used to receive the information returned by the web server.
[0124] In some embodiments of the present application, the target proxy determination sub-module specifically includes: a target web page confirmation unit, configured to determine whether the web page is a target web page in response to a user's access to the web page; a first target proxy unit, configured to, if the web page is a target web page, determine the user agent associated with and stored for the web page as the target proxy; and a second target proxy unit, configured to, if the web page is not a target web page, determine the default user agent as the target proxy.
[0125] In the embodiments of the present application, the most suitable and compatible target proxy for the target web page is pre-configured and stored in an associated manner. When accessing the target web page, the pre-configured target proxy is sent to the web server, so that the web server can return normal web page data, enabling the user to normally access web pages that are only adapted to a specified environment (such as an old environment), that is, the old business system can be accessed without using a fixed browser, which brings more browser usage options to the user and solves the problem in the prior art that some web servers only adapt to old environments, resulting in inconvenient user access. At the same time, during use, the user can simulate the user agent on a specific device to meet their diverse web access needs.
[0126] Figure 6 The structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application is shown.
[0127] It should be noted that Figure 6 The computer system of the electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.
[0128] As Figure 6 shown, the computer system includes a central processing unit (CPU) 1801, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1802 or the program loaded from the storage section 1808 into the random access memory (RAM) 1803, such as executing the method described in the above embodiments. In the RAM 1803, various programs and data required for system operation are also stored. The CPU 1801, ROM 1802, and RAM 1803 are connected to each other through a bus 1804. The input / output (I / O) interface 1805 is also connected to the bus 1804.
[0129] The following components are connected to the I / O interface 1805: an input section 1806 including a keyboard, a mouse, etc.; an output section 1807 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1808 including a hard disk, etc.; and a communication section 1809 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1809 performs communication processing via a network such as the Internet. A drive 1810 is also connected to the I / O interface 1805 as required. A removable medium 1811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1810 as required so that a computer program read from the same can be installed into the storage section 1808 as required.
[0130] Specifically, according to an embodiment of the present application, the processes described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product including a computer program carried on a computer-readable medium, the computer program including a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 1809, and / or installed from the removable medium 1811. When the computer program is executed by a central processing unit (CPU) 1801, various functions defined in the system of the present application are executed.
[0131] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. In the present application, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable computer program is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The computer program contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0132] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. Among them, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, as well as the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0133] The units involved in the embodiments described in this application can be implemented in software or in hardware, and the described units can also be provided in a processor. Among them, the names of these units do not, in some cases, constitute a limitation on the units themselves.
[0134] As another aspect, this application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the methods described in the above embodiments.
[0135] It should be noted that although several modules or units of a device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0136] From the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (such as a personal computer, a server, a touch terminal, or a network device, etc.) to execute the methods according to the embodiments of this application.
[0137] After considering the specification and practicing the embodiments disclosed herein, those skilled in the art will readily conceive of other embodiments of this application. This application is intended to cover any variations, uses, or adaptations of this application, which follow the general principles of this application and include known common general knowledge or conventional technical means in the technical field not disclosed in this application.
[0138] It should be understood that this application is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is only limited by the appended claims.
Claims
1. A web page access method, characterized in that, the web page access method includes: Configuring a target proxy corresponding to each target web page and associating and storing it, where the target proxy is a user agent compatible with the target web page; In response to a user's access to a web page, sending the corresponding target proxy to the web server and receiving the information returned by the web server.
2. The web page access method according to claim 1, characterized in that, the configuring a compatible proxy corresponding to each target web page and associating and storing it specifically includes: Determining a target proxy corresponding to each target web page; Associating and storing the domain name of the target web page with the corresponding target proxy.
3. The web page access method according to claim 2, characterized in that, the determining a target proxy corresponding to each target web page specifically includes: Accessing each of the target web pages and crawling the web page information of the target web page; Determining the target proxy corresponding to the target web page according to the web page information of the target web page.
4. The web page access method according to claim 2, characterized in that, the determining a target proxy corresponding to each target web page specifically includes: Configuring a plurality of different compatible proxies, where the compatible proxies are respectively used to be compatible with different access environments; Accessing the target web page and sequentially sending different compatible proxies to the target web page to obtain the information returned by the target web page; Determining the corresponding target proxy according to the information returned by the target web page.
5. The web page access method according to claim 4, characterized in that, the access environment includes an operating system and / or a browser kernel.
6. The web page access method according to claim 1, characterized in that, the in response to a user's access to a web page, sending the corresponding target proxy to the web server and receiving the information returned by the web server specifically includes: In response to a user's access to a web page, determining the target proxy corresponding to the web page; Sending the target proxy corresponding to the web page to the web server; Receiving the information returned by the web server.
7. The web page access method according to claim 6, characterized in that, the in response to a user's access to a web page, determining the target proxy corresponding to the web page specifically includes: In response to a user's access to a web page, determining whether the web page is a target web page; If the web page is a target web page, determining the user agent associated and stored with the web page as the target proxy; If the web page is not a target web page, determining the default user agent as the target proxy.
8. A web page access device, characterized in that, the web page access device includes: A target proxy configuration module for configuring a target proxy corresponding to each target web page and associating and storing it, where the target proxy is a user agent compatible with the target web page; A target proxy sending module for, in response to a user's access to a web page, sending the corresponding target proxy to the web server and receiving the information returned by the web server.
9. A computer-readable medium, on which a computer program is stored, characterized in that, when the computer program is executed by a processor, it implements the web page access method according to any one of claims 1 to 7.
10. An electronic device, characterized in that, including: One or more processors; A storage device for storing one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the web page access method according to any one of claims 1 to 7.