WO2022267274A1 - Mobile hotspot authorization inspection method and apparatus, storage medium, and electronic device - Google Patents

Mobile hotspot authorization inspection method and apparatus, storage medium, and electronic device Download PDF

Info

Publication number
WO2022267274A1
WO2022267274A1 PCT/CN2021/125053 CN2021125053W WO2022267274A1 WO 2022267274 A1 WO2022267274 A1 WO 2022267274A1 CN 2021125053 W CN2021125053 W CN 2021125053W WO 2022267274 A1 WO2022267274 A1 WO 2022267274A1
Authority
WO
WIPO (PCT)
Prior art keywords
indication information
authorization
sending
request
time
Prior art date
Application number
PCT/CN2021/125053
Other languages
French (fr)
Chinese (zh)
Inventor
蔡进义
Original Assignee
上海闻泰信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海闻泰信息技术有限公司 filed Critical 上海闻泰信息技术有限公司
Publication of WO2022267274A1 publication Critical patent/WO2022267274A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the disclosure relates to a mobile hotspot authorization verification method, a mobile hotspot authorization verification device, and a computer-readable storage medium and electronic equipment for realizing the mobile hotspot authorization verification method.
  • Wireless local area network (WLAN, Wireless Local Area Networks) services are gradually becoming popular, and user terminals can use WLAN to access the Internet conveniently in WLAN hotspot coverage areas through the WLAN network provided by mobile network operators.
  • WLAN Wireless Local Area Networks
  • a user terminal can connect to the Internet through a WLAN hotspot, but the WLAN hotspot only allows the user terminal to connect to the Internet after the authorization server successfully completes the authorization check, otherwise the user terminal cannot use Internet services.
  • HTTP Hypertext Transfer Protocol
  • HTTP Status Code HTTP Status Code
  • the hotspot function is enabled to allow the user terminal to connect to the Internet; when receiving an error HTTP status code such as "403", it means that the network status is not good, and the hotspot function will be turned off directly, and the user terminal cannot connect to the Internet, and the authorization request will be resent to the authorization server until it is received.
  • HTTP Hypertext Transfer Protocol
  • the industry has not provided a solution to flexibly adjust the time to resend the authorization request based on the real situation of the network status, resulting in possible There is a situation that the authorization request is sent too frequently, which increases the busyness and burden of the authorization server, and also makes the power consumption of the WLAN hotspot at this time larger.
  • the current technology does not provide a solution to flexibly adjust the time to resend the authorization request based on the real situation of the network status, so that there may be situations where the authorization request is sent too frequently, which increases the busyness and burden of the authorization server, and makes the power consumption of the WLAN hotspot larger .
  • an authorization verification method an authorization verification device, and a computer-readable storage medium and an electronic device for implementing the authorization verification method are provided.
  • a mobile hotspot authorization verification method comprising:
  • the method before the step of sending the first authorization verification request to the authorization server, the method further includes: sending a second authorization verification request to the authorization server; receiving the authorization The second network status indication information returned by the server, the second network status indication information is generated by the authorization server in response to the second authorization verification request; judging whether the second network status indication information is specified network status indication information, The specified network status indication information indicates that the network status is normal; if yes, repeat the step of sending the first authorization check request to the authorization server.
  • the method further includes: when the second network state indication information is not the specified network state indication information, determining the number of the second authorization check request sent at the current moment The number of times of sending; based on the number of times of sending and the first preset basic time length, determine the first waiting time; based on the first waiting time and the current time, determine the second sending time for resending the second authorization check request; in the When the second sending time comes, the step of sending the second authorization verification request to the authorization server is repeated until the number of times of sending is greater than the first preset threshold.
  • the method further includes: after sending the second authorization verification request to the authorization server, if no information returned by the authorization server is received after waiting for a preset period of time, Then determine the sending times of the second authorization verification request sent at the current moment; determine the first waiting time based on the sending times and the first preset basic time length; determine the resending of the first waiting time based on the first waiting time and the current time Second sending time of the authorization verification request; when the second sending time arrives, repeat the step of sending the second authorization verification request to the authorization server until the number of times of sending is greater than the first preset times threshold End.
  • the determining the first waiting period based on the number of sending times and the first preset basic period includes: determining the first waiting period based on the following formula:
  • T1 represents the first waiting duration
  • t represents the first preset basic duration
  • n represents the number of sending times.
  • the method further includes: judging whether the first network status indication information is a specified network status Indication information: determining the first sending time for resending the first authorization check request based on the first network status indication information includes: when the first network status indication information is designated network status indication information, based on the first A preset rule determines the first sending time of resending the first authorization verification request; when the first network status indication information is not specified network status indication information, determines the time of resending the first authorization verification request based on a second preset rule A first sending time; wherein, the first sending time indicated and determined by the first preset rule and the second preset rule are different.
  • the first network state indication information when the first network state indication information is specified network state indication information, determining the first sending time for resending the first authorization check request based on a first preset rule, Including: when the first network state indication information is designated network state indication information, determining the number of times the first authorization check request has been sent at the current moment; determining the first weight value corresponding to the designated network state indication information; based on The number of times the first authorization verification request is sent, the first weight value and the second preset basic duration determine a second waiting duration; based on the second waiting duration and the current time, determine to resend the first authorization verification request The first sending time of .
  • the method further includes: when the number of times the first authorization verification request is sent is greater than a second preset number of times threshold, ending so as not to send the first authorization verification request again.
  • the first network state indication information when the first network state indication information is not designated network state indication information, determine the first sending time for resending the first authorization check request based on a second preset rule, Including: when the first network state indication information is not the specified network state indication information, record the current time, and obtain a preset network state indication information set, the preset network state indication information set includes all but the specified network state indication information The first network state indication information set and the second network state indication information set other than information; when it is determined that the first network state indication information belongs to the first network state indication information set, determine the first network state indication information The second weight value corresponding to the information; based on the second weight value and the second preset basic time length, determine the third waiting time; based on the third waiting time and the current time, determine the first time to resend the first authorization check request a sending time; or, when determining that the first network state indication information belongs to the second network state indication information set, determine a third weight value corresponding to the first network state indication information, and the
  • the method further includes: determining the number of times the first authorization verification request has been sent; when the number of times the first authorization verification request is sent is greater than a second preset number of times threshold , end and no longer send the first authorization check request.
  • a mobile hotspot authorization verification device comprising:
  • the request sending module is configured to send the first authorization check request to the authorization server
  • An information receiving module configured to receive first network status indication information returned by the authorization server, the first network status indication information being generated by the authorization server in response to the first authorization verification request;
  • the time determination module is configured to determine the first sending time for resending the first authorization check request based on the first network status indication information; where different first network status indication information corresponds to different request sending times;
  • the loop control module is configured to trigger the request sending module to send the first authorization verification request to the authorization server when the first sending time arrives.
  • a computer-readable storage medium on which computer-readable instructions are stored, and when the computer-readable instructions are executed by one or more processors, the steps of the authorization verification method described in any of the above-mentioned embodiments are implemented.
  • An electronic device comprising:
  • a memory configured to store computer readable instructions
  • the one or more processors are configured to execute the steps of the authorization verification method in any of the above embodiments by executing the computer-readable instructions.
  • the mobile hotspot sends a first authorization verification request to the authorization server, receives the first network status indication information returned by the authorization server, and the first network status indication information Generated by the authorization server in response to the first authorization verification request; based on the first network status indication information, determine the first sending time for resending the first authorization verification request; wherein different first network status indication information corresponds to different request sending times; When the first sending time arrives, repeat the step of sending the first authorization verification request to the authorization server.
  • the determined sending time of resending the authorization verification request is different, so that the network status indicated by the network status indication information can be dynamically determined. Constantly adjust the time for sending authorization verification requests.
  • the time for resending authorization requests can be flexibly adjusted based on the real situation of the network status indicated by the network status indication information, so as to avoid sending authorization requests too frequently, thereby reducing The busyness and burden of the authorization server also reduces the power consumption of the mobile hotspot.
  • FIG. 1 is a schematic diagram of an application scenario of a mobile hotspot authorization verification method provided by one or more embodiments of the present disclosure
  • FIG. 2 is a flowchart of a mobile hotspot authorization verification method provided by one or more embodiments of the present disclosure
  • FIG. 3 is a flowchart of a mobile hotspot authorization verification method according to one or more embodiments of the present disclosure
  • FIG. 4 is a flowchart of a mobile hotspot authorization verification method according to one or more embodiments of the present disclosure
  • Fig. 5 is a schematic diagram of waiting time for authorization verification in one or more embodiments of the present disclosure
  • FIG. 6 is a flowchart of a mobile hotspot authorization verification method according to one or more embodiments of the present disclosure
  • FIG. 7 is a flowchart of a mobile hotspot authorization verification method according to one or more embodiments of the present disclosure.
  • FIG. 8 is a flowchart of a mobile hotspot authorization verification method in one or more embodiments of the present disclosure
  • FIG. 9 is a schematic diagram of a mobile hotspot authorization verification device according to one or more embodiments of the present disclosure.
  • FIG. 10 is a schematic diagram of an electronic device implementing a mobile hotspot authorization verification method according to one or more embodiments of the present disclosure.
  • At least one (item) means one or more, and “multiple” means two or more.
  • “And/or” is used to describe the association relationship of associated objects, which means that there can be three kinds of relationships, for example, “A and/or B” can mean: only A exists, only B exists, and A and B exist at the same time. Among them, A and B can be singular or plural.
  • the character “/” generally indicates that the contextual objects are an “or” relationship.
  • At least one of the following” or similar expressions refer to any combination of these items, including any combination of single or plural items.
  • At least one item (piece) of a, b or c can mean: a, b, c, "a and b", “a and c", “b and c", or "a and b and c ", where a, b, c can be single or multiple.
  • the application scenario may include but not limited to a mobile hotspot 101 (Mobile Hotspot), an authorization server 102 (Entitlement Server) and a user equipment (User Equipment, referred to as UE) 103, wherein, the mobile hotspot 101 and the authorization server 102 and the UE can communicate with each other, and the specific communication connection mode can refer to the existing technology, which will not be repeated here.
  • the UE may be but not limited to smart phones, tablet computers and other devices, and the mobile hotspot 101 may include but not limited to be a WLAN hotspot.
  • the UE can connect to the Internet through the mobile hotspot 101, provided that the mobile hotspot 101 allows the UE to connect to the Internet only after the authorization server 102 successfully completes the authorization check, otherwise the UE cannot use Internet services.
  • a mobile hotspot authorization verification method is shown in FIG. 2 . This embodiment is mainly described by taking the mobile hotspot authorization verification method applied to the mobile hotspot 101 in FIG. 1 as an example.
  • Step S201 Sending a first authorization verification request to the authorization server.
  • the first authorization check request may be an HTTP request, such as an HTTP GET request, but is not limited thereto.
  • the mobile hotspot 101 sends an HTTP GET request to the authorization server 102.
  • Step S202 Receive the first network status indication information returned by the authorization server.
  • the first network status indication information is generated by the authorization server in response to the first authorization verification request.
  • the first network status indication information may be an HTTP status code, and different HTTP status codes may identify different network statuses. For example, when the HTTP status code is "200", it indicates that the network is normal, and when the HTTP status code is "403" , indicating an error network state.
  • the authorization server 102 after receiving the HTTP GET request sent by the mobile hotspot 101, the authorization server 102 responds to the HTTP GET request and returns an HTTP status code to the mobile hotspot 101.
  • Step S203 Based on the first network status indication information, determine a first sending time for resending the first authorization check request; where different first network status indication information corresponds to different request sending times.
  • Step S204 Determine whether the first sending time has come, and if so, repeat the step of sending the first authorization verification request to the authorization server.
  • the mobile hotspot 101 sends the HTTP GET request, if the HTTP status code returned by the authorization server 102 is "403", then determine the corresponding request sending time 1.
  • step S201 to send the HTTP GET request for the second time, if the HTTP status code returned by the authorization server 102 this time is "404", then determine the corresponding Another request is sent time 2.
  • step S201 to send the HTTP GET request for the third time, and process in a loop like this.
  • the mobile hotspot 101 can end the cycle and no longer send HTTP GET requests, of course it is not limited thereto, and can also be based on other methods such as the total number of authorization checks.
  • the cycle ends when the duration reaches the maximum duration, which is not limited in this embodiment.
  • the determined sending time of resending the authorization verification request is different, so it can be based on The network status indicated by the network status indication information dynamically and continuously adjusts the time to send the authorization verification request.
  • the hotspot function is not directly turned off, and the resend can be flexibly adjusted based on the real situation of the network status indicated by the network status indication information.
  • the time of the authorization request avoids sending the authorization request too frequently, thereby reducing the busyness and burden of the authorization server 102 and reducing the power consumption of the mobile hotspot 101 .
  • the method may further include the following steps:
  • Step S301 Send a second authorization verification request to the authorization server.
  • the mobile hotspot 101 sends a second authorization check request such as an HTTP GET request to the authorization server 102 in response to detecting that there is a network connection request from any UE for the first time.
  • a second authorization check request such as an HTTP GET request
  • Step S302 Receive the second network status indication information returned by the authorization server, the second network status indication information is generated by the authorization server in response to the second authorization verification request.
  • the second network status indication information may also be an HTTP status code.
  • the authorization server 102 after receiving the second authorization verification request sent by the mobile hotspot 101, such as an HTTP GET request, the authorization server 102 returns an HTTP status code to the mobile hotspot 101 in response to the HTTP GET request.
  • Step S303 Judging whether the second network status indication information is designated network status indication information, and the designated network status indication information indicates that the network status is normal.
  • the designated network status indication information may be designated HTTP status code "200".
  • the mobile hotspot 101 sends the second authorization verification request such as an HTTP GET request, it is judged whether the received HTTP status code is the designated HTTP status code "200", and if so, the step of sending the first authorization verification request to the authorization server is repeated , that is, return to the above step S201.
  • the second authorization verification request such as an HTTP GET request
  • step S201 before the mobile hotspot 101 enters step S201, when a UE is connected to the mobile hotspot 101, it triggers the sending of the authorization check request for the first time, and when the first authorization check is successful, it returns the HTTP status code "200".
  • the network status is normal, and then enter step S201, that is, enter the stage shown in Figure 2 to continuously send authorization verification requests, so that as the network status may change, the HTTP status code "200" returned by the authorization server 102 can be obtained as timely as possible , so as to enable the hotspot function in time to allow the user terminal to connect to the Internet, thereby improving user experience.
  • the method further Can include the following steps:
  • Step S401 Determine the number of times the second authorization verification request has been sent at the current moment.
  • Step S402 Determine a first waiting period based on the number of sending times and the first preset basic period.
  • the first preset basic duration t can be set as required, and there is no limitation to this.
  • Step S403 Based on the first waiting period and the current time, determine a second sending time for resending the second authorization check request.
  • the second sending time determined by the mobile hotspot 101 is "2021/5/28 17:01:00", which is just an example and not limited thereto.
  • Step S404 When the second sending time arrives, repeat the step of sending the second authorization verification request to the authorization server until the sending times are greater than the first preset threshold.
  • the first preset threshold value is the maximum number of retries MAX for sending an authorization verification request during authorization verification, which can be set as required, and is not limited in this embodiment.
  • step S301 when the second sending time arrives such as "2021/5/28 17:01:00", return to step S301, send the second authorization verification request to the authorization server for the second time, and then execute steps S302-S303, if received
  • the authorization server 102 returns an incorrect HTTP status code, indicating that the current authorization check has not been successful once, and it may be that the current network status is unstable or cannot provide services.
  • the mobile hotspot 101 in this embodiment re-checks the status code based on the number of times the authorization check request is sent.
  • the method may further include the following steps:
  • the preset duration can be set as required, which is not limited in this embodiment.
  • a second authorization check request such as an HTTP GET request
  • step S402 to step S404 in the foregoing embodiment.
  • the mobile hotspot 101 controls the waiting time for resending the authorization checking request based on the number of times the authorization checking request is sent. Stop when greater than max retries. In this way, the server system can be avoided from being busy by sending authorization check requests too frequently when the network status is unstable, and at the same time, the power consumption of the mobile hotspot 101 can be saved.
  • the method may further include the following steps: judging the first Whether the network state indication information is specified network state indication information.
  • the mobile hotspot 101 judges whether the returned first network status indication information such as the HTTP status code is a specified HTTP status code "200".
  • step S203 based on the first network status indication information, determining the first sending time for resending the first authorization check request may specifically include the following steps:
  • the mobile hotspot 101 may determine the first sending time for resending the first authorization check request based on a first preset rule.
  • the mobile hotspot 101 may determine to resend the first authorization check request based on the second preset rule. send time.
  • the first preset rule and the second preset rule respectively indicate that the determined first sending time is different, for example, indicating that the determined waiting time for resending the first authorization check request is different so that the first sending time is different.
  • the mobile hotspot 101 judges whether the HTTP status code returned by the authorization server 102 is a specified HTTP status code and adopts corresponding different rules to dynamically adjust the sending time of resending the authorization verification request, so that it can be flexible according to different network conditions Adjust the sending time of the resend authorization check request.
  • step a) is to determine to resend the first
  • the first sending time of the authorization verification request may specifically include the following steps:
  • Step S601 When the first network state indication information is designated network state indication information, determine the number of times of sending the first authorization check request that has been sent at the current moment.
  • Step S602 Determine the first weight value corresponding to the designated network state indication information.
  • a mapping relationship table between different HTTP status codes and corresponding weight values can be preset, and the mobile hotspot 101 can determine the first weight corresponding to the specified HTTP status code "200" by querying the mapping relationship table value w1.
  • Step S603 Determine a second waiting period based on the number of times the first authorization check request is sent, the first weight value, and the second preset basic period.
  • the second preset basic duration P can be set as required, which is not limited in this embodiment.
  • the mobile hotspot 101 may determine the second waiting period T2 based on the product of the number of transmissions n', the first weight value w1, and the second preset basic period P:
  • T2 n' ⁇ P ⁇ w1.
  • Step S604 Based on the second waiting period and the current time, determine a first sending time for resending the first authorization check request.
  • the mobile hotspot 101 may determine the first sending time for resending the first authorization verification request based on the second waiting period T2 and the current time, that is, the sending time for sending the first authorization verification request for the second time, and then return Step S204 is executed.
  • the value of n' is constantly updated, and the first weight value w1 corresponding to the HTTP status code "200" remains unchanged. Therefore, the first sending time of resending the first authorization verification request is determined by the number of sendings n'. The larger the value of n', the longer the waiting time for resending the first authorization verification request, and the later the corresponding first sending time.
  • the mobile hotspot 101 when the mobile hotspot 101 continues to receive the specified HTTP status code "200", it essentially adjusts the waiting time for the next resend authorization check request based on the number of times the resend authorization check request is sent, which can be relatively simple Conveniently adjust the sending time of the resend authorization check request.
  • the method may further include: when the number of times the first authorization check request is sent is greater than the second preset number of times threshold, end and no longer send The first authorization check request.
  • the second preset times threshold may be set as required, which is not limited in this embodiment. Specifically, as an example, when the number n' of sending the first authorization verification request is greater than the second preset times threshold, the mobile hotspot 101 ends the iteration and does not send the first authorization verification request to the authorization server 102.
  • step b) is to determine to resend the first network status indication information based on a second preset rule when the first network status indication information is not specified network status indication information.
  • the first sending time of an authorization verification request may specifically include the following steps:
  • Step S701 When the first network state indication information is not the specified network state indication information, record the current time, and obtain a preset network state indication information set, which may include information other than the specified network state indication information The first set of network state indication information and the second set of network state indication information.
  • the preset network status indication information set may be a preset HTTP status code set, which may include but not limited to a first HTTP status code (such as 460-464) set and a second HTTP status code (such as 465-469)
  • a collection, but not including the HTTP status code "200" that is, the HTTP status code collection is a collection of status codes related to network status problems such as errors, and is divided into two collections to indicate the severity of the problem.
  • the second HTTP status code The severity of problems in the network status represented by the status codes in the set is high, and the severity of problems in the network status represented by the status codes in the first HTTP status code set is low, but it is not limited thereto.
  • the setting of the status code set It can be preset according to needs, for example, it can be subdivided into three sets according to the severity, which is not limited in this embodiment.
  • step S201 After sending the first authorization check request for the first time in step S201, if the first network status indication information returned by the authorization server 102, such as the HTTP status code, is not the specified HTTP status code "200" but "460", record the current time , and obtain a set of preset HTTP status codes.
  • the first network status indication information returned by the authorization server 102 such as the HTTP status code
  • Step S702 When it is determined that the first network state indication information belongs to the first network state indication information set, determine a second weight value corresponding to the first network state indication information.
  • the second weight value w2 corresponding to the HTTP status code "460" is determined.
  • the second weight value w2 may generally be greater than the first weight value w1.
  • Step S703 Determine a third waiting period based on the second weight value and the second preset basic period.
  • Step S704 Based on the third waiting period and the current time, determine a first sending time for resending the first authorization check request.
  • the first sending time for resending the first authorization check request can be determined, and then return to step S204 for execution.
  • step b) may also include the following steps:
  • Step S801 When it is determined that the first network state indication information belongs to the second network state indication information set, determine a third weight value corresponding to the first network state indication information, and the third weight value is greater than the second weight value.
  • the first network status indication information returned by the authorization server 102 such as the HTTP status code
  • the second HTTP status code eg 465-469 set
  • the third weight value w3 corresponding to the HTTP status code "465" is determined, w3>w2.
  • Step S802 Determine a fourth waiting period based on the third weight value and the second preset basic period.
  • Step S803 Based on the fourth waiting period and the current time, determine a first sending time for resending the first authorization check request.
  • the first sending time for resending the first authorization check request can be determined, and then return to step S204 for execution.
  • the mobile hotspot 101 can dynamically adjust the weight value based on different HTTP status code sets and HTTP status codes, thereby realizing adjustment of the waiting time for resending the authorization verification request.
  • the determined weight value is larger, and the corresponding waiting time is longer.
  • the determined weight value is smaller, and the corresponding waiting time is shorter, so that it can be more accurate Adjust the sending time of resending the authorization verification request according to the real situation of the network status, avoid sending the authorization verification request too frequently to cause the server system to be busy, save its own power consumption, and at the same time, as the network status may change, the authorization can be obtained as timely as possible
  • the HTTP status code "200" returned by the server 102 enables the hotspot function in time to allow the user terminal to connect to the Internet and improve user experience.
  • the method may further include: determining the number of times the first authorization check request has been sent; When the number of sending times of the first authorization verification request is greater than the second preset number of times threshold, the process ends so that the first authorization verification request is no longer sent.
  • the second preset times threshold may be set as required, which is not limited in this embodiment. Specifically, as an example, when the determined sending times n' of the first authorization verification request sent is greater than the second preset times threshold, the mobile hotspot 101 ends the iteration and does not send the first authorization verification request to the authorization server 102.
  • steps in the flow charts of FIG. 2 to FIG. 8 are shown sequentially as indicated by the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in FIGS. 2 to 8 may include a plurality of sub-steps or stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. These sub-steps or The execution order of the stages is not necessarily performed sequentially, but may be executed alternately or alternately with at least a part of other steps or substeps of other steps or stages.
  • the embodiment of the present disclosure also provides a mobile hotspot authorization verification device, as shown in Figure 9, the mobile hotspot authorization verification device may include a request sending module 901, an information receiving module 902, and a time determination module 903 And loop control module 904; wherein, the request sending module is configured to send the first authorization check request to the authorization server.
  • the information receiving module is configured to receive the first network status indication information returned by the authorization server, and the first network status indication information is generated by the authorization server in response to the first authorization verification request.
  • the time determining module is configured to determine a first sending time for resending the first authorization check request based on the first network status indication information; wherein different first network status indication information corresponds to different request sending times.
  • the loop control module is configured to trigger the request sending module to send the first authorization check request to the authorization server when the first sending time arrives.
  • the mobile hotspot authorization verification device when the mobile hotspot 101 is authorized, since the network status indication information returned by the authorization server 102 may be different each time, the determined sending time of resending the authorization verification request is different, so that it can Based on the network status indicated by the network status indication information, the time for sending the authorization verification request is dynamically and continuously adjusted.
  • the hotspot function is not directly turned off, and the hotspot function can be flexibly adjusted based on the real situation of the network status indicated by the network status indication information.
  • the time for sending the authorization request avoids sending the authorization request too frequently, thereby reducing the busyness and burden of the authorization server 102 and reducing the power consumption of the mobile hotspot 101 .
  • the device may further include an information judging module.
  • the request sending module may also be configured to send a second authorization verification request before sending the first authorization verification request to the authorization server. request to the authorization server.
  • the information receiving module is further configured to receive second network status indication information returned by the authorization server, the second network status indication information being generated by the authorization server in response to the second authorization verification request.
  • the information judging module is configured to judge whether the second network status indication information is designated network status indication information, and the designated network status indication information indicates that the network status is normal.
  • the cycle control module can also be configured to trigger the request sending module to send the first authorization check request to the authorization server when the judgment result of the information judging module is yes.
  • the device may further include a times determination module configured to determine that the second network status indication information has been sent at the current moment when the information judging module determines that the second network status indication information is not the specified network status indication information. The number of times the second authorization check request is sent.
  • the time determination module is further configured to determine a first waiting time based on the sending times and the first preset basic time; based on the first waiting time and the current time, determine the second sending time for resending the second authorization check request .
  • the loop control module can also be configured to trigger the request sending module to send the second authorization verification request to the authorization server when the second sending time arrives, until the sending times are greater than the first preset times threshold.
  • the number of times determination module is further configured to wait for a preset period of time and not receive any information returned by the authorization server after the request sending module sends the second authorization verification request to the authorization server, Then, the number of sending times of the second authorization check request sent at the current moment is determined.
  • the time determining module is further configured to determine a first waiting time based on the sending times and the first preset basic time; based on the first waiting time and the current time, determine a second sending time for resending the second authorization check request.
  • the loop control module can also be configured to trigger the request sending module to send the second authorization verification request to the authorization server when the second sending time arrives, and end when the sending times are greater than the first preset times threshold.
  • the information judging module may also be configured to judge whether the first network status indicating information is a specified network status indicating information after the information receiving module receives the first network status indicating information returned by the authorization server. information.
  • the time determining module determines the first sending time for resending the first authorization check request based on the first network status indication information, which may specifically include the following manner: when the information judging module determines that the first network status indication information is designated network status indication information, A first sending time for resending the first authorization check request is determined based on a first preset rule.
  • the first sending time for resending the first authorization check request is determined based on the second preset rule.
  • the first predetermined sending time indicated by the first preset rule and the second preset rule are different from each other.
  • the time determining module determines the time to resend the first authorization check request based on the first preset rule.
  • the first sending time may specifically include: when the first network state indication information is designated network state indication information, determining the number of times the first authorization check request has been sent at the current moment; determining the first weight corresponding to the designated network state indication information value; based on the number of sending times of the first authorization verification request, the first weight value and the second preset basic duration, determine the second waiting period; based on the second waiting period and the current time, determine the first time to resend the first authorization verification request send time.
  • the loop control module is further configured to end when the number of times the first authorization verification request is sent is greater than the second preset number of times threshold so as not to trigger the request sending module to send the first authorization again. Verify request.
  • the time determination module determines the time to resend the first authorization check request based on the second preset rule.
  • the first sending time may specifically include: when the first network state indication information is not the designated network state indication information, record the current time, and obtain the preset network state indication information set, the preset network state indication information set includes all but the specified network state indication information The first network state indication information set and the second network state indication information set other than the indication information; when it is determined that the first network state indication information belongs to the first network state indication information set, determine the second network state indication information corresponding to the first network state indication information Weight value; Based on the second weight value and the second preset basic time length, determine the third waiting time; based on the third waiting time and the current time, determine the first sending time for resending the first authorization check request; or determine the first When the network state indication information belongs to the second network state indication information set, determine a third weight value
  • the number of determination module is further configured to determine the number of times the first authorization check request has been sent.
  • the loop control module is further configured to end when the number of times the first authorization verification request is sent is greater than the second preset times threshold so as not to trigger the request sending module to send the first authorization verification request.
  • Each module in the above-mentioned mobile hotspot authorization verification device can be implemented in whole or in part by software, hardware and combinations thereof.
  • the above-mentioned modules can be embedded in hardware or independent of one or more processors in the electronic device, and can also be stored in the memory of the electronic device in the form of software, so that one or more processors can call and execute the above The operation corresponding to the module.
  • an electronic device may be a mobile hotspot device, and its internal structure may be as shown in FIG. 10 .
  • the electronic device may include one or more processors, memory, communication interfaces, display screens, and input devices connected by a system bus. Wherein, one or more processors of the electronic device are used to provide calculation and control capabilities.
  • the memory of the electronic device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system and computer readable instructions.
  • the internal memory provides an environment for the execution of the operating system and computer readable instructions in the non-volatile storage medium.
  • the communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, an operator network, near field communication (NFC) or other technologies.
  • a mobile hotspot authorization verification method is implemented.
  • the display screen of the electronic device may be a liquid crystal display screen or an electronic ink display screen
  • the input device of the electronic device may be a touch layer covered on the display screen, or a button, a trackball or a touch pad provided on the housing of the electronic device , and can also be an external keyboard, touchpad, or mouse.
  • FIG. 10 is only a block diagram of a partial structure related to the disclosed solution, and does not constitute a limitation on the electronic device to which the disclosed solution is applied.
  • the specific electronic device can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.
  • the apparatus provided by the present disclosure may be implemented in the form of a computer-readable instruction, and the computer-readable instruction may run on the electronic device as shown in FIG. 10 .
  • Various program modules constituting the mobile hotspot authorization verification device can be stored in the memory of the electronic device, for example, the request sending module 901 , information receiving module 902 , time determining module 903 and cycle control module 904 shown in FIG. 9 .
  • the computer-readable instructions constituted by various program modules enable one or more processors to execute the steps in the mobile hotspot authorization verification method of various embodiments of the present disclosure described in this specification.
  • the electronic device shown in Figure 10 can execute step S201 through the request sending module 901 in the mobile hotspot authorization verification device shown in Figure 9, the electronic device can execute step S202 through the information receiving module 902, and the electronic device can determine Module 903 executes step S203, and the electronic device may execute step S204 through the loop control module 904.
  • an electronic device including a memory and one or more processors, the memory stores computer-readable instructions, and the one or more processors execute the computer-readable instructions to implement the following steps:
  • Step S201 Sending a first authorization verification request to the authorization server.
  • Step S202 Receive the first network status indication information returned by the authorization server.
  • the first network status indication information is generated by the authorization server in response to the first authorization verification request.
  • Step S203 Based on the first network status indication information, determine a first sending time for resending the first authorization check request; where different first network status indication information corresponds to different request sending times.
  • Step S204 When the first sending time arrives, repeat the step of sending the first authorization verification request to the authorization server.
  • the following steps are also implemented: before the step of sending the first authorization verification request to the authorization server, sending the second authorization verification request to the authorization server; receiving the authorization server's return The second network status indication information, the second network status indication information is generated by the authorization server in response to the second authorization check request; whether the second network status indication information is the designated network status indication information, and the designated network status indication information indicates that the network status is normal; If yes, repeat the step of sending the first authorization verification request to the authorization server.
  • the following steps are further implemented: when the second network status indication information is not specified network status indication information, determine the status of the second authorization check request sent at the current moment The number of sending times; based on the number of sending times and the first preset basic time length, determine the first waiting time; based on the first waiting time and the current time, determine the second sending time for resending the second authorization check request; when the second sending time arrives , repeating the step of sending the second authorization verification request to the authorization server until the sending times are greater than the first preset times threshold.
  • the following steps are also implemented: after sending the second authorization verification request to the authorization server, if no information returned by the authorization server is received after waiting for a preset period of time, Then determine the number of times the second authorization verification request has been sent at the current moment; determine the first waiting period based on the number of transmissions and the first preset basic duration; determine resending the second authorization verification request based on the first waiting duration and the current moment.
  • the second sending time when the second sending time arrives, repeat the step of sending the second authorization verification request to the authorization server until the number of times of sending is greater than the first preset threshold.
  • the following steps are further implemented: determining the first waiting period based on the following formula:
  • T1 represents the first waiting duration
  • t represents the first preset basic duration
  • n represents the number of sending times.
  • the following steps are further implemented: after receiving the first network status indication information returned by the authorization server, determining whether the first network status indication information is specified network status indication information ; Based on the first network status indication information, determining the first sending time for resending the first authorization check request includes: when the first network status indication information is designated network status indication information, determining to resend the first authorization check request based on the first preset rule A first sending time of an authorization verification request; when the first network state indication information is not specified network state indication information, determine the first sending time of resending the first authorization verification request based on a second preset rule; wherein, the first predetermined It is assumed that the determined first sending time indicated by the rule and the second preset rule is different.
  • the following steps are further implemented: when the first network status indication information is designated network status indication information, determine the status of the first authorization check request sent at the current moment The number of sending times; determine the first weight value corresponding to the specified network status indication information; determine the second waiting time based on the number of times the first authorization check request is sent, the first weight value, and the second preset basic time length; based on the second waiting time and At the current moment, determine the first sending time for resending the first authorization check request.
  • the following steps are also implemented: when the number of times the first authorization verification request is sent is greater than the second preset number of thresholds, end and no longer send the first authorization verification request ask.
  • the following steps are also implemented: when the first network status indication information is not specified network status indication information, record the current moment, and acquire preset network status indication information Set, the preset network state indication information set includes the first network state indication information set and the second network state indication information set except for the specified network state indication information; it is determined that the first network state indication information belongs to the first network state indication information
  • the second weight value corresponding to the first network state indication information determines the third waiting time based on the second weight value and the second preset basic time length; determine to resend the first time based on the third waiting time and the current time The first sending time of the authorization verification request; or, when it is determined that the first network status indication information belongs to the second network status indication information set, determine the third weight value corresponding to the first network status indication information, and the third weight value is greater than the second weight value; based on the third weight value and the second preset basic time length, determine the fourth waiting time; based on the fourth waiting time and
  • the following steps are also implemented: determining the number of times the first authorization verification request has been sent; when the number of times the first authorization verification request is sent is greater than the second preset When the number of times exceeds the threshold, end and no longer send the first authorization check request.
  • the determined sending time of resending the authorization verification request is different, so that it can be based on the network status indication
  • the network status indicated by the information dynamically and continuously adjusts the time for sending the authorization verification request.
  • the hotspot function is not directly turned off, and the time for resending the authorization request can be flexibly adjusted based on the real situation of the network status indicated by the network status indication information. time, avoid sending authorization requests too frequently, thereby reducing the busyness and burden of the authorization server 102, and also reducing the power consumption of the mobile hotspot 101.
  • a computer-readable storage medium on which computer-readable instructions are stored, and when the computer-readable instructions are executed by one or more processors, the following steps are implemented:
  • Step S201 Sending a first authorization verification request to the authorization server.
  • Step S202 Receive the first network status indication information returned by the authorization server.
  • the first network status indication information is generated by the authorization server in response to the first authorization verification request.
  • Step S203 Based on the first network status indication information, determine a first sending time for resending the first authorization check request; where different first network status indication information corresponds to different request sending times.
  • Step S204 When the first sending time arrives, repeat the step of sending the first authorization verification request to the authorization server.
  • the following steps are further implemented: before the step of sending the first authorization verification request to the authorization server, sending the second authorization verification request to the authorization server; receiving the authorization server Returning the second network status indication information, the second network status indication information is generated by the authorization server in response to the second authorization verification request; judging whether the second network status indication information is the designated network status indication information, and the designated network status indication information indicates that the network status is normal ; If yes, repeat the step of sending the first authorization verification request to the authorization server.
  • the following steps are further implemented: when the second network status indication information is not specified network status indication information, determine the second authorization check request that has been sent at the current moment The number of sending times; based on the number of sending times and the first preset basic time length, determine the first waiting time; based on the first waiting time and the current time, determine the second sending time for resending the second authorization check request; when the second sending time arrives , repeat the step of sending the second authorization verification request to the authorization server until the sending times are greater than the first preset times threshold.
  • the following steps are further implemented when the computer-readable instructions are executed by one or more processors: after sending the second authorization verification request to the authorization server, if no information returned by the authorization server is received after waiting for a preset period of time , then determine the number of times the second authorization verification request has been sent at the current moment; determine the first waiting time based on the number of sending times and the first preset basic duration; determine to resend the second authorization verification request based on the first waiting time and the current time The second sending time of the request; when the second sending time arrives, repeat the step of sending the second authorization verification request to the authorization server until the number of times of sending is greater than the first preset threshold.
  • the following steps are further implemented: determining the first waiting period based on the following formula:
  • T1 represents the first waiting duration
  • t represents the first preset basic duration
  • n represents the number of sending times.
  • the following steps are further implemented: after receiving the first network status indication information returned by the authorization server, determining whether the first network status indication information is a specified network status indication Information; based on the first network status indication information, determining the first sending time for resending the first authorization check request includes: when the first network status indication information is specified network status indication information, determining to resend based on the first preset rule The first sending time of the first authorization verification request; when the first network state indication information is not the specified network state indication information, determine the first sending time of resending the first authorization verification request based on the second preset rule; wherein, the first The preset rule and the second preset rule respectively indicate that the determined first sending time is different.
  • the following steps are further implemented: when the first network status indication information is designated network status indication information, determine the first authorization check request that has been sent at the current moment The number of sending times; determine the first weight value corresponding to the specified network status indication information; determine the second waiting time based on the number of times the first authorization check request is sent, the first weight value, and the second preset basic time length; based on the second waiting time and the current time, determine the first sending time for resending the first authorization check request.
  • the following steps are further implemented: when the number of times the first authorization verification request is sent is greater than the second preset number of thresholds, end and no longer send the first authorization Verify request.
  • the following steps are further implemented: when the first network status indication information is not specified network status indication information, record the current moment, and obtain a preset network status indication The information set, the preset network state indication information set includes the first network state indication information set and the second network state indication information set except for the specified network state indication information; it is determined that the first network state indication information belongs to the first network When the state indication information is collected, determine the second weight value corresponding to the first network state indication information; determine the third waiting time based on the second weight value and the second preset basic time length; determine the new waiting time based on the third waiting time and the current time.
  • the following steps are further implemented: determining the number of times the first authorization check request has been sent; when the number of times the first authorization check request is sent is greater than the second preset When the number of times threshold is set, end and no longer send the first authorization check request.
  • the determined sending time of resending the authorization verification request is different, so that it can be based on the network status indication
  • the network status indicated by the information dynamically and continuously adjusts the time for sending the authorization verification request.
  • the hotspot function is not directly turned off, and the time for resending the authorization request can be flexibly adjusted based on the real situation of the network status indicated by the network status indication information. time, avoid sending authorization requests too frequently, thereby reducing the busyness and burden of the authorization server 102, and also reducing the power consumption of the mobile hotspot 101.
  • Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory or optical memory, etc.
  • Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory.
  • RAM Random Access Memory
  • SRAM Static Random Access Memory
  • DRAM Dynamic Random Access Memory
  • the mobile hotspot authorization verification method provided by this disclosure can flexibly adjust the time for resending authorization requests based on the real situation of the network status indicated by the network status indication information when the network status is not good, avoiding the situation of sending authorization requests too frequently, and solving the problem
  • the problem of the busyness and burden of the authorization server caused by sending the authorization request too frequently reduces the power consumption of the mobile hotspot and has strong industrial applicability.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present disclosure relates to a mobile hotspot authorization inspection method and apparatus, a storage medium, and an electronic device. The method comprises: sending a first authorization inspection request to an authorization server; receiving first network state indication information returned by the authorization server, the first network state indication information being generated by the authorization server in response to the first authorization inspection request; determining, on the basis of the first network state indication information, a first sending time for re-sending the first authorization inspection request, wherein different first network state indication information corresponds to different request sending times; and repeating the step of sending the first authorization inspection request to the authorization server upon arrival of the first sending time. According to embodiments of the present disclosure, the time for re-sending an authorization request can be flexibly adjusted on the basis of the real situation of a network state indicated by the network state indication information, to avoid the situation that the authorization request is sent too frequently, thereby reducing the busy and burden of the authorization server, and reducing the power consumption of a mobile hotspot.

Description

移动热点授权检验方法、装置、存储介质和电子设备Mobile hotspot authorization verification method, device, storage medium and electronic equipment
本公开要求于2021年6月21日提交中国专利局、申请号为202110686577.2、发明名称为“移动热点授权检验方法、装置、存储介质和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。This disclosure claims the priority of the Chinese patent application with the application number 202110686577.2 and the title of the invention "Mobile hotspot authorized inspection method, device, storage medium and electronic equipment" submitted to the China Patent Office on June 21, 2021, the entire content of which is passed References are incorporated in this disclosure.
技术领域technical field
本公开涉及一种移动热点授权检验方法、移动热点授权检验装置,以及实现移动热点授权检验方法的计算机可读存储介质和电子设备。The disclosure relates to a mobile hotspot authorization verification method, a mobile hotspot authorization verification device, and a computer-readable storage medium and electronic equipment for realizing the mobile hotspot authorization verification method.
背景技术Background technique
无线局域网(WLAN,Wireless Local Area Networks)业务逐渐普及,用户终端可以通过移动网络运营商提供的WLAN网络,在WLAN热点覆盖区域使用WLAN方便地上网。Wireless local area network (WLAN, Wireless Local Area Networks) services are gradually becoming popular, and user terminals can use WLAN to access the Internet conveniently in WLAN hotspot coverage areas through the WLAN network provided by mobile network operators.
相关技术中,用户终端可以通过WLAN热点连接到互联网,但前提是WLAN热点必须在授权服务器成功地完成授权检验之后,才允许用户终端连接到互联网,否则用户终端无法使用互联网服务。目前用户终端发送授权请求如HTTP(Hypertext Transfer Protocol)请求后,当收到授权服务器返回的HTTP状态码(HTTP Status Code)是“200”时,表示网络状态正常,开启热点功能从而允许用户终端连接到互联网;当收到HTTP状态码是“403”等错误HTTP状态码时,表示网络状态不佳,则直接关闭热点功能,用户终端无法连接到互联网,另外重新发送授权请求到授权服务器,直至收到HTTP状态码是“200”时开启热点功能。In related technologies, a user terminal can connect to the Internet through a WLAN hotspot, but the WLAN hotspot only allows the user terminal to connect to the Internet after the authorization server successfully completes the authorization check, otherwise the user terminal cannot use Internet services. At present, after the user terminal sends an authorization request such as HTTP (Hypertext Transfer Protocol) request, when the HTTP status code (HTTP Status Code) returned by the authorization server is "200", it means that the network status is normal, and the hotspot function is enabled to allow the user terminal to connect to the Internet; when receiving an error HTTP status code such as "403", it means that the network status is not good, and the hotspot function will be turned off directly, and the user terminal cannot connect to the Internet, and the authorization request will be resent to the authorization server until it is received. Turn on the hotspot function when the HTTP status code is "200".
目前当用户终端与授权服务器之间的网络状态不佳(如网络不稳定或无法提供服务等)时,业界还没有提供基于网络状态的真实情况灵活调整重新发送授权请求的时间的方案,导致可能存在过于频繁发送授权请求的情况,这增加了授权服务器的忙碌和负担,也使得此时WLAN热点的功耗较大。At present, when the network status between the user terminal and the authorization server is not good (for example, the network is unstable or unable to provide services, etc.), the industry has not provided a solution to flexibly adjust the time to resend the authorization request based on the real situation of the network status, resulting in possible There is a situation that the authorization request is sent too frequently, which increases the busyness and burden of the authorization server, and also makes the power consumption of the WLAN hotspot at this time larger.
发明内容Contents of the invention
(一)要解决的技术问题(1) Technical problems to be solved
现行技术中没有提供基于网络状态的真实情况灵活调整重新发送授权请求的时间的方案,使得可能存在过于频繁发送授权请求的情况,增加了授权服务器的忙碌和负担,使WLAN热点的功耗较大。The current technology does not provide a solution to flexibly adjust the time to resend the authorization request based on the real situation of the network status, so that there may be situations where the authorization request is sent too frequently, which increases the busyness and burden of the authorization server, and makes the power consumption of the WLAN hotspot larger .
(二)技术方案(2) Technical solution
根据本公开公开的各种实施例,提供了一种授权检验方法、授权检验装置,以及实现授权检验方法的计算机可读存储介质和电子设备。According to various embodiments of the present disclosure, an authorization verification method, an authorization verification device, and a computer-readable storage medium and an electronic device for implementing the authorization verification method are provided.
一种移动热点授权检验方法,包括:A mobile hotspot authorization verification method, comprising:
发送第一授权检验请求到授权服务器;sending a first authorization check request to the authorization server;
接收所述授权服务器返回的第一网络状态指示信息,所述第一网络状态指示信息由所述授权服务器响应所述第一授权检验请求生成;receiving first network status indication information returned by the authorization server, the first network status indication information being generated by the authorization server in response to the first authorization verification request;
基于所述第一网络状态指示信息,确定重新发送第一授权检验请求的第一发送时间;其中不同的第一网络状态指示信息对应不同的请求发送时间;Based on the first network status indication information, determine a first sending time for resending the first authorization check request; where different first network status indication information corresponds to different request sending times;
在所述第一发送时间到来时,重复所述发送第一授权检验请求到授权服务器的步骤。When the first sending time arrives, repeat the step of sending the first authorization check request to the authorization server.
可选的,在本公开的一些实施例中,所述发送第一授权检验请求到授权服务器的步骤之前,所述方法还包括:发送第二授权检验请求到所述授权服务器;接收所述授权服务器返回的第二网络状态指示信息,所述第二网络状态指示信息由所述授权服务器响应所述第二授权检验请求生成;判断所述第二网络状态指示信息是否为指定网络状态指示信息,所述指定网络状态指示信息指示网络状态正常;若是,则重复所述发送第一授权检验请求到授权服务器的步骤。Optionally, in some embodiments of the present disclosure, before the step of sending the first authorization verification request to the authorization server, the method further includes: sending a second authorization verification request to the authorization server; receiving the authorization The second network status indication information returned by the server, the second network status indication information is generated by the authorization server in response to the second authorization verification request; judging whether the second network status indication information is specified network status indication information, The specified network status indication information indicates that the network status is normal; if yes, repeat the step of sending the first authorization check request to the authorization server.
可选的,在本公开的一些实施例中,所述方法还包括:在所述第二网络状态指示信息不是所述指定网络状态指示信息时,确定当前时刻已发送的第二授权检验请求的发送次数;基于所述发送次数以及第一预设基本时长,确定第一等待时长;基于所述第一等待时长和当前时刻,确定重新发送第二授权检验请求的第二发送时间;在所述第二发送时间到来时,重复所述发送第二授权检验请求到所述授权服务器的步骤,直至所述发送次数大于第一预设次数阈值时结束。Optionally, in some embodiments of the present disclosure, the method further includes: when the second network state indication information is not the specified network state indication information, determining the number of the second authorization check request sent at the current moment The number of times of sending; based on the number of times of sending and the first preset basic time length, determine the first waiting time; based on the first waiting time and the current time, determine the second sending time for resending the second authorization check request; in the When the second sending time comes, the step of sending the second authorization verification request to the authorization server is repeated until the number of times of sending is greater than the first preset threshold.
可选的,在本公开的一些实施例中,所述方法还包括:发送第二授权检验请求到所述授权服务器之后,若等待预设时长时未接收到所述授权服务器返回的任何信息,则确定当前时刻已发送的第二授权检验请求的发送次数;基于所述发送次数以及第一预设基本时长,确定第一等待时长;基于所述第一等待时长和当前时刻,确定重新发送第二授权检验请求的第二发送时间;在所述第二发送时间到来时,重复所述发送第二授权检验请求到所述授权服务器的步骤,直至所述发送次数大于第一预设次数阈值时结束。Optionally, in some embodiments of the present disclosure, the method further includes: after sending the second authorization verification request to the authorization server, if no information returned by the authorization server is received after waiting for a preset period of time, Then determine the sending times of the second authorization verification request sent at the current moment; determine the first waiting time based on the sending times and the first preset basic time length; determine the resending of the first waiting time based on the first waiting time and the current time Second sending time of the authorization verification request; when the second sending time arrives, repeat the step of sending the second authorization verification request to the authorization server until the number of times of sending is greater than the first preset times threshold End.
可选的,在本公开的一些实施例中,所述基于所述发送次数以及第一预设基本时长,确定第一等待时长,包括:基于以下公式确定第一等待时长:Optionally, in some embodiments of the present disclosure, the determining the first waiting period based on the number of sending times and the first preset basic period includes: determining the first waiting period based on the following formula:
T1=t×2n;T1=t×2n;
其中,T1表示第一等待时长,t表示第一预设基本时长,n表示发送次数。Wherein, T1 represents the first waiting duration, t represents the first preset basic duration, and n represents the number of sending times.
可选的,在本公开的一些实施例中,所述接收所述授权服务器返回的第一网络状态指示信息之后,所述方法还包括:判断所述第一网络状态指示信息是否为指定网络状态指示信息;所述基于所述第一网络状态指示信息,确定重新发送第一授权检验请求的第一发送时间,包括:在所述第一网络状态指示信息是指定网络状态指示信息时,基于第一预设规则确定重新发送第一授权检验请求的第一发送时间;在所述第一网络状态指示信息不是指定网络状态指示信息时,基于第二预设规则确定重新发送第一授权检验请求的第一发送时间;其中,所述第一预设规则与所述第二预设规则各自指示确定的第一发送时间不同。Optionally, in some embodiments of the present disclosure, after receiving the first network status indication information returned by the authorization server, the method further includes: judging whether the first network status indication information is a specified network status Indication information: determining the first sending time for resending the first authorization check request based on the first network status indication information includes: when the first network status indication information is designated network status indication information, based on the first A preset rule determines the first sending time of resending the first authorization verification request; when the first network status indication information is not specified network status indication information, determines the time of resending the first authorization verification request based on a second preset rule A first sending time; wherein, the first sending time indicated and determined by the first preset rule and the second preset rule are different.
可选的,在本公开的一些实施例中,在所述第一网络状态指示信息是指定网络状态指示信息时,基于第一预设规则确定重新发送第一授权检验请求的第一发送时间,包括:在所述第一网络状态指示信息是指定网络状态指示信息时,确定当前时刻已发送的第一授权检验请求的发送次数;确定所述指定网络状态指示信息对应的第一权重值;基于所述第一授权检验请求的发送次数、所述第一权重值以及第二预设基本时长,确定第二等待时长;基于所述第二等待时长和当前时刻, 确定重新发送第一授权检验请求的第一发送时间。Optionally, in some embodiments of the present disclosure, when the first network state indication information is specified network state indication information, determining the first sending time for resending the first authorization check request based on a first preset rule, Including: when the first network state indication information is designated network state indication information, determining the number of times the first authorization check request has been sent at the current moment; determining the first weight value corresponding to the designated network state indication information; based on The number of times the first authorization verification request is sent, the first weight value and the second preset basic duration determine a second waiting duration; based on the second waiting duration and the current time, determine to resend the first authorization verification request The first sending time of .
可选的,在本公开的一些实施例中,所述方法还包括:在所述第一授权检验请求的发送次数大于第二预设次数阈值时,结束从而不再发送第一授权检验请求。Optionally, in some embodiments of the present disclosure, the method further includes: when the number of times the first authorization verification request is sent is greater than a second preset number of times threshold, ending so as not to send the first authorization verification request again.
可选的,在本公开的一些实施例中,在所述第一网络状态指示信息不是指定网络状态指示信息时,基于第二预设规则确定重新发送第一授权检验请求的第一发送时间,包括:在所述第一网络状态指示信息不是指定网络状态指示信息时,记录当前时刻,并获取预设网络状态指示信息集合,所述预设网络状态指示信息集合包括除所述指定网络状态指示信息之外的第一网络状态指示信息集合和第二网络状态指示信息集合;判定所述第一网络状态指示信息归属于所述第一网络状态指示信息集合时,确定所述第一网络状态指示信息对应的第二权重值;基于所述第二权重值以及第二预设基本时长,确定第三等待时长;基于所述第三等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间;或者,判定所述第一网络状态指示信息归属于所述第二网络状态指示信息集合时,确定所述第一网络状态指示信息对应的第三权重值,所述第三权重值大于所述第二权重值;基于所述第三权重值以及第二预设基本时长,确定第四等待时长;基于所述第四等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间。Optionally, in some embodiments of the present disclosure, when the first network state indication information is not designated network state indication information, determine the first sending time for resending the first authorization check request based on a second preset rule, Including: when the first network state indication information is not the specified network state indication information, record the current time, and obtain a preset network state indication information set, the preset network state indication information set includes all but the specified network state indication information The first network state indication information set and the second network state indication information set other than information; when it is determined that the first network state indication information belongs to the first network state indication information set, determine the first network state indication information The second weight value corresponding to the information; based on the second weight value and the second preset basic time length, determine the third waiting time; based on the third waiting time and the current time, determine the first time to resend the first authorization check request a sending time; or, when determining that the first network state indication information belongs to the second network state indication information set, determine a third weight value corresponding to the first network state indication information, and the third weight value greater than the second weight value; based on the third weight value and the second preset basic time length, determine a fourth waiting time length; based on the fourth waiting time length and the current time, determine to resend the first authorization check request A sending time.
可选的,在本公开的一些实施例中,所述方法还包括:确定已发送的第一授权检验请求的发送次数;在所述第一授权检验请求的发送次数大于第二预设次数阈值时,结束从而不再发送第一授权检验请求。Optionally, in some embodiments of the present disclosure, the method further includes: determining the number of times the first authorization verification request has been sent; when the number of times the first authorization verification request is sent is greater than a second preset number of times threshold , end and no longer send the first authorization check request.
一种移动热点授权检验装置,包括:A mobile hotspot authorization verification device, comprising:
请求发送模块,配置成发送第一授权检验请求到授权服务器;The request sending module is configured to send the first authorization check request to the authorization server;
信息接收模块,配置成接收所述授权服务器返回的第一网络状态指示信息,所述第一网络状态指示信息由所述授权服务器响应所述第一授权检验请求生成;An information receiving module configured to receive first network status indication information returned by the authorization server, the first network status indication information being generated by the authorization server in response to the first authorization verification request;
时间确定模块,配置成基于所述第一网络状态指示信息,确定重新发送第一授权检验请求的第一发送时间;其中不同的第一网络状态指示信息对应不同的请求发送时间;The time determination module is configured to determine the first sending time for resending the first authorization check request based on the first network status indication information; where different first network status indication information corresponds to different request sending times;
循环控制模块,配置成在所述第一发送时间到来时,触发所述请求发送模块发送第一授权检验请求到授权服务器。The loop control module is configured to trigger the request sending module to send the first authorization verification request to the authorization server when the first sending time arrives.
一种计算机可读存储介质,其上存储有计算机可读指令,该计算机可读指令被一个或多个处理器执行时实现上述任一实施例所述授权检验方法的步骤。A computer-readable storage medium, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by one or more processors, the steps of the authorization verification method described in any of the above-mentioned embodiments are implemented.
一种电子设备,包括:An electronic device comprising:
一个或多个处理器;以及one or more processors; and
存储器,配置成存储计算机可读指令;a memory configured to store computer readable instructions;
其中,所述一个或多个处理器配置为经由执行所述计算机可读指令来执行上述任一实施例所述授权检验方法的步骤。Wherein, the one or more processors are configured to execute the steps of the authorization verification method in any of the above embodiments by executing the computer-readable instructions.
本公开实施例提供的技术方案与现有技术相比具有如下优点:Compared with the prior art, the technical solutions provided by the embodiments of the present disclosure have the following advantages:
本公开实施例提供的移动热点授权检验方法、装置、存储介质和电子设备,移动热点发送第一授权检验请求到授权服务器,接收授权服务器返回的第一网络状态指示信息,第一网络状态指示信息由授权服务器响应第一授权检验请求生成;基于第一网络状态指示信息,确定重新发送第一授权检验请求的第一发送时间;其中不同的第一网络状态指示信息对应不同的请求发送时间;在第一发送时间到 来时,重复发送第一授权检验请求到授权服务器的步骤。这样,在移动热点授权检验时,由于每次授权服务器返回的网络状态指示信息可能不同,因此确定的重新发送授权检验请求的发送时间不同,从而可以基于网络状态指示信息所指示的网络状态动态地不断调整发送授权检验请求的时间,在网络状态不佳时,可基于网络状态指示信息指示的网络状态的真实情况灵活调整重新发送授权请求的时间,避免过于频繁发送授权请求的情况,从而减轻了授权服务器的忙碌和负担,也使得移动热点的功耗降低。In the mobile hotspot authorization verification method, device, storage medium and electronic device provided by the embodiments of the present disclosure, the mobile hotspot sends a first authorization verification request to the authorization server, receives the first network status indication information returned by the authorization server, and the first network status indication information Generated by the authorization server in response to the first authorization verification request; based on the first network status indication information, determine the first sending time for resending the first authorization verification request; wherein different first network status indication information corresponds to different request sending times; When the first sending time arrives, repeat the step of sending the first authorization verification request to the authorization server. In this way, during the mobile hotspot authorization verification, since the network status indication information returned by the authorization server may be different each time, the determined sending time of resending the authorization verification request is different, so that the network status indicated by the network status indication information can be dynamically determined. Constantly adjust the time for sending authorization verification requests. When the network status is not good, the time for resending authorization requests can be flexibly adjusted based on the real situation of the network status indicated by the network status indication information, so as to avoid sending authorization requests too frequently, thereby reducing The busyness and burden of the authorization server also reduces the power consumption of the mobile hotspot.
附图说明Description of drawings
图处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, In other words, other drawings can also be obtained from these drawings without paying creative labor.
图1为本公开一个或多个实施例提供的移动热点授权检验方法的应用场景示意图;FIG. 1 is a schematic diagram of an application scenario of a mobile hotspot authorization verification method provided by one or more embodiments of the present disclosure;
图2为本公开一个或多个实施例提供的移动热点授权检验方法流程图;FIG. 2 is a flowchart of a mobile hotspot authorization verification method provided by one or more embodiments of the present disclosure;
图3为本公开一个或多个实施例移动热点授权检验方法流程图;FIG. 3 is a flowchart of a mobile hotspot authorization verification method according to one or more embodiments of the present disclosure;
图4为本公开一个或多个实施例移动热点授权检验方法流程图;FIG. 4 is a flowchart of a mobile hotspot authorization verification method according to one or more embodiments of the present disclosure;
图5为本公开一个或多个实施例授权检验等待时长示意图;Fig. 5 is a schematic diagram of waiting time for authorization verification in one or more embodiments of the present disclosure;
图6为本公开一个或多个实施例移动热点授权检验方法流程图;FIG. 6 is a flowchart of a mobile hotspot authorization verification method according to one or more embodiments of the present disclosure;
图7为本公开一个或多个实施例移动热点授权检验方法流程图;FIG. 7 is a flowchart of a mobile hotspot authorization verification method according to one or more embodiments of the present disclosure;
图8为本公开一个或多个实施例中移动热点授权检验方法流程图;FIG. 8 is a flowchart of a mobile hotspot authorization verification method in one or more embodiments of the present disclosure;
图9为本公开一个或多个实施例移动热点授权检验装置示意图;FIG. 9 is a schematic diagram of a mobile hotspot authorization verification device according to one or more embodiments of the present disclosure;
图10为本公开一个或多个实施例实现移动热点授权检验方法的电子设备示意图。FIG. 10 is a schematic diagram of an electronic device implementing a mobile hotspot authorization verification method according to one or more embodiments of the present disclosure.
具体实施方式detailed description
为了能够更清楚地理解本公开的上述目的、特征和优点,下面将对本公开的方案进行进一步描述。需要说明的是,在不冲突的情况下,本公开的实施例及实施例中的特征可以相互组合。In order to more clearly understand the above objects, features and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that, in the case of no conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other.
在下面的描述中阐述了很多具体细节以便于充分理解本公开,但本公开还可以采用其他不同于在此描述的方式来实施;显然,说明书中的实施例只是本公开的一部分实施例,而不是全部的实施例。In the following description, many specific details are set forth in order to fully understand the present disclosure, but the present disclosure can also be implemented in other ways than described here; obviously, the embodiments in the description are only some of the embodiments of the present disclosure, and Not all examples.
应当理解,在下文中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上。“和/或”用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a, b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”,其中a,b,c可以是单个,也可以是多个。It should be understood that hereinafter, "at least one (item)" means one or more, and "multiple" means two or more. "And/or" is used to describe the association relationship of associated objects, which means that there can be three kinds of relationships, for example, "A and/or B" can mean: only A exists, only B exists, and A and B exist at the same time. Among them, A and B can be singular or plural. The character "/" generally indicates that the contextual objects are an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one item (piece) of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c ", where a, b, c can be single or multiple.
图1为本公开实施例示出的移动热点授权检验方法的应用场景示意图,该应用场景可以包括但不限于移动热点101(Mobile Hotspot)、授权服务器102(Entitlement Server)以及用户设备(User Equipment,简称为UE)103,其中,移动热点101与授权服务器102以及UE可以分别通信连接,具体的通信连接方式可以参考现有技术,此处不再赘述。UE可以是但不限于智能手机、平板电脑等设备,移动热点101可以包括但不限于是WLAN热点。在该示例应用场景下,UE可以通过移动热点101连接到互联网,前提是移动热点101必须在授权服务器102成功地完成授权检验之后,才允许UE连接到互联网,否则UE无法使用互联网服务。1 is a schematic diagram of an application scenario of a mobile hotspot authorization verification method shown in an embodiment of the present disclosure. The application scenario may include but not limited to a mobile hotspot 101 (Mobile Hotspot), an authorization server 102 (Entitlement Server) and a user equipment (User Equipment, referred to as UE) 103, wherein, the mobile hotspot 101 and the authorization server 102 and the UE can communicate with each other, and the specific communication connection mode can refer to the existing technology, which will not be repeated here. The UE may be but not limited to smart phones, tablet computers and other devices, and the mobile hotspot 101 may include but not limited to be a WLAN hotspot. In this example application scenario, the UE can connect to the Internet through the mobile hotspot 101, provided that the mobile hotspot 101 allows the UE to connect to the Internet only after the authorization server 102 successfully completes the authorization check, otherwise the UE cannot use Internet services.
在一个实施例中,如图2所示移动热点授权检验方法,本实施例主要以该移动热点授权检验方法应用于图1中的移动热点101来举例说明。In one embodiment, a mobile hotspot authorization verification method is shown in FIG. 2 . This embodiment is mainly described by taking the mobile hotspot authorization verification method applied to the mobile hotspot 101 in FIG. 1 as an example.
步骤S201:发送第一授权检验请求到授权服务器。Step S201: Sending a first authorization verification request to the authorization server.
示例性的,第一授权检验请求可以是HTTP形式的请求,如HTTP GET请求,但不限于此。Exemplarily, the first authorization check request may be an HTTP request, such as an HTTP GET request, but is not limited thereto.
具体的,作为示例,移动热点101发送HTTP GET请求到授权服务器102。Specifically, as an example, the mobile hotspot 101 sends an HTTP GET request to the authorization server 102.
步骤S202:接收授权服务器返回的第一网络状态指示信息,第一网络状态指示信息由授权服务器响应第一授权检验请求生成。Step S202: Receive the first network status indication information returned by the authorization server. The first network status indication information is generated by the authorization server in response to the first authorization verification request.
示例性的,第一网络状态指示信息可以是HTTP状态码,不同的HTTP状态码可以标识不同的网络状态,如HTTP状态码是“200”时,表示网络正常,HTTP状态码是“403”时,表示一种错误网络状态。Exemplarily, the first network status indication information may be an HTTP status code, and different HTTP status codes may identify different network statuses. For example, when the HTTP status code is "200", it indicates that the network is normal, and when the HTTP status code is "403" , indicating an error network state.
具体的,作为示例,授权服务器102接收到移动热点101发送的HTTP GET请求之后,响应HTTP GET请求返回HTTP状态码至移动热点101。Specifically, as an example, after receiving the HTTP GET request sent by the mobile hotspot 101, the authorization server 102 responds to the HTTP GET request and returns an HTTP status code to the mobile hotspot 101.
步骤S203:基于第一网络状态指示信息,确定重新发送第一授权检验请求的第一发送时间;其中不同的第一网络状态指示信息对应不同的请求发送时间。Step S203: Based on the first network status indication information, determine a first sending time for resending the first authorization check request; where different first network status indication information corresponds to different request sending times.
步骤S204:判断第一发送时间是否到来,若是则重复发送第一授权检验请求到授权服务器的步骤。Step S204: Determine whether the first sending time has come, and if so, repeat the step of sending the first authorization verification request to the authorization server.
示例性的,不同的HTTP状态码对应不同的请求发送时间。Exemplarily, different HTTP status codes correspond to different request sending times.
具体的,作为示例,移动热点101发送HTTP GET请求后,若授权服务器102返回的HTTP状态码是“403”,则确定对应的请求发送时间1。Specifically, as an example, after the mobile hotspot 101 sends the HTTP GET request, if the HTTP status code returned by the authorization server 102 is "403", then determine the corresponding request sending time 1.
在请求发送时间1未到来时继续等待,当请求发送时间1到来时,重复步骤S201第二次发送HTTP GET请求,若授权服务器102本次返回的HTTP状态码是“404”,则确定对应的另一请求发送时间2。Continue to wait when the request sending time 1 has not arrived, and when the request sending time 1 arrives, repeat step S201 to send the HTTP GET request for the second time, if the HTTP status code returned by the authorization server 102 this time is "404", then determine the corresponding Another request is sent time 2.
在请求发送时间2未到来时继续等待,当请求发送时间2到来时,重复步骤S201第三次发送HTTP GET请求,如此循环处理。Continue to wait when the request sending time 2 has not arrived, and when the request sending time 2 arrives, repeat step S201 to send the HTTP GET request for the third time, and process in a loop like this.
在一些示例中,当发送HTTP GET请求的总次数大于设置的最大次数时,移动热点101可以结束循环不再发送HTTP GET请求,当然并不限于此,也可以基于其他方式如授权校验的总时长达到最大时长结束循环,本实施例中对此不作限制。In some examples, when the total number of HTTP GET requests sent is greater than the set maximum number of times, the mobile hotspot 101 can end the cycle and no longer send HTTP GET requests, of course it is not limited thereto, and can also be based on other methods such as the total number of authorization checks. The cycle ends when the duration reaches the maximum duration, which is not limited in this embodiment.
本实施例的上述移动热点授权检验方法,在移动热点101授权检验时,由于 每次授权服务器102返回的网络状态指示信息可能不同,因此确定的重新发送授权检验请求的发送时间不同,从而可以基于网络状态指示信息所指示的网络状态动态地不断调整发送授权检验请求的时间,在网络状态不佳时,不直接关闭热点功能,可基于网络状态指示信息指示的网络状态的真实情况灵活调整重新发送授权请求的时间,避免过于频繁发送授权请求的情况,从而减轻了授权服务器102的忙碌和负担,也使得移动热点101的功耗降低。In the above-mentioned mobile hotspot authorization verification method of this embodiment, when the mobile hotspot 101 is authorized for verification, since the network status indication information returned by the authorization server 102 may be different each time, the determined sending time of resending the authorization verification request is different, so it can be based on The network status indicated by the network status indication information dynamically and continuously adjusts the time to send the authorization verification request. When the network status is not good, the hotspot function is not directly turned off, and the resend can be flexibly adjusted based on the real situation of the network status indicated by the network status indication information. The time of the authorization request avoids sending the authorization request too frequently, thereby reducing the busyness and burden of the authorization server 102 and reducing the power consumption of the mobile hotspot 101 .
可选的,在本公开的一些实施例中,步骤S201中发送第一授权检验请求到授权服务器之前,结合参考图3中所示,所述方法还可以包括以下步骤:Optionally, in some embodiments of the present disclosure, before sending the first authorization verification request to the authorization server in step S201, referring to what is shown in FIG. 3 , the method may further include the following steps:
步骤S301:发送第二授权检验请求到授权服务器。Step S301: Send a second authorization verification request to the authorization server.
具体的,作为示例,移动热点101响应于检测到首次有任意一个UE的网络连接请求时,发送第二授权检验请求如HTTP GET请求到授权服务器102。Specifically, as an example, the mobile hotspot 101 sends a second authorization check request such as an HTTP GET request to the authorization server 102 in response to detecting that there is a network connection request from any UE for the first time.
步骤S302:接收授权服务器返回的第二网络状态指示信息,第二网络状态指示信息由授权服务器响应第二授权检验请求生成。Step S302: Receive the second network status indication information returned by the authorization server, the second network status indication information is generated by the authorization server in response to the second authorization verification request.
示例性的,第二网络状态指示信息也可以是HTTP状态码。Exemplarily, the second network status indication information may also be an HTTP status code.
具体的,作为示例,授权服务器102接收到移动热点101发送的第二授权检验请求如HTTP GET请求之后,响应该HTTP GET请求返回HTTP状态码至移动热点101。Specifically, as an example, after receiving the second authorization verification request sent by the mobile hotspot 101, such as an HTTP GET request, the authorization server 102 returns an HTTP status code to the mobile hotspot 101 in response to the HTTP GET request.
步骤S303:判断第二网络状态指示信息是否为指定网络状态指示信息,指定网络状态指示信息指示网络状态正常。Step S303: Judging whether the second network status indication information is designated network status indication information, and the designated network status indication information indicates that the network status is normal.
示例性的,指定网络状态指示信息可以是指定HTTP状态码“200”。Exemplarily, the designated network status indication information may be designated HTTP status code "200".
具体的,移动热点101发送第二授权检验请求如HTTP GET请求之后,判断接收到的HTTP状态码是否是指定HTTP状态码“200”,若是,则重复发送第一授权检验请求到授权服务器的步骤,即返回上述步骤S201。Specifically, after the mobile hotspot 101 sends the second authorization verification request such as an HTTP GET request, it is judged whether the received HTTP status code is the designated HTTP status code "200", and if so, the step of sending the first authorization verification request to the authorization server is repeated , that is, return to the above step S201.
本实施例中,移动热点101进入步骤S201之前,响应于一个UE连接到移动热点101时,触发第一次发送授权检验请求,在第一次授权检验成功即返回HTTP状态码“200”时说明网络状态正常,之后便进入步骤S201,即进入图2所示的阶段不断发送授权检验请求,这样随着网络状态可能产生变化,可以尽可能及时地获取授权服务器102返回的HTTP状态码“200”,从而及时开启热点功能以允许用户终端连接到互联网,提高使用者的体验。In this embodiment, before the mobile hotspot 101 enters step S201, when a UE is connected to the mobile hotspot 101, it triggers the sending of the authorization check request for the first time, and when the first authorization check is successful, it returns the HTTP status code "200". The network status is normal, and then enter step S201, that is, enter the stage shown in Figure 2 to continuously send authorization verification requests, so that as the network status may change, the HTTP status code "200" returned by the authorization server 102 can be obtained as timely as possible , so as to enable the hotspot function in time to allow the user terminal to connect to the Internet, thereby improving user experience.
可选的,本公开的一些实施例中,在上述图3所示实施例的基础上,在第二网络状态指示信息不是指定网络状态指示信息时,如图4中所示,所述方法还可以包括以下步骤:Optionally, in some embodiments of the present disclosure, on the basis of the foregoing embodiment shown in FIG. 3 , when the second network status indication information is not specified network status indication information, as shown in FIG. 4 , the method further Can include the following steps:
步骤S401:确定当前时刻已发送的第二授权检验请求的发送次数。Step S401: Determine the number of times the second authorization verification request has been sent at the current moment.
具体,移动热点101进入步骤S201之前,第一次发送授权检验请求即第二授权检验请求之后,若收到授权服务器102返回的HTTP状态码不是指定HTTP状态码“200”,如返回的HTTP状态码是“403”,则确定当前时刻已发送的第二授权检验请求的发送次数n,此时n=1,当前时刻例如是“2021/5/28 16:56:00”。Specifically, before the mobile hotspot 101 enters step S201, after sending the authorization verification request for the first time, that is, the second authorization verification request, if the HTTP status code returned by the authorization server 102 is not the specified HTTP status code "200", such as the returned HTTP status If the code is "403", then determine the number of times n of the second authorization check request sent at the current moment, where n=1, and the current moment is, for example, "2021/5/28 16:56:00".
步骤S402:基于发送次数以及第一预设基本时长,确定第一等待时长。Step S402: Determine a first waiting period based on the number of sending times and the first preset basic period.
示例性的,第一预设基本时长t可以根据需要设置,对此不作限制。Exemplarily, the first preset basic duration t can be set as required, and there is no limitation to this.
第一等待时长T1例如可基于发送次数n以及第一预设基本时长的乘积得到,即T1=t×n,但不限于此。The first waiting period T1 can be obtained, for example, based on the product of the number of sending times n and the first preset basic period, that is, T1=t×n, but it is not limited thereto.
步骤S403:基于第一等待时长和当前时刻,确定重新发送第二授权检验请求的第二发送时间。Step S403: Based on the first waiting period and the current time, determine a second sending time for resending the second authorization check request.
具体的,例如第一等待时长T1是5秒,则移动热点101确定的第二发送时间是“2021/5/28 17:01:00”,此处仅为举例说明,并不限于此。Specifically, for example, if the first waiting time T1 is 5 seconds, then the second sending time determined by the mobile hotspot 101 is "2021/5/28 17:01:00", which is just an example and not limited thereto.
步骤S404:在第二发送时间到来时,重复发送第二授权检验请求到授权服务器的步骤,直至发送次数大于第一预设次数阈值时结束。Step S404: When the second sending time arrives, repeat the step of sending the second authorization verification request to the authorization server until the sending times are greater than the first preset threshold.
示例性的,第一预设次数阈值即授权检验时发送授权检验请求的最大重试次数MAX,其可以根据需要设置,本实施例中对此不作限制。Exemplarily, the first preset threshold value is the maximum number of retries MAX for sending an authorization verification request during authorization verification, which can be set as required, and is not limited in this embodiment.
具体的,在第二发送时间如“2021/5/28 17:01:00”到来时,返回步骤S301,第二次发送第二授权检验请求到授权服务器,之后执行步骤S302~S303,若收到授权服务器102返回的HTTP状态码也不是指定HTTP状态码“200”,如返回的HTTP状态码是“403”,则跳转执行步骤S401确定当前时刻已发送的第二授权检验请求的发送次数n,此时n=2,然后执行步骤S402~S404,如此循环处理,直至不断更新后的发送次数n大于第一预设次数阈值如1000(n>1000)时结束。Specifically, when the second sending time arrives such as "2021/5/28 17:01:00", return to step S301, send the second authorization verification request to the authorization server for the second time, and then execute steps S302-S303, if received The HTTP status code returned by the authorization server 102 is not the specified HTTP status code "200". If the returned HTTP status code is "403", then jump to step S401 to determine the number of times the second authorization verification request sent at the current moment is sent. n, n=2 at this time, and then execute steps S402-S404, and the process is repeated until the updated sending times n is greater than the first preset times threshold such as 1000 (n>1000).
可选的,在本公开的一些实施例中,上述步骤S402中可以基于但不限于以下公式确定第一等待时长T1:T1=t×2n。Optionally, in some embodiments of the present disclosure, the first waiting period T1 may be determined based on but not limited to the following formula in the above step S402: T1=t×2n.
具体的,授权服务器102返回错误的HTTP状态码,表示目前的授权检验是没有过任何1次的成功,有可能是目前的网络状态不稳定或无法提供服务。为了避免在网络状态不稳定的情况下过于频繁地发送授权检验请求造成服务器系统忙碌,也为了尽可能及时获得正常的HTTP状态码,本实施例中移动热点101基于授权检验请求的发送次数来对重新发送授权检验请求的等待时长做控制,当发送次数越来越多时,下一次发送授权检验请求的等待时长就越久且呈指数地增加,如图5所示n=1,2,3,…,MAX时分别对应的等待时长呈指数地增加。当发送次数n大于最大重试次数MAX时停止。如此可以避免在网络状态不稳定的情况下过于频繁地发送授权检验请求造成服务器系统忙碌,同时节省移动热点101的功耗。Specifically, the authorization server 102 returns an incorrect HTTP status code, indicating that the current authorization check has not been successful once, and it may be that the current network status is unstable or cannot provide services. In order to prevent the server system from being busy by sending authorization check requests too frequently when the network status is unstable, and to obtain a normal HTTP status code as soon as possible, the mobile hotspot 101 in this embodiment re-checks the status code based on the number of times the authorization check request is sent. The waiting time for sending the authorization verification request is controlled. When the number of sendings increases, the waiting time for sending the authorization verification request next time will be longer and increase exponentially, as shown in Figure 5 n=1, 2, 3,..., When MAX, the corresponding waiting time increases exponentially. Stop when the number of sending n is greater than the maximum number of retries MAX. In this way, the server system can be avoided from being busy by sending authorization check requests too frequently when the network status is unstable, and at the same time, the power consumption of the mobile hotspot 101 can be saved.
可选的,在上述图3所示实施例的基础上,本公开的另一些实施例中,所述方法还可以包括以下步骤:Optionally, on the basis of the above-mentioned embodiment shown in FIG. 3 , in other embodiments of the present disclosure, the method may further include the following steps:
步骤i):发送第二授权检验请求到所述授权服务器之后,若等待预设时长时未接收到所述授权服务器返回的任何信息,则确定当前时刻已发送的第二授权检验请求的发送次数。Step i): After sending the second authorization verification request to the authorization server, if no information returned by the authorization server is received after waiting for a preset period of time, determine the number of times the second authorization verification request has been sent at the current moment .
示例性的,该预设时长可以根据需要设置,本实施例中对此不作限制。具体的,步骤S301中移动热点101响应于检测到首次有任意一个UE的网络连接请求时,发送第二授权检验请求如HTTP GET请求到授权服务器102时可以开始计时,在计时时长等于该预设时长时,若未接收到授权服务器102返回的任何信息,则确定当前时刻已发送的第二授权检验请求的发送次数n,此时n=1。Exemplarily, the preset duration can be set as required, which is not limited in this embodiment. Specifically, in step S301, when the mobile hotspot 101 responds to detecting that there is a network connection request of any UE for the first time, it can start timing when sending a second authorization check request such as an HTTP GET request to the authorization server 102, and when the timing duration is equal to the preset duration , if no information returned by the authorization server 102 is received, the number n of sending times of the second authorization verification request sent at the current moment is determined, and n=1 at this time.
步骤ii):基于所述发送次数以及第一预设基本时长,确定第一等待时长。Step ii): Determine a first waiting period based on the sending times and the first preset basic period.
步骤iii):基于所述第一等待时长和当前时刻,确定重新发送第二授权检验请求的第二发送时间。Step iii): Based on the first waiting time and the current time, determine a second sending time for resending the second authorization check request.
步骤iiii):在所述第二发送时间到来时,重复所述发送第二授权检验请求到所述授权服务器的步骤,直至所述发送次数大于第一预设次数阈值时结束。Step iii): When the second sending time arrives, repeat the step of sending the second authorization verification request to the authorization server until the number of times of sending is greater than the first preset threshold.
可以理解的是,关于步骤ii)至步骤iiii),其具体实施过程可以参考前述实施例中的步骤S402至步骤S404。本实施例中,等待预设时长时未接收到授权服务器102返回的任何信息,即授权服务器102没有做出任何响应,表示目前的授权检验是没有过任何1次的成功,有可能是目前的网络状态不稳定或无法提供服务。本实施例中移动热点101基于授权检验请求的发送次数来对重新发送授权检验请求的等待时长做控制,当发送次数越来越多时,下一次发送授权检验请求的等待时长就越久,直到发送次数n大于最大重试次数时停止。如此可以避免在网络状态不稳定的情况下过于频繁地发送授权检验请求造成服务器系统忙碌,同时节省移动热点101的功耗。It can be understood that, for the specific implementation process of step ii) to step iii), reference may be made to step S402 to step S404 in the foregoing embodiment. In this embodiment, no information was received from the authorization server 102 when waiting for the preset period of time, that is, the authorization server 102 did not make any response, indicating that the current authorization verification has not been successful once, and it may be the current The network status is unstable or service cannot be provided. In this embodiment, the mobile hotspot 101 controls the waiting time for resending the authorization checking request based on the number of times the authorization checking request is sent. Stop when greater than max retries. In this way, the server system can be avoided from being busy by sending authorization check requests too frequently when the network status is unstable, and at the same time, the power consumption of the mobile hotspot 101 can be saved.
可选的,在上述各实施例的基础上,本公开的一些实施例中,步骤S202即接收授权服务器102返回的第一网络状态指示信息之后,所述方法还可以包括以下步骤:判断第一网络状态指示信息是否为指定网络状态指示信息。示例性的,移动热点101判断返回的第一网络状态指示信息如HTTP状态码是否为指定HTTP状态码“200”。Optionally, on the basis of the foregoing embodiments, in some embodiments of the present disclosure, after receiving the first network status indication information returned by the authorization server 102 in step S202, the method may further include the following steps: judging the first Whether the network state indication information is specified network state indication information. Exemplarily, the mobile hotspot 101 judges whether the returned first network status indication information such as the HTTP status code is a specified HTTP status code "200".
相应的,步骤S203中基于第一网络状态指示信息,确定重新发送第一授权检验请求的第一发送时间,具体可以包括以下步骤:Correspondingly, in step S203, based on the first network status indication information, determining the first sending time for resending the first authorization check request may specifically include the following steps:
步骤a):在第一网络状态指示信息是指定网络状态指示信息时,基于第一预设规则确定重新发送第一授权检验请求的第一发送时间。Step a): When the first network state indication information is specified network state indication information, determine the first sending time for resending the first authorization check request based on the first preset rule.
示例性的,在移动热点101判定返回的HTTP状态码是指定HTTP状态码“200”时,可以基于第一预设规则确定重新发送第一授权检验请求的第一发送时间。Exemplarily, when the mobile hotspot 101 determines that the returned HTTP status code is the designated HTTP status code "200", it may determine the first sending time for resending the first authorization check request based on a first preset rule.
步骤b):在第一网络状态指示信息不是指定网络状态指示信息时,基于第二预设规则确定重新发送第一授权检验请求的第一发送时间;其中,第一预设规则与第二预设规则各自指示确定的第一发送时间不同。Step b): When the first network state indication information is not the specified network state indication information, determine the first sending time for resending the first authorization check request based on the second preset rule; wherein, the first preset rule and the second preset rule Assume that the determined first sending times indicated by the respective rules are different.
示例性的,在移动热点101判定返回的HTTP状态码不是指定HTTP状态码“200”,如是HTTP状态码“403”时,可以基于第二预设规则确定重新发送第一授权检验请求的第一发送时间。第一预设规则与第二预设规则各自指示确定的第一发送时间不同,例如指示确定的重新发送第一授权检验请求的等待时长不同而使得第一发送时间不同。Exemplarily, when the mobile hotspot 101 determines that the returned HTTP status code is not the specified HTTP status code "200", such as the HTTP status code "403", it may determine to resend the first authorization check request based on the second preset rule. send time. The first preset rule and the second preset rule respectively indicate that the determined first sending time is different, for example, indicating that the determined waiting time for resending the first authorization check request is different so that the first sending time is different.
本实施例中,移动热点101判断授权服务器102返回的HTTP状态码是否为指定HTTP状态码而采用对应不同的规则去动态地调整重新发送授权检验请求的发送时间,如此可以依据网络状态的不同灵活调整重新发送授权检验请求的发送时间。In this embodiment, the mobile hotspot 101 judges whether the HTTP status code returned by the authorization server 102 is a specified HTTP status code and adopts corresponding different rules to dynamically adjust the sending time of resending the authorization verification request, so that it can be flexible according to different network conditions Adjust the sending time of the resend authorization check request.
可选的,在本公开的一些实施例中,结合图6中所示,步骤a)即在第一网络状态指示信息是指定网络状态指示信息时,基于第一预设规则确定重新发送第一授权检验请求的第一发送时间,具体可以包括以下步骤:Optionally, in some embodiments of the present disclosure, with reference to what is shown in FIG. 6, step a) is to determine to resend the first The first sending time of the authorization verification request may specifically include the following steps:
步骤S601:在第一网络状态指示信息是指定网络状态指示信息时,确定当前时刻已发送的第一授权检验请求的发送次数。Step S601: When the first network state indication information is designated network state indication information, determine the number of times of sending the first authorization check request that has been sent at the current moment.
具体的,在移动热点101判定返回的HTTP状态码是指定HTTP状态码“200”时,确定当前时刻已发送的第一授权检验请求的发送次数n’,此时n’=1。Specifically, when the mobile hotspot 101 determines that the returned HTTP status code is the specified HTTP status code "200", determine the number of times n' of the first authorization verification request sent at the current moment, and n'=1 at this time.
步骤S602:确定指定网络状态指示信息对应的第一权重值。Step S602: Determine the first weight value corresponding to the designated network state indication information.
示例性的,本实施例中可以预先设置不同的HTTP状态码与对应的权重值之 间的映射关系表,移动热点101可通过查询映射关系表确定指定HTTP状态码“200”对应的第一权重值w1。Exemplarily, in this embodiment, a mapping relationship table between different HTTP status codes and corresponding weight values can be preset, and the mobile hotspot 101 can determine the first weight corresponding to the specified HTTP status code "200" by querying the mapping relationship table value w1.
步骤S603:基于第一授权检验请求的发送次数、第一权重值以及第二预设基本时长,确定第二等待时长。Step S603: Determine a second waiting period based on the number of times the first authorization check request is sent, the first weight value, and the second preset basic period.
示例性的,第二预设基本时长P可以根据需要设置,本实施例中对此不作限制。具体的,作为示例,移动热点101可基于发送次数n’、第一权重值w1以及第二预设基本时长P的乘积确定第二等待时长T2:Exemplarily, the second preset basic duration P can be set as required, which is not limited in this embodiment. Specifically, as an example, the mobile hotspot 101 may determine the second waiting period T2 based on the product of the number of transmissions n', the first weight value w1, and the second preset basic period P:
T2=n’×P×w1。T2=n'×P×w1.
步骤S604:基于第二等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间。Step S604: Based on the second waiting period and the current time, determine a first sending time for resending the first authorization check request.
具体的,作为示例,移动热点101可基于第二等待时长T2和当前时刻,确定重新发送第一授权检验请求的第一发送时间,即第二次发送第一授权检验请求的发送时间,之后返回步骤S204执行,在此迭代处理过程中,n’的取值会不断更新,HTTP状态码“200”对应的第一权重值w1不变。因此重新发送第一授权检验请求的第一发送时间由发送次数n’决定,n’的取值越大,重新发送第一授权检验请求的等待时长越长,相应的第一发送时间越晚。Specifically, as an example, the mobile hotspot 101 may determine the first sending time for resending the first authorization verification request based on the second waiting period T2 and the current time, that is, the sending time for sending the first authorization verification request for the second time, and then return Step S204 is executed. During this iterative process, the value of n' is constantly updated, and the first weight value w1 corresponding to the HTTP status code "200" remains unchanged. Therefore, the first sending time of resending the first authorization verification request is determined by the number of sendings n'. The larger the value of n', the longer the waiting time for resending the first authorization verification request, and the later the corresponding first sending time.
本实施例中的上述方案,移动热点101在持续收到指定HTTP状态码“200”时,实质基于重新发送授权检验请求的发送次数调整下一次重新发送授权检验请求的等待时长,如此可以较为简单方便地调整重新发送授权检验请求的发送时间。In the above solution in this embodiment, when the mobile hotspot 101 continues to receive the specified HTTP status code "200", it essentially adjusts the waiting time for the next resend authorization check request based on the number of times the resend authorization check request is sent, which can be relatively simple Conveniently adjust the sending time of the resend authorization check request.
可选的,在上述实施例的基础上,本公开的一些实施例中,所述方法还可以包括:在第一授权检验请求的发送次数大于第二预设次数阈值时,结束从而不再发送第一授权检验请求。Optionally, on the basis of the above embodiments, in some embodiments of the present disclosure, the method may further include: when the number of times the first authorization check request is sent is greater than the second preset number of times threshold, end and no longer send The first authorization check request.
示例性的,第二预设次数阈值可以根据需要设置,本实施例中对此不作限制。具体的,作为示例,当第一授权检验请求的发送次数n’大于第二预设次数阈值时,移动热点101结束迭代不再发送第一授权检验请求到授权服务器102。Exemplarily, the second preset times threshold may be set as required, which is not limited in this embodiment. Specifically, as an example, when the number n' of sending the first authorization verification request is greater than the second preset times threshold, the mobile hotspot 101 ends the iteration and does not send the first authorization verification request to the authorization server 102.
可选的,在本公开的另一些实施例中,如图7中所示,步骤b)即在第一网络状态指示信息不是指定网络状态指示信息时,基于第二预设规则确定重新发送第一授权检验请求的第一发送时间,具体可以包括以下步骤:Optionally, in other embodiments of the present disclosure, as shown in FIG. 7 , step b) is to determine to resend the first network status indication information based on a second preset rule when the first network status indication information is not specified network status indication information. The first sending time of an authorization verification request may specifically include the following steps:
步骤S701:在第一网络状态指示信息不是指定网络状态指示信息时,记录当前时刻,并获取预设网络状态指示信息集合,预设网络状态指示信息集合可以包括除指定网络状态指示信息之外的第一网络状态指示信息集合和第二网络状态指示信息集合。Step S701: When the first network state indication information is not the specified network state indication information, record the current time, and obtain a preset network state indication information set, which may include information other than the specified network state indication information The first set of network state indication information and the second set of network state indication information.
示例性的,预设网络状态指示信息集合可以是预设HTTP状态码集合,其可以包括但不限于第一HTTP状态码(如460~464)集合和第二HTTP状态码(如465~469)集合,但不包括HTTP状态码“200”,即该HTTP状态码集合是网络状态出现问题如错误相关的状态码集合,分成2个集合来表示问题的严重性程度不同,例如第二HTTP状态码集合中的状态码表征的网络状态出现问题的严重程度高,而第一HTTP状态码集合中的状态码表征的网络状态出现问题的严重程度低,但也不限于此,该状态码集合的设置可以根据需要预先设置,例如可以根据严重程度细分成3个集合,本实施例中对此不作限制。Exemplarily, the preset network status indication information set may be a preset HTTP status code set, which may include but not limited to a first HTTP status code (such as 460-464) set and a second HTTP status code (such as 465-469) A collection, but not including the HTTP status code "200", that is, the HTTP status code collection is a collection of status codes related to network status problems such as errors, and is divided into two collections to indicate the severity of the problem. For example, the second HTTP status code The severity of problems in the network status represented by the status codes in the set is high, and the severity of problems in the network status represented by the status codes in the first HTTP status code set is low, but it is not limited thereto. The setting of the status code set It can be preset according to needs, for example, it can be subdivided into three sets according to the severity, which is not limited in this embodiment.
具体的,在步骤S201中首次发送第一授权检验请求后,若授权服务器102返 回的第一网络状态指示信息如HTTP状态码不是指定HTTP状态码“200”而是“460”,则记录当前时刻,并获取预设HTTP状态码集合。Specifically, after sending the first authorization check request for the first time in step S201, if the first network status indication information returned by the authorization server 102, such as the HTTP status code, is not the specified HTTP status code "200" but "460", record the current time , and obtain a set of preset HTTP status codes.
步骤S702:判定第一网络状态指示信息归属于第一网络状态指示信息集合时,确定第一网络状态指示信息对应的第二权重值。Step S702: When it is determined that the first network state indication information belongs to the first network state indication information set, determine a second weight value corresponding to the first network state indication information.
具体的,判定第一网络状态指示信息如HTTP状态码“460”归属于第一HTTP状态码(如460~464)集合,则确定该HTTP状态码“460”对应的第二权重值w2。第二权重值w2通常可大于第一权重值w1。Specifically, if it is determined that the first network status indication information such as the HTTP status code "460" belongs to the first HTTP status code (eg 460-464) set, then the second weight value w2 corresponding to the HTTP status code "460" is determined. The second weight value w2 may generally be greater than the first weight value w1.
步骤S703:基于第二权重值以及第二预设基本时长,确定第三等待时长。Step S703: Determine a third waiting period based on the second weight value and the second preset basic period.
具体的,例如基于第二权重值w2以及第二预设基本时长P的乘积,确定第三等待时长T3=w2×P。Specifically, for example, based on the product of the second weight value w2 and the second preset basic time length P, the third waiting time length T3=w2×P is determined.
步骤S704:基于第三等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间。Step S704: Based on the third waiting period and the current time, determine a first sending time for resending the first authorization check request.
具体的,基于第三等待时长T3和当前时刻,即可确定重新发送第一授权检验请求的第一发送时间,之后返回步骤S204执行。Specifically, based on the third waiting period T3 and the current time, the first sending time for resending the first authorization check request can be determined, and then return to step S204 for execution.
可选的,在本公开的另一些实施例中,如图8中所示,步骤b)还可以包括以下步骤:Optionally, in other embodiments of the present disclosure, as shown in FIG. 8, step b) may also include the following steps:
步骤S801:判定第一网络状态指示信息归属于第二网络状态指示信息集合时,确定第一网络状态指示信息对应的第三权重值,第三权重值大于第二权重值。Step S801: When it is determined that the first network state indication information belongs to the second network state indication information set, determine a third weight value corresponding to the first network state indication information, and the third weight value is greater than the second weight value.
具体的,在步骤S201中首次发送第一授权检验请求后,若授权服务器102返回的第一网络状态指示信息如HTTP状态码不是指定HTTP状态码“200”而是“465”,则判定第一网络状态指示信息如HTTP状态码“465”归属于第二HTTP状态码(如465~469)集合,此时确定该HTTP状态码“465”对应的第三权重值w3,w3>w2。Specifically, after the first authorization check request is sent for the first time in step S201, if the first network status indication information returned by the authorization server 102, such as the HTTP status code, is not the specified HTTP status code "200" but "465", it is determined that the first The network status indication information such as the HTTP status code "465" belongs to the second HTTP status code (eg 465-469) set, and at this time, the third weight value w3 corresponding to the HTTP status code "465" is determined, w3>w2.
步骤S802:基于第三权重值以及第二预设基本时长,确定第四等待时长。Step S802: Determine a fourth waiting period based on the third weight value and the second preset basic period.
具体的,例如基于第三权重值w3以及第二预设基本时长P的乘积,确定第四等待时长T4=w3×P。Specifically, for example, based on the product of the third weight value w3 and the second preset basic time length P, the fourth waiting time length T4=w3×P is determined.
步骤S803:基于第四等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间。Step S803: Based on the fourth waiting period and the current time, determine a first sending time for resending the first authorization check request.
具体的,基于第四等待时长T4和当前时刻,即可确定重新发送第一授权检验请求的第一发送时间,之后返回步骤S204执行。Specifically, based on the fourth waiting period T4 and the current time, the first sending time for resending the first authorization check request can be determined, and then return to step S204 for execution.
上述图7或图8所示实施例的方案中,移动热点101可基于不同的HTTP状态码集合及HTTP状态码去动态地调整权重值,进而实现调整重新发送授权检验请求的等待时长,在网络状态出现问题的严重程度高时,确定的权重值较大,相应等待时长较长,在网络状态出现问题的严重程度低时,确定的权重值较小,相应等待时长较小,如此可以较为准确地依据网络状态的真实情况调整重新发送授权检验请求的发送时间,避免过于频繁发送授权检验请求造成服务器系统忙碌,节省自身功耗,同时随着网络状态可能产生变化,可以尽可能及时地获取授权服务器102返回的HTTP状态码“200”,从而及时开启热点功能以允许用户终端连接到互联网,提高使用者的体验。In the scheme of the above-mentioned embodiment shown in FIG. 7 or FIG. 8, the mobile hotspot 101 can dynamically adjust the weight value based on different HTTP status code sets and HTTP status codes, thereby realizing adjustment of the waiting time for resending the authorization verification request. When the severity of the state problem is high, the determined weight value is larger, and the corresponding waiting time is longer. When the severity of the network state problem is low, the determined weight value is smaller, and the corresponding waiting time is shorter, so that it can be more accurate Adjust the sending time of resending the authorization verification request according to the real situation of the network status, avoid sending the authorization verification request too frequently to cause the server system to be busy, save its own power consumption, and at the same time, as the network status may change, the authorization can be obtained as timely as possible The HTTP status code "200" returned by the server 102 enables the hotspot function in time to allow the user terminal to connect to the Internet and improve user experience.
可选的,在上述图7或图8所示示例性实施例的基础上,本公开的一些实施例中,所述方法还可以包括:确定已发送的第一授权检验请求的发送次数;在第 一授权检验请求的发送次数大于第二预设次数阈值时,结束从而不再发送第一授权检验请求。Optionally, on the basis of the exemplary embodiment shown in FIG. 7 or FIG. 8 above, in some embodiments of the present disclosure, the method may further include: determining the number of times the first authorization check request has been sent; When the number of sending times of the first authorization verification request is greater than the second preset number of times threshold, the process ends so that the first authorization verification request is no longer sent.
示例性的,第二预设次数阈值可以根据需要设置,本实施例中对此不作限制。具体的,作为示例,当确定的已发送的第一授权检验请求的发送次数n’大于第二预设次数阈值时,移动热点101结束迭代不再发送第一授权检验请求到授权服务器102。Exemplarily, the second preset times threshold may be set as required, which is not limited in this embodiment. Specifically, as an example, when the determined sending times n' of the first authorization verification request sent is greater than the second preset times threshold, the mobile hotspot 101 ends the iteration and does not send the first authorization verification request to the authorization server 102.
应该理解的是,虽然图2至图8的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2至图8中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flow charts of FIG. 2 to FIG. 8 are shown sequentially as indicated by the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in FIGS. 2 to 8 may include a plurality of sub-steps or stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. These sub-steps or The execution order of the stages is not necessarily performed sequentially, but may be executed alternately or alternately with at least a part of other steps or substeps of other steps or stages.
基于同一构思,在一个实施例中,本公开实施例还提供一种移动热点授权检验装置,如图9所示移动热点授权检验装置可包括请求发送模块901、信息接收模块902、时间确定模块903和循环控制模块904;其中,请求发送模块配置成发送第一授权检验请求到授权服务器。信息接收模块配置成接收授权服务器返回的第一网络状态指示信息,第一网络状态指示信息由授权服务器响应第一授权检验请求生成。时间确定模块配置成基于第一网络状态指示信息,确定重新发送第一授权检验请求的第一发送时间;其中不同的第一网络状态指示信息对应不同的请求发送时间。循环控制模块配置成在第一发送时间到来时,触发请求发送模块发送第一授权检验请求到授权服务器。Based on the same concept, in an embodiment, the embodiment of the present disclosure also provides a mobile hotspot authorization verification device, as shown in Figure 9, the mobile hotspot authorization verification device may include a request sending module 901, an information receiving module 902, and a time determination module 903 And loop control module 904; wherein, the request sending module is configured to send the first authorization check request to the authorization server. The information receiving module is configured to receive the first network status indication information returned by the authorization server, and the first network status indication information is generated by the authorization server in response to the first authorization verification request. The time determining module is configured to determine a first sending time for resending the first authorization check request based on the first network status indication information; wherein different first network status indication information corresponds to different request sending times. The loop control module is configured to trigger the request sending module to send the first authorization check request to the authorization server when the first sending time arrives.
本公开实施例提供的移动热点授权检验装置,在移动热点101授权检验时,由于每次授权服务器102返回的网络状态指示信息可能不同,因此确定的重新发送授权检验请求的发送时间不同,从而可以基于网络状态指示信息所指示的网络状态动态地不断调整发送授权检验请求的时间,在网络状态不佳时,不直接关闭热点功能,可基于网络状态指示信息指示的网络状态的真实情况灵活调整重新发送授权请求的时间,避免过于频繁发送授权请求的情况,从而减轻了授权服务器102的忙碌和负担,也使得移动热点101的功耗降低。In the mobile hotspot authorization verification device provided by the embodiment of the present disclosure, when the mobile hotspot 101 is authorized, since the network status indication information returned by the authorization server 102 may be different each time, the determined sending time of resending the authorization verification request is different, so that it can Based on the network status indicated by the network status indication information, the time for sending the authorization verification request is dynamically and continuously adjusted. When the network status is not good, the hotspot function is not directly turned off, and the hotspot function can be flexibly adjusted based on the real situation of the network status indicated by the network status indication information. The time for sending the authorization request avoids sending the authorization request too frequently, thereby reducing the busyness and burden of the authorization server 102 and reducing the power consumption of the mobile hotspot 101 .
可选的,在本公开的一些实施例中,所述装置还可包括信息判断模块,相应的,请求发送模块还可配置成在发送第一授权检验请求到授权服务器之前,发送第二授权检验请求到授权服务器。信息接收模块还配置成接收授权服务器返回的第二网络状态指示信息,第二网络状态指示信息由授权服务器响应第二授权检验请求生成。信息判断模块配置成判断第二网络状态指示信息是否为指定网络状态指示信息,指定网络状态指示信息指示网络状态正常。循环控制模块还可配置成在信息判断模块的判断结果为是时,触发请求发送模块发送第一授权检验请求到授权服务器。Optionally, in some embodiments of the present disclosure, the device may further include an information judging module. Correspondingly, the request sending module may also be configured to send a second authorization verification request before sending the first authorization verification request to the authorization server. request to the authorization server. The information receiving module is further configured to receive second network status indication information returned by the authorization server, the second network status indication information being generated by the authorization server in response to the second authorization verification request. The information judging module is configured to judge whether the second network status indication information is designated network status indication information, and the designated network status indication information indicates that the network status is normal. The cycle control module can also be configured to trigger the request sending module to send the first authorization check request to the authorization server when the judgment result of the information judging module is yes.
可选的,在本公开的一些实施例中,所述装置还可以包括次数确定模块,配置成在信息判断模块判断第二网络状态指示信息不是指定网络状态指示信息时,确定当前时刻已发送的第二授权检验请求的发送次数。时间确定模块,还配置成基于所述发送次数以及第一预设基本时长,确定第一等待时长;基于所述第一等 待时长和当前时刻,确定重新发送第二授权检验请求的第二发送时间。循环控制模块,还可配置成在第二发送时间到来时,触发请求发送模块发送第二授权检验请求到授权服务器,直至发送次数大于第一预设次数阈值时结束。Optionally, in some embodiments of the present disclosure, the device may further include a times determination module configured to determine that the second network status indication information has been sent at the current moment when the information judging module determines that the second network status indication information is not the specified network status indication information. The number of times the second authorization check request is sent. The time determination module is further configured to determine a first waiting time based on the sending times and the first preset basic time; based on the first waiting time and the current time, determine the second sending time for resending the second authorization check request . The loop control module can also be configured to trigger the request sending module to send the second authorization verification request to the authorization server when the second sending time arrives, until the sending times are greater than the first preset times threshold.
可选的,在本公开的一些实施例中,次数确定模块还配置成在请求发送模块发送第二授权检验请求到授权服务器之后,若等待预设时长时未接收到授权服务器返回的任何信息,则确定当前时刻已发送的第二授权检验请求的发送次数。时间确定模块,还配置成基于所述发送次数以及第一预设基本时长,确定第一等待时长;基于第一等待时长和当前时刻,确定重新发送第二授权检验请求的第二发送时间。循环控制模块,还可配置成在第二发送时间到来时,触发请求发送模块发送第二授权检验请求到所述授权服务器,直至发送次数大于第一预设次数阈值时结束。Optionally, in some embodiments of the present disclosure, the number of times determination module is further configured to wait for a preset period of time and not receive any information returned by the authorization server after the request sending module sends the second authorization verification request to the authorization server, Then, the number of sending times of the second authorization check request sent at the current moment is determined. The time determining module is further configured to determine a first waiting time based on the sending times and the first preset basic time; based on the first waiting time and the current time, determine a second sending time for resending the second authorization check request. The loop control module can also be configured to trigger the request sending module to send the second authorization verification request to the authorization server when the second sending time arrives, and end when the sending times are greater than the first preset times threshold.
可选的,在本公开的一些实施例中,时间确定模块基于所述发送次数以及第一预设基本时长,确定第一等待时长,包括:基于以下公式确定第一等待时长:T1=t×2n;其中,T1表示第一等待时长,t表示第一预设基本时长,n表示发送次数。Optionally, in some embodiments of the present disclosure, the time determination module determines the first waiting period based on the sending times and the first preset basic period, including: determining the first waiting period based on the following formula: T1=t× 2n; wherein, T1 represents the first waiting time, t represents the first preset basic time, and n represents the number of sending times.
可选的,在本公开的一些实施例中,信息判断模块还可配置成在信息接收模块接收授权服务器返回的第一网络状态指示信息之后,判断第一网络状态指示信息是否为指定网络状态指示信息。时间确定模块基于第一网络状态指示信息,确定重新发送第一授权检验请求的第一发送时间,具体可以包括以下方式:在信息判断模块判定第一网络状态指示信息是指定网络状态指示信息时,基于第一预设规则确定重新发送第一授权检验请求的第一发送时间。在信息判断模块判定第一网络状态指示信息不是指定网络状态指示信息时,基于第二预设规则确定重新发送第一授权检验请求的第一发送时间。其中,第一预设规则与第二预设规则各自指示确定的第一发送时间不同。Optionally, in some embodiments of the present disclosure, the information judging module may also be configured to judge whether the first network status indicating information is a specified network status indicating information after the information receiving module receives the first network status indicating information returned by the authorization server. information. The time determining module determines the first sending time for resending the first authorization check request based on the first network status indication information, which may specifically include the following manner: when the information judging module determines that the first network status indication information is designated network status indication information, A first sending time for resending the first authorization check request is determined based on a first preset rule. When the information judging module determines that the first network state indication information is not specified network state indication information, the first sending time for resending the first authorization check request is determined based on the second preset rule. Wherein, the first predetermined sending time indicated by the first preset rule and the second preset rule are different from each other.
可选的,在本公开的一些实施例中,时间确定模块在信息判断模块判定第一网络状态指示信息是指定网络状态指示信息时,基于第一预设规则确定重新发送第一授权检验请求的第一发送时间,具体可以包括:在第一网络状态指示信息是指定网络状态指示信息时,确定当前时刻已发送的第一授权检验请求的发送次数;确定指定网络状态指示信息对应的第一权重值;基于第一授权检验请求的发送次数、第一权重值以及第二预设基本时长,确定第二等待时长;基于第二等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间。Optionally, in some embodiments of the present disclosure, when the information judging module determines that the first network status indication information is specified network status indication information, the time determining module determines the time to resend the first authorization check request based on the first preset rule. The first sending time may specifically include: when the first network state indication information is designated network state indication information, determining the number of times the first authorization check request has been sent at the current moment; determining the first weight corresponding to the designated network state indication information value; based on the number of sending times of the first authorization verification request, the first weight value and the second preset basic duration, determine the second waiting period; based on the second waiting period and the current time, determine the first time to resend the first authorization verification request send time.
可选的,在本公开的一些实施例中,循环控制模块,还配置成在第一授权检验请求的发送次数大于第二预设次数阈值时,结束从而不再触发请求发送模块发送第一授权检验请求。Optionally, in some embodiments of the present disclosure, the loop control module is further configured to end when the number of times the first authorization verification request is sent is greater than the second preset number of times threshold so as not to trigger the request sending module to send the first authorization again. Verify request.
可选的,在本公开的一些实施例中,时间确定模块在信息判断模块判定第一网络状态指示信息不是指定网络状态指示信息时,基于第二预设规则确定重新发送第一授权检验请求的第一发送时间,具体可以包括:在第一网络状态指示信息不是指定网络状态指示信息时,记录当前时刻,并获取预设网络状态指示信息集合,预设网络状态指示信息集合包括除指定网络状态指示信息之外的第一网络状态指示信息集合和第二网络状态指示信息集合;判定第一网络状态指示信息归属于第一网络状态指示信息集合时,确定第一网络状态指示信息对应的第二权重值; 基于第二权重值以及第二预设基本时长,确定第三等待时长;基于第三等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间;或者,判定第一网络状态指示信息归属于第二网络状态指示信息集合时,确定第一网络状态指示信息对应的第三权重值,第三权重值大于第二权重值;基于第三权重值以及第二预设基本时长,确定第四等待时长;基于第四等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间。Optionally, in some embodiments of the present disclosure, when the information judging module determines that the first network status indication information is not specified network status indication information, the time determination module determines the time to resend the first authorization check request based on the second preset rule. The first sending time may specifically include: when the first network state indication information is not the designated network state indication information, record the current time, and obtain the preset network state indication information set, the preset network state indication information set includes all but the specified network state indication information The first network state indication information set and the second network state indication information set other than the indication information; when it is determined that the first network state indication information belongs to the first network state indication information set, determine the second network state indication information corresponding to the first network state indication information Weight value; Based on the second weight value and the second preset basic time length, determine the third waiting time; based on the third waiting time and the current time, determine the first sending time for resending the first authorization check request; or determine the first When the network state indication information belongs to the second network state indication information set, determine a third weight value corresponding to the first network state indication information, the third weight value is greater than the second weight value; based on the third weight value and the second preset basis Determine the fourth waiting time; based on the fourth waiting time and the current time, determine the first sending time for resending the first authorization check request.
可选的,在本公开的一些实施例中,次数确定模块还配置成确定已发送的第一授权检验请求的发送次数。循环控制模块还配置成在该第一授权检验请求的发送次数大于第二预设次数阈值时,结束从而不再触发请求发送模块发送第一授权检验请求。Optionally, in some embodiments of the present disclosure, the number of determination module is further configured to determine the number of times the first authorization check request has been sent. The loop control module is further configured to end when the number of times the first authorization verification request is sent is greater than the second preset times threshold so as not to trigger the request sending module to send the first authorization verification request.
关于移动热点授权检验装置的具体限定可以参见上文中对于移动热点授权检验方法的限定,在此不再赘述。上述移动热点授权检验装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于电子设备中的一个或多个处理器中,也可以以软件形式存储于电子设备中的存储器中,以便于一个或多个处理器调用执行以上各个模块对应的操作。For specific limitations on the mobile hotspot authorization verification device, please refer to the above-mentioned limitations on the mobile hotspot authorization verification method, which will not be repeated here. Each module in the above-mentioned mobile hotspot authorization verification device can be implemented in whole or in part by software, hardware and combinations thereof. The above-mentioned modules can be embedded in hardware or independent of one or more processors in the electronic device, and can also be stored in the memory of the electronic device in the form of software, so that one or more processors can call and execute the above The operation corresponding to the module.
在一个实施例中,提供了一种电子设备,该电子设备可以是移动热点设备,其内部结构图可以如图10所示。该电子设备可以包括通过系统总线连接的一个或多个处理器、存储器、通信接口、显示屏和输入装置。其中,该电子设备的一个或多个处理器用于提供计算和控制能力。该电子设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机可读指令。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该电子设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、运营商网络、近场通信(NFC)或其他技术实现。该计算机可读指令被一个或多个处理器执行时以实现一种移动热点授权检验方法。该电子设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该电子设备的输入装置可以是显示屏上覆盖的触摸层,也可以是电子设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, an electronic device is provided. The electronic device may be a mobile hotspot device, and its internal structure may be as shown in FIG. 10 . The electronic device may include one or more processors, memory, communication interfaces, display screens, and input devices connected by a system bus. Wherein, one or more processors of the electronic device are used to provide calculation and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer readable instructions. The internal memory provides an environment for the execution of the operating system and computer readable instructions in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, an operator network, near field communication (NFC) or other technologies. When the computer readable instructions are executed by one or more processors, a mobile hotspot authorization verification method is implemented. The display screen of the electronic device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device may be a touch layer covered on the display screen, or a button, a trackball or a touch pad provided on the housing of the electronic device , and can also be an external keyboard, touchpad, or mouse.
本领域技术人员可以理解,图10中示出的结构,仅仅是与本公开方案相关的部分结构的框图,并不构成对本公开方案所应用于其上的电子设备的限定,具体的电子设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 10 is only a block diagram of a partial structure related to the disclosed solution, and does not constitute a limitation on the electronic device to which the disclosed solution is applied. The specific electronic device can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.
在一个实施例中,本公开提供的装置可以实现为一种计算机可读指令的形式,计算机可读指令可在如图10所示的电子设备上运行。电子设备的存储器中可存储组成该移动热点授权检验装置的各个程序模块,比如,图9所示的请求发送模块901、信息接收模块902、时间确定模块903和循环控制模块904。各个程序模块构成的计算机可读指令使得一个或多个处理器执行本说明书中描述的本公开各个实施例的移动热点授权检验方法中的步骤。In one embodiment, the apparatus provided by the present disclosure may be implemented in the form of a computer-readable instruction, and the computer-readable instruction may run on the electronic device as shown in FIG. 10 . Various program modules constituting the mobile hotspot authorization verification device can be stored in the memory of the electronic device, for example, the request sending module 901 , information receiving module 902 , time determining module 903 and cycle control module 904 shown in FIG. 9 . The computer-readable instructions constituted by various program modules enable one or more processors to execute the steps in the mobile hotspot authorization verification method of various embodiments of the present disclosure described in this specification.
例如,图10所示的电子设备可以通过如图9所示的移动热点授权检验装置中的请求发送模块901执行步骤S201,电子设备可通过信息接收模块902执行步骤S202,电子设备可通过时间确定模块903执行步骤S203,电子设备可通过循环控制模块904执行步骤S204。For example, the electronic device shown in Figure 10 can execute step S201 through the request sending module 901 in the mobile hotspot authorization verification device shown in Figure 9, the electronic device can execute step S202 through the information receiving module 902, and the electronic device can determine Module 903 executes step S203, and the electronic device may execute step S204 through the loop control module 904.
在一个实施例中,提供了一种电子设备,包括存储器和一个或多个处理器,该存储器存储有计算机可读指令,该一个或多个处理器执行计算机可读指令时实现以下步骤:In one embodiment, an electronic device is provided, including a memory and one or more processors, the memory stores computer-readable instructions, and the one or more processors execute the computer-readable instructions to implement the following steps:
步骤S201:发送第一授权检验请求到授权服务器。Step S201: Sending a first authorization verification request to the authorization server.
步骤S202:接收授权服务器返回的第一网络状态指示信息,第一网络状态指示信息由授权服务器响应第一授权检验请求生成。Step S202: Receive the first network status indication information returned by the authorization server. The first network status indication information is generated by the authorization server in response to the first authorization verification request.
步骤S203:基于第一网络状态指示信息,确定重新发送第一授权检验请求的第一发送时间;其中不同的第一网络状态指示信息对应不同的请求发送时间。Step S203: Based on the first network status indication information, determine a first sending time for resending the first authorization check request; where different first network status indication information corresponds to different request sending times.
步骤S204:在第一发送时间到来时,重复发送第一授权检验请求到授权服务器的步骤。Step S204: When the first sending time arrives, repeat the step of sending the first authorization verification request to the authorization server.
在一个实施例中,一个或多个处理器执行计算机可读指令时还实现以下步骤:发送第一授权检验请求到授权服务器的步骤之前,发送第二授权检验请求到授权服务器;接收授权服务器返回的第二网络状态指示信息,第二网络状态指示信息由授权服务器响应第二授权检验请求生成;判断第二网络状态指示信息是否为指定网络状态指示信息,指定网络状态指示信息指示网络状态正常;若是,则重复发送第一授权检验请求到授权服务器的步骤。In one embodiment, when one or more processors execute the computer-readable instructions, the following steps are also implemented: before the step of sending the first authorization verification request to the authorization server, sending the second authorization verification request to the authorization server; receiving the authorization server's return The second network status indication information, the second network status indication information is generated by the authorization server in response to the second authorization check request; whether the second network status indication information is the designated network status indication information, and the designated network status indication information indicates that the network status is normal; If yes, repeat the step of sending the first authorization verification request to the authorization server.
在一个实施例中,一个或多个处理器执行计算机可读指令时还实现以下步骤:在第二网络状态指示信息不是指定网络状态指示信息时,确定当前时刻已发送的第二授权检验请求的发送次数;基于发送次数以及第一预设基本时长,确定第一等待时长;基于第一等待时长和当前时刻,确定重新发送第二授权检验请求的第二发送时间;在第二发送时间到来时,重复发送第二授权检验请求到授权服务器的步骤,直至发送次数大于第一预设次数阈值时结束。In one embodiment, when one or more processors execute the computer-readable instructions, the following steps are further implemented: when the second network status indication information is not specified network status indication information, determine the status of the second authorization check request sent at the current moment The number of sending times; based on the number of sending times and the first preset basic time length, determine the first waiting time; based on the first waiting time and the current time, determine the second sending time for resending the second authorization check request; when the second sending time arrives , repeating the step of sending the second authorization verification request to the authorization server until the sending times are greater than the first preset times threshold.
在一个实施例中,一个或多个处理器执行计算机可读指令时还实现以下步骤:发送第二授权检验请求到授权服务器之后,若等待预设时长时未接收到授权服务器返回的任何信息,则确定当前时刻已发送的第二授权检验请求的发送次数;基于发送次数以及第一预设基本时长,确定第一等待时长;基于第一等待时长和当前时刻,确定重新发送第二授权检验请求的第二发送时间;在第二发送时间到来时,重复发送第二授权检验请求到授权服务器的步骤,直至发送次数大于第一预设次数阈值时结束。In one embodiment, when one or more processors execute the computer-readable instructions, the following steps are also implemented: after sending the second authorization verification request to the authorization server, if no information returned by the authorization server is received after waiting for a preset period of time, Then determine the number of times the second authorization verification request has been sent at the current moment; determine the first waiting period based on the number of transmissions and the first preset basic duration; determine resending the second authorization verification request based on the first waiting duration and the current moment The second sending time; when the second sending time arrives, repeat the step of sending the second authorization verification request to the authorization server until the number of times of sending is greater than the first preset threshold.
在一个实施例中,一个或多个处理器执行计算机可读指令时还实现以下步骤:基于以下公式确定第一等待时长:In one embodiment, when one or more processors execute the computer-readable instructions, the following steps are further implemented: determining the first waiting period based on the following formula:
T1=t×2n;T1=t×2n;
其中,T1表示第一等待时长,t表示第一预设基本时长,n表示发送次数。Wherein, T1 represents the first waiting duration, t represents the first preset basic duration, and n represents the number of sending times.
在一个实施例中,一个或多个处理器执行计算机可读指令时还实现以下步骤:接收授权服务器返回的第一网络状态指示信息之后,判断第一网络状态指示信息是否为指定网络状态指示信息;基于第一网络状态指示信息,确定重新发送第一授权检验请求的第一发送时间,包括:在第一网络状态指示信息是指定网络状态指示信息时,基于第一预设规则确定重新发送第一授权检验请求的第一发送时间;在第一网络状态指示信息不是指定网络状态指示信息时,基于第二预设规则确定重新发送第一授权检验请求的第一发送时间;其中,第一预设规则与第二预设规则各自指示确定的第一发送时间不同。In one embodiment, when one or more processors execute the computer-readable instructions, the following steps are further implemented: after receiving the first network status indication information returned by the authorization server, determining whether the first network status indication information is specified network status indication information ; Based on the first network status indication information, determining the first sending time for resending the first authorization check request includes: when the first network status indication information is designated network status indication information, determining to resend the first authorization check request based on the first preset rule A first sending time of an authorization verification request; when the first network state indication information is not specified network state indication information, determine the first sending time of resending the first authorization verification request based on a second preset rule; wherein, the first predetermined It is assumed that the determined first sending time indicated by the rule and the second preset rule is different.
在一个实施例中,一个或多个处理器执行计算机可读指令时还实现以下步骤:在第一网络状态指示信息是指定网络状态指示信息时,确定当前时刻已发送的第一授权检验请求的发送次数;确定指定网络状态指示信息对应的第一权重值;基于第一授权检验请求的发送次数、第一权重值以及第二预设基本时长,确定第二等待时长;基于第二等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间。In one embodiment, when one or more processors execute the computer-readable instructions, the following steps are further implemented: when the first network status indication information is designated network status indication information, determine the status of the first authorization check request sent at the current moment The number of sending times; determine the first weight value corresponding to the specified network status indication information; determine the second waiting time based on the number of times the first authorization check request is sent, the first weight value, and the second preset basic time length; based on the second waiting time and At the current moment, determine the first sending time for resending the first authorization check request.
在一个实施例中,一个或多个处理器执行计算机可读指令时还实现以下步骤:在第一授权检验请求的发送次数大于第二预设次数阈值时,结束从而不再发送第一授权检验请求。In one embodiment, when one or more processors execute the computer-readable instructions, the following steps are also implemented: when the number of times the first authorization verification request is sent is greater than the second preset number of thresholds, end and no longer send the first authorization verification request ask.
在一个实施例中,一个或多个处理器执行计算机可读指令时还实现以下步骤:在第一网络状态指示信息不是指定网络状态指示信息时,记录当前时刻,并获取预设网络状态指示信息集合,预设网络状态指示信息集合包括除指定网络状态指示信息之外的第一网络状态指示信息集合和第二网络状态指示信息集合;判定第一网络状态指示信息归属于第一网络状态指示信息集合时,确定第一网络状态指示信息对应的第二权重值;基于第二权重值以及第二预设基本时长,确定第三等待时长;基于第三等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间;或者,判定第一网络状态指示信息归属于第二网络状态指示信息集合时,确定第一网络状态指示信息对应的第三权重值,第三权重值大于第二权重值;基于第三权重值以及第二预设基本时长,确定第四等待时长;基于第四等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间。In one embodiment, when one or more processors execute the computer-readable instructions, the following steps are also implemented: when the first network status indication information is not specified network status indication information, record the current moment, and acquire preset network status indication information Set, the preset network state indication information set includes the first network state indication information set and the second network state indication information set except for the specified network state indication information; it is determined that the first network state indication information belongs to the first network state indication information When gathering, determine the second weight value corresponding to the first network state indication information; determine the third waiting time based on the second weight value and the second preset basic time length; determine to resend the first time based on the third waiting time and the current time The first sending time of the authorization verification request; or, when it is determined that the first network status indication information belongs to the second network status indication information set, determine the third weight value corresponding to the first network status indication information, and the third weight value is greater than the second weight value; based on the third weight value and the second preset basic time length, determine the fourth waiting time; based on the fourth waiting time and the current time, determine the first sending time for resending the first authorization check request.
在一个实施例中,一个或多个处理器执行计算机可读指令时还实现以下步骤:确定已发送的第一授权检验请求的发送次数;在第一授权检验请求的发送次数大于第二预设次数阈值时,结束从而不再发送第一授权检验请求。In one embodiment, when one or more processors execute the computer-readable instructions, the following steps are also implemented: determining the number of times the first authorization verification request has been sent; when the number of times the first authorization verification request is sent is greater than the second preset When the number of times exceeds the threshold, end and no longer send the first authorization check request.
本实施例的上述技术方案,在移动热点101授权检验时,由于每次授权服务器102返回的网络状态指示信息可能不同,因此确定的重新发送授权检验请求的发送时间不同,从而可以基于网络状态指示信息所指示的网络状态动态地不断调整发送授权检验请求的时间,在网络状态不佳时,不直接关闭热点功能,可基于网络状态指示信息指示的网络状态的真实情况灵活调整重新发送授权请求的时间,避免过于频繁发送授权请求的情况,从而减轻了授权服务器102的忙碌和负担,也使得移动热点101的功耗降低。In the above technical solution of this embodiment, during the authorization verification of the mobile hotspot 101, since the network status indication information returned by the authorization server 102 may be different each time, the determined sending time of resending the authorization verification request is different, so that it can be based on the network status indication The network status indicated by the information dynamically and continuously adjusts the time for sending the authorization verification request. When the network status is not good, the hotspot function is not directly turned off, and the time for resending the authorization request can be flexibly adjusted based on the real situation of the network status indicated by the network status indication information. time, avoid sending authorization requests too frequently, thereby reducing the busyness and burden of the authorization server 102, and also reducing the power consumption of the mobile hotspot 101.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机可读指令,计算机可读指令被一个或多个处理器执行时实现以下步骤:In one embodiment, a computer-readable storage medium is provided, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by one or more processors, the following steps are implemented:
步骤S201:发送第一授权检验请求到授权服务器。Step S201: Sending a first authorization verification request to the authorization server.
步骤S202:接收授权服务器返回的第一网络状态指示信息,第一网络状态指示信息由授权服务器响应第一授权检验请求生成。Step S202: Receive the first network status indication information returned by the authorization server. The first network status indication information is generated by the authorization server in response to the first authorization verification request.
步骤S203:基于第一网络状态指示信息,确定重新发送第一授权检验请求的第一发送时间;其中不同的第一网络状态指示信息对应不同的请求发送时间。Step S203: Based on the first network status indication information, determine a first sending time for resending the first authorization check request; where different first network status indication information corresponds to different request sending times.
步骤S204:在第一发送时间到来时,重复发送第一授权检验请求到授权服务器的步骤。Step S204: When the first sending time arrives, repeat the step of sending the first authorization verification request to the authorization server.
在一个实施例中,计算机可读指令被一个或多个处理器执行时还实现以下步骤:发送第一授权检验请求到授权服务器的步骤之前,发送第二授权检验请求到 授权服务器;接收授权服务器返回的第二网络状态指示信息,第二网络状态指示信息由授权服务器响应第二授权检验请求生成;判断第二网络状态指示信息是否为指定网络状态指示信息,指定网络状态指示信息指示网络状态正常;若是,则重复发送第一授权检验请求到授权服务器的步骤。In one embodiment, when the computer readable instructions are executed by one or more processors, the following steps are further implemented: before the step of sending the first authorization verification request to the authorization server, sending the second authorization verification request to the authorization server; receiving the authorization server Returning the second network status indication information, the second network status indication information is generated by the authorization server in response to the second authorization verification request; judging whether the second network status indication information is the designated network status indication information, and the designated network status indication information indicates that the network status is normal ; If yes, repeat the step of sending the first authorization verification request to the authorization server.
在一个实施例中,计算机可读指令被一个或多个处理器执行时还实现以下步骤:在第二网络状态指示信息不是指定网络状态指示信息时,确定当前时刻已发送的第二授权检验请求的发送次数;基于发送次数以及第一预设基本时长,确定第一等待时长;基于第一等待时长和当前时刻,确定重新发送第二授权检验请求的第二发送时间;在第二发送时间到来时,重复发送第二授权检验请求到授权服务器的步骤,直至发送次数大于第一预设次数阈值时结束。In one embodiment, when the computer-readable instructions are executed by one or more processors, the following steps are further implemented: when the second network status indication information is not specified network status indication information, determine the second authorization check request that has been sent at the current moment The number of sending times; based on the number of sending times and the first preset basic time length, determine the first waiting time; based on the first waiting time and the current time, determine the second sending time for resending the second authorization check request; when the second sending time arrives , repeat the step of sending the second authorization verification request to the authorization server until the sending times are greater than the first preset times threshold.
在一个实施例中,计算机可读指令被一个或多个处理器执行时还实现以下步骤:发送第二授权检验请求到授权服务器之后,若等待预设时长时未接收到授权服务器返回的任何信息,则确定当前时刻已发送的第二授权检验请求的发送次数;基于发送次数以及第一预设基本时长,确定第一等待时长;基于第一等待时长和当前时刻,确定重新发送第二授权检验请求的第二发送时间;在第二发送时间到来时,重复发送第二授权检验请求到授权服务器的步骤,直至发送次数大于第一预设次数阈值时结束。In one embodiment, the following steps are further implemented when the computer-readable instructions are executed by one or more processors: after sending the second authorization verification request to the authorization server, if no information returned by the authorization server is received after waiting for a preset period of time , then determine the number of times the second authorization verification request has been sent at the current moment; determine the first waiting time based on the number of sending times and the first preset basic duration; determine to resend the second authorization verification request based on the first waiting time and the current time The second sending time of the request; when the second sending time arrives, repeat the step of sending the second authorization verification request to the authorization server until the number of times of sending is greater than the first preset threshold.
在一个实施例中,计算机可读指令被一个或多个处理器执行时还实现以下步骤:基于以下公式确定第一等待时长:In one embodiment, when the computer-readable instructions are executed by one or more processors, the following steps are further implemented: determining the first waiting period based on the following formula:
T1=t×2n;T1=t×2n;
其中,T1表示第一等待时长,t表示第一预设基本时长,n表示发送次数。Wherein, T1 represents the first waiting duration, t represents the first preset basic duration, and n represents the number of sending times.
在一个实施例中,计算机可读指令被一个或多个处理器执行时还实现以下步骤:接收授权服务器返回的第一网络状态指示信息之后,判断第一网络状态指示信息是否为指定网络状态指示信息;基于第一网络状态指示信息,确定重新发送第一授权检验请求的第一发送时间,包括:在第一网络状态指示信息是指定网络状态指示信息时,基于第一预设规则确定重新发送第一授权检验请求的第一发送时间;在第一网络状态指示信息不是指定网络状态指示信息时,基于第二预设规则确定重新发送第一授权检验请求的第一发送时间;其中,第一预设规则与第二预设规则各自指示确定的第一发送时间不同。In one embodiment, when the computer-readable instructions are executed by one or more processors, the following steps are further implemented: after receiving the first network status indication information returned by the authorization server, determining whether the first network status indication information is a specified network status indication Information; based on the first network status indication information, determining the first sending time for resending the first authorization check request includes: when the first network status indication information is specified network status indication information, determining to resend based on the first preset rule The first sending time of the first authorization verification request; when the first network state indication information is not the specified network state indication information, determine the first sending time of resending the first authorization verification request based on the second preset rule; wherein, the first The preset rule and the second preset rule respectively indicate that the determined first sending time is different.
在一个实施例中,计算机可读指令被一个或多个处理器执行时还实现以下步骤:在第一网络状态指示信息是指定网络状态指示信息时,确定当前时刻已发送的第一授权检验请求的发送次数;确定指定网络状态指示信息对应的第一权重值;基于第一授权检验请求的发送次数、第一权重值以及第二预设基本时长,确定第二等待时长;基于第二等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间。In one embodiment, when the computer-readable instructions are executed by one or more processors, the following steps are further implemented: when the first network status indication information is designated network status indication information, determine the first authorization check request that has been sent at the current moment The number of sending times; determine the first weight value corresponding to the specified network status indication information; determine the second waiting time based on the number of times the first authorization check request is sent, the first weight value, and the second preset basic time length; based on the second waiting time and the current time, determine the first sending time for resending the first authorization check request.
在一个实施例中,计算机可读指令被一个或多个处理器执行时还实现以下步骤:在第一授权检验请求的发送次数大于第二预设次数阈值时,结束从而不再发送第一授权检验请求。In one embodiment, when the computer-readable instructions are executed by one or more processors, the following steps are further implemented: when the number of times the first authorization verification request is sent is greater than the second preset number of thresholds, end and no longer send the first authorization Verify request.
在一个实施例中,计算机可读指令被一个或多个处理器执行时还实现以下步骤:在第一网络状态指示信息不是指定网络状态指示信息时,记录当前时刻,并获取预设网络状态指示信息集合,预设网络状态指示信息集合包括除指定网络状 态指示信息之外的第一网络状态指示信息集合和第二网络状态指示信息集合;判定第一网络状态指示信息归属于所述第一网络状态指示信息集合时,确定第一网络状态指示信息对应的第二权重值;基于第二权重值以及第二预设基本时长,确定第三等待时长;基于第三等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间;或者,判定第一网络状态指示信息归属于第二网络状态指示信息集合时,确定第一网络状态指示信息对应的第三权重值,第三权重值大于第二权重值;基于第三权重值以及第二预设基本时长,确定第四等待时长;基于第四等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间。In one embodiment, when the computer-readable instructions are executed by one or more processors, the following steps are further implemented: when the first network status indication information is not specified network status indication information, record the current moment, and obtain a preset network status indication The information set, the preset network state indication information set includes the first network state indication information set and the second network state indication information set except for the specified network state indication information; it is determined that the first network state indication information belongs to the first network When the state indication information is collected, determine the second weight value corresponding to the first network state indication information; determine the third waiting time based on the second weight value and the second preset basic time length; determine the new waiting time based on the third waiting time and the current time. Send the first sending time of the first authorization check request; or, when determining that the first network status indication information belongs to the second network status indication information set, determine the third weight value corresponding to the first network status indication information, and the third weight value greater than the second weight value; based on the third weight value and the second preset basic time length, determine the fourth waiting time; based on the fourth waiting time and the current time, determine the first sending time for resending the first authorization check request.
在一个实施例中,计算机可读指令被一个或多个处理器执行时还实现以下步骤:确定已发送的第一授权检验请求的发送次数;在第一授权检验请求的发送次数大于第二预设次数阈值时,结束从而不再发送第一授权检验请求。In one embodiment, when the computer readable instructions are executed by one or more processors, the following steps are further implemented: determining the number of times the first authorization check request has been sent; when the number of times the first authorization check request is sent is greater than the second preset When the number of times threshold is set, end and no longer send the first authorization check request.
本实施例的上述技术方案,在移动热点101授权检验时,由于每次授权服务器102返回的网络状态指示信息可能不同,因此确定的重新发送授权检验请求的发送时间不同,从而可以基于网络状态指示信息所指示的网络状态动态地不断调整发送授权检验请求的时间,在网络状态不佳时,不直接关闭热点功能,可基于网络状态指示信息指示的网络状态的真实情况灵活调整重新发送授权请求的时间,避免过于频繁发送授权请求的情况,从而减轻了授权服务器102的忙碌和负担,也使得移动热点101的功耗降低。In the above technical solution of this embodiment, during the authorization verification of the mobile hotspot 101, since the network status indication information returned by the authorization server 102 may be different each time, the determined sending time of resending the authorization verification request is different, so that it can be based on the network status indication The network status indicated by the information dynamically and continuously adjusts the time for sending the authorization verification request. When the network status is not good, the hotspot function is not directly turned off, and the time for resending the authorization request can be flexibly adjusted based on the real situation of the network status indicated by the network status indication information. time, avoid sending authorization requests too frequently, thereby reducing the busyness and burden of the authorization server 102, and also reducing the power consumption of the mobile hotspot 101.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本公开所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,比如静态随机存取存储器(Static Random Access Memory,SRAM)和动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile computer In the readable storage medium, the computer-readable instructions may include the processes of the embodiments of the above-mentioned methods when executed. Wherein, any reference to storage, database or other media used in the various embodiments provided by the present disclosure may include at least one of non-volatile and volatile storage. Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms such as Static Random Access Memory (SRAM) and Dynamic Random Access Memory (DRAM), among others.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered to be within the range described in this specification.
工业实用性Industrial Applicability
本公开提供的移动热点授权检验方法,在网络状态不佳时,可基于网络状态指示信息指示的网络状态的真实情况灵活调整重新发送授权请求的时间,避免过于频繁发送授权请求的情况,解决了由于过于频繁发送授权请求而导致的授权服务器的忙碌和负担的问题,降低了移动热点的功耗,具有很强的工业实用性。The mobile hotspot authorization verification method provided by this disclosure can flexibly adjust the time for resending authorization requests based on the real situation of the network status indicated by the network status indication information when the network status is not good, avoiding the situation of sending authorization requests too frequently, and solving the problem The problem of the busyness and burden of the authorization server caused by sending the authorization request too frequently reduces the power consumption of the mobile hotspot and has strong industrial applicability.

Claims (20)

  1. 一种移动热点授权检验方法,其特征在于,包括:A mobile hotspot authorization verification method, characterized in that, comprising:
    发送第一授权检验请求到授权服务器;sending a first authorization check request to the authorization server;
    接收所述授权服务器返回的第一网络状态指示信息,所述第一网络状态指示信息由所述授权服务器响应所述第一授权检验请求生成;receiving first network status indication information returned by the authorization server, the first network status indication information being generated by the authorization server in response to the first authorization verification request;
    基于所述第一网络状态指示信息,确定重新发送第一授权检验请求的第一发送时间;其中不同的第一网络状态指示信息对应不同的请求发送时间;Based on the first network status indication information, determine a first sending time for resending the first authorization check request; where different first network status indication information corresponds to different request sending times;
    在所述第一发送时间到来时,重复所述发送第一授权检验请求到授权服务器的步骤。When the first sending time arrives, repeat the step of sending the first authorization check request to the authorization server.
  2. 根据权利要求1所述的授权检验方法,其中,所述方法还包括:The authorization verification method according to claim 1, wherein the method further comprises:
    发送第二授权检验请求到所述授权服务器;sending a second authorization check request to the authorization server;
    接收所述授权服务器返回的第二网络状态指示信息,所述第二网络状态指示信息由所述授权服务器响应所述第二授权检验请求生成;receiving second network status indication information returned by the authorization server, the second network status indication information being generated by the authorization server in response to the second authorization verification request;
    判断所述第二网络状态指示信息是否为指定网络状态指示信息,所述指定网络状态指示信息指示网络状态正常;judging whether the second network state indication information is designated network state indication information, and the designated network state indication information indicates that the network state is normal;
    在所述第二网络状态指示信息为指定网络状态指示信息的条件下,重复所述发送第一授权检验请求到授权服务器的步骤。On the condition that the second network state indication information is designated network state indication information, repeat the step of sending the first authorization check request to the authorization server.
  3. 根据权利要求2所述的授权检验方法,其中,所述方法还包括:The authorization verification method according to claim 2, wherein said method further comprises:
    在所述第二网络状态指示信息不是所述指定网络状态指示信息时,确定当前时刻已发送的第二授权检验请求的发送次数;When the second network state indication information is not the specified network state indication information, determine the number of times of sending the second authorization check request that has been sent at the current moment;
    基于所述发送次数以及第一预设基本时长,确定第一等待时长;Determine a first waiting period based on the number of sending times and a first preset basic period;
    基于所述第一等待时长和当前时刻,确定重新发送第二授权检验请求的第二发送时间;Based on the first waiting period and the current time, determine a second sending time for resending the second authorization check request;
    在所述第二发送时间到来时,重复所述发送第二授权检验请求到所述授权服务器的步骤,直至所述发送次数大于第一预设次数阈值时结束。When the second sending time arrives, repeating the step of sending the second authorization verification request to the authorization server until the number of times of sending is greater than a first preset threshold.
  4. 根据权利要求2所述的授权检验方法,其中,所述方法还包括:The authorization verification method according to claim 2, wherein said method further comprises:
    发送第二授权检验请求到所述授权服务器之后,若等待预设时长时未接收到所述授权服务器返回的任何信息,则确定当前时刻已发送的第二授权检验请求的发送次数;After sending the second authorization verification request to the authorization server, if no information returned by the authorization server is received after waiting for a preset period of time, then determine the number of times the second authorization verification request has been sent at the current moment;
    基于所述发送次数以及第一预设基本时长,确定第一等待时长;Determine a first waiting period based on the number of sending times and a first preset basic period;
    基于所述第一等待时长和当前时刻,确定重新发送第二授权检验请求的第二发送时间;Based on the first waiting period and the current time, determine a second sending time for resending the second authorization check request;
    在所述第二发送时间到来时,重复所述发送第二授权检验请求到所述授权服务器的步骤,直至所述发送次数大于第一预设次数阈值时结束。When the second sending time arrives, repeating the step of sending the second authorization verification request to the authorization server until the number of times of sending is greater than a first preset threshold.
  5. 根据权利要求3或4所述的授权检验方法,其中,所述基于所述发送次数以及第一预设基本时长,确定第一等待时长,包括:The authorization verification method according to claim 3 or 4, wherein said determining the first waiting period based on the number of sending times and the first preset basic period includes:
    基于以下公式确定第一等待时长:The first waiting period is determined based on the following formula:
    T1=t×2n;T1=t×2n;
    其中,T1表示第一等待时长,t表示第一预设基本时长,n表示发送次数。Wherein, T1 represents the first waiting duration, t represents the first preset basic duration, and n represents the number of sending times.
  6. 根据权利要求1所述的授权检验方法,其中,所述方法还包括:The authorization verification method according to claim 1, wherein the method further comprises:
    判断所述第一网络状态指示信息是否为指定网络状态指示信息;judging whether the first network status indication information is designated network status indication information;
    所述基于所述第一网络状态指示信息,确定重新发送第一授权检验请求的第一发送时间,包括:The determining the first sending time for resending the first authorization check request based on the first network state indication information includes:
    在所述第一网络状态指示信息是指定网络状态指示信息时,基于第一预设规则确定重新发送第一授权检验请求的第一发送时间;When the first network state indication information is designated network state indication information, determine the first sending time for resending the first authorization check request based on a first preset rule;
    在所述第一网络状态指示信息不是指定网络状态指示信息时,基于第二预设规则确定重新发送第一授权检验请求的第一发送时间;When the first network status indication information is not specified network status indication information, determine the first sending time for resending the first authorization check request based on a second preset rule;
    其中,所述第一预设规则与所述第二预设规则各自指示确定的第一发送时间不同。Wherein, the first sending time indicated by the first preset rule and the second preset rule are different from each other.
  7. 根据权利要求6所述的授权检验方法,其中,在所述第一网络状态指示信息是指定网络状态指示信息时,基于第一预设规则确定重新发送第一授权检验请求的第一发送时间,包括:The authorization verification method according to claim 6, wherein when the first network state indication information is designated network state indication information, the first sending time for resending the first authorization verification request is determined based on a first preset rule, include:
    在所述第一网络状态指示信息是指定网络状态指示信息时,确定当前时刻已发送的第一授权检验请求的发送次数;When the first network status indication information is designated network status indication information, determine the number of times the first authorization check request has been sent at the current moment;
    确定所述指定网络状态指示信息对应的第一权重值;determining a first weight value corresponding to the specified network state indication information;
    基于所述第一授权检验请求的发送次数、所述第一权重值以及第二预设基本时长,确定第二等待时长;determining a second waiting period based on the number of times the first authorization check request is sent, the first weight value, and a second preset basic period;
    基于所述第二等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间。Based on the second waiting period and the current time, determine the first sending time for resending the first authorization check request.
  8. 根据权利要求7所述的授权检验方法,其中,所述方法还包括:The authorization verification method according to claim 7, wherein said method further comprises:
    在所述第一授权检验请求的发送次数大于第二预设次数阈值时,结束从而不再发送第一授权检验请求。When the number of sending times of the first authorization checking request is greater than the second preset number of times threshold, the process ends so that the first authorization checking request is no longer sent.
  9. 根据权利要求6所述的授权检验方法,其中,在所述第一网络状态指示信息不是指定网络状态指示信息时,基于第二预设规则确定重新发送第一授权检验请求的第一发送时间,包括:The authorization verification method according to claim 6, wherein when the first network status indication information is not specified network status indication information, the first sending time for resending the first authorization verification request is determined based on a second preset rule, include:
    在所述第一网络状态指示信息不是指定网络状态指示信息时,记录当前时刻,并获取预设网络状态指示信息集合,所述预设网络状态指示信息集合包括除所述指定网络状态指示信息之外的第一网络状态指示信息集合和第二网络状态指示信息集合;When the first network state indication information is not the designated network state indication information, record the current time, and obtain a preset network state indication information set, the preset network state indication information set includes other than the designated network state indication information The first set of network status indication information and the second set of network status indication information;
    判定所述第一网络状态指示信息归属于所述第一网络状态指示信息集合时,确定所述第一网络状态指示信息对应的第二权重值;When determining that the first network state indication information belongs to the first network state indication information set, determine a second weight value corresponding to the first network state indication information;
    基于所述第二权重值以及第二预设基本时长,确定第三等待时长;determining a third waiting period based on the second weight value and a second preset basic period;
    基于所述第三等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间;Based on the third waiting period and the current time, determine the first sending time for resending the first authorization check request;
    或者,or,
    判定所述第一网络状态指示信息归属于所述第二网络状态指示信息集合时,确定所述第一网络状态指示信息对应的第三权重值,所述第三权重值大于所述第二权重值;When determining that the first network state indication information belongs to the second network state indication information set, determine a third weight value corresponding to the first network state indication information, where the third weight value is greater than the second weight value value;
    基于所述第三权重值以及第二预设基本时长,确定第四等待时长;determining a fourth waiting period based on the third weight value and a second preset basic period;
    基于所述第四等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间。Based on the fourth waiting period and the current time, determine the first sending time for resending the first authorization check request.
  10. 根据权利要求9所述的授权检验方法,其中,所述方法还包括:The authorization verification method according to claim 9, wherein said method further comprises:
    确定已发送的第一授权检验请求的发送次数;determining the number of times the first authorization check request has been sent;
    在所述第一授权检验请求的发送次数大于第二预设次数阈值时,结束从而不再发送第一授权检验请求。When the number of sending times of the first authorization checking request is greater than the second preset number of times threshold, the process ends so that the first authorization checking request is no longer sent.
  11. 一种移动热点授权检验装置,其特征在于,包括:A mobile hotspot authorization verification device is characterized in that it comprises:
    请求发送模块,配置成发送第一授权检验请求到授权服务器;The request sending module is configured to send the first authorization check request to the authorization server;
    信息接收模块,配置成接收所述授权服务器返回的第一网络状态指示信息,所述第一网络状态指示信息由所述授权服务器响应所述第一授权检验请求生成;An information receiving module configured to receive first network status indication information returned by the authorization server, the first network status indication information being generated by the authorization server in response to the first authorization verification request;
    时间确定模块,配置成基于所述第一网络状态指示信息,确定重新发送第一授权检验请求的第一发送时间;其中不同的第一网络状态指示信息对应不同的请求发送时间;The time determination module is configured to determine the first sending time for resending the first authorization check request based on the first network status indication information; where different first network status indication information corresponds to different request sending times;
    循环控制模块,配置成在所述第一发送时间到来时,触发所述请求发送模块发送第一授权检验请求到授权服务器。The loop control module is configured to trigger the request sending module to send the first authorization verification request to the authorization server when the first sending time arrives.
  12. 根据权利要求11所述的授权检验装置,其中,所述装置还包括:信息判断模块;The authorization verification device according to claim 11, wherein the device further comprises: an information judging module;
    所述请求发送模块还配置成在发送所述第一授权检验请求到所述授权服务器之前,发送第二授权检验请求到所述授权服务器;The request sending module is further configured to send a second authorization verification request to the authorization server before sending the first authorization verification request to the authorization server;
    所述信息接收模块还配置成接收所述授权服务器返回的第二网络状态指示信息,所述第二网络状态指示信息由所述授权服务器响应所述第二授权检验请求生成;The information receiving module is further configured to receive second network status indication information returned by the authorization server, the second network status indication information being generated by the authorization server in response to the second authorization verification request;
    所述信息判断模块配置成判断所述第二网络状态指示信息是否为指定网络状态指示信息,所述指定网络状态指示信息指示网络状态正常;The information judging module is configured to judge whether the second network status indication information is designated network status indication information, and the designated network status indication information indicates that the network status is normal;
    所述循环控制模块还配置成在所述信息判断模块的判断结果为是时,触发所述请求发送模块发送所述第一授权检验请求到所述授权服务器。The cycle control module is further configured to trigger the request sending module to send the first authorization check request to the authorization server when the judgment result of the information judging module is yes.
  13. 根据权利要求12所述的授权检验装置,其中,所述装置还包括:The authorization verification device according to claim 12, wherein said device further comprises:
    次数确定模块,配置成在所述信息判断模块判断所述第二网络状态指示信息不是所述指定网络状态指示信息时,确定当前时刻已发送的第二授权检验请求的发送次数;The number of times determination module is configured to determine the number of times the second authorization check request has been sent at the current moment when the information judging module judges that the second network status indication information is not the specified network status indication information;
    所述时间确定模块,还配置成基于所述发送次数以及第一预设基本时长,确定第一等待时长;基于所述第一等待时长和当前时刻,确定重新发送第二授权检验请求的第二发送时间;The time determination module is further configured to determine a first waiting period based on the number of sending times and a first preset basic period; based on the first waiting period and the current time, determine a second time period for resending the second authorization check request. sending time;
    所述循环控制模块,还配置成在所述第二发送时间到来时,触发所述请求发送模块发送第二授权检验请求到所述授权服务器,直至所述发送次数大于第一预设次数阈值时结束。The loop control module is further configured to trigger the request sending module to send a second authorization check request to the authorization server when the second sending time arrives, until the number of times of sending is greater than a first preset threshold End.
  14. 根据权利要求11所述的授权检验装置,其中,所述装置还包括:The authorization verification device according to claim 11, wherein said device further comprises:
    信息判断模块,配置成在所述接收所述授权服务器返回的第一网络状态指示信息之后,判断第一网络状态指示信息是否为指定网络状态指示信息;The information judging module is configured to judge whether the first network status indication information is designated network status indication information after receiving the first network status indication information returned by the authorization server;
    所述时间确定模块,具体配置成在所述第一网络状态指示信息是指定网络状态指示信息时,基于第一预设规则确定重新发送第一授权检验请求的第一发送时间;在所述第一网络状态指示信息不是指定网络状态指示信息时,基于第二预设规则确定重新发送第一授权检验请求的第一发送时间;其中,所述第一预设规则 与所述第二预设规则各自指示确定的第一发送时间不同。The time determining module is specifically configured to determine, based on a first preset rule, a first sending time for resending the first authorization check request when the first network state indication information is specified network state indication information; When the network state indication information is not specified network state indication information, determine the first sending time for resending the first authorization check request based on the second preset rule; wherein, the first preset rule and the second preset rule The determined first sending times of the respective indications are different.
  15. 根据权利要求14所述的授权检验装置,其中,Authorization verification device according to claim 14, wherein,
    所述时间确定模块,具体配置成在所述第一网络状态指示信息是指定网络状态指示信息时,确定当前时刻已发送的第一授权检验请求的发送次数;确定所述指定网络状态指示信息对应的第一权重值;基于所述第一授权检验请求的发送次数、所述第一权重值以及第二预设基本时长,确定第二等待时长;基于所述第二等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间。The time determination module is specifically configured to, when the first network state indication information is designated network state indication information, determine the number of times the first authorization check request has been sent at the current moment; determine that the designated network state indication information corresponds to The first weight value; based on the number of times the first authorization check request is sent, the first weight value, and the second preset basic time length, determine the second waiting time; based on the second waiting time and the current time, determine The first sending time of the first authorization check request is resent.
  16. 根据权利要求15所述的授权检验装置,其中,Authorization verification device according to claim 15, wherein,
    所述循环控制模块,还配置成在第一授权检验请求的发送次数大于第二预设次数阈值时,结束从而不再触发请求发送模块发送第一授权检验请求。The cycle control module is further configured to end when the number of times the first authorization verification request is sent is greater than the second preset number of times threshold so as not to trigger the request sending module to send the first authorization verification request.
  17. 根据权利要求14所述的授权检验装置,其中,Authorization verification device according to claim 14, wherein,
    所述时间确定模块在所述信息判断模块判定所述第一网络状态指示信息不是指定网络状态指示信息时,基于第二预设规则确定重新发送第一授权检验请求的第一发送时间,具体包括:在所述第一网络状态指示信息不是指定网络状态指示信息时,记录当前时刻,并获取预设网络状态指示信息集合,所述预设网络状态指示信息集合包括除所述指定网络状态指示信息之外的第一网络状态指示信息集合和第二网络状态指示信息集合;判定所述第一网络状态指示信息归属于所述第一网络状态指示信息集合时,确定所述第一网络状态指示信息对应的第二权重值;基于所述第二权重值以及第二预设基本时长,确定第三等待时长;基于所述第三等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间;或者,判定所述第一网络状态指示信息归属于所述第二网络状态指示信息集合时,确定所述第一网络状态指示信息对应的第三权重值,所述第三权重值大于所述第二权重值;基于所述第三权重值以及第二预设基本时长,确定第四等待时长;基于所述第四等待时长和当前时刻,确定重新发送第一授权检验请求的第一发送时间。When the information judging module determines that the first network status indication information is not specified network status indication information, the time determining module determines the first sending time for resending the first authorization check request based on a second preset rule, specifically including : when the first network state indication information is not the specified network state indication information, record the current time, and obtain a preset network state indication information set, the preset network state indication information set includes the specified network state indication information other than the first network state indication information set and the second network state indication information set; when it is determined that the first network state indication information belongs to the first network state indication information set, determine the first network state indication information The corresponding second weight value; based on the second weight value and the second preset basic time length, determine the third waiting time; based on the third waiting time and the current time, determine the first time to resend the first authorization check request sending time; or, when determining that the first network state indication information belongs to the second network state indication information set, determine a third weight value corresponding to the first network state indication information, and the third weight value is greater than The second weight value; based on the third weight value and the second preset basic time length, determine a fourth waiting time; based on the fourth waiting time and the current time, determine the first time to resend the first authorization check request send time.
  18. 根据权利要求17所述的授权检验装置,其中,所述装置还包括:次数确定模块,配置成确定已发送的第一授权检验请求的发送次数;The authorization verification device according to claim 17, wherein the device further comprises: a times determination module configured to determine the number of times the first authorization verification request has been sent;
    所述循环控制模块,还配置成在所述第一授权检验请求的发送次数大于第二预设次数阈值时,结束从而不再发送第一授权检验请求。The loop control module is further configured to end the sending of the first authorization checking request when the number of sending times of the first authorization checking request is greater than a second preset number threshold.
  19. 一种计算机可读存储介质,其上存储有计算机可读指令,其特征在于,该计算机可读指令被一个或多个处理器执行时实现权利要求1~10任一项所述授权检验方法的步骤。A computer-readable storage medium, on which computer-readable instructions are stored, characterized in that, when the computer-readable instructions are executed by one or more processors, the authorization verification method described in any one of claims 1-10 is implemented. step.
  20. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    一个或多个处理器;以及one or more processors; and
    存储器,配置成存储计算机可读指令;a memory configured to store computer readable instructions;
    其中,所述一个或多个处理器配置为经由执行所述计算机可读指令来执行权利要求1~10任一项所述授权检验方法的步骤。Wherein, the one or more processors are configured to execute the steps of the authorization verification method according to any one of claims 1-10 by executing the computer-readable instructions.
PCT/CN2021/125053 2021-06-21 2021-10-20 Mobile hotspot authorization inspection method and apparatus, storage medium, and electronic device WO2022267274A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110686577.2A CN113411806B (en) 2021-06-21 2021-06-21 Mobile hotspot authorization checking method and device, storage medium and electronic equipment
CN202110686577.2 2021-06-21

Publications (1)

Publication Number Publication Date
WO2022267274A1 true WO2022267274A1 (en) 2022-12-29

Family

ID=77681991

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/125053 WO2022267274A1 (en) 2021-06-21 2021-10-20 Mobile hotspot authorization inspection method and apparatus, storage medium, and electronic device

Country Status (2)

Country Link
CN (1) CN113411806B (en)
WO (1) WO2022267274A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116153451A (en) * 2023-04-18 2023-05-23 中国人民解放军总医院 Disease receiving and curing seed analysis system based on data processing

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113411806B (en) * 2021-06-21 2022-12-30 上海闻泰信息技术有限公司 Mobile hotspot authorization checking method and device, storage medium and electronic equipment
CN114125841B (en) * 2021-10-25 2024-05-24 西安闻泰电子科技有限公司 Hot spot network control method, device, equipment and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110199898A1 (en) * 2010-02-16 2011-08-18 Samsung Electronics Co. Ltd. Method and apparatus for controlling network access of ue in wireless communication system
CN108366091A (en) * 2018-01-10 2018-08-03 深圳市金立通信设备有限公司 Network request processing method, terminal and computer-readable medium
US20180227758A1 (en) * 2015-08-05 2018-08-09 Orange Method and device for identifying visited and home authentication servers
CN110620681A (en) * 2019-08-22 2019-12-27 中国平安财产保险股份有限公司 Network connection timeout time setting method, device, equipment and medium
CN111836263A (en) * 2019-04-23 2020-10-27 华为技术有限公司 Communication processing method and communication processing device
CN113411806A (en) * 2021-06-21 2021-09-17 上海闻泰信息技术有限公司 Mobile hotspot authorization checking method and device, storage medium and electronic equipment

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101127214B1 (en) * 2003-07-22 2012-03-29 톰슨 라이센싱 Method and apparatus for controlling credit based accessprepaid to a wireless network
US9913305B2 (en) * 2014-08-11 2018-03-06 Intel IP Corporation Systems, methods, and devices for congestion control on a mobile network
KR102226522B1 (en) * 2014-11-04 2021-03-11 삼성전자주식회사 Apparatus and method for determining network status
WO2016112540A1 (en) * 2015-01-16 2016-07-21 华为技术有限公司 Service authorization method, proximity-based service server and user equipment
CN106100865B (en) * 2016-05-24 2019-06-14 中国联合网络通信集团有限公司 Hot spot shared authorization method and server
CN106161601A (en) * 2016-06-24 2016-11-23 广东欧珀移动通信有限公司 The method and device of request of data
CN108093019B (en) * 2016-11-23 2020-12-04 腾讯科技(深圳)有限公司 Member information refreshing method and terminal
US10021665B1 (en) * 2016-12-20 2018-07-10 T-Mobile Usa, Inc. Processing requests in communication session
CN106714167A (en) * 2016-12-30 2017-05-24 北京华为数字技术有限公司 Authentication method and network access server
CN112449440B (en) * 2019-08-29 2023-05-23 深圳市优克联新技术有限公司 Wireless resource control method, device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110199898A1 (en) * 2010-02-16 2011-08-18 Samsung Electronics Co. Ltd. Method and apparatus for controlling network access of ue in wireless communication system
US20180227758A1 (en) * 2015-08-05 2018-08-09 Orange Method and device for identifying visited and home authentication servers
CN108366091A (en) * 2018-01-10 2018-08-03 深圳市金立通信设备有限公司 Network request processing method, terminal and computer-readable medium
CN111836263A (en) * 2019-04-23 2020-10-27 华为技术有限公司 Communication processing method and communication processing device
CN110620681A (en) * 2019-08-22 2019-12-27 中国平安财产保险股份有限公司 Network connection timeout time setting method, device, equipment and medium
CN113411806A (en) * 2021-06-21 2021-09-17 上海闻泰信息技术有限公司 Mobile hotspot authorization checking method and device, storage medium and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116153451A (en) * 2023-04-18 2023-05-23 中国人民解放军总医院 Disease receiving and curing seed analysis system based on data processing

Also Published As

Publication number Publication date
CN113411806A (en) 2021-09-17
CN113411806B (en) 2022-12-30

Similar Documents

Publication Publication Date Title
WO2022267274A1 (en) Mobile hotspot authorization inspection method and apparatus, storage medium, and electronic device
US20220150678A1 (en) Communication method and apparatus, computer-readable medium, and electronic device
WO2018086517A1 (en) Downlink packet transmission method and device
WO2018082548A1 (en) Data transmission method, terminal and network-side device
US11985198B2 (en) Method, apparatus, and system for session reestablishment or session sharing, and storage medium
US10516622B2 (en) Speech transmission method and apparatus and speech service system
CN110557265B (en) Multicast method and device
WO2021042612A1 (en) Wireless screen projection method and apparatus, device and storage medium
US9838313B2 (en) Method, system, control device and node device for data transmission
CN114827280A (en) Request processing method, device, equipment and medium
JP6531593B2 (en) Communication method, communication program and information processing apparatus
CN100444594C (en) Communications device, method and program for receiving process execution, and medium recorded thereon
WO2020147081A1 (en) Data transmission method, related device, and computer storage medium
WO2018145583A1 (en) Resource reservation method and determination method for uplink control channel, base station and terminal
WO2022242129A1 (en) Multi-public-network connection driving method and apparatus, and computer device and storage medium
KR20190054671A (en) A method of optimizing a domain of an API server responding to a call of a specific function and a terminal implementing the method
US8031675B2 (en) System and method for detecting wireless base stations
WO2018153194A1 (en) Streaming data acquisition method, device, and system
WO2015180010A1 (en) Wireless backhaul method, mobile terminal, and system
CN109597576B (en) Method, device, readable storage medium and system for improving response speed of NCQ command
WO2017059728A1 (en) Load reporting and control method, emsc device, mme device and communications system
US11751080B2 (en) Wireless network access point and method for operation thereof
CN116340202B (en) Data transmission method, device, equipment and computer readable storage medium
JP6792543B2 (en) Non-communication time estimation device, non-communication time estimation method, and program
WO2021204073A1 (en) Method and device for stopping sending schedule request

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21946756

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE