Page access method, device, medium, and electronic device
By obtaining geographical location and carrier information from the terminal to determine the user type, the problem of misjudgment of user type caused by untimely collection of IP addresses is solved, and more accurate data isolation and business processing are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DOUYIN VISION CO LTD
- Filing Date
- 2023-02-06
- Publication Date
- 2026-04-24
AI Technical Summary
In existing technologies, the untimely collection of IP addresses leads to misjudgment of user types, which affects the processing performance of application services.
By obtaining geographic location information and/or carrier information from the terminal, the user type is determined, and user type information is added to the access request, so that the load balancer server sends the request to the matching business server to achieve data isolation.
It reduced the probability of misidentification of user types, improved business processing efficiency, and achieved data isolation for different user types.
Smart Images

Figure CN116226565B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of electronic information technology, and more specifically, to a page access method, apparatus, medium, and electronic device. Background Technology
[0002] In application business scenarios, due to some pre-set restrictions, different types of users can use different application versions and business needs to achieve data isolation for different types of users.
[0003] In related technologies, user type is determined based on IP address. However, due to the continuous addition of IP addresses, there is a problem of untimely IP address recording, which can lead to misjudgment of user type. This, in turn, affects users to varying degrees when using the application, impacting business processing efficiency. Summary of the Invention
[0004] This summary section is provided to briefly introduce the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0005] In a first aspect, this disclosure provides a page access method applied to a terminal, the method comprising:
[0006] When the terminal accesses the target page, it is determined whether the terminal has permission to obtain reference information, which includes the geographical location information and / or operator information of the terminal.
[0007] If the terminal has permission to obtain the reference information, then the reference information is obtained;
[0008] Based on the reference information, determine the user type information of the terminal, and add the user type information to the access request for the target page;
[0009] The access request is sent to a load balancing server, which then sends the access request to a business server that matches the user type information obtained by parsing the access request. The business server then returns the target page to the terminal based on the access request.
[0010] Secondly, this disclosure provides a page access method applied to a load balancing server, the method comprising:
[0011] The system receives an access request for a target page sent by the terminal and parses the access request to obtain a parsing result.
[0012] If the parsing result includes user type information, the access request is sent to a business server that matches the user type information, so that the business server returns the target page to the terminal based on the access request;
[0013] The user type information is determined by the terminal through reference information obtained when it has the permission to obtain reference information. The reference information includes the geographical location information and / or operator information of the terminal.
[0014] Thirdly, this disclosure provides a page access device for use in a terminal, the device comprising:
[0015] The first determining module is used to determine whether the terminal has permission to obtain reference information when the terminal accesses the target page. The reference information includes the geographical location information and / or operator information of the terminal.
[0016] The first acquisition module is used to acquire the reference information when the terminal has the permission to acquire the reference information;
[0017] The second determining module is used to determine the user type information of the terminal based on the reference information, and add the user type information to the access request for the target page;
[0018] The first sending module is used to send the access request to a load balancing server, so that the load balancing server sends the access request to a business server that matches the user type information obtained by parsing the access request, so that the business server returns the target page to the terminal based on the access request.
[0019] Fourthly, this disclosure provides a page access device applied to a load balancing server, the device comprising:
[0020] The parsing module is used to receive access requests for a target page sent by the terminal and parse the access requests to obtain parsing results;
[0021] The second sending module is configured to, when the parsing result includes user type information, send the access request to a business server that matches the user type information, so that the business server returns the target page to the terminal based on the access request;
[0022] The user type information is determined by the terminal through reference information obtained when it has the permission to obtain reference information. The reference information includes the geographical location information and / or operator information of the terminal.
[0023] Fifthly, this disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect, or the steps of the method described in the second aspect.
[0024] Sixthly, this disclosure provides an electronic device, comprising:
[0025] A storage device on which computer programs are stored;
[0026] A processing device for executing the computer program in the storage device to implement the steps of the method of the first aspect, or the steps of the method of the second aspect.
[0027] Through the above technical solution, when the terminal has the authority to obtain reference information, it adds user type information to the access request for the target page based on the obtained reference information. This allows the load balancing server to send the access request to the business server that matches the user type information based on the received access request. Since different user type information represents different user types, access requests from users of different user types are processed based on the business server configured with their user type, achieving data isolation. This avoids the situation where a certain number of users' user types are misjudged due to untimely IP address collection, reducing the probability of user type misjudgment and improving business processing efficiency.
[0028] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0029] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale. In the drawings:
[0030] Figure 1 This is a flowchart illustrating a page access method according to an embodiment.
[0031] Figure 2 This is a flowchart illustrating a page access method according to an embodiment.
[0032] Figure 3 This is a flowchart illustrating a page access method according to an embodiment.
[0033] Figure 4 This is a block diagram illustrating a page access device according to one embodiment.
[0034] Figure 5 This is a block diagram illustrating a page access device according to one embodiment.
[0035] Figure 6 This is a schematic diagram of the structure of an electronic device according to one embodiment. Detailed Implementation
[0036] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0037] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0038] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0039] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0040] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0041] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0042] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0043] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0044] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0045] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0046] Meanwhile, it is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0047] As mentioned in the background section, in application business scenarios, due to some pre-defined restrictions, different types of users need to differentiate between the application versions and business requirements they can use to achieve data isolation for different types of users. Related technologies determine user types based on IP addresses, such as IPv6. However, IPv6 network segments are currently expanding rapidly. Therefore, there is a possibility that IP addresses are not collected in a timely manner, leading to misclassification of user types for a certain number of users. This, in turn, affects users to varying degrees when using the application, impacting business processing efficiency.
[0048] In view of this, embodiments of this disclosure provide a page access method, apparatus, medium, and electronic device. When a terminal has permission to obtain reference information, it adds user type information to the access request for the target page based on the obtained reference information. This allows a load balancing server to send the access request to a business server that matches the user type information. Since different user type information represents different user types, access requests from users of different user types are processed based on the business server configured with their respective user types. This achieves data isolation, avoids misclassification of user types for a certain number of users due to untimely IP address recording, reduces the probability of user type misclassification, and improves business processing efficiency.
[0049] The embodiments of this disclosure will be further explained below with reference to the accompanying drawings.
[0050] Figure 1 This is a flowchart illustrating a page access method according to an embodiment. This page access method can be applied to a terminal. (Refer to...) Figure 1 The method for accessing this page may include the following steps:
[0051] Step S101: If the terminal accesses the target page, determine whether the terminal has permission to obtain reference information.
[0052] The terminal can initiate an access request, which can be used to request access to the target page.
[0053] The reference information includes the geographical location of the terminal and / or operator information.
[0054] For example, step S101 can be implemented in the following way: when the terminal accesses the target page, determine whether the terminal has permission to obtain the geographical location information of the terminal.
[0055] For example, step S101 can be implemented in the following way: when the terminal accesses the target page, determine whether the terminal has permission to obtain the terminal's operator information.
[0056] For example, step S101 can be implemented as follows: when the terminal accesses the target page, determine whether the terminal has permission to obtain the terminal's geographical location information and operator information. For a detailed implementation of determining whether the terminal has permission to obtain the terminal's geographical location information and operator information, please refer to the relevant embodiments below; this embodiment will not be repeated here.
[0057] It's worth noting that access requests can be sent through the browser on the terminal. When users interact with applications through their terminals, they access pages through the browser. For example, when interacting with applications through their terminals, users can send a command to open a target page through the browser installed on the terminal. In response to this command, the browser sends an access request to the server that provides the service for the target page.
[0058] Among them, the user type information of the terminal can represent the user type of the user using the terminal, which can be overseas or domestic.
[0059] Among them, the geographical location information and carrier information of the terminal can determine whether the terminal is located overseas or domestically. Therefore, the user type can be determined by the geographical location information and carrier information of the terminal.
[0060] For example, the geographical location information of the terminal can be the information corresponding to the highest address unit in the detailed address. It is worth noting that the detailed address includes multiple address units with high and low levels. The lower the level of the address unit, the more precise the location represented, and the higher the level of the address unit, the more ambiguous the location represented. In order to avoid obtaining the precise geographical location of the terminal, only the information corresponding to the highest address unit in the detailed address can be used as the geographical location information of the terminal. Moreover, the information corresponding to the highest address unit in the detailed address can be used to determine the user type information, that is, to determine whether the user type is overseas or domestic.
[0061] For example, the geographical location information of the terminal could be the geographical location information of the cell tower to which the terminal is connected, thus avoiding the need to obtain the terminal's precise geographical location. It is understood that this cell tower is used to enable data transmission and reception when the user interacts with the application through the terminal.
[0062] Step S102: If the terminal has permission to obtain reference information, obtain the reference information.
[0063] Step S103: Determine the user type information of the terminal based on the reference information, and add the user type information to the access request for the target page.
[0064] It is worth noting that user type information can be used to determine the user type of a user using a terminal. Here, user type information can be identification information that directly represents the user type based on geographic location information, or it can be operator information that indirectly represents the user type.
[0065] Generally speaking, user type information can be added to the request header of an access request. The request header is a data area that mainly includes some basic information about the terminal.
[0066] Step S104: The access request is sent to the load balancing server, so that the load balancing server sends the access request to the business server that matches the user type information based on the user type information obtained by parsing the access request, so that the business server returns the target page to the terminal based on the access request.
[0067] Here, the business server that matches the user type information can be a single server or a group of servers; this embodiment does not limit this.
[0068] It's worth noting that a load balancer, acting as a proxy server, distributes access requests to the appropriate business servers. Load balancers can be examples of web servers or FTP (File Transfer Protocol) servers. Upon receiving an access request, the load balancer parses it to obtain the parsing result. If the parsing result includes user type information, the load balancer sends the access request to the business server that matches the user type information. This allows the business server to respond to the access request, return the target page to the terminal, and enable the terminal to access the target page.
[0069] Specifically, when the load balancer sends an access request to a business server that matches the user type information obtained from resolving the access request, it can utilize rewriting capabilities to change the domain name in the access request to the domain name corresponding to the business server that matches the user type information. A domain name, also known as a network domain, is the name of a computer or group of computers consisting of a string of names separated by dots. It is used to locate and identify computers during data transmission. Here, "computer" and "computer group" correspond to the single server and server group mentioned above, respectively.
[0070] For example, if the user type information indicates that the user is an overseas user, the access request is sent to a business server dedicated to handling overseas users, so that the business server handling overseas users can respond to the access request; if the user type information indicates that the user is a domestic user, the access request is sent to a business server dedicated to handling domestic users, so that the business server handling domestic users can respond to the access request, thereby achieving data isolation between overseas users and domestic users.
[0071] In this way, when the terminal has the authority to obtain reference information, it adds user type information to the access request for the target page based on the obtained reference information. This allows the load balancing server to send the access request to the business server that matches the user type information. Since different user type information represents different user types, access requests from users of different user types are processed based on the business server configured with their user type. This achieves data isolation, avoids misjudging the user type of a certain number of users due to untimely IP address collection, reduces the probability of user type misjudgment, and improves business processing efficiency.
[0072] In some embodiments, the reference information includes the geographical location information of the terminal and the operator information. In this case, the above step S101 can be implemented in the following way: if the terminal accesses the target page, determine whether the terminal has permission to obtain geographical location information; if the terminal does not have permission to obtain geographical location information, determine whether the terminal has permission to obtain operator information.
[0073] It's worth noting that using geographic location information to determine a user's region is less prone to change compared to using carrier information. Furthermore, geographic location information can accurately pinpoint a user's region, thus accurately determining the user type information used to characterize the user. Therefore, we first determine if the terminal has permission to access geographic location information. If the terminal has this permission, the user type information is directly determined based on the acquired geographic location information. If the terminal does not have this permission, we then determine if it has permission to access carrier information. When the user type includes both overseas and domestic categories, the user's region can be used to characterize the user type.
[0074] By setting up two types of reference information—geographic location information and carrier information—the system prioritizes determining whether the terminal has permission to access geographic location information. If the terminal does have permission to access geographic location information, then it determines whether the terminal has permission to access carrier information. This process is repeated step by step, based on different reference information, to ensure that user type information is determined to the greatest extent and with the highest accuracy. This allows for data isolation based on user type information.
[0075] In some embodiments, the step of determining whether a terminal has permission to obtain geographic location information when the terminal accesses a target page can be implemented in the following manner: when the terminal accesses a target page, determine whether the terminal has enabled the function of authorizing the acquisition of geographic location information; if it is determined that the terminal has not enabled the function of authorizing the acquisition of geographic location information, obtain the page scene type of the current page of the terminal; if the page scene type of the current page matches a preset page scene, display a request for authorization to obtain geographic location information on the terminal; respond to a first operation on the request for authorization information, determine that the terminal does not have permission to obtain geographic location information, wherein the first operation is to refuse authorization to obtain geographic location information.
[0076] The preset page scenarios can be understood as scenarios that require the terminal to perform location tracking. Examples of preset page scenarios include food delivery scenarios and navigation scenarios.
[0077] The request for authorization to obtain geolocation information can be displayed via a pop-up window, which is a window that automatically pops up when a webpage, software, or application is opened.
[0078] The explanation of the first operation can be found in the following related embodiments, which will not be repeated here.
[0079] It's worth noting that in the preset page scenario, the terminal itself needs to perform location tracking to achieve the corresponding functions, such as ordering takeout. As mentioned above, geolocation information can accurately determine the user's region, thus accurately determining the user type based on that region. Therefore, if the terminal hasn't enabled the authorization to obtain geolocation information, the current page scenario type can be obtained immediately. If the current page scenario type matches the preset scenario, the terminal displays a request for authorization to obtain geolocation information. When the terminal agrees to grant authorization, the permission to obtain geolocation information is obtained in real time, increasing the probability of determining the user type based on geolocation information. Conversely, if the terminal initially refuses authorization to obtain geolocation information, the terminal's permission to obtain carrier information is determined secondarily to determine the user type based on carrier information. This avoids misclassification of a certain number of users due to untimely IP address data collection, improving business processing efficiency.
[0080] In some embodiments, the step of determining whether a terminal has permission to obtain geolocation information when the terminal accesses the target page may further include: determining that the terminal does not have permission to obtain geolocation information if the page scenario type of the current page does not conform to a preset page scenario.
[0081] It's worth noting that if the current page's scenario type doesn't match the preset scenario, meaning it cannot obtain location information in real-time by displaying a request for authorization, then since it's already determined that the terminal hasn't enabled the authorization to obtain location information before determining the current page's scenario type, it can be directly concluded that the terminal lacks permission to obtain location information. This allows for further determination of whether the terminal has permission to obtain carrier information, enabling the determination of user type information based on carrier information. This avoids misclassification of a certain number of users due to untimely IP address data collection, thus improving business processing efficiency.
[0082] In some embodiments, the step of determining whether a terminal has permission to obtain geographic location information when the terminal accesses the target page may further include: determining that the terminal has permission to obtain geographic location information if it is determined that the terminal has enabled the function of authorizing the acquisition of geographic location information.
[0083] In this way, geographical location information can be directly obtained, thereby determining the user type information of the terminal.
[0084] In some embodiments, the step of determining whether a terminal has permission to obtain geographic location information when the terminal accesses the target page may further include: responding to a second operation for requesting authorization information, determining that the terminal has permission to obtain geographic location information, wherein the second operation is an operation of agreeing to authorize the acquisition of geographic location information.
[0085] The first and second operations can be click operations on different controls requesting authorization information. Generally, when displaying authorization information for obtaining geolocation information, two controls are usually shown: one control for refusing authorization to obtain geolocation information (clicked by the user) and the other control for agreeing authorization to obtain geolocation information (clicked by the user).
[0086] By using the above methods, the goal of obtaining access to geolocation information in real time can be achieved, thereby increasing the probability of determining user type information based on geolocation information.
[0087] In some embodiments, if the terminal does not have permission to obtain reference information, the access request is sent to the load balancing server so that the load balancing server can parse the access request to obtain the terminal's gateway address, and send the access request to the business server that matches the user type information based on the gateway address, so that the business server can return the target page to the terminal based on the access request.
[0088] It's worth noting that the gateway address is usually included in the request header of the access request. For example, the gateway address can be read from the $http_real_ip parameter in the request header.
[0089] For example, when the terminal is using a wireless network, the gateway address (IP, Internet Protocol) corresponds to the exit IP of the wireless network; when the terminal is using a cellular network, the gateway address (IP, Internet Protocol) corresponds to the exit IP of the cell tower.
[0090] After obtaining the gateway address, a pre-defined IP network segment database is used for matching to obtain matching user type information. In other words, user type information can be determined based on the gateway address. The pre-defined IP network segment database includes different gateway addresses and corresponding user type information for each gateway address.
[0091] By using the above method, if it is determined that the terminal does not have the permission to obtain reference information, it is also impossible to add user type information to the access request. Therefore, it is also impossible to obtain user type information from the result of parsing the access request. Thus, the solution of determining user type information based on the gateway address is used as a fallback solution to reduce the probability that different types of users cannot be isolated from data due to the inability to determine user type information based on reference information, thereby improving the rationality of the overall solution.
[0092] In some embodiments, the user type information is the terminal's operator information. The load balancing server can send the access request to the service server that matches the user type information in the following way: according to the terminal's operator information, query the target user type that matches the operator information in the preset operator information database, and send the access request to the service server that matches the target user type. The preset operator information database includes multiple types of operator information and the correspondence between user types corresponding to each type of operator information.
[0093] Following the example of the user types mentioned above, the target user type corresponds to overseas or domestic.
[0094] For example, user type information can be added by adding new parameters. The parameters in the request header can be composed of preset field names and the values corresponding to the preset field names. Therefore, in this embodiment, the preset field names are used to describe the semantic information of the corresponding parameters, that is, the semantic information representing the user type, and the values corresponding to the preset field names are user type information.
[0095] As mentioned above, carrier information is more prone to change than geographic location information. If the target user type is determined by the terminal based on a preset carrier information database, it would require updating the preset carrier information database for all terminals or retrieving the preset carrier information database from its storage location. The former is inconvenient for maintaining the preset carrier information database, and the latter requires the terminal to consume more power. Therefore, to facilitate the maintenance of the preset carrier information database and reduce terminal power consumption, the value corresponding to the preset field name is directly set to the user type information. This allows the load balancer server to determine the target user type based on the value corresponding to the preset field name and the preset carrier information database. This method only requires updating the preset carrier information database stored in the load balancer server and does not consume excessive power from the terminals.
[0096] In some embodiments, the terminal includes a client and a front-end. The client refers to a client-facing program, which can be developed on many platforms. The front-end can be understood as a browser. The front-end and the client exchange necessary information bidirectionally through a protocol. However, the front-end cannot directly obtain reference information; it can only be obtained by the client. Therefore, the front-end needs to obtain reference information from the client through a protocol. Thus, the above-mentioned step of determining whether the terminal has the right to obtain reference information can be implemented in the following way: the front-end sends an information acquisition request to the client through a preset communication protocol; the client responds to the information acquisition request, confirming whether the terminal has the right to obtain reference information.
[0097] Furthermore, when the terminal has the permission to obtain reference information, the step of obtaining reference information can be implemented in the following way: when the client has the permission to obtain reference information on the terminal, it obtains the reference information and returns the reference information to the front end through a preset communication protocol.
[0098] Furthermore, the steps described above, which involve determining the user type information of the terminal based on the reference information and adding the user type information to the access request for the target page, can be implemented in the following way: The front end determines the user type information of the terminal based on the reference information and adds the user type information to the access request for the target page.
[0099] The default communication protocol can be JSBridge, or JavaScript bridge. Through the JavaScript bridge, the front end and the client can exchange the necessary information, i.e., reference information, bidirectionally.
[0100] The aforementioned information retrieval request is used to request reference information. When the reference information is carrier information, the client retrieves the carrier information by calling the natively provided CoreTelephony object.
[0101] By using the above method, reference information is exchanged through a preset communication protocol between the front-end and the client. The terminal adds user type information to the access request based on the reference information, so that the load balancing server sends the access request to the business server that matches the user type information. This allows access requests from users of different user types to be processed by the business server configured with their user type, achieving data isolation and avoiding misjudgment of user types for a certain number of users due to untimely IP address collection, thereby improving business processing efficiency.
[0102] Figure 2 This is a flowchart illustrating a page access method according to an embodiment, applied to a load balancing server. (Refer to...) Figure 2 This includes the following steps:
[0103] Step S201: Receive the access request for the target page sent by the terminal, and parse the access request to obtain the parsing result.
[0104] Step S202: If the parsing result includes user type information, the access request is sent to the business server that matches the user type information, so that the business server returns the target page to the terminal based on the access request. The user type information is determined by the terminal through the reference information it has the right to obtain reference information. The reference information includes the geographical location information and / or operator information of the terminal.
[0105] about Figure 2 The implementation of the steps shown can be referred to the above-mentioned related embodiments, and will not be repeated here.
[0106] Figure 3 This is a flowchart illustrating a page access method according to an embodiment, applied to a terminal including a client and a front-end, as well as a load balancing server, see below. Figure 3When a user accesses a target page through the terminal's front end and initiates an access request, the front end intercepts the access request and attempts to obtain geolocation information from the client. The client determines whether it has permission to obtain geolocation information. If the client determines that it has permission to obtain geolocation information, the client directly obtains the geolocation information and returns it to the front end. The front end determines the user type information based on the geolocation information. The front end adds the identifier information representing the user type to the request header of the access request and sends the access request to the load balancer server. Here, the identifier information is understood as the user type information.
[0107] If the client determines that it does not have permission to obtain geolocation information, then the client determines whether it has permission to obtain carrier information. If the client determines that it has permission to obtain carrier information, the client obtains the carrier information through native capabilities and returns the carrier information to the front end. The front end adds the carrier information to the request header of the access request and sends the access request to the load balancer server.
[0108] After receiving an access request from the front end, the load balancer server parses the request. If the parsed result includes user type information (identification information or ISP information), the load balancer server sends the access request to the business server that matches the user type information based on the user type information in the request header. If the parsed result does not include user type information, the load balancer server sends the access request to the business server that matches the user type information based on the gateway address in the parsed result. It is worth noting that the access request generated to access the target page usually carries the gateway address.
[0109] Among them, regarding Figure 3 The specific implementation methods of the steps involved can be referred to the above-mentioned related embodiments, and will not be repeated here.
[0110] Additionally, when the user type is overseas, the load balancer sends the access request to the business processor that handles overseas users, thereby hitting the overseas server instance. The overseas server then returns the overseas version of the target page corresponding to the access request to the front end. When the user type is domestic, the load balancer sends the access request to the business processor that handles domestic users, thereby hitting the domestic server instance and returning the domestic version of the page corresponding to the access request to the front end.
[0111] Figure 4 This is a block diagram illustrating a page access device 400 according to an embodiment, which is applied to a terminal, with reference to... Figure 4 The device 400 includes:
[0112] The first determining module 401 is used to determine whether the terminal has permission to obtain reference information when the terminal accesses the target page. The reference information includes the geographical location information and / or operator information of the terminal.
[0113] The first acquisition module 402 is used to acquire the reference information when the terminal has the permission to acquire the reference information;
[0114] The second determining module 403 is used to determine the user type information of the terminal based on the reference information, and add the user type information to the access request for the target page;
[0115] The first sending module 404 is used to send the access request to a load balancing server, so that the load balancing server sends the access request to a business server that matches the user type information obtained by parsing the access request, so that the business server returns the target page to the terminal based on the access request.
[0116] In some embodiments, the reference information includes the geographical location information and / or operator information of the terminal, and the first determining module 401 includes:
[0117] The first determining submodule is used to determine whether the terminal has permission to obtain the geographic location information when the terminal accesses the target page;
[0118] The second determining submodule is used to determine whether the terminal has permission to obtain the operator information if the terminal does not have permission to obtain the geographical location information.
[0119] In some embodiments, the first determining submodule is specifically used for:
[0120] When the terminal accesses the target page, determine whether the terminal has enabled the function of authorizing the acquisition of geographical location information;
[0121] If it is determined that the terminal has not enabled the function of authorizing the acquisition of geographical location information, obtain the page scene type of the current page of the terminal;
[0122] If the current page's scenario type matches a preset page scenario, the terminal displays a request for authorization to obtain geolocation information.
[0123] In response to the first operation regarding the requested authorization information, it is determined that the terminal does not have permission to obtain the geographic location information. The first operation is to refuse authorization to obtain the geographic location information.
[0124] In some embodiments, the first determining submodule is further configured to:
[0125] If the current page's scene type does not match the preset page scene, it is determined that the terminal does not have permission to obtain the geographic location information.
[0126] In some embodiments, the first determining submodule is further configured to:
[0127] If it is determined that the terminal has enabled the function of authorizing the acquisition of geographical location information, it is determined that the terminal has the permission to acquire the geographical location information;
[0128] In response to the second operation regarding the requested authorization information, it is determined that the terminal has permission to obtain the geographic location information, wherein the second operation is to agree to authorize the acquisition of the geographic location information.
[0129] In some embodiments, the device 400 further includes:
[0130] The third sending module is used to send the access request to a load balancing server when the terminal does not have the permission to obtain the reference information, so that the load balancing server parses the access request to obtain the gateway address of the terminal, and sends the access request to a business server that matches the user type information according to the gateway address, so that the business server returns the target page to the terminal based on the access request.
[0131] In some embodiments, the user type information is the carrier information, and the load balancing server sends the access request to the service server that matches the user type information according to the user type information in the following manner:
[0132] Based on the operator information, query the target user type that matches the operator information in the preset operator information database, and send the access request to the business server that matches the target user type;
[0133] The preset operator information database includes various operator information and the corresponding user types for each type of operator information.
[0134] In some embodiments, the terminal includes a front-end and a client. The first determining module 401 determines whether the terminal has permission to obtain reference information by: the front-end sending an information acquisition request to the client through a preset communication protocol; and determining whether the terminal has permission to obtain reference information by the client responding to the information acquisition request.
[0135] The first acquisition module 402 is specifically used to acquire the reference information through the client when the terminal has the permission to acquire reference information, and return the reference information to the front end through the preset communication protocol;
[0136] The second determining module 403 is specifically used to determine the user type information of the terminal based on the reference information through the front end, and to add the user type information in the access request for the target page.
[0137] The implementation methods of each module in the above-mentioned device can be referred to the above-mentioned related embodiments, and will not be repeated here.
[0138] Figure 5 This is a block diagram illustrating a page access device 500 according to one embodiment, which is applied to a load balancing server, see reference. Figure 5 The device 500 includes:
[0139] The parsing module 501 is used to receive an access request for a target page sent by the terminal and parse the access request to obtain a parsing result;
[0140] The second sending module 502 is used to send the access request to a business server that matches the user type information when the parsing result includes user type information, so that the business server returns the target page to the terminal based on the access request;
[0141] The user type information is determined by the terminal through reference information obtained when it has the permission to obtain reference information. The reference information includes the geographical location information and / or operator information of the terminal.
[0142] The implementation methods of each module in the above-mentioned device can be referred to the above-mentioned related embodiments, and will not be repeated here.
[0143] This disclosure also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the above-described method.
[0144] This disclosure also provides an electronic device, including:
[0145] A storage device on which computer programs are stored;
[0146] A processing device for executing the computer program in the storage device to implement the steps of the above method.
[0147] The following is for reference. Figure 6The diagram illustrates a structural schematic of an electronic device (e.g., the terminal or load balancing server described above) 600 suitable for implementing embodiments of the present disclosure. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0148] like Figure 6 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0149] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0150] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.
[0151] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. 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 thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0152] In some implementations, electronic devices can communicate using any currently known or future-developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0153] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0154] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: determine whether the terminal has permission to obtain reference information, including the terminal's geographical location information and / or operator information, when the terminal accesses a target page; obtain the reference information if the terminal has permission to obtain the reference information; determine the terminal's user type information based on the reference information and add the user type information to the access request for the target page; and send the access request to a load balancing server, so that the load balancing server, based on the user type information obtained by parsing the access request, sends the access request to a business server that matches the user type information, so that the business server returns the target page to the terminal based on the access request.
[0155] Alternatively, the aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: receive an access request for a target page sent by a terminal, and parse the access request to obtain a parsing result; if the parsing result includes user type information, send the access request to a service server matching the user type information, so that the service server returns the target page to the terminal based on the access request; wherein the user type information is determined by the terminal through reference information obtained when it has the right to obtain reference information, and the reference information includes the geographical location information and / or operator information of the terminal.
[0156] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0157] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0158] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules are not, in some cases, intended to limit the functionality of the module itself.
[0159] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0160] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0161] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0162] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0163] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative forms of implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which the various modules perform their operations has been described in detail in the embodiments relating to the method, and will not be elaborated upon here.
Claims
1. A method for accessing a webpage, characterized in that, Applied to a terminal, the method includes: When the terminal accesses the target page, it is determined whether the terminal has permission to obtain reference information, which includes the geographical location information and / or operator information of the terminal. If the terminal has permission to obtain the reference information, then the reference information is obtained; Based on the reference information, determine the user type information of the terminal, and add the user type information to the access request for the target page; The access request is sent to a load balancing server, which then sends the access request to a business server that matches the user type information obtained by parsing the access request. The business server then returns the target page to the terminal based on the access request.
2. The method according to claim 1, characterized in that, The reference information includes the geographical location information and / or carrier information of the terminal. Determining whether the terminal has permission to access the reference information when the terminal accesses the target page includes: When the terminal accesses the target page, determine whether the terminal has permission to obtain the geographic location information; If the terminal does not have permission to obtain the geographic location information, determine whether the terminal has permission to obtain the operator information.
3. The method according to claim 2, characterized in that, When the terminal accesses the target page, determining whether the terminal has permission to obtain the geographic location information includes: When the terminal accesses the target page, determine whether the terminal has enabled the function of authorizing the acquisition of geographical location information; If it is determined that the terminal has not enabled the function of authorizing the acquisition of geographical location information, obtain the page scene type of the current page of the terminal; If the current page's scenario type matches a preset page scenario, the terminal displays a request for authorization to obtain geolocation information. In response to the first operation regarding the requested authorization information, it is determined that the terminal does not have permission to obtain the geographic location information. The first operation is to refuse authorization to obtain the geographic location information.
4. The method according to claim 3, characterized in that, When the terminal accesses the target page, determining whether the terminal has permission to obtain the geographic location information further includes: If the current page's scene type does not match the preset page scene, it is determined that the terminal does not have permission to obtain the geographic location information.
5. The method according to claim 3, characterized in that, When the terminal accesses the target page, determining whether the terminal has permission to obtain the geographic location information further includes: If it is determined that the terminal has enabled the function of authorizing the acquisition of geographical location information, then it is determined that the terminal has the permission to acquire the geographical location information; or... In response to the second operation regarding the requested authorization information, it is determined that the terminal has the permission to obtain the geographic location information, wherein the second operation is to agree to authorize the acquisition of the geographic location information.
6. The method according to claim 1, characterized in that, The method further includes: If the terminal does not have permission to obtain the reference information, the access request is sent to a load balancing server, so that the load balancing server parses the access request to obtain the gateway address of the terminal, and sends the access request to a business server that matches the user type information based on the gateway address, so that the business server returns the target page to the terminal based on the access request.
7. The method according to claim 1, characterized in that, The user type information is the operator information, and the load balancing server sends the access request to the service server that matches the user type information according to the user type information in the following way: Based on the operator information, query the target user type that matches the operator information in the preset operator information database, and send the access request to the business server that matches the target user type; The preset operator information database includes various operator information and the corresponding user types for each type of operator information.
8. The method according to any one of claims 1-7, characterized in that, The terminal includes a front-end and a client. Determining whether the terminal has permission to obtain reference information includes: The front end sends an information retrieval request to the client through a preset communication protocol; The client responds to the information acquisition request and determines whether the terminal has permission to acquire reference information. The step of obtaining the reference information when the terminal has the permission to obtain the reference information includes: the client obtaining the reference information when the terminal has the permission to obtain the reference information, and returning the reference information to the front end through the preset communication protocol; The step of determining the user type information of the terminal based on the reference information and adding the user type information to the access request for the target page includes: the front end determining the user type information of the terminal based on the reference information and adding the user type information to the access request for the target page.
9. A method for accessing a page, characterized in that, Applied to a load balancing server, the method includes: The system receives an access request for a target page sent by the terminal and parses the access request to obtain a parsing result. If the parsing result includes user type information, the access request is sent to a business server that matches the user type information, so that the business server returns the target page to the terminal based on the access request; The user type information is determined by the terminal through reference information obtained when it has the permission to obtain reference information. The reference information includes the geographical location information and / or operator information of the terminal.
10. A page access device, characterized in that, Applied to a terminal, the device includes: The first determining module is used to determine whether the terminal has permission to obtain reference information when the terminal accesses the target page. The reference information includes the geographical location information and / or operator information of the terminal. The first acquisition module is used to acquire the reference information when the terminal has the permission to acquire the reference information; The second determining module is used to determine the user type information of the terminal based on the reference information, and add the user type information to the access request for the target page; The first sending module is used to send the access request to a load balancing server, so that the load balancing server sends the access request to a business server that matches the user type information obtained by parsing the access request, so that the business server returns the target page to the terminal based on the access request.
11. A page access device, characterized in that, The device, used in a load balancing server, includes: The parsing module is used to receive access requests for a target page sent by the terminal and parse the access requests to obtain parsing results; The second sending module is used to send the access request to a business server that matches the user type information, based on the user type information, when the parsing result includes user type information, so that the business server returns the target page to the terminal based on the access request; The user type information is determined by the terminal through reference information obtained when it has the permission to obtain reference information. The reference information includes the geographical location information and / or operator information of the terminal.
12. A computer-readable medium having a computer program stored thereon, characterized in that, When executed by a processing device, the program implements the steps of the method according to any one of claims 1-8, or the steps of the method according to claim 9.
13. An electronic device, characterized in that, include: A storage device on which computer programs are stored; A processing apparatus for executing the computer program in the storage device to implement the steps of the method of any one of claims 1-8, or the steps of the method of claim 9.
Citation Information
Patent Citations
Cluster scheduling method and device
CN111274029A
Page access method and system
CN112612983A