Methods of logging into applications, electronic devices and communication systems

By leveraging the distributed computing capabilities and trigger mechanisms of the serverless function platform, login degradation can be quickly analyzed and executed, resolving timeout issues when electronic devices experience login anomalies, improving user experience, and enhancing policy scalability.

CN116112190BActive Publication Date: 2026-04-03HUAWEI DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-09
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

When an electronic device experiences login failures, existing technologies require waiting for a preset timeout before performing login downgrades, resulting in a poor user experience and poor scalability of downgrade strategies.

Method used

By leveraging the distributed computing capabilities of the serverless function platform, login anomalies can be quickly analyzed through parameter sets. Login information can be obtained using HTTP triggers and login gateways, triggering the serverless function platform to run degradation functions, thereby achieving rapid login degradation.

Benefits of technology

When login failures occur, electronic devices can perform login degradation more quickly, improving the user experience. Furthermore, the degradation strategy can be flexibly configured without modifying the software development kit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116112190B_ABST
    Figure CN116112190B_ABST
Patent Text Reader

Abstract

A method for logging into an application, an electronic device, and a communication system are disclosed. In this method, after the electronic device sends a login request, it can use relevant cloud functions in a serverless function platform to analyze whether the application login is normal. If it is not normal, the electronic device is notified to perform login downgrade. Since the cloud functions in the serverless function platform have distributed computing capabilities, they can analyze whether the server is normal more quickly than methods that rely on timeout mechanisms. In the case of server malfunction, the electronic device can perform login downgrade without passively waiting for the timeout period.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of electronic devices and communication technology, and in particular to methods for logging into applications, electronic devices, and communication systems. Background Technology

[0002] Currently, to allow users to access their application history, different application accounts are set up for different users to identify them. Electronic devices send login requests to log in to the application using these accounts, retrieving application resources and user data from the application server. However, if the server malfunctions, it cannot respond to the login request, causing the electronic device to fail to log in. In the event of server unresponsiveness, the electronic device can only confirm a server failure after a preset timeout period, and then implement login degradation (for example, during game login, if login fails, a game trial interface is displayed to inform the user of the login failure). Furthermore, the degradation strategy involved in login degradation is set in the software development kit (SDK) stored on the electronic device. Changing this degradation strategy requires upgrading the SDK, resulting in poor scalability.

[0003] How to enable electronic devices to determine and execute login downgrade more quickly (faster than the preset timeout) to notify the user of login failure in the event of an abnormal login is a problem that urgently needs to be solved. Summary of the Invention

[0004] This application provides a method, electronic device, and communication system for logging into an application, which enables the electronic device to perform login downgrade faster (faster than a preset timeout) in the event of a login error, so as to notify the user of the login error.

[0005] Firstly, this application provides a method for logging into an application. The method is applied to a communication system, which includes an electronic device and a serverless function platform. The electronic device has the application installed. The method includes: the electronic device sending a login request to log into the application, the login request carrying login information of the electronic device; the serverless function platform receiving a parameter set, the parameter set including a first parameter, the first parameter including the login information of the electronic device, and the parameter set also including login information of other electronic devices; after determining that the electronic device's login is abnormal based on the parameter set, the serverless function platform sending a first resource to the electronic device; and the electronic device displaying a first user interface based on the first resource, the first user interface being the user interface when the electronic device fails to log into the application.

[0006] In the above embodiments, when an electronic device logs into an application, if an error occurs during login, it does not need to passively wait for a preset timeout before performing login degradation. Instead, the distributed computing capabilities of the serverless function platform can be utilized to quickly analyze whether the current login is abnormal based on a set of parameters. If an error is found, this information is reported to the electronic device, and the resources required for login degradation are sent to the electronic device. After receiving these resources, the electronic device can perform login degradation to inform the user of the login failure. In this way, the electronic device can perform login degradation faster (than the preset timeout).

[0007] In conjunction with the first aspect, in one embodiment, after the electronic device sends a login request for requesting to log in to the application and before the electronic device displays a first user interface based on the first resource, the method further includes: the electronic device displaying a second user interface, the second user interface being different from the first user interface.

[0008] In the above embodiments, the first interface can be an interface during the login process, used to notify the user that they are currently logging in.

[0009] In conjunction with the first aspect, in one embodiment, after the electronic device sends a login request for requesting to log in to the application and before the serverless function platform receives the parameter set, the method further includes: the electronic device obtaining a first parameter based on the login request; and the electronic device sending the first parameter to the serverless function platform.

[0010] In the above embodiment, the login request carries the login information of the electronic device. The electronic device can directly obtain the login information from the login request as the first parameter and then send it to the serverless function platform. This process can be carried out without going through the login gateway, making the operation more flexible.

[0011] In conjunction with the first aspect, in one embodiment, the communication system further includes a login gateway, wherein the electronic device sends a login request for requesting to log in to the application, specifically including: the electronic device sending a login request for requesting to log in to the application to the login gateway; after the login gateway receives the login request, the method further includes: in response to the login request, the login gateway obtaining a first parameter and sending the first parameter to the serverless function platform, wherein the first parameter further includes a parameter for measuring network performance.

[0012] In the above embodiments, the first parameter sent by the login gateway to the serverless function platform includes not only the login information of the electronic device, but also parameters for measuring network performance. Based on these first parameters, the serverless function platform can perform more accurate analysis of whether the login is abnormal.

[0013] In conjunction with the first aspect, in one embodiment, the communication system further includes an HTTP trigger. After the function platform determines that the electronic device has a login anomaly based on the parameter set, it sends a first resource to the electronic device. Specifically, this includes: after the serverless function platform determines that the electronic device has a login anomaly based on the parameter set, the serverless function platform sends a degradation function name to the electronic device; the electronic device sends the degradation function name to the HTTP trigger to cause the serverless function platform to run the degradation function; after the serverless function platform runs the degradation function, it determines the first resource and sends the first resource to the electronic device.

[0014] In the above embodiments, when the electronic device experiences an abnormal login, it can use an HTTP trigger to trigger the serverless function platform to run a degradation function to achieve login degradation. The HTTP trigger is used to connect the electronic device and the serverless function platform so that the electronic device can complete the login degradation.

[0015] In conjunction with the first aspect, in one embodiment, the communication system further includes an HTTP trigger. After the function platform determines that the electronic device has a login anomaly based on the parameter set, it sends a first resource to the electronic device. Specifically, this includes: after the serverless function platform determines that the electronic device has a login anomaly based on the parameter set, it sends an HTTP error code and a degradation function name to the electronic device; the electronic device determines the login anomaly based on the HTTP error code; after determining the login anomaly, the electronic device sends the degradation function name to the HTTP trigger to cause the serverless function platform to run the degradation function; after the serverless function platform runs the degradation function, it determines the first resource and sends the first resource to the electronic device.

[0016] In the above embodiments, the serverless function platform uses HTTP error codes to make the electronic device determine that the login is abnormal, so that the electronic device can use an HTTP trigger to trigger the serverless function platform to run a degradation function to achieve login degradation.

[0017] In conjunction with the first aspect, in one implementation, the login information includes a request time and an Internet Protocol (IP) address, wherein the request time is the time when the electronic device sends the login request; and the IP address is the IP address of the electronic device.

[0018] In the above embodiment, the login information is the request time and Internet Protocol (IP) address. The parameter set received by the serverless function platform includes login information of multiple electronic devices. Based on this parameter set, the serverless function platform can reduce the computation time and determine whether the login is abnormal more quickly.

[0019] In conjunction with the first aspect, in one implementation, the login request carries a request time and an IP address, wherein the request time is the time when the electronic device sends the login request; the IP address is the IP address of the electronic device; the login gateway responds to the login request, and the login gateway obtains a first parameter, specifically including: the login gateway obtaining the request time and IP address carried in the login request; the login gateway obtaining bandwidth and packet loss rate; and the login gateway using the request time, IP address, bandwidth, and packet loss rate as the first parameter.

[0020] In the above embodiments, the first parameter may include other information besides the request time and IP address, such as bandwidth and packet loss rate. The bandwidth and packet loss rate can determine the network transmission status. By combining the bandwidth and packet loss rate, the serverless function platform can more accurately calculate whether the server is abnormal.

[0021] In conjunction with the first aspect, in one implementation, the login request also carries the application identifier ID of the application, the application ID being used to uniquely identify the application, and the application ID being associated with the degradation function name. The method further includes: the serverless function platform receiving the application ID; the serverless function platform sending the degradation function name to the electronic device, specifically including: the serverless function platform determining the degradation function name associated with the application ID; and the serverless function platform sending the degradation function name to the electronic device.

[0022] In the above embodiments, the application ID is associated with the degradation function name, and different degradation strategies can be configured for different applications. The mechanism for determining login exceptions in the serverless function platform is common, but the degradation strategies are customized for different applications.

[0023] In conjunction with the first aspect, in one implementation, the login request also carries the application identifier ID of the application, the application ID being used to uniquely identify the application, and the application ID being associated with the HTTP error code and the fallback function name. The method further includes: the serverless function platform receiving the application ID; the serverless function platform sending the HTTP error code and the fallback function name to the electronic device, specifically including: the serverless function platform determining the HTTP error code and the fallback function name associated with the application ID; and the serverless function platform sending the HTTP error code and the fallback function name to the electronic device.

[0024] In the above embodiments, the application ID is associated with the HTTP error code and the fallback function name. Different HTTP error codes and fallback strategies can be configured for different applications. The mechanism for determining login exceptions on the serverless function platform is common, but the fallback strategy is customized for different applications.

[0025] In conjunction with the first aspect, in one implementation, the serverless function platform determines that the electronic device login is abnormal based on the parameter set, specifically including: the serverless function platform runs a login decision function to determine that the electronic device login is abnormal based on the parameter set.

[0026] In the above embodiments, the function that determines whether the login is abnormal is the login decision function, which is different from the function that obtains the resources involved in login degradation. It realizes that different functions are packaged and managed separately, which increases the maintainability of the serverless function platform.

[0027] In conjunction with the first aspect, in one embodiment, the method further includes: the serverless function platform receiving a change request, the change request being used to change the content in the degradation function associated with the application ID to implement a change in the degradation strategy; the serverless function platform running the modified degradation function to obtain a second resource; the serverless function sending the second resource to the electronic device; the electronic device displaying a third user interface based on the second resource, the third user interface being the user interface when the electronic device fails to log in to the application, and the third user interface being different from the first user interface.

[0028] In the above embodiments, for a certain application, the degradation strategy can be changed by modifying the content of the degradation function corresponding to the application ID in the serverless function platform. Login degradation can also be achieved without changing the application's software development kit in the terminal, thus achieving strong scalability of login degradation.

[0029] Secondly, this application provides a method for logging into an application, the method being applied to an electronic device on which the application is installed, the method comprising: the electronic device sending a login request for requesting to log into the application; in the event of an abnormal login by the electronic device, the electronic device receiving a first resource sent by a serverless function platform; and the electronic device displaying a first user interface based on the first resource, the first user interface being the user interface when the electronic device fails to log into the application.

[0030] In the above embodiments, when an electronic device logs into an application, if an error occurs during login, it does not need to passively wait for a preset timeout before performing login degradation. Instead, the distributed computing capabilities of the serverless function platform can be utilized to quickly analyze whether the current login is abnormal based on a set of parameters. If an error is found, this information is reported to the electronic device, and the resources required for login degradation are sent to the electronic device. After receiving these resources, the electronic device can perform login degradation to inform the user of the login failure. In this way, the electronic device can perform login degradation faster (than the preset timeout).

[0031] In conjunction with the second aspect, in one embodiment, after the electronic device sends a login request for requesting to log in to the application and before the electronic device displays a first user interface based on the first resource, the method further includes: the electronic device displaying a second user interface, the second user interface being different from the first user interface.

[0032] In the above embodiments, the first interface can be an interface during the login process, used to notify the user that they are currently logging in.

[0033] In conjunction with the second aspect, in one embodiment, after the electronic device sends a login request for requesting to log in to the application, and before the electronic device receives the first resource sent by the serverless function platform, the method further includes: the electronic device obtaining a first parameter based on the login request; and the electronic device sending the first parameter to the serverless function platform.

[0034] In the above embodiment, the login request carries the login information of the electronic device. The electronic device can directly obtain the login information from the login request as the first parameter and then send it to the serverless function platform. This process can be carried out without going through the login gateway, making the operation more flexible.

[0035] In conjunction with the second aspect, in one embodiment, the electronic device sends a login request for requesting to log in to the application, specifically including: the electronic device sending a login request for requesting to log in to the application to a login gateway.

[0036] In conjunction with the second aspect, in one embodiment, before the electronic device receives the first resource sent by the serverless function platform, the method further includes: the electronic device receiving a degradation function name sent by the serverless function platform; the electronic device sending the degradation function name to the HTTP trigger to cause the serverless function platform to run the degradation function;

[0037] In the above embodiments, when the electronic device experiences an abnormal login, it can use an HTTP trigger to trigger the serverless function platform to run a degradation function to achieve login degradation. The HTTP trigger is used to connect the electronic device and the serverless function platform so that the electronic device can complete the login degradation.

[0038] In conjunction with the second aspect, in one embodiment, the login information includes a request time and an IP address, wherein the request time is the time when the electronic device sends the login request; and the IP address is the IP address of the electronic device.

[0039] In conjunction with the second aspect, in one embodiment, the login request also carries the application ID of the application, which is used to uniquely identify the application and is associated with the fallback function name. The method further includes:

[0040] The electronic device sends the application ID to the serverless function platform so that the serverless function can determine the degradation function name based on the application ID.

[0041] In some embodiments, the application ID is associated with the degradation function name, and different degradation strategies can be configured for different applications. The mechanism for determining login exceptions in the serverless function platform is common, but the degradation strategies are customized for different applications.

[0042] In conjunction with the second aspect, in one implementation, the login request also carries the application ID of the application, which is used to uniquely identify the application. The application ID is associated with the HTTP error code and the fallback function name. The method further includes: the electronic device sending the application ID to the serverless function platform so that the serverless function can determine the HTTP error code and the fallback function name based on the application ID.

[0043] In the above embodiments, the application ID is associated with the HTTP error code and the fallback function name. Different HTTP error codes and fallback strategies can be configured for different applications. The mechanism for determining login exceptions on the serverless function platform is common, but the fallback strategy is customized for different applications.

[0044] Thirdly, this application provides a method for logging into an application, the method being applied to a serverless function platform, the method comprising: the serverless function platform receiving a parameter set, the parameter set including a first parameter, the first parameter including login information of the electronic device, the parameter set also including login information of other electronic devices; the serverless function platform determining, based on the parameter set, that the electronic device has an abnormal login, sending a first resource to the electronic device.

[0045] In conjunction with the above embodiments, the distributed computing capabilities of the serverless function platform can quickly analyze whether the current login is abnormal based on the parameter set. If an abnormality is found, the situation is reported back to the electronic device, and the resources involved in the electronic device to perform login downgrade are sent to the electronic device. This allows the electronic device to perform login downgrade without passively waiting for a preset timeout period to occur when logging into the application and an abnormality occurs.

[0046] In conjunction with the third aspect, in one embodiment, the first parameter is the request time and the IP address, wherein the request time is the time when the electronic device sends the login request; and the IP address is the IP address of the electronic device.

[0047] In conjunction with the third aspect, in one embodiment, the first parameter is request time, IP address, bandwidth, and packet loss rate, wherein the request time is the time when the electronic device sends the login request; the IP address is the IP address of the electronic device; the bandwidth is the amount of data that can pass through the login gateway within a certain period of time, and the first parameter is the ratio of lost data packets to received data packets of the login gateway.

[0048] In conjunction with the third aspect, in some embodiments, after the function platform determines that the electronic device has a login anomaly based on the parameter set, it sends a first resource to the electronic device. Specifically, this includes: after the serverless function platform determines that the electronic device has a login anomaly based on the parameter set, the serverless function platform sends a degradation function name to the electronic device; the serverless function platform receives an instruction to run the degradation function; after the serverless function platform runs the degradation function, it determines the first resource and sends the first resource to the electronic device.

[0049] In conjunction with the third aspect, in some embodiments, the method further includes: the serverless function platform receiving an application ID; the serverless function platform sending the degradation function name to the electronic device, specifically including: the serverless function platform determining the degradation function name associated with the application ID; and the serverless function platform sending the degradation function name to the electronic device.

[0050] In conjunction with the third aspect, in some embodiments, the serverless function platform determines that the electronic device login is abnormal based on the parameter set, specifically including: the serverless function platform runs a login decision function to determine that the electronic device login is abnormal based on the parameter set.

[0051] In conjunction with the third aspect, in some embodiments, the method further includes: the serverless function platform receiving a change request, the change request being used to change the content in the degradation function associated with the application ID to implement a change in the degradation strategy; the serverless function platform running the modified degradation function to obtain a second resource; and the serverless function sending the second resource to the electronic device, the second resource being different from the first resource.

[0052] Fourthly, this application provides a communication system, which includes an electronic device and a serverless function platform, wherein: the electronic device is used to send a login request to log in to the application; the serverless function platform is used to receive a parameter set; the serverless function platform is also used to send a first resource to the electronic device after determining that the electronic device has an abnormal login based on the parameter set; the electronic device is also used to display a first user interface based on the first resource.

[0053] In the above embodiments, when an electronic device logs into an application, if an error occurs during login, it does not need to passively wait for a preset timeout before performing login degradation. Instead, the distributed computing capabilities of the serverless function platform can be utilized to quickly analyze whether the current login is abnormal based on a set of parameters. If an error is found, this information is reported to the electronic device, and the resources required for login degradation are sent to the electronic device. After receiving these resources, the electronic device can perform login degradation to inform the user of the login failure. In this way, the electronic device can perform login degradation faster (than the preset timeout).

[0054] In conjunction with the fourth aspect, in some embodiments, the communication system further includes a login gateway, wherein: the electronic device is further configured to send the login request to the login gateway; the login gateway is configured to respond to the login request and obtain a first parameter; and the login gateway is further configured to send the first parameter to the serverless function platform.

[0055] In the above embodiments, the login gateway can obtain bandwidth and packet loss rate as the content of the first parameter and send it to the serverless function platform, so that the serverless function platform can more accurately determine whether the electronic device is abnormally logged in based on the first parameter.

[0056] Fifthly, embodiments of this application provide an electronic device comprising: one or more processors and a memory; the memory being coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors calling the computer instructions to cause the electronic device to perform the method as described in the second aspect or any embodiment of the second aspect.

[0057] In the above embodiments, when an electronic device logs into an application, if an error occurs during login, it does not need to passively wait for a preset timeout before performing login degradation. Instead, the distributed computing capabilities of the serverless function platform can be utilized to quickly analyze whether the current login is abnormal based on a set of parameters. If an error is found, this information is reported to the electronic device, and the resources required for login degradation are sent to the electronic device. After receiving these resources, the electronic device can perform login degradation to inform the user of the login failure. In this way, the electronic device can perform login degradation faster (than the preset timeout).

[0058] In a sixth aspect, embodiments of this application provide a chip system applied to an electronic device. The chip system includes one or more processors that invoke computer instructions to cause the electronic device to perform the methods described in the second aspect or any embodiment of the second aspect.

[0059] In the above embodiments, when an electronic device logs into an application, if an error occurs during login, it does not need to passively wait for a preset timeout before performing login degradation. Instead, the distributed computing capabilities of the serverless function platform can be utilized to quickly analyze whether the current login is abnormal based on a set of parameters. If an error is found, this information is reported to the electronic device, and the resources required for login degradation are sent to the electronic device. After receiving these resources, the electronic device can perform login degradation to inform the user of the login failure. In this way, the electronic device can perform login degradation faster (than the preset timeout).

[0060] In a seventh aspect, embodiments of this application provide a computer program product containing instructions that, when run on an electronic device, cause the electronic device to perform the method described in the second aspect or any embodiment of the second aspect.

[0061] In the above embodiments, when an electronic device logs into an application, if an error occurs during login, it does not need to passively wait for a preset timeout before performing login degradation. Instead, the distributed computing capabilities of the serverless function platform can be utilized to quickly analyze whether the current login is abnormal based on a set of parameters. If an error is found, this information is reported to the electronic device, and the resources required for login degradation are sent to the electronic device. After receiving these resources, the electronic device can perform login degradation to inform the user of the login failure. In this way, the electronic device can perform login degradation faster (than the preset timeout).

[0062] Eighthly, embodiments of this application provide a computer-readable storage medium that, when the instructions are executed on an electronic device, causes the electronic device to perform the method described in the second aspect or any embodiment of the second aspect.

[0063] In the above embodiments, when an electronic device logs into an application, if an error occurs during login, it does not need to passively wait for a preset timeout before performing login degradation. Instead, the distributed computing capabilities of the serverless function platform can be utilized to quickly analyze whether the current login is abnormal based on a set of parameters. If an error is found, this information is reported to the electronic device, and the resources required for login degradation are sent to the electronic device. After receiving these resources, the electronic device can perform login degradation to inform the user of the login failure. In this way, the electronic device can perform login degradation faster (than the preset timeout). Attached Figure Description

[0064] Figures 1a-1c A set of exemplary user interfaces is shown in one scenario where an electronic device performs a login downgrade operation;

[0065] Figure 2 A diagram illustrating why an electronic device is not responding when logging into the game server.

[0066] Figure 3 An exemplary user interface involved in updating the downgrade policy for an electronic device;

[0067] Figure 4 This is a schematic diagram of the communication system provided in an embodiment of this application;

[0068] Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;

[0069] Figure 6 This is an exemplary signaling flowchart related to the game login method in the embodiments of this application;

[0070] Figure 7 This is a schematic diagram of the game login device in an embodiment of this application. Detailed Implementation

[0071] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items.

[0072] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0073] The term "user interface (UI)" used in the following embodiments of this application refers to the medium interface through which an application or operating system interacts and exchanges information with the user. It realizes the conversion between the internal form of information and the form that the user can accept. The user interface is source code written in a specific computer language such as Java or Extensible Markup Language (XML). The interface source code is parsed and rendered on the electronic device, ultimately presenting content that the user can recognize. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be visible interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets displayed on the screen of an electronic device.

[0074] To facilitate understanding, the relevant terms and concepts involved in the embodiments of this application will be introduced below.

[0075] (1) Content Provider (CP)

[0076] A content provider is a supplier that provides service content, which can be various media content such as text, images, audio, and video, as well as applications and cloud functions mentioned below.

[0077] In some embodiments, developers who create applications and distribute them to end consumers through channels such as app stores can be called content providers. For example, a game developer can act as a content provider by listing its game application on an app store for consumers to download and use.

[0078] (2) Serverless frameworks and serverless function platforms

[0079] Serverless architecture is a backend architecture that provides cloud computing services. It offers both Functions as a Service (FaaS) and Backend as a Service (BaaS) technologies. In this architecture, FaaS handles computation, while BaaS handles storage, creating a separation of computation and storage. When content providers develop applications using this serverless architecture, they only need to implement the application's business logic using a specific business function implementation language (such as JavaScript; different serverless platforms use different languages ​​for implementing specific business functions). They can then focus on the business system architecture, business development, or business support operations. The computing and storage resources needed to implement the business logic are managed by a cloud platform or other third party. This allows for the automatic allocation of more resources to support business logic during peak traffic periods and the automatic release of resources to save costs during off-peak traffic periods. These resources include containers or servers that support the application services.

[0080] Serverless provides cloud functions, which feature functionality as a service. Several cloud functions can be integrated to form a serverless function platform. Each cloud function can schedule resources to complete a specific function, automatically allocating computing and storage resources according to its resource requirements. Theoretically, there is no upper limit to the amount of resources that can be scheduled, enabling elastic scaling to accommodate different access volumes. Here, access volume refers to the number of electronic devices accessing the cloud function.

[0081] Cloud functions in serverless function platforms have distributed computing capabilities. By acquiring computing resources, computing tasks are divided into several small parts, and any part can be assigned to different computers for processing, quickly completing the calculation and returning the calculation results.

[0082] This serverless function platform can be deployed on cloud servers and enables functionality by running cloud functions. These cloud functions are not continuously running; they are triggered by triggers. Furthermore, no runtime environment needs to be set up before execution; once triggered, they run directly. These triggers can be HTTP triggers, which activate the cloud function upon receiving an HTTP request, or other triggers such as timer triggers.

[0083] Cloud functions in a serverless function platform can be provided by the platform or uploaded by content providers. For example, content providers can compile some business logic from an application into independent cloud functions and place them in the serverless function platform.

[0084] (3) Login downgrade and downgrade strategy

[0085] Login downgrading refers to the process where, when an electronic device fails to log in to an application, it performs actions other than logging into the application itself to handle the login failure and inform the user that login is impossible. For example, when logging into a game, this action might include playing a game demo, playing a video, or displaying a login failure screen.

[0086] A downgrade strategy refers to the actions taken to downgrade the login after a login failure is confirmed. For example, when logging into a game, these actions may include the aforementioned game trial, playing a video, or displaying a login failure screen.

[0087] The following section uses logging into the game as an example to describe in detail the process of login downgrade.

[0088] Figures 1a-1c A set of exemplary user interfaces is shown in one scenario where an electronic device performs a login downgrade operation.

[0089] like Figure 1a As shown, user interface 10 is a user interface for logging into the game, which may include a login control 101. In response to the user's operation on the login control (e.g., a click operation), the electronic device can send a login request to the game server through the game login gateway to log into the game. A detailed description of this process can be found in the following... Figure 2 The description of the above will not be repeated here. After the electronic device sends a login request, it can display the user interface 11.

[0090] like Figure 1b As shown, user interface 11 is an exemplary user interface of an electronic device that prompts the user to log in. The user interface 11 includes a prompt box 111, which includes the prompt text: "Login requesting, please wait". The prompt text indicates that the user is requesting login. At this time, if the game cannot log in successfully, a login downgrade can be performed, and user interface 12 will be displayed.

[0091] like Figure 1c The user interface 12 is an exemplary login failure interface for an electronic device. In this case, the degradation strategy of the electronic device is to display this login failure interface if login fails. The user interface 12 includes a prompt box 1211 containing the message: "Login failed, we suggest you try logging in again," to notify the user of the login failure.

[0092] Currently, when logging into applications on electronic devices, users need to log in using an application account. The application server needs to authenticate the application account using a login server. Only after successful authentication can the electronic device access the required application resources.

[0093] In this embodiment, a game application is used as an example for illustration. The login application mentioned above refers to logging into a game, the application account is the game account, and the application server is the game server. During the game application login process, the game account is required for login, and the game server needs to authenticate the game account using the login server.

[0094] During this process, electronic devices can establish a connection with the game server through the game login gateway and send a login request to log in to the game using their game accounts. However, if the game server is unable to respond to the login request, because the electronic device accesses the game login gateway via the Hypertext Transfer Protocol (HTTP), after sending the login request, the device, due to the HTTP timeout mechanism, must wait for the game server's response until a preset timeout period is reached before stopping the wait and performing login degradation to inform the user that login is unavailable. Reasons for the game server's inability to respond to the login request can include server failure (including both the game server and the login authentication server).

[0095] The type of game application is not limited. For example, it can be an application that integrates the Huawei Mobile Services (HMS) SDK, which can connect to HMS through a Huawei account to obtain the services required for the application to run. In this case, the electronic device can use its Huawei account as the game account to log in to the game. The aforementioned login authentication server can be a Huawei server. This login authentication server is used to perform OAuth2 authentication to allow the game application to obtain access to the login server.

[0096] It should be understood that the aforementioned examples of game applications integrating HMSSDK, login authentication servers being Huawei servers, and game accounts being Huawei accounts are all illustrative and do not constitute a limitation on this solution.

[0097] This timeout is a parameter in game login. It needs to balance network transmission speed and server processing speed, so it usually cannot be set too short (it cannot be less than the server's processing time plus the time it takes for the login request to be transmitted to the server, e.g., 20 seconds). Otherwise, if no response is received from the game server after the timeout, it may not be a server malfunction, but rather a slow server processing speed causing a failed login attempt. A common setting is 30 seconds. For example, the exemplary user interface involved in the login downgrade process for failed electronic device logins can be found in the aforementioned section. Figures 1a-1c The description in the text is understandable, referring to... Figure 1a The user interface 10 shown in the image shows that after the user clicks "Login," causing the electronic device to send a login request, the electronic device displays... Figure 1c The user interface 11 shown in the image notifies the user of the login failure process, which takes 30 seconds.

[0098] Figure 2 This is a diagram illustrating why an electronic device is not responding when logging into the game server.

[0099] like Figure 2 As shown, the electronic device first accesses the game login gateway via the Hypertext Transfer Protocol (HTTP) and sends a login request to the game login gateway. This login request includes the game account. The game login gateway routes the login request to the game server. After receiving the login request, the game server authenticates the game account through a single sign-on (SSO) server (also known as a login authentication server). However, the login authentication server does not respond, making it impossible for the game server to respond to the login request. In the end, the electronic device can only passively wait until the timeout period expires.

[0100] It should be understood that, Figure 2 The example shown is only one scenario where an electronic device fails to respond when logging into the game server. Other scenarios are also possible, such as the authentication server responding but the game server not responding.

[0101] In this scheme, the set of exemplary user interfaces involved in the login downgrade of electronic devices can be referenced from the aforementioned... Figures 1a-1c The description will not be repeated here.

[0102] In this scenario, if the server becomes unresponsive, the electronic device must passively wait until a timeout period occurs before triggering a login downgrade to notify the user of login failure. This waiting time is typically 30 seconds, impacting user experience. Furthermore, in this solution, the downgrade strategy for login downgrade is set within the game application's software development kit (SDK). Changing this downgrade strategy requires modifying the SSDK, which is inconvenient.

[0103] To address the issues of electronic devices passively waiting for extended periods before performing login downgrades and the inconvenience of modifying downgrade strategies in the aforementioned solutions, this application proposes a game login method. In this method, after an electronic device sends a login request, it can utilize relevant cloud functions in a serverless function platform to analyze whether the server involved in the game login is functioning correctly. If not, the electronic device is notified to perform login downgrades. Because cloud functions in the serverless function platform possess distributed computing capabilities, they can analyze server status much faster than the timeout mechanisms relied upon in the aforementioned solutions. In cases of server malfunction, the electronic device can perform login downgrades without passively waiting for a timeout. Furthermore, the game application's downgrade strategy is not set in the game application's software development kit (SDK), but rather in a cloud function and then deployed to the serverless function platform. If the downgrade strategy needs modification, the cloud function involved in the downgrade strategy can be updated directly.

[0104] For example, a set of exemplary user interfaces for performing login downgrade after an electronic device fails to log in can refer to the aforementioned... Figures 1a-1c The description specifies a fallback strategy where a login failure screen is displayed if login fails. The cloud functions implementing this fallback strategy are deployed on a serverless function platform. Modifying the fallback strategy simply requires updating the relevant cloud functions. For example, the fallback strategy could be changed from displaying the login failure screen to playing a video if login fails.

[0105] Figure 3 An exemplary user interface involved in updating the downgrade policy for an electronic device.

[0106] Assuming that an exemplary user interface related to the previous degradation strategy can be referenced from the aforementioned... Figure 1c The user interface 12 is shown in the image. (Refer to the foregoing.) Figure 1a The user interface 10, in response to user actions (e.g., clicks) on the login control 101, performs login downgrade in the event of login failure, displaying... Figure 3 The user interface 20 is shown in the image. Video 2011 can be played in user interface 20; therefore, the changed degradation strategy is... Figure 1c The change strategy shown is different, and the process does not involve modifying the game application's SDK.

[0107] The following descriptions use a game application as an example. It should be understood that this application uses a game application as an example for illustration. In fact, any application that logs in via the HTTP protocol can use the login application method described in this application to execute a downgrade strategy when login fails.

[0108] The following section first introduces an exemplary communication system provided by an embodiment of this application.

[0109] Figure 4 This is a schematic diagram of the communication system provided in the embodiments of this application.

[0110] like Figure 4 As shown, the communication system may include at least one electronic device, such as electronic device 401, electronic device 402, and other electronic devices. The communication system also includes a game login gateway, an HTTP trigger, a serverless function platform, and a login authentication server.

[0111] Among them, electronic devices can be those running Huawei HarmonyOS, Android, iOS, Microsoft, or other operating systems, such as mobile phones, tablets, laptops, personal computers, or desktop computers with touch panels. For example, in Figure 4 In the example shown, electronic device 401 is a mobile phone, and electronic device 402 is a laptop computer.

[0112] Electronic devices such as 401 and 402 both have game applications installed. These devices can log in to the game using a game account to access game resources and user data. The game account can be a mobile phone account or a Huawei account, etc. The type of game application is not limited; for example, it could be an application integrating the Huawei Mobile Services (HMS) SDK, which can connect to HMS through a Huawei account to obtain the services required for application operation. In this way, the electronic device can use its Huawei account as a game account to log in to the game.

[0113] The game login gateway can receive login requests sent by electronic devices and then obtain the first performance parameters carried in the request (such as the request time and Internet Protocol (IP) address mentioned below). The game login gateway can also obtain a second performance parameter and report it to the serverless function platform. The second performance parameter includes the first performance parameter and may also include parameters that measure network performance, such as bandwidth and packet loss rate. The game login gateway can also send a request to an HTTP trigger (for example, this request could be the analysis request involved in step S102 below; see the description of step S102 below for details, which will not be repeated here) to notify the HTTP trigger to execute the relevant cloud functions on the serverless function platform.

[0114] It should be understood that the game login gateway may also have other capabilities, such as routing requests sent by electronic devices to the game server and providing authentication, service governance, and other capabilities.

[0115] The descriptions of the login request and the first performance parameter can be found in the description of step S101 below. Detailed information about the second performance parameter, such as bandwidth and packet loss rate, can be found in the description of step S102 below, and will not be repeated here.

[0116] The HTTP trigger can directly receive requests from electronic devices or game login gateways (such as the analysis request mentioned below), determine the cloud function to be run in the serverless function platform and the parameters required to run the cloud function (such as the second performance parameter mentioned below), and send the parameters to the serverless function platform to trigger the serverless function platform to run the cloud function.

[0117] In some embodiments, it can be independent of the serverless function platform.

[0118] In other embodiments, the HTTP trigger can be integrated into a serverless function platform.

[0119] It should be understood that in the two embodiments described above, the HTTP trigger can be implemented in hardware, software, or a combination of software and hardware.

[0120] The serverless function platform can integrate several cloud functions, which may include login decision functions, default degradation functions, and custom degradation functions, as well as other cloud functions.

[0121] The login decision function is used to determine whether the login is normal. The serverless function platform can receive the second performance parameter sent by the HTTP trigger, run the login decision function, analyze based on the second performance parameter, determine whether the login is normal, and return the result to the electronic device.

[0122] Default and custom fallback functions are collectively referred to as fallback functions. Default fallback functions are provided by the serverless function platform and their content cannot be modified by third parties. Custom fallback functions are uploaded to the serverless function platform by content providers. These fallback functions include the fallback strategies involved when an electronic device performs login fallback. One fallback function represents one fallback strategy, which may include playing computer graphics (CG) animations, re-login, or trial play. After running the fallback function, the serverless function platform can return a parameter to the electronic device. This parameter is used by the electronic device to perform login fallback. Different fallback functions return different parameters, allowing the electronic device to implement different fallback strategies based on these parameters.

[0123] For a detailed description of the second performance parameter, please refer to the description of the relevant content in step S102 below, which will not be repeated here. For other information about the serverless function platform, please refer to the description of the relevant content in term (2) above, which will not be repeated here.

[0124] The login authentication server is used to authenticate the game account. After successful authentication, the electronic device can log in to the game server to obtain game resources.

[0125] It should be understood that the communication system may have more or fewer components than shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0126] The exemplary electronic device provided in the embodiments of this application will be introduced first below.

[0127] Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application.

[0128] The following describes the embodiments using an electronic device as an example. It should be understood that the electronic device may have more or fewer components than shown in the figures, may combine two or more components, or may have different component configurations. The various components shown in the figures can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0129] The electronic device may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0130] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0131] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0132] The controller can serve as the nerve center and command center of an electronic device. Based on the instruction opcode and timing signals, the controller generates operation control signals to control the fetching and execution of instructions.

[0133] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory.

[0134] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include inter-integrated circuit (I2C) interfaces, inter-integrated circuit sound (I2S) interfaces, pulse code modulation (PCM) interfaces, etc.

[0135] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL).

[0136] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to realize communication between the processor 110 and the audio module 170.

[0137] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0138] The UART interface is a general-purpose serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication.

[0139] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. The MIPI interface includes the camera serial interface (CSI) and the display serial interface (DSI).

[0140] The GPIO interface can be configured via software. The GPIO interface can be configured as either control signals or data signals.

[0141] The SIM interface can be used to communicate with the SIM card interface 195 to transmit data to or read data from the SIM card.

[0142] USB interface 130 is an interface that conforms to the USB standard specification, specifically it can be a Mini USB interface, Micro USB interface, USB Type C interface, etc.

[0143] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device.

[0144] The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger.

[0145] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110.

[0146] The wireless communication function of electronic devices can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0147] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.

[0148] The mobile communication module 150 can provide solutions for wireless communication applications, including 2G / 3G / 4G / 5G, in electronic devices. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.

[0149] A modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium- to high-frequency signal.

[0150] The wireless communication module 160 can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), infrared (IR) technology, and other wireless communication solutions.

[0151] In some embodiments, antenna 1 of the electronic device is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling the electronic device to communicate with networks and other devices via wireless communication technology.

[0152] Electronic devices implement display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0153] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), or the like. In some embodiments, the electronic device may include one or N displays 194, where N is a positive integer greater than 1.

[0154] Electronic devices can achieve shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0155] The ISP is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye.

[0156] Camera 193 is used to capture still images or videos. An object passes through the lens, generating an optical image that is projected onto the photosensitive element. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into standard image signals in formats such as RGB and YUV.

[0157] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when an electronic device is selecting a frequency, a DSP can perform a Fourier transform on the frequency energy.

[0158] Video codecs are used to compress or decompress digital video. Electronic devices can support one or more video codecs. This allows the electronic device to play or record video in various encoded formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0159] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.

[0160] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0161] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area.

[0162] Electronic devices can implement audio functions such as music playback and recording through audio modules 170, speakers 170A, receivers 170B, microphones 170C, headphone jacks 170D, and application processors.

[0163] The audio module 170 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal.

[0164] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. Electronic devices can listen to music or make hands-free calls through the speaker 170A.

[0165] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When an electronic device answers a phone call or voice message, the receiver 170B can be brought close to the ear to hear the voice.

[0166] The microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals.

[0167] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.

[0168] The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194.

[0169] The gyroscope sensor 180B can be used to determine the motion posture of electronic devices.

[0170] The 180E accelerometer can detect the magnitude of acceleration in various directions (typically three axes) of electronic devices.

[0171] A distance sensor 180F is used to measure distance. Electronic devices can measure distance using infrared or laser. In some embodiments, during a shooting scene, the electronic device can utilize the distance sensor 180F to measure distance for rapid focusing.

[0172] The proximity light sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED.

[0173] The ambient light sensor 180L is used to detect ambient light levels. Electronic devices can adaptively adjust the brightness of their displays (194) based on the detected ambient light. The ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Furthermore, the ambient light sensor 180L can work in conjunction with the proximity sensor 180G to detect whether electronic devices are in a pocket, preventing accidental touches.

[0174] The fingerprint sensor 180H is used to collect fingerprints. Electronic devices can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, app access locks, fingerprint photography, fingerprint answering of calls, etc.

[0175] Temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device uses the temperature detected by temperature sensor 180J to execute a temperature processing strategy.

[0176] Touch sensor 180K, also known as "touch panel". Touch sensor 180K can be set on display screen 194. Touch sensor 180K and display screen 194 together form touch screen, also known as "touch screen".

[0177] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. The electronic device can receive button input and generate key signal inputs related to user settings and function control of the electronic device.

[0178] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback.

[0179] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.

[0180] The SIM card interface 195 is used to connect the SIM card.

[0181] In this embodiment, the processor 110 can call computer instructions stored in the internal memory 121 to cause the electronic device to execute the game login method in this embodiment.

[0182] The method in the embodiments of this application will be specifically described below with reference to the hardware structure of the exemplary communication system and electronic device described above:

[0183] In this embodiment, when the server involved in logging into the game (which may include the game server and the login authentication server involved in the previous application) malfunctions, the electronic device can receive an HTTP error code and a degradation function name sent by the login decision function in the serverless function platform. The electronic device can then perform login degradation based on the HTTP error code and the degradation function name. The login decision function, HTTP error code, and degradation function name will be described in detail below and will not be repeated here.

[0184] Figure 6 This is an exemplary signaling flowchart related to the game login method in this application embodiment.

[0185] The process of an electronic device executing the game login method of the embodiments of this application can be referred to the following description of steps S101-S111:

[0186] S101. The electronic device sends a login request to the game login gateway, the login request carrying a first performance parameter;

[0187] This login request is used to request login to the game server. The electronic device sends the login request to the game login gateway after detecting an operation that triggers the game login; in response to this operation, a login request is sent. For example, an exemplary description of detecting this operation that triggers the game login can be found in the foregoing. Figure 1a The user interface 10 shown illustrates the operation of the login control 101. This operation to trigger game login can also be automatic upon opening the game application without user intervention, and may include other scenarios, which are not limited in this embodiment.

[0188] In some embodiments, the electronic device can upload a login request to a game login gateway, which then routes it to the game server. The login request may carry a first performance parameter and the game's application ID (identity document, ID). The application ID uniquely identifies a game, and the first performance parameter indicates the electronic device's login information. The first performance parameter includes at least the request time and an Internet Protocol (IP) address. Other parameters may also be included, but examples are not provided here. The first performance parameter can be used to analyze whether the server is malfunctioning; the specific process can be found in the description of step S104 below, which will not be repeated here.

[0189] The request time refers to the time when the electronic device sends the login request. The IP address refers to the network address of the electronic device, which is used to identify the network address of the electronic device. Through the IP address, the current address of the electronic device can be determined, such as the city address where the electronic device is currently located.

[0190] It should be understood that the login request may also include other content, such as game account, game version, etc., which will not be elaborated in this embodiment.

[0191] S102. The game login gateway sends an analysis request to the HTTP trigger. The analysis request includes the login decision function name, application ID, and a second performance parameter, which includes the first performance parameter.

[0192] Step S102 is optional. The game login gateway can be used to obtain the first performance parameter and application ID carried in the login request after receiving the login request sent by the electronic device. The game login gateway can also be used to obtain the second performance parameter and report it to the serverless function platform through an HTTP trigger. The second performance parameter includes the first performance parameter and may also include some parameters that measure network performance, such as bandwidth and packet loss rate. The login decision function name, application ID and second performance parameter are reported to the serverless function platform.

[0193] The game login gateway can also be used to send analytics requests to HTTP triggers to notify the HTTP triggers to run relevant cloud functions on the serverless function platform.

[0194] It should be understood that the game login gateway may also have other capabilities, such as routing requests sent by electronic devices to the game server and providing authentication, service governance, and other capabilities.

[0195] This analysis request is used to notify the HTTP trigger to fire the serverless function platform to run the login decision function.

[0196] The second performance parameter is a parameter required to run the login decision function. This second performance parameter may include the first performance parameter mentioned in step S101, which is obtained from the login request. The second performance parameter may also include network parameters such as bandwidth and packet loss rate.

[0197] Bandwidth refers to the amount of data that can pass through the game login gateway within a certain period of time. The larger the bandwidth, the more electronic devices can log in to the game server through the game login gateway. This period of time can be a unit of time or other preset time; this embodiment of the application does not limit it. Packet loss rate is the ratio of lost data packets (received data packets - sent data packets) to received data packets at the game login gateway. A higher packet loss rate indicates a greater likelihood of network failure, affecting successful game login.

[0198] It should be understood that this explanation uses broadband and packet loss rate as examples of network parameters. In other embodiments, other network parameters, such as network speed, may also be included, but this application does not limit this.

[0199] The login decision function is a cloud function in the serverless function platform. This login decision function is used to analyze whether the server is normal based on the second performance parameter. For the specific process, please refer to the following description of step S104.

[0200] If step S102 is not executed, after sending a login request, the electronic device obtains the first performance parameter and application ID carried in the login request, uses the first performance parameter as the second performance parameter, and then sends an analysis request to the HTTP trigger. The analysis request includes the login decision function name, application ID, and the second performance parameter, in which case the second performance parameter includes the first performance parameter.

[0201] S103. The HTTP trigger sends the login decision function name, application ID, and second performance parameter to the serverless function platform;

[0202] HTTP triggers can be used to trigger the execution of cloud functions on a serverless function platform.

[0203] Specifically, when the HTTP trigger receives the aforementioned analysis request, it can obtain the login decision function name, application ID, and the parameters required for the login decision function to run (i.e., the second performance parameters) from the analysis request. Then, the HTTP trigger sends the second performance parameters to the serverless function platform, causing the serverless function platform to run the login decision function.

[0204] It should be understood that the analysis request can be sent from the game login gateway to the HTTP trigger, or it can be sent from the electronic device to the game login gateway.

[0205] In some embodiments, it can be independent of serverless function platforms.

[0206] In other embodiments, the HTTP trigger can be integrated into a serverless function platform.

[0207] It should be understood that in the two embodiments described above, the HTTP trigger can be implemented in hardware, software, or a combination of software and hardware.

[0208] In this embodiment, steps S101-S103 describe the behavior of an electronic device logging into a game. It should be understood that the same game application can be installed on at least one electronic device, allowing at least one electronic device to execute steps S101-S103. Assuming N electronic devices send login requests to log into the game, any electronic device can execute steps S101-S103. The HTTP trigger function will then trigger the login decision function N times, transmitting N second performance parameters to it. Here, N is an integer greater than or equal to 1. Upon receiving the N second performance parameters, the login decision function can analyze them to determine if the server is functioning correctly, thereby determining whether the electronic device should perform a login downgrade. The detailed steps involved in this process are described in step S104 below:

[0209] The S104.serverless function platform runs a login decision function, analyzes based on the second performance parameter to determine whether the login is normal, and determines the returned content based on the application ID;

[0210] In the event of an abnormal login, the returned content includes the HTTP error code and the name of the downgrade function involved in step S105 below. In the event of a normal login, the returned content includes the HTTP correct code involved in step S110 below.

[0211] The login decision function can analyze M second performance parameters received within a first preset time period to determine whether the login is normal, where M is an integer less than or equal to N. These M second performance parameters include those related to the login process of electronic devices, and may also include those related to the login process of other electronic devices.

[0212] It should be understood that login anomalies refer to any abnormal situations that occur during the process from when an electronic device sends a login request to when it receives a response from the game server. These include server anomalies, such as game server anomalies or login authentication server anomalies.

[0213] The first preset time can be fixed, for example, 5 seconds. It can also be variable. For example, a preset time of 5 seconds can be set for peak traffic periods (e.g., 6:00 PM to 12:00 AM), while a preset time of 10 seconds can be set for off-peak traffic periods (other times within the peak period). The variation of this preset time can also refer to other rules, which are not limited in this embodiment.

[0214] In some embodiments, the serverless function platform runs a login decision function. It can statistically analyze the M second performance parameters, specifically identifying W second performance parameters with the same IP address, and then extracting W request times from these W second performance parameters. Each request time represents the time when any electronic device sends a login request. By subtracting any request time from the current time, W waiting times are obtained. If 60% of these W waiting times exceed a preset waiting time, the serverless function platform can determine that a login anomaly has occurred.

[0215] In other embodiments, the serverless function platform runs a login decision function. If it determines that 60% of the waiting times out of the W waiting times are greater than the preset waiting time, it can obtain the W bandwidths and W packet loss rates from the W second performance parameters, and calculate the total bandwidth and the average packet loss rate. If the total bandwidth is greater than the preset bandwidth and / or the average packet loss rate is greater than the preset packet loss rate, the serverless function platform can determine that an abnormality has occurred during login.

[0216] In one possible implementation, the serverless function platform can not only determine whether the login is abnormal, but also determine the type of abnormality. When 60%-80% of the aforementioned W waiting times are longer than the preset waiting time, the abnormality type can be determined as the first type; when 80%-90% of the waiting times are longer than the preset waiting time, the abnormality type can be determined as the second type; and when more than 90% of the waiting times are longer than the preset waiting time, the abnormality type can be determined as the third type. Based on the application ID and the abnormality type, the returned content can be determined.

[0217] It should be understood that the 60%, 60%-80%, 80%-90%, and 90% mentioned in the above two embodiments are merely illustrative examples and do not constitute a limitation on the embodiments of this application. The login decision function analysis of whether login is faulty in the above two embodiments is also an example. In other embodiments, other analysis methods may be used, and the embodiments of this application do not limit this.

[0218] If the login decision function determines that a login error has occurred, the login decision function can return the HTTP error code corresponding to the application ID and the degradation function name to the electronic device so that the electronic device can perform login degradation. For details of this process, please refer to the following description of steps S105-S109.

[0219] In some embodiments, the HTTP error code and the fallback function name are associated with an application ID, with each application ID uniquely associated with one HTTP error code and one fallback function name. When the serverless function platform determines that a login error has occurred, it can retrieve the HTTP error code and the fallback function name.

[0220] In other embodiments, the HTTP error code and fallback function name are associated with an application ID. One application ID can be associated with multiple HTTP error codes and fallback function names, each associated with a different exception type. When the serverless function platform determines that a login exception type has occurred, it can retrieve the HTTP error code and fallback function name associated with that exception type.

[0221] It should be understood that the HTTP error code and fallback function associated with the application ID are determined based on the scenario of game login failure. Generally speaking, different game login failure scenarios can correspond to different HTTP error codes and fallback function names.

[0222] If the login decision function determines that the server is normal, the login decision function can return the HTTP correct code corresponding to the application ID so that the electronic device can complete the game login based on the HTTP correct code. For a detailed description of this process, please refer to the following description of steps S110 and S111.

[0223] S105. The electronic device receives the HTTP error code and the fallback function name sent by the serverless function platform;

[0224] This HTTP error code is used to inform the electronic device that an error has occurred during the current login process, and can be used to perform login downgrade to notify the user that the login to the game has failed. Common HTTP error codes include: HTTPCODE_FALLBACK_PLAYCGVIDEO, when this downgrade function is run, the downgrade strategy involved is playing the CG animation; HTTPCODE_FALLBACK_LOGIN, when this downgrade function is run, the downgrade strategy involved is re-login; HTTPCODE_FALLBACK_TRIALPLAY, when this downgrade function is run, the downgrade strategy involved is playing the game. This HTTP error code can also have other forms, which will not be listed in the embodiments of this application.

[0225] Electronic devices can trigger the serverless function platform to run a degradation function to complete login degradation. This degradation function is a cloud function in the serverless function platform, and it corresponds one-to-one with an HTTP error code; that is, each HTTP error code corresponds to a degradation function, which can be changed. The degradation function includes a degradation strategy. After the serverless function platform runs the degradation function, it can send the resources involved in executing the login degradation to the electronic device to trigger the electronic device to execute the login degradation. The details of this process are described in the following steps S107 and S108, and will not be repeated here.

[0226] It should be understood that the degradation function can be either the default degradation function mentioned above, or the custom degradation function mentioned above.

[0227] In one possible implementation, after receiving the HTTP error code, the electronic device can generate a request for the serverless function platform to run the degradation function and send it to the HTTP trigger.

[0228] S106. The electronic device sends a request to the HTTP trigger to execute the degradation function;

[0229] For a description of the HTTP trigger, please refer to the relevant description in step S103 above, which will not be repeated here.

[0230] Electronic devices can send the request to execute the degradation function to an HTTP trigger. The HTTP trigger parses the degradation function name in the request and then sends the request to the serverless function platform to trigger the serverless function to run the degradation function.

[0231] S107. The HTTP trigger activates the serverless function platform to run the degradation function and obtain the resources required for login degradation.

[0232] The fallback strategies involved when electronic devices perform login fallback differ depending on the fallback function triggered by the serverless platform. Common fallback strategies include those related to the aforementioned HTTP error codes.

[0233] It should be understood that after the serverless function platform runs any degradation function, it can return a resource to the electronic device. This resource is used by the electronic device to perform login degradation, that is, to indicate the data involved in the case of game login failure.

[0234] The following example illustrates the fallback strategy involved in playing computer graphics (CG) animation within the fallback function corresponding to an HTTP error code. Assume the HTTP error code is HTTPCODE_FALLBACK_PLAYCGVIDEO, and the corresponding fallback function is named play-cg-video. The resource returned to the electronic device is a link to a CG animation. The data indicated by this resource is indeed a CG animation. The following pseudocode of the play-cg-video fallback function provides an illustrative description of its operation:

[0235]

[0236] Here, `let fallbackHandler = function(event, context, callback)` is the function interface for the fallback function `play-cg-video`. This fallback function includes three parameters: `event`, `context`, and `callback`. `event` is the input parameter for the fallback function, such as the request to execute the fallback function; its data structure can be customized, for example, it can be a string. `context` stores runtime information when the fallback function runs, such as the electronic device's request ID and authentication information. `callback` is the return result of the fallback function. `if(clientParameter.httpCode != HTTPCODE_FALLBACK_PLAYCGVIDEO)` checks if the HTTP error code is `HTTPCODE_FALLBACK_PLAYCGVIDEO` corresponding to the fallback function. If not, it returns an explanation. If it is, it retrieves the CG animation link as a resource to be returned to the electronic device. `let url =`

[0237] `context.env.videoUrl` retrieves the link to the CG animation. For example, the link to the CG animation could be represented as: http:

[0238] / / XXXXXXXXXX.mp4. callback({...resultObj.SUCCESS,videoUrl:url}) indicates that the animation link is returned as a resource to the electronic device.

[0239] S108. The electronic device receives the resources required for login downgrade from the serverless function platform;

[0240] The resources required for an electronic device to perform login downgrade are the return result of the downgrade function in step S107. The electronic device can obtain the data required to perform login downgrade based on these resources, and different data represent different downgrade strategies.

[0241] The resource and its corresponding data can vary depending on the circumstances. For example, the resource could be the result returned after running the aforementioned downgrade function "play-cg-video," which is the aforementioned animation link. Based on this animation link, the electronic device can obtain a CG animation. When the downgrade function is another cloud function, the resource could be the result returned by that other downgrade function, such as an image. This image could include content used to prompt the user of login failure; for example, the returned resource might not be the aforementioned animation link, but rather the animation link itself. It should be understood that the type of resource and its corresponding data are not unique and should not constitute a limitation on the embodiments of this application.

[0242] S109. Electronic devices implement login downgrade based on this resource;

[0243] The electronic device can obtain the data required to achieve login downgrade based on the resource. The description of the resource and its corresponding data can be found in the relevant description in the aforementioned step S108, and will not be repeated here.

[0244] This example uses the resource as an example of the result returned by the aforementioned degradation function, "play-cg-video", which is the aforementioned animation link. Other cases can be described using this parameter, and will not be described one by one.

[0245] The electronic device retrieves the data required for login downgrade based on the CG animation link, then plays the CG animation. After the CG animation finishes playing, the electronic device may prompt the user to log in to the game again. An exemplary user interface for playing the CG animation on the electronic device can refer to the aforementioned... Figure 3 The description of the user interface 20 shown in the figure.

[0246] S110. The electronic device receives the correct HTTP code sent by the degradation function;

[0247] This HTTP correct code informs the electronic device that the current server is functioning normally, and that it can continue to wait for the game server's response without performing a login downgrade.

[0248] S111. The electronic device completes the game login based on this HTTP correct code.

[0249] Based on the HTTP correct code, the electronic device continues to wait for a response from the game server, allowing the game account associated with the electronic device to pass the authentication server's verification. Then, the electronic device can log in to the game server, obtain game resources, and successfully log in to the game.

[0250] It should be understood that, in some embodiments, the downgrade strategy for the same game can be updated. For example, the downgrade strategy may be changed from playing the first CG animation to playing the second CG animation, or from playing the CG animation to replaying the game. The implementation methods include, but are not limited to, the following:

[0251] In one possible implementation, the serverless function platform receives a first change request, which modifies the content of the fallback function associated with the application ID to change the fallback strategy. For example, before the change, the fallback strategy implemented by the content of the fallback function associated with the application ID was to play a CG animation; after the change, the fallback strategy implemented by the content of the fallback function associated with the application ID is to replay.

[0252] In another possible implementation, the serverless function platform receives a second change request, which is used to change the HTTP error code associated with the application ID and the fallback function name. This allows the serverless function platform to obtain different HTTP error codes and fallback function names (compared to before the update) based on the application ID when a login error occurs, enabling the electronic device to implement different fallback strategies.

[0253] It should be understood that, in addition to the two methods mentioned above, other methods can be used to update the downgrade strategy. For example, the data used to downgrade the login on an electronic device can be changed. For instance, if the login downgrade data for a game is the first CG animation, it can be directly changed to the second CG animation.

[0254] The HTTP error code involved in the aforementioned step S105 is optional. In some embodiments, the application ID is associated with the degradation function name. When the serverless function platform determines that the login is abnormal, it sends the application ID associated with the degradation function name to the electronic device. By default, the electronic device can determine that the current login is abnormal after receiving the degradation function name, and can perform login degradation to notify the user that the login to the game has failed.

[0255] It should be understood that the purpose of the login decision function in the serverless function platform is to determine whether the login is abnormal. In some embodiments, in order to improve the running speed, different login decision functions can be set for different regions in the serverless function platform. For example, the login decision function set for city A is login decision function A, and the login decision function set for city B is login decision function B. The purpose of these login decision functions is to determine whether the login is abnormal. The IP address of the electronic device determines which region the electronic device belongs to, and then the login decision function corresponding to that region is used to determine whether the login of the electronic device is abnormal.

[0256] In this embodiment, a game application is used as an example for illustration. To make the description more representative, the game can be considered an application, and the game login gateway can be understood as a login gateway. The user interface involved in the electronic device performing login downgrade can be referred to as the first user interface. The user interface displayed after sending the login request but before performing login downgrade can be referred to as the second user interface. After the login downgrade policy is changed, the user interface displayed after performing login downgrade can be referred to as the third user interface. The aforementioned M second performance parameters can be referred to as a parameter set, and the second performance parameters sent by the electronic device to the serverless function platform can be referred to as the first parameters.

[0257] The following is combined Figure 7 A schematic diagram of the game login device in the embodiments of this application is presented.

[0258] like Figure 7 As shown, the game login device includes: a sending module 201, a receiving module 202, a confirming module 203, and a display module 204.

[0259] The sending module 201 can be used by the electronic device to send content to other devices (such as a game login gateway, an HTTP trigger, etc.). For example, it can send a login request to the game login gateway, which triggers the gateway to obtain target performance parameters. These parameters include some or all network performance parameters on the login request transmission link, used by the serverless function platform to determine whether the server is functioning correctly. The server in question is the one involved when the electronic device logs into the game. The sending module 201 is also used to send a request to the HTTP trigger to execute a degradation function.

[0260] The receiving module 202 can be used by an electronic device to receive content sent to it from other devices (such as a game login gateway, HTTP trigger, etc.). For example, the receiving module 202 is used to receive a first parameter sent by the serverless function platform, which indicates the first resource involved when the electronic device fails to log in to the game. The receiving module 202 is also used to receive an HTTP error code and a fallback function name sent by the serverless function platform when the server malfunctions. The receiving module 202 is also used to receive an HTTP success code sent by the serverless function platform when the server is functioning normally.

[0261] The determining module 203 can be used by an electronic device to determine the operation to be performed based on the received content. For example, after receiving an HTTP error code and a degradation function name, the determining module 203 can determine to send a request to the HTTP trigger to execute the degradation function. The determining module 203 can also be used to display a login degradation interface to prompt the user that the current game login has failed after receiving the parameters required for login degradation. The determining module 203 can also be used to complete the game login based on the correct HTTP correct code after receiving it.

[0262] After the electronic device sends the login request, the determination module 203 displays a first user interface to prompt the user that the game is logging in. If the game login fails, a second interface is displayed to prompt the user that the game login has failed.

[0263] For details regarding any aspects of the game login device not mentioned above, please refer to the aforementioned content; further details will not be repeated here.

[0264] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0265] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".

[0266] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.

[0267] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A method for logging into an application, characterized in that, The method is applied to a communication system, which includes an electronic device and a serverless function platform. The electronic device has an application installed, and the method includes: The electronic device sends a login request to log in to the application, the login request carrying the electronic device's login information; The serverless function platform receives a parameter set, which includes a first parameter of multiple electronic devices. The first parameter includes login information, including the login request time. The multiple electronic devices belong to the same region, and the multiple electronic devices include the aforementioned electronic device. The serverless function platform selects a login decision function based on the region, and different login decision functions are set for different regions in the serverless function platform; The serverless function platform determines, based on the parameter set and the selected login decision function, whether more than a first number of electronic devices have a login waiting time exceeding a preset waiting time. If so, it predicts that the electronic device is experiencing a login anomaly and sends a first resource to the electronic device. The first resource includes image resources, which are determined by the serverless function platform after running a degradation function. The degradation function is used to define the user interface displayed when the electronic device experiences a login anomaly. The electronic device displays a first user interface based on the first resource. The first user interface is the user interface when the electronic device fails to log in to the application.

2. The method according to claim 1, characterized in that, After the electronic device sends a login request to log in to the application, and before the electronic device displays the first user interface based on the first resource, the method further includes: The electronic device displays a second user interface, which is different from the first user interface.

3. The method according to claim 1, characterized in that, After the electronic device sends a login request to log in to the application, and before the serverless function platform receives the parameter set, the method further includes: The electronic device obtains the first parameter based on the login request; The electronic device sends the first parameter to the serverless function platform.

4. The method according to claim 3, characterized in that, The communication system further includes a login gateway, wherein the electronic device sends a login request for logging into the application, specifically including: The electronic device sends a login request to the login gateway to request login to the application; After the login gateway receives the login request, the method further includes: In response to the login request, the login gateway obtains the first parameter and sends the first parameter to the serverless function platform. The first parameter also includes a parameter for measuring network performance.

5. The method according to any one of claims 1-4, characterized in that, The communication system further includes an HTTP trigger, and before the serverless function platform sends the first resource to the electronic device, it also includes: After determining that the electronic device is experiencing login issues based on the parameter set, the serverless function platform sends a downgrade function name to the electronic device. The electronic device sends the degradation function name to the HTTP trigger so that the serverless function platform runs the degradation function; After the serverless function platform runs the degradation function, it determines the first resource and sends the first resource to the electronic device.

6. The method according to claim 4, characterized in that, In response to the login request, the login gateway obtains the first parameter, specifically including: The login gateway obtains the request time and IP address carried in the login request from the login request; The login gateway obtains bandwidth and packet loss rate; The login gateway uses the request time, IP address, bandwidth, and packet loss rate as the first parameters.

7. The method according to claim 5, characterized in that, The login request also carries the application ID of the application, which is used to uniquely identify the application. The application ID is associated with the fallback function name. The method further includes: The serverless function platform receives the application ID; The serverless function platform sends the degradation function name to the electronic device, specifically including: The serverless function platform determines the name of the degradation function associated with the application ID; The serverless function platform sends the degradation function name to the electronic device.

8. The method according to claim 7, characterized in that, The method further includes: The serverless function platform receives a change request, which is used to change the content in the degradation function associated with the application ID in order to change the degradation strategy. The serverless function platform runs the modified degradation function to obtain the second resource; The serverless function sends a second resource to the electronic device; The electronic device displays a third user interface based on the second resource. The third user interface is the user interface when the electronic device fails to log in to the application. The third user interface is different from the first user interface.

9. A method for logging into an application, characterized in that, The method is applied to an electronic device in which an application is installed, and the method includes: The electronic device sends a login request to request login to the application; In the event of an abnormal login on the electronic device, the electronic device receives a first resource sent by the serverless function platform. This first resource includes image resources, which are determined by the serverless function platform after running a degradation function. The degradation function defines the user interface displayed when the electronic device experiences a login anomaly. The login anomaly is determined by the serverless function platform, including: the platform determining, based on a parameter set and a selected login decision function, whether more than a first number of electronic devices have a login waiting time exceeding a preset waiting time; if so, predicting a login anomaly on the electronic device. The parameter set includes first parameters of the multiple electronic devices, which include login information, including the login request time. The multiple electronic devices belong to the same region, and the selected login decision function is determined by the serverless function platform based on the region; different login decision functions are set for different regions within the serverless function platform. The electronic device displays a first user interface based on the first resource, and the first user interface is the user interface when the electronic device fails to log in to the application.

10. The method according to claim 9, characterized in that, After the electronic device sends a login request to log in to the application, and before the electronic device displays the first user interface based on the first resource, the method further includes: The electronic device displays a second user interface, which is different from the first user interface.

11. The method according to claim 9, characterized in that, After the electronic device sends a login request to log in to the application, and before the electronic device receives the first resource sent by the serverless function platform, the method further includes: The electronic device obtains the first parameter based on the login request; The electronic device sends the first parameter to the serverless function platform.

12. The method according to claim 9, characterized in that, The electronic device sends a login request to log in to the application, specifically including: The electronic device sends a login request to the login gateway to request login to the application.

13. The method according to claim 9, wherein before the electronic device receives the first resource sent by the serverless function platform, the method further comprises: The electronic device receives the downgrade function name sent by the serverless function platform; The electronic device sends the degradation function name to the HTTP trigger so that the serverless function platform runs the degradation function.

14. The method according to any one of claims 9-13, characterized in that, The login request also carries the application ID of the application, which is used to uniquely identify the application. The application ID is associated with the fallback function name. The method further includes: The electronic device sends the application ID to the serverless function platform so that the serverless function can determine the degradation function name based on the application ID.

15. A method for logging into an application, characterized in that, The method is applied to a serverless function platform, and the method includes: The serverless function platform receives a parameter set, which includes a first parameter of multiple electronic devices. The first parameter includes login information. The multiple electronic devices belong to the same region. The login information includes the login request time. The multiple electronic devices include the first electronic device. The serverless function platform selects a login decision function based on the region, and different login decision functions are set for different regions in the serverless function platform; The serverless function platform determines, based on the parameter set and the selected login decision function, whether more than a first number of electronic devices have a login waiting time exceeding a preset waiting time. If so, it predicts that the first electronic device is experiencing a login anomaly and sends a first resource to the first electronic device. The first resource includes image resources, which are determined by the serverless function platform after running a degradation function. The degradation function is used to define the user interface displayed when the first electronic device experiences a login anomaly.

16. The method according to claim 15, characterized in that, The first parameter is the request time, IP address, bandwidth, and packet loss rate, wherein the request time is the time when the first electronic device sends the login request; the IP address is the IP address of the first electronic device; the bandwidth is the amount of data that can pass through the login gateway within a certain period of time; and the packet loss rate is the ratio of lost data packets to received data packets of the login gateway.

17. The method according to claim 15, characterized in that, Before the serverless function platform sends the first resource to the first electronic device, it also includes: After determining that the login of the first electronic device is abnormal based on the parameter set and the selected login decision function, the serverless function platform sends a degradation function name to the first electronic device. The serverless function platform receives instructions to run degradation functions; After the serverless function platform runs the degradation function, it determines the first resource and sends the first resource to the first electronic device.

18. The method according to claim 17, characterized in that, The method further includes: The serverless function platform receives the application ID; The serverless function platform sends the degradation function name to the first electronic device, specifically including: The serverless function platform determines the name of the degradation function associated with the application ID; The serverless function platform sends the degradation function name to the first electronic device.

19. The method according to claim 18, characterized in that, The method further includes: The serverless function platform receives a change request, which is used to change the content in the degradation function associated with the application ID in order to change the degradation strategy. The serverless function platform runs the modified downgrade function to obtain the second resource; The serverless function sends a second resource to the electronic device, the second resource being different from the first resource.

20. An electronic device, characterized in that, The electronic device includes one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, the computer program code including computer instructions, and when the one or more processors execute the computer instructions, the one or more processors are used to invoke the computer instructions to cause the electronic device to perform the method as described in any one of claims 9-14.

21. A computer storage medium, characterized in that, The storage medium stores a computer program, the computer program including executable instructions, which, when executed by a processor, cause the processor to perform the method as described in any one of claims 9-14.

22. A computer program product, characterized in that, When the computer program product is run on the first electronic device, it causes the first electronic device to perform the method as described in any one of claims 9-14.

Citation Information

Patent Citations

  • A method and apparatus for transmitting information

    CN109818974A

  • Function creating method and system and function calling method and system

    CN113296750A