VOIP call method and related apparatus

By starting a lightweight process in the VoIP application background to establish a long connection with the application server, managing its life cycle and API access, the power consumption and memory waste problems during the VoIP application background runtime is solved, and low-cost VoIP calls are achieved.

WO2025140675A1PCT designated stage expired Publication Date: 2025-07-03HUAWEI TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/143522
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-10
Filing Date
2024-12-28
Publication Date
2025-07-03

AI Technical Summary

Technical Problem

In the prior art, when VoIP applications cut to the background operation, how to achieve VoIP calls at lower power consumption and memory costs has not been effectively solved, resulting in increased device power consumption and memory waste.

Method used

By starting VoIP lightweight processes, establishing a long connection with the application server, VoIP calls are realized without pulling up the main application process, and controlling its behavior by managing the life cycle of the lightweight process and API access rights, avoiding unnecessary power consumption and memory usage.

Benefits of technology

It realizes that when VoIP application is running in the background, it reduces device power consumption and memory usage, maintains user experience consistency, avoids the risk of applications abuse of VoIP calls and keeps the process running continuously, and reduces the impact of device power consumption and memory.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024143522_03072025_PF_FP_ABST
    Figure CN2024143522_03072025_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a VoIP call method and a related apparatus, applied to an electronic device. The method comprises: receiving a VoIP call message sent by an application server of a first VoIP application by means of a push server, wherein the VoIP call message is used for requesting to initiate a VoIP call; starting a first VoIP lightweight process of the first VoIP application, and providing the VoIP call message to the first VoIP lightweight process; displaying a call notification on the basis of the VoIP call message acquired by the first VoIP lightweight process; and the first VoIP lightweight process establishing a long connection with the application server. In this way, a VoIP call can be implemented with low power consumption and memory cost.
Need to check novelty before this filing date? Find Prior Art

Description

VoIP calling method and related device

[0001] This application claims priority to Chinese patent application No. 202311865222.5 filed with the State Intellectual Property Office of China on December 29, 2023, and entitled “VoIP Call Method and Related Device,” the entire contents of which are incorporated herein by reference. This application claims priority to Chinese patent application No. 202410042257.7 filed with the State Intellectual Property Office of China on January 10, 2024, and entitled “VoIP Call Method and Related Device,” the entire contents of which are incorporated herein by reference. Technical Field

[0002] The present application relates to the field of electronic technology, and in particular to a VoIP communication method and related devices. Background Art

[0003] With the development of mobile Internet and the improvement of people's living standards, more and more users use mobile phones and other terminal devices to make calls. Calls between mobile phones can be operator calls realized through the operator network, or they can be Internet calls (Voice over Internet Protocol, VoIP) realized through the Internet. An application that can realize VoIP calls (this application can be referred to as VoIP application) can be installed in the mobile phone; when the VoIP application is running in the foreground, it can establish a long connection with the application server to carry out end-cloud call communication, and realize VoIP calls between users through the application server; when the VoIP application is switched to the background to run, the terminal device's system will freeze or directly destroy the application process from the perspective of device power consumption. At this time, the VoIP application cannot communicate with the application server.

[0004] At present, how to implement VoIP calls at a lower cost when VoIP applications are switched to background operation remains to be studied. Summary of the Invention

[0005] The embodiments of the present application provide a VoIP call method and related devices, which can implement VoIP calls with lower power consumption and memory costs.

[0006] In a first aspect, the present application provides a VoIP call method, which is applied to an electronic device, the electronic device including a first VoIP application, the method comprising: receiving a VoIP call message sent by an application server of the first VoIP application via a push server, the VoIP call message being used to request a VoIP call; starting a first VoIP lightweight process of the first VoIP application and providing a VoIP call message to the first VoIP lightweight process; displaying a call notification based on the VoIP call message obtained by the first VoIP lightweight process; and establishing a persistent connection between the first VoIP lightweight process and the application server. In implementing an embodiment of the present application, after receiving the VoIP call message via the push server, the VoIP lightweight process is started, and a persistent connection is established between the VoIP lightweight process and the application server to implement the VoIP call, without having to start the main application process. In this way, VoIP calls can be implemented with lower device power consumption and memory costs.

[0007] In one implementation, after the call notification is displayed based on the VoIP call message obtained by the first VoIP lightweight process, the process further includes: receiving a first operation, the first operation being used to answer the VoIP call; in response to the first operation, the first VoIP lightweight process loads the answering page for the VoIP call; the answering page is displayed; based on the persistent connection, the first VoIP lightweight process performs a call operation with the application server. When implementing the embodiment of the present application, after the user answers the VoIP call, the answering page is loaded by the VoIP lightweight process, and the VoIP call is conducted based on the persistent connection created by the VoIP lightweight process. In this way, the user experience remains consistent with that of "pulling up the main application process to answer the call," but avoids pulling up the main application process, thereby reducing device power consumption and required memory.

[0008] In one implementation, after the first VoIP lightweight process performs a call operation with the application server, the process further includes: receiving a second operation for hanging up the VoIP call; and in response to the second operation, destroying the first VoIP lightweight process and stopping displaying the answer page. In this embodiment of the present application, after the called user hangs up the VoIP call, the VoIP lightweight process is promptly destroyed. This avoids wasting device power and memory due to the VoIP lightweight process continuing to run after the called user hangs up the VoIP call.

[0009] In one implementation, after the first VoIP lightweight process and the application server perform a call operation in response to a VoIP call message, the process further includes: receiving a first message from the application server, the first message being used to instruct the caller to hang up the VoIP call; and, based on the first message, destroying the first VoIP lightweight process and stopping the display of the answering page. In implementing this embodiment of the present application, the VoIP lightweight process is promptly destroyed after the caller hangs up the VoIP call. This avoids wasting device power and memory due to the VoIP lightweight process continuing to run after the caller hangs up the VoIP call.

[0010] In one implementation, after displaying a call notification based on a VoIP call message obtained by the first VoIP lightweight process, the method further includes: receiving a third operation for rejecting the VoIP call corresponding to the VoIP call message or deleting the call notification; and, in response to the third operation, destroying the first VoIP lightweight process. In implementing this embodiment of the present application, after the called user rejects the VoIP call, the VoIP lightweight process is promptly destroyed. This avoids wasting device power and memory due to the VoIP lightweight process continuing to run after the called user rejects the VoIP call.

[0011] In one implementation, after displaying the call notification based on the VoIP call message obtained by the first VoIP lightweight process, the method further includes: upon detecting that the user has not answered the VoIP call within a first time period, destroying the first VoIP lightweight process. In implementing this embodiment of the present application, if the called user does not answer the VoIP call for an extended period, the VoIP lightweight process is promptly destroyed. This avoids wasting device power and memory by allowing the VoIP lightweight process to continue running when the user has not answered the VoIP call for an extended period.

[0012] In one implementation, after the first VoIP lightweight process and the application server perform a call operation in response to the VoIP call message, the process further includes: receiving a second message from the application server, the second message being used to instruct the caller to cancel the VoIP call; and destroying the first VoIP lightweight process based on the second message. In implementing this embodiment of the present application, the VoIP lightweight process is promptly destroyed after the caller cancels the call. This avoids wasting device power and memory due to the VoIP lightweight process continuing to run after the caller cancels the call.

[0013] In one implementation, the first VoIP lightweight process is independent of the main application process of the first VoIP application. By implementing the embodiment of the present application, the VoIP lightweight process does not need to be launched when the application process is launched. Using the VoIP lightweight process to implement VoIP calls reduces device power consumption and memory requirements.

[0014] In one implementation, the electronic device includes an API blacklist, and the first VoIP lightweight process is prohibited from calling APIs in the API blacklist. By implementing the embodiment of the present application and managing the API blacklist, the behavior of the first VoIP application in the VoIP lightweight process can be constrained, and the first VoIP application can be restricted from performing operations unrelated to the VoIP call.

[0015] In one implementation, before destroying the first VoIP lightweight process, the method further includes: performing pre-destruction processing on the first VoIP lightweight process. By implementing the embodiment of the present application, important data loss can be avoided through pre-destruction processing.

[0016] In one implementation, the electronic device also includes a push service, a lightweight process management service, a VoIP call management service and a notification management service. The above-mentioned receiving the VoIP call message sent by the application server of the first VoIP application through the push server includes: the push service receives the VoIP call message sent by the application server through the push server; the push service sends the VoIP call message to the lightweight process management service; the above-mentioned starting the first VoIP lightweight process of the first VoIP application and providing the VoIP call message to the first VoIP lightweight process includes: the lightweight process management service starts the first VoIP lightweight process of the first VoIP application and sends the VoIP call message to the first VoIP lightweight process; the above-mentioned display of the call notification based on the VoIP call message obtained by the first VoIP lightweight process includes: the first VoIP lightweight process sends the incoming call information of the VoIP call message to the VoIP call management service; the VoIP call management service instructs the notification management service to display the call notification of the VoIP call message based on the incoming call information. By implementing the embodiment of the present application, after the VoIP call message is sent to the Push service of the electronic device through the push server, the VoIP lightweight process of the first VoIP application can be started using the lightweight process management service, and the call notification can be displayed using the VoIP call management service and the notification management service; the user experience can be kept consistent with the user experience of "pulling up the application main process to answer the call", but it avoids pulling up the application main process, thereby reducing device power consumption and required memory.

[0017] In one implementation, after the push service sends a VoIP call message to the lightweight process management service, the process further includes: the lightweight process management service starts a first timer; after the first VoIP lightweight process sends the incoming call information of the VoIP call message to the VoIP call management service, the process further includes: the VoIP call management service sends a call status to the lightweight process management service, the call status being used to indicate that the incoming call information has been reported; before the first timer times out, if the lightweight process management service receives the call status, the lightweight process management service stops the first timer; before the first timer times out, if the lightweight process management service does not receive the call status, then when the first timer times out, the lightweight process management service destroys the first VoIP lightweight process. In the implementation of the embodiment of the present application, the first timer can be used to limit the first VoIP application to call the interface of the VoIP call management service within a specified time to report the incoming call information of the VoIP call message, otherwise the VoIP lightweight process corresponding to the VoIP call message will be destroyed, thereby preventing the first VoIP application from maliciously executing the VoIP lightweight process in the background for a long time using the VoIP call message.

[0018] In one implementation, after the push service sends a VoIP call message to the lightweight process management service, it also includes: the lightweight process management service sends first indication information of the VoIP call message to the VoIP call management service; after the first VoIP lightweight process sends the incoming call information of the VoIP call message to the VoIP call management service, it also includes: the VoIP call management service verifies the legitimacy of the incoming call information according to the first indication information; the VoIP call management service instructs the notification management service to display the call notification of the VoIP call message based on the incoming call information, including: when the incoming call information is verified to be legitimate, the notification management service displays the call notification of the VoIP call message based on the incoming call information. In implementing the embodiment of the present application, the lightweight process management service notifies the VoIP call management service of the VoIP call message in advance, so that the VoIP call management service can perform security verification on the incoming call information of the VoIP call message, thereby avoiding the first VoIP application from maliciously requesting to display call notifications of abnormal processes.

[0019] In one implementation, in response to a first operation, a first VoIP lightweight process loads a VoIP call answering page, including: in response to the first operation, notifying a management service to call an answering service of the VoIP call management service; the answering service creates a first window, the first window including a first page; the answering service calls an answering loading module in the first page; the answering loading module uses a cross-process loading mechanism to call the first VoIP lightweight process to load the VoIP call answering page, and renders the answering page onto the first page; and displaying the answering page includes displaying the first window. In this embodiment of the present application, after the called user answers the VoIP call, the answering loading module of the VoIP lightweight process can render the answering page of the VoIP lightweight process onto the first page of the VoIP call management service, allowing the user to still see the answering page as if it were displayed within the first VoIP application. This maintains the user experience consistent with launching the main application process to answer the call, while avoiding launching the main application process, thereby reducing device power consumption and memory requirements.

[0020] In one implementation, the above-mentioned destroying the first VoIP lightweight process and stopping displaying the answering page in response to the second operation, or destroying the first VoIP lightweight process and stopping displaying the answering page based on the first message, includes: in response to the second operation or based on the second message, the first VoIP lightweight process destroys the answering page; the first VoIP lightweight process sends a hang-up status to the VoIP call management service; based on the hang-up status, the VoIP call management service destroys the first page and sends a hang-up status to the lightweight process management service; based on the hang-up status, the lightweight process management service destroys the first VoIP lightweight process. When implementing the embodiment of the present application, after the called user or caller hangs up the VoIP call, the VoIP call management service and the lightweight process management service are used to promptly destroy the first VoIP lightweight process, thereby avoiding the impact of the VoIP lightweight process on device power consumption and memory after the hang-up.

[0021] In one implementation, the above-mentioned destruction of the first VoIP lightweight process in response to the third operation includes: in response to the third operation, the notification management service calls the rejection service of the VoIP call management service; the rejection service instructs the notification management service to delete the call notification; the rejection service instructs the first VoIP lightweight process to reject the VoIP call message; the first VoIP lightweight process sends a rejection status to the lightweight process management service, where the rejection status is used to indicate the rejection of the VoIP call; based on the rejection status, the lightweight process management service destroys the first VoIP lightweight process. In implementing the embodiment of the present application, after the called user rejects the VoIP call or deletes the call notification, the VoIP call management service and the lightweight process management service are used to promptly destroy the first VoIP lightweight process, thereby avoiding the impact of the VoIP lightweight process on device power consumption and memory after the rejection.

[0022] In one implementation, the above-mentioned method of destroying the first VoIP lightweight process when it is detected that the user has not answered the VoIP call within the first time period, or the above-mentioned method of destroying the first VoIP lightweight process based on the second message, includes: when it is detected that the user has not answered the VoIP call within the first time period or based on the second message, the first VoIP lightweight process sends a missed status to the VoIP call management service; based on the missed status, the VoIP call management service instructs the notification management service to delete the call notification and sends a missed status to the lightweight process management service; based on the missed status, the lightweight process management service destroys the first VoIP lightweight process. When implementing the embodiment of the present application, after the called user has not answered the VoIP call for a long time or the caller can actively cancel the call, the VoIP call management service and the lightweight process management service are used to promptly destroy the first VoIP lightweight process, thereby avoiding the impact of the VoIP lightweight process on the device power consumption and memory after the missed call.

[0023] In one implementation, the method further includes: when the lightweight process management service starts the first VoIP lightweight process of the first VoIP application, loading callable APIs other than those in the API blacklist into the process space of the first VoIP lightweight process. By implementing this embodiment of the present application and managing the API blacklist, the behavior of the first VoIP application in the VoIP lightweight process can be constrained, and the first VoIP application can be restricted from performing operations unrelated to VoIP calls.

[0024] In a second aspect, the present application provides a VoIP call method, which is applied to an electronic device, wherein the electronic device includes a first VoIP application, a lightweight process management service, a VoIP call management service and a notification management service. The method includes: the lightweight process management service receives a VoIP call message sent by the application server of the first VoIP application through a push server, and the VoIP call message is used to request a VoIP call; the lightweight process management service calls and starts the first VoIP lightweight process of the first VoIP application, and sends a VoIP call message to the first VoIP lightweight process; the first VoIP lightweight process reports the incoming call information of the VoIP call message to the VoIP call management service; the VoIP call management service instructs the notification management service to display the call notification of the VoIP call message based on the incoming call information. By implementing the embodiment of the present application, after the VoIP call message is sent to the Push service of the electronic device through the push server, the VoIP lightweight process of the first VoIP application can be started using the lightweight process management service, and the call notification can be displayed using the VoIP call management service and the notification management service; the user experience can be kept consistent with the user experience of "pulling up the application main process to answer the call", but it avoids pulling up the application main process, thereby reducing device power consumption and required memory.

[0025] In one implementation, the lightweight process management service is configured with an API blacklist. When the lightweight process management service starts the first VoIP lightweight process, the first VoIP lightweight process is prohibited from calling APIs in the API blacklist. By implementing this embodiment of the present application and managing the API blacklist, the behavior of the first VoIP application within the VoIP lightweight process can be constrained, and the first VoIP application can be restricted from performing operations unrelated to the VoIP call.

[0026] In one implementation, after the lightweight process management service receives a VoIP call message, it further includes: starting a first timer; after the first VoIP lightweight process reports the incoming call information of the VoIP call message to the VoIP call management service, it further includes: the VoIP call management service sends a call status to the lightweight process management service, the call status being used to indicate that the incoming call information has been reported; before the first timer times out, if the lightweight process management service receives the call status, the lightweight process management service closes the first timer; before the first timer times out, if the lightweight process management service does not receive the call status, when the first timer times out, the lightweight process management service destroys the first VoIP lightweight process. In the implementation of the embodiment of the present application, the first timer can be used to limit the first VoIP application to call the interface of the VoIP call management service within a specified time to report the incoming call information of the VoIP call message, otherwise the VoIP lightweight process corresponding to the VoIP call message will be destroyed, thereby preventing the first VoIP application from maliciously executing the VoIP lightweight process in the background for a long time using the VoIP call message.

[0027] In one implementation, after the lightweight process management service receives the VoIP call message, it also includes: the lightweight process management service sends first indication information of the VoIP call message to the VoIP call management service; after the first VoIP lightweight process reports the incoming call information of the VoIP call message to the VoIP call management service, it also includes: the VoIP call management service verifies the legitimacy of the incoming call information according to the first indication information; the VoIP call management service instructs the notification management service to display the call notification of the VoIP call message based on the incoming call information, including: when the incoming call information is verified to be legitimate, the notification management service displays the call notification of the VoIP call message based on the incoming call information. In implementing the embodiment of the present application, the lightweight process management service notifies the VoIP call management service of the VoIP call message in advance, so that the VoIP call management service can perform security verification on the incoming call information of the VoIP call message, thereby avoiding the first VoIP application from maliciously requesting to display call notifications of abnormal processes.

[0028] In one implementation, after the lightweight process management service starts the first VoIP lightweight process of the first VoIP application, or before the first VoIP lightweight process reports the incoming call information of the VoIP call message to the VoIP call management service, the first VoIP lightweight process further includes: establishing a communication connection with the application server, where the communication connection can be used for the VoIP call. The communication connection can be a persistent connection.

[0029] In one implementation, after the notification management service displays a call notification of a VoIP call message based on the incoming call information, the notification management service further includes: in response to a first operation, the notification management service calls an answering service of the VoIP call management service, the first operation being for answering the VoIP call requested by the VoIP call message; the answering service creates a first page; the answering service calls an answering loading module in the first page; the answering loading module uses a cross-process loading mechanism to call a first VoIP lightweight process to load an answering page for the VoIP call, and renders the answering page to the first page; the electronic device displays the first page after the answering page is rendered; and the first VoIP lightweight process conducts a VoIP call with the application server regarding the VoIP call message. In implementing this embodiment of the present application, after the called user answers the VoIP call, the answering loading module of the VoIP lightweight process can render the answering page of the VoIP lightweight process to the first page of the VoIP call management service for display when the user answers the call, so that it still appears to the user that the answering page is displayed within the first VoIP application. In this way, the user experience remains consistent with that of "launching the main application process to answer the call", but avoids launching the main application process, reducing device power consumption and required memory.

[0030] In one implementation, after the notification management service displays the call notification of the VoIP call message based on the incoming call information, it also includes: in response to a second operation, the notification management service calls the rejection service of the VoIP call management service, the second operation is used to reject the VoIP call requested by the VoIP call message, or to delete the call notification; the rejection service instructs the notification management service to delete the call notification; the rejection service instructs the first VoIP lightweight process to reject the VoIP call message; the VoIP call management service sends a rejection status to the lightweight process management service, the rejection status is used to indicate the rejection of the VoIP call requested by the VoIP call message; based on the rejection status, the lightweight process management service destroys the first VoIP lightweight process. When implementing the embodiment of the present application, after the called user rejects the VoIP call or deletes the call notification, the VoIP call management service and the lightweight process management service are used to promptly destroy the first VoIP lightweight process, thereby avoiding the impact of the VoIP lightweight process on the device power consumption and memory after the rejection.

[0031] In one implementation, after the rejection service of the VoIP call management service instructs the first VoIP lightweight process to reject the VoIP call message, the method further includes: the first VoIP lightweight process sending a rejection status to the application server.

[0032] In one implementation, after the notification management service displays the call notification of the VoIP call message based on the incoming call information, it also includes: when it is detected that the caller cancels the VoIP call or the called user does not answer the call within a first period of time, the first VoIP lightweight process sends a not answered status to the VoIP call management service; based on the not answered status, the VoIP call management service instructs the notification management service to delete the call notification and sends a not answered status to the lightweight process management service; based on the not answered status, the lightweight process management service destroys the first VoIP lightweight process. When implementing the embodiment of the present application, after the called user does not answer the VoIP call for a long time or the caller can actively cancel the call, the VoIP call management service and the lightweight process management service are used to promptly destroy the first VoIP lightweight process, thereby avoiding the impact of the VoIP lightweight process on the device power consumption and memory after the call is not answered.

[0033] In one implementation, after the first VoIP lightweight process conducts a VoIP call with the application server regarding the VoIP call message, the process further includes: upon detecting a hang-up operation or the caller hanging up the VoIP call, the first VoIP lightweight process destroys the answering page; the first VoIP lightweight process sends a hang-up status to the VoIP call management service; based on the hang-up status, the VoIP call management service destroys the first page and sends a hang-up status to the lightweight process management service; based on the hang-up status, the lightweight process management service destroys the first VoIP lightweight process. When implementing this embodiment of the present application, after the called user or caller hangs up the VoIP call, the VoIP call management service and the lightweight process management service are used to promptly destroy the first VoIP lightweight process, thereby avoiding the impact of the VoIP lightweight process on device power consumption and memory after the hang-up.

[0034] In one implementation, before the lightweight process management service destroys the first VoIP lightweight process, the lightweight process management service further includes: instructing the first VoIP lightweight process to perform pre-destruction processing; and the first VoIP lightweight process performs pre-destruction processing. By implementing this embodiment of the present application, important data loss can be avoided through pre-destruction processing.

[0035] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, wherein the memory is coupled to the processor, the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor reads the computer instructions from the memory, the electronic device executes the VoIP call described in the first aspect.

[0036] In a fourth aspect, an embodiment of the present application provides a computer storage medium comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes a VoIP call in any possible implementation of any of the above aspects.

[0037] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to perform a VoIP call in any possible implementation of any of the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] FIG1 is a schematic diagram of a system architecture of a communication system provided in an embodiment of the present application;

[0039] FIG2 is a flow chart of a VoIP calling method provided in an embodiment of the present application;

[0040] FIG3A is a flow chart of another VoIP calling method provided in an embodiment of the present application;

[0041] FIG3B is a schematic diagram of the software structure of the software system provided in an embodiment of the present application;

[0042] FIG4A is a schematic diagram of a call display process of a VoIP call method provided in an embodiment of the present application;

[0043] 4B to 4D are schematic diagrams of the VoIP call notification interface provided in an embodiment of the present application;

[0044] FIG5A is a schematic diagram of a process flow of a called party answering a call in a VoIP calling method according to an embodiment of the present application;

[0045] 5B to 5D are schematic diagrams of interfaces for a called party to answer a call provided in an embodiment of the present application;

[0046] FIG6 is a schematic diagram of a called party rejection process of a VoIP call method provided in an embodiment of the present application;

[0047] FIG7 is a schematic diagram of a missed call process of a VoIP call method provided in an embodiment of the present application;

[0048] FIG8 is a flowchart illustrating a call hanging-up process of a VoIP call method provided in an embodiment of the present application;

[0049] FIG9 is a flow chart of a VoIP calling method provided in an embodiment of the present application;

[0050] FIG10 is a schematic structural diagram of a terminal device provided in an embodiment of the present application;

[0051] FIG11 is a schematic diagram of the structure of an application server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] The following is a clear and detailed description of the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship between related objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0053] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0054] The term "user interface (UI)" in the following embodiments of this application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is a source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on an electronic device and finally presented as content that the user can recognize. The commonly used form of user interface is graphical user interface (GUI), which refers to a user interface related to computer operations that is displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.

[0055] To facilitate understanding, the relevant concepts involved in the embodiments of the present application are explained below.

[0056] VoIP: A voice communication technology that uses the Internet Protocol (IP) to facilitate voice, video, and multimedia conferencing, essentially conducting calls over the internet. Other informal names include IP telephony, Internet telephony, broadband telephony, and broadband phone service. VoIP can be used on a variety of internet-connected devices, including VoIP phones, smartphones, and personal computers. Voice / video calls made on end devices through third-party applications are generally considered VoIP calls.

[0057] VoIP application: An application that enables VoIP calls. VoIP applications can be standalone applications or integrated into other applications (such as phone applications). VoIP applications can be system applications on the terminal device or downloadable third-party applications, such as WeChat for Business and Changlian. Third-party applications can be pre-installed on the terminal device or downloaded and installed by the user.

[0058] The following introduces the communication system 10 involved in the VoIP calling method provided in the embodiment of the present application.

[0059] Figure 1 exemplarily illustrates a system architecture diagram of a communication system 10 provided in an embodiment of the present application. As shown in Figure 1 , the communication system 10 includes one or more terminal devices (e.g., terminal device 100, terminal device 400), one or more application servers (e.g., application server 200), and a Push server 300.

[0060] Terminal devices 100 and 400 are installed with a first VoIP application (e.g., a Changlian application). User 1 can use the first VoIP application of terminal device 100 to conduct a VOIP call with the first VoIP application of another user (e.g., user 2) on terminal device 400. For example, terminal device 100 receives a VoIP call from user 2, who is logged into the first VoIP application of terminal device 400. The VoIP call is used to request a VOIP call with user 1. In this case, user 2 can be referred to as the caller or calling user, and user 1 can be referred to as the called user. The following description uses terminal device 100 as an example.

[0061] The terminal device 100 is installed or integrated with a Push service, which is used to receive messages pushed by the application server of each application. Such pushed messages can be referred to as Push messages. It should be noted that if the first VoIP application of the terminal device 100 has the Push message function enabled, then even when the terminal device 100 is not running the first VoIP application or is running the first VoIP application in the background, the Push service of the terminal device 100 can also receive and display Push messages from the first VoIP application from the Push server 300.

[0062] Application server 200 can be used to push messages to a first VoIP application installed on each terminal device (e.g., terminal device 100). In some embodiments, application server 200 can be understood as a service server for the first VoIP application and is also used to provide other services of the first VoIP application. For example, if the first VoIP application is a Changlian application, application server 200 is also used to provide Changlian application with functions such as sending and receiving messages, conferencing, and scheduling.

[0063] The Push server 300 may receive Push messages sent by each application server, and push the Push messages to the terminal device on which the corresponding application is installed, for example, sending a Push message of the first VoIP application to the terminal device 100 .

[0064] In the embodiment of the present application, each terminal device (eg, terminal device 100, terminal device 400) and application server 200, application server 200 and Push server 300, and Push server 300 and terminal device 100 may communicate through a communication network.

[0065] The communication network may include local area networks (LANs) and / or wide area networks (WANs). The communication network may be implemented using any known network communication protocol, which may be various wired or wireless communication protocols, such as Ethernet, universal serial bus (USB), FireWire, global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), Bluetooth, wireless fidelity (Wi-Fi), NFC, voice over Internet protocol (VoIP), a communication protocol supporting a network slicing architecture, or any other suitable communication protocol.

[0066] The terminal device 100 and the terminal device 400 can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and can also be a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device (such as a smart bracelet), an in-vehicle device, a smart home device (such as a smart TV, a smart screen, a large-screen device, etc.) and / or a smart city device. The embodiments of the present application do not impose any special restrictions on the specific types of the terminal devices 100 and 400.

[0067] Application server 200 can be a single server, a server cluster consisting of multiple servers, or a cloud computing center. Similarly, Push server 300 can be a single server, a server cluster consisting of multiple servers, or a cloud computing center. The present embodiment of the application does not specifically limit the names of application server 200 and Push server 300.

[0068] It should be understood that Figure 1 is merely a schematic diagram of the system structure of the communication system provided in an embodiment of the present application, and does not constitute a specific limitation on the communication system 10. The communication system 10 may include more or fewer devices than shown in the figure. For example, it may also include wireless relay equipment and wireless backhaul equipment (not shown in Figure 1), which are not limited here.

[0069] In one usage scenario, when the terminal device 100 switches the first VoIP application to the background, the device system will freeze or directly destroy the main application process of the first VoIP application from the perspective of device power consumption. At this time, the first VoIP application disconnects the long connection with the application server 200, and the first VoIP application cannot communicate with the application server 200, and thus cannot receive VoIP calls from other terminal devices through the application server 200.

[0070] For example, as shown in Figure 2, in a VoIP call method provided in an embodiment of the present application, the Push server 300 provides the application server 200 with an interface for sending VoIP call messages; when the terminal device 100 switches the first VoIP application to the background, the application server 200 can use the VoIP call message of the first VoIP application as a Push message and push it to the terminal device 100 through the Push server 300.

[0071] Specifically, (1) when the application server 200 receives a call request from a caller for user 1 who has logged into the first VoIP application on the terminal device 100, if the application server 200 currently has a long connection with the first VoIP application of the terminal device 100, it directly sends a VoIP call message to the terminal device 100; if the application server 200 currently has no long connection with the first VoIP application of the terminal device 100, it sends a VoIP call message to the Push server 300; (2) the Push server 300 establishes a Push service with the terminal device 100. h long connection, the Push server 300 can send the above-mentioned VoIP call message to the Push service through the Push long connection; (3) based on the above-mentioned VoIP call message, the Push service of the terminal device 100 triggers the start of the application main process of the first VoIP application, and then sends the VoIP call message to the main process of the first VoIP application; (4) based on the above-mentioned VoIP call message, the application main process of the first VoIP application of the terminal device 100 establishes a long connection with the application server 200, and then realizes the VoIP call with the caller through the application server 200.

[0072] The above-mentioned VoIP call method can still receive VoIP call messages when the first VoIP application is switched to the background, thereby realizing the VoIP call of the first VoIP application. However, the above-mentioned solution also has the following defects: each time the Push service receives a VoIP call message, it must wake up the main application process of the first VoIP application; after starting the main application process, the system cannot control the behavior of the main application process, and the first VoIP application may perform services unrelated to the VoIP call; the system cannot control the execution time of the main application process, and there is a risk that the application will abuse the VoIP call to keep the application running continuously; the above-mentioned situations will increase the power consumption of the device and waste memory, which will have a negative impact on the terminal device 100 and thus affect the user experience.

[0073] Furthermore, in the above solution, if the caller cancels the call, the called user doesn't answer the call for a long time, or hangs up after answering, the main application process cannot be directly destroyed, considering that the user may still be using it in the foreground or background of the terminal device 100. Instead, two approaches are available: Method 1: Allow the main application process to continue running without control; Method 2: Freeze the main application process. Method 1 will significantly impact device power consumption and memory, while Method 2 will also impact device memory, as it will still occupy memory even when frozen.

[0074] For example, as shown in FIG3A , in another VoIP call method provided in an embodiment of the present application, the terminal device 100 includes a first VoIP application and a Push service, and also includes a lightweight process management service, a VoIP call management service, and a notification management service.

[0075] Different from the VoIP call method shown in FIG. 2 , after the Push service of the terminal device 100 receives the VoIP call message from the Push server 300 , it sends the VoIP call message to the lightweight process management service.

[0076] The lightweight process management service is responsible for receiving VoIP call messages from the Push service, triggering the first VoIP application to start the VoIP lightweight process, and sending the VoIP call message to the lightweight process for processing to realize the VoIP call; it is also responsible for managing the life cycle of the VoIP lightweight process, that is, in cases where the user does not answer the VoIP call, resulting in a long call time, the caller cancels the VoIP call, the user rejects the VoIP call, the user hangs up the VoIP call after answering the VoIP call, etc., it controls the VoIP application to destroy the VoIP lightweight process in a timely manner; it is also responsible for managing the API access rights of the VoIP lightweight process to control the actions that the VoIP lightweight process can perform.

[0077] The VoIP lightweight process is an independent process for implementing VoIP calls and is isolated from the main application process. In the embodiment of the present application, the lightweight process may also be referred to as other names, such as a subprocess.

[0078] The first VoIP application inherits the VoIP lightweight process expansion capability in the development state. In the running state, based on this capability, it can run the VoIP lightweight process, support the VoIP lightweight process to receive VoIP messages in the background, and process the VoIP call messages in the VoIP lightweight process to implement VoIP calls. This processing includes establishing a persistent connection with the application server 200, connecting to the VoIP call management service to report the call status, and loading the VoIP call answering page. In the embodiment of the present application, the answering page may also be referred to as the answering interface.

[0079] In some embodiments, the VoIP lightweight process extension capability inherited by the first VoIP application has some or all of the following characteristic capabilities:

[0080] (1) Independent VoIP lightweight process: When the VoIP lightweight process extension capability of the first VoIP application is called, a lightweight process for implementing VoIP calls can be started, which is isolated from the main application process.

[0081] (2) Limited callable APIs. That is, the APIs that can be called by the VoIP lightweight process that is launched when the VoIP lightweight process extension capability is invoked are strictly limited, and APIs unrelated to VoIP behavior can be disabled. In one implementation, the APIs that can be called by the VoIP lightweight process extension capability are set through a preset API whitelist, or the APIs that are prohibited from being called by the VoIP lightweight process extension capability are set through a preset API blacklist.

[0082] (3) Supporting background startup and receiving background messages. That is, when the first VoIP application is running in the background, it supports calling the VoIP lightweight process extension capability to start the VoIP lightweight process. The VoIP lightweight process extension capability provides a callback method for receiving background messages, so that the first VoIP application can implement the VoIP lightweight process in the callback method to receive VoIP call messages in the background. In the embodiment of the present application, "starting" can also be referred to as "pulling up".

[0083] (4) Support for foreground loading. That is, the first VoIP application can implement the processing of related foreground services such as call notification and answering page in the VoIP lightweight process extension capability. The call interface and answering page can be subsequently loaded into the foreground for display by the answering loading module of the VoIP lightweight process.

[0084] The VoIP call management service includes a module for loading the answering call of a VoIP lightweight process. This module is responsible for receiving call status reports from the VoIP lightweight process, displaying call notifications to the notification management service, and processing user operations for answering or rejecting VoIP calls. It also supports loading the answering page of the VoIP lightweight process across processes and rendering it in the VoIP call management service.

[0085] Notification management service, used to display VoIP call notifications and support displaying controls such as answer buttons and reject buttons.

[0086] In the VoIP call method provided in the embodiment of the present application, the Push service implements the VoIP call by waking up the VoIP lightweight process of the VoIP application. The closed loop of the VoIP call process, including calling, answering, rejecting, and hanging up, is completed in the VoIP lightweight process. The main application process does not need to be started during the entire process, which reduces the impact on device power consumption and memory. By managing the life cycle of the VoIP lightweight process, the risk of the VoIP application abusing VoIP calls to keep the process running continuously is eliminated, further reducing power consumption and memory usage. By managing the API access rights of the VoIP lightweight process, the first VoIP application can be prevented from performing actions unrelated to the VoIP call. In addition, the user is unaware of the background processing of the VoIP lightweight process, avoiding affecting the user experience.

[0087] The following is an introduction to the software structure of the terminal device 100 involved in the embodiment of the present application.

[0088] The software system of the terminal device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the terminal device 100. The terminal device 100 is not limited to the Android system and can also adopt other software systems.

[0089] FIG3B is a software structure block diagram of a terminal device 100 provided in an embodiment of the present application.

[0090] The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system can be divided from top to bottom into the application layer, application framework layer, hardware abstraction layer (HAL) layer, and kernel layer. Among them:

[0091] The application layer may include a series of application packages. As shown in FIG3B , the application layer may include a first VoIP application, such as Changlian and Enterprise WeChat, and may also include other applications such as camera, gallery, calendar, call, WLAN, Bluetooth, music, video, and SMS.

[0092] In some embodiments, the first VoIP application develops a subclass in the development state, and the VoIP lightweight process expansion capability is inherited in the subclass, that is, the application package (Android application package, APK) of the first VoIP application integrates the program file of the VoIP lightweight process expansion capability. The software system of the terminal device 100 has an underlying support module for the VoIP lightweight process expansion capability, which supports the terminal device 100 to install the first VoIP application. After that, the first VoIP application runs a VoIP lightweight process independent of the main application process based on this capability in the running state to realize VoIP calls. Specifically, please refer to Figure 3A and the relevant description of the subsequent embodiments, which will not be repeated here. The application framework layer provides an application programming interface (API) and a programming framework for the applications of the application layer. The application framework layer includes some predefined functions.

[0093] As shown in Figure 3B, the application framework layer may include a Push service, a VoIP call management service, a lightweight process management service, and a notification management service. The application framework layer may also include a window manager, a content provider, a view system, a phone manager, a resource manager, etc. In some embodiments, the VoIP call management service and the lightweight process management service may also be integrated into a single software module.

[0094] The Notification Manager service enables applications to display notifications in the status bar. These messages can be used to convey notifications and then disappear automatically after a short pause, without requiring user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the form of icons or scrolling text in the system's top status bar, such as notifications from background applications, or in the form of dialog windows on the screen. Examples include displaying text messages in the status bar, sounding notifications, vibrating electronic devices, and flashing indicator lights.

[0095] In embodiments of the present application, the Notification Management Service can be used to display call notifications for VoIP call messages on both the lock screen and non-lock screen interfaces. Users can answer or reject VoIP calls through the call notifications displayed by the Notification Management Service, and can also delete the call notifications. The functions of the Push Service, VoIP Call Management Service, Lightweight Process Management Service, and Notification Management Service can be found in Figure 3A and the related descriptions of the subsequent embodiments, and will not be repeated here.

[0096] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.

[0097] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0098] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0099] The HAL layer and the kernel layer are used to execute corresponding operations in response to the functions called by the system services in the application framework layer.

[0100] The kernel layer is the layer between hardware and software. It includes the input system, sensor drivers, and display drivers. It can also include audio drivers, camera drivers, and more. The input system monitors user input operations, such as answering, accepting, or hanging up VoIP calls, and deleting call notifications.

[0101] For example, a display driver can drive a display screen to display a VoIP call notification and a VoIP call answering page. A sensor driver can drive a sensor (e.g., a touch sensor) to detect user input operations (e.g., answering, rejecting, and hanging up). An audio driver can drive a microphone to collect user voice data for VoIP calls. A camera driver can drive a camera to capture video images for VoIP calls.

[0102] The specific implementation of the VoIP call method provided in the embodiment of the present application is introduced in detail below.

[0103] In some embodiments, after the VoIP call message is sent to the Push service of the terminal device 100 through the Push server 300, the Push service uses the lightweight process management service to start the VoIP lightweight process 1 of the first VoIP application, and at the same time combines with the VoIP call management service to complete the VoIP call notification display, answering, rejection and other processes.

[0104] Exemplarily, FIG4A shows a VoIP call method provided in an embodiment of the present application, which includes a lightweight process startup process, which includes but is not limited to part or all of steps S101 to S109.

[0105] S101 : The application server 200 sends a VoIP call message 1 to the Push server 300 .

[0106] The VoIP call message 1 is used to request a VoIP call, and the VoIP call message 1 may include some or all of the following: a message identity (ID), a caller account, a caller avatar, a caller name, an account of the called user, and the like.

[0107] S102 : The Push server 300 sends a VoIP call message 1 to the Push service of the terminal device 100 .

[0108] In some embodiments, user 2 logs in to the first VoIP application of the terminal device 400. User 2 can make a VoIP call (such as a voice call or a video call) to user 1 through the first VoIP application, that is, make a VoIP call, triggering the terminal device 400 to send a VoIP call message 1 to the application server 200 of the first VoIP application; if the application server 200 detects that a long connection is not currently established with the terminal device 100 of user 1, the application server 200 requests the Push server 300 to push the VoIP call message 1 to the terminal device 100 via the Push long connection.

[0109] S103. The Push service of the terminal device 100 sends a VoIP call message 1 to the lightweight process management service.

[0110] In some embodiments, after receiving VoIP call message 1, the Push service of terminal device 100 verifies the legitimacy of the message and performs deduplication processing on the message, rejecting duplicate VoIP call message 1. The verified VoIP call message 1 is then sent to the lightweight process management service. The specific implementation of verifying the legitimacy of the message and performing deduplication processing on the message is not specifically limited in the embodiments of the present application.

[0111] In the embodiment of the present application, after the lightweight process management service receives the VoIP call message 1, it can execute one or more of steps S104, S106, S107 and S109.

[0112] S104. The lightweight process management service of the terminal device 100 sends indication information 1 to the VoIP call management service. The indication information 1 indicates the VoIP call message 1, so as to inform the call management service of the VoIP call message 1 in advance.

[0113] S105 . The VoIP call management service saves the indication information 1 . The indication information 1 is subsequently used to verify the legitimacy of the incoming call information of the VoIP call message 1 .

[0114] In one implementation, the indication information 1 includes the message ID of the VoIP call message 1 .

[0115] S106 : The lightweight process management service of the terminal device 100 calls the VoIP lightweight process extension capability of the first VoIP application to start the VoIP lightweight process 1 of the first VoIP application, and sends the VoIP call message 1 to the VoIP lightweight process 1 .

[0116] S107 . When starting the VoIP lightweight process 1 of the first VoIP application, load the callable API of the VoIP lightweight process based on the API blacklist.

[0117] In some embodiments, the lightweight process management service manages a blacklist of APIs that are prohibited from being called by the VoIP lightweight process extension capability (i.e., a blacklist of APIs prohibited from being called by the VoIP lightweight process). When the lightweight process management service invokes the VoIP lightweight process extension capability of the first VoIP application to start VoIP lightweight process 1, the APIs in the API blacklist are not loaded into the process space of VoIP lightweight process 1, i.e., VoIP lightweight process 1 cannot call the APIs in the API blacklist. In one implementation, the lightweight process management service obtains a total list of APIs; when starting VoIP lightweight process 1, the lightweight process management service loads the APIs in the total list of APIs, excluding the APIs in the API blacklist, into the process space of VoIP lightweight process 1.

[0118] In other embodiments, the lightweight process management service can also manage an API whitelist that can be called by the VoIP lightweight process extension capability. When the lightweight process management service calls the VoIP lightweight process extension capability of the first VoIP application to start the VoIP lightweight process 1, the API in the API whitelist is loaded into the process space of the VoIP lightweight process 1. The VoIP lightweight process 1 cannot call APIs outside the API whitelist.

[0119] The lightweight process management service manages the API blacklist / API whitelist, which can constrain the behavior of the first VoIP application in the VoIP lightweight process and prevent the first VoIP application from performing operations unrelated to the VoIP call.

[0120] S108 : The first VoIP application runs VoIP lightweight process 1 , and VoIP lightweight process 1 receives VoIP call message 1 .

[0121] In some embodiments, the first VoIP application may implement a background message receiving method in a subclass of the VoIP lightweight process extension capability, through which the VoIP lightweight process 1 may receive the VoIP call message 1 sent by the lightweight process management service in the background.

[0122] S109. The lightweight process management service of the terminal device 100 starts lifecycle timer 1, and the timing duration of the timer is the preset duration 1.

[0123] In some embodiments, when the lightweight process management service successfully starts the VoIP lightweight process 1 of the first VoIP application, it will use the application package name of the first VoIP application plus the message ID of the VoIP call message 1 as the granularity identifier and start the life cycle timer 1, or use the above message ID as the granularity identifier and start the life cycle timer 1. When the timer is triggered, the lightweight process management service will forcibly destroy the VoIP lightweight process 1.

[0124] In some embodiments, the lightweight process management service executes step S109 after executing step S106 (i.e., invoking the VoIP lightweight process extension capability to start VoIP lightweight process 1). In some embodiments, the lightweight process management service executes step S109 only after receiving confirmation information from VoIP lightweight process 1 after executing step S106; the confirmation information indicates that VoIP lightweight process 1 has been successfully started.

[0125] As shown in Figure 4A, after the first VoIP application launches a VoIP lightweight process 1 and receives a VoIP call message 1, it can trigger a call notification displaying the call message. The above-mentioned VoIP call method further includes a call notification display process, which includes but is not limited to part or all of steps S110 to S119.

[0126] S110 : The VoIP lightweight process 1 of the first VoIP application establishes a communication connection with the application server 200 .

[0127] In some embodiments, the communication connection is a persistent connection. After starting VoIP lightweight process 1, VoIP lightweight process 1 of the first VoIP application can establish a persistent connection with application server 200 in advance using the receiving method of the VoIP lightweight process's extended capabilities. In this way, based on the call notification of VoIP call message 1, after the user answers the incoming call of VoIP call message 1, the first VoIP application can use the pre-established persistent connection to quickly establish a VoIP call with the caller, providing a better user experience.

[0128] S111. Before lifecycle timer 1 is triggered, VoIP lightweight process 1 of the first VoIP application reports incoming call information 1 of VoIP call message 1 to the VoIP call management service to request the VoIP call management service to display the call notification of VoIP call message 1. Incoming call information 1 is used to determine the display content of the call notification.

[0129] In some embodiments, the incoming call information may include some or all of the following: the message ID of the VoIP call message 1, the caller's avatar, the caller's name, the call notification content, the answer button, the reject button, etc.

[0130] S112. The VoIP call management service verifies the legitimacy of the incoming call information 1 according to the instruction information 1. If the incoming call information 1 is legit, S113 is executed.

[0131] In some embodiments, the incoming call information 1 includes a message ID of a VoIP call message. If the message IDs in the incoming call information 1 and the indication information 1 are the same, the incoming call information 1 is determined to be legal; otherwise, it is illegal.

[0132] In the aforementioned step S104, the lightweight process management service informs the VoIP call management service of the indication information 1 of the VoIP call message 1 in advance, so as to facilitate the security verification of the incoming call information 1 of the VoIP call message 1 sent by the first VoIP application in step S112, thereby avoiding the first VoIP application maliciously requesting to display call notifications of abnormal processes.

[0133] The above steps S104, S105 and S112 are optional.

[0134] S113 . Based on the incoming call information 1 , the VoIP call management service requests the notification management service to display the call notification of the VoIP call message 1 .

[0135] The display content of the call notification may include one or more of the following: caller profile picture and name, call notification title and content, answer button and reject button, etc. In some embodiments, the VoIP call management service sends incoming call information 1 to the notification management service; the notification management service displays the call notification of VoIP call message 1 based on the incoming call information 1.

[0136] In some embodiments, the notification management service supports displaying call notifications on the lock screen interface and supports answering calls without unlocking the phone, so that users can answer VoIP calls more quickly.

[0137] For example, as shown in FIG4B , before step S113 , the terminal device 100 displays the lock screen interface 11 . After step S113 , the notification management service triggers the terminal device 100 to display a call notification on the lock screen interface 11 . The call notification includes the caller's avatar 201 and name 202 , call notification content 203 , an answer button 205 , and a reject button 204 . As shown in FIG4B , if the caller is making a voice call using the first VoIP application, the call notification content 203 may be "Inviting you for a voice call." If the caller is making a video call using the first VoIP application, the call notification content 203 may also be "Inviting you for a video call."

[0138] Exemplarily, as shown in FIG4C , before step S113 , the terminal device 100 displays a non-lock screen interface (eg, the main interface 13 ), and after step S113 , the notification management service triggers the terminal device 100 to display a call notification on the non-lock screen interface.

[0139] Exemplarily, as shown in FIG4D , the display content of the call notification may further include a call notification title 206 . For example, if the first VoIP application is the Changlian application, the call notification title 206 is “Changlian application incoming call”.

[0140] S114. The VoIP call management service reports the call status to the lightweight process management service, indicating that the call notification of the VoIP call message 1 has been displayed.

[0141] In some embodiments, along with the call status, the message ID of the VoIP call message 1 is also reported to indicate that the call status is for the VoIP call message 1 .

[0142] In some embodiments, the VoIP call management service executes step S114 after executing step S113. In some embodiments, the VoIP call management service executes step S114 only after receiving confirmation information from the notification management service after executing step S113; the confirmation information is used to indicate that the call notification has been displayed.

[0143] S115 : If a call status is received before the aforementioned lifecycle timer 1 is triggered, the lightweight process management service closes the lifecycle timer 1 corresponding to the VoIP call message 1 .

[0144] S116: If the above call status is not received before the lifecycle timer 1 is triggered, the lifecycle timer 1 is triggered when the timing ends.

[0145] Before the lifecycle timer 1 expires (i.e., before it times out), if the lightweight process management service receives the above-mentioned call status, it is considered that the first VoIP application has completed the call notification display of the VoIP call message 1 within the specified time. At this time, the lifecycle timer 1 corresponding to the VoIP call message 1 will be destroyed, so that the VoIP lightweight process 1 corresponding to the VoIP call message 1 can survive until the call ends or other conditions trigger the destruction of the VoIP lightweight process; otherwise, when the lifecycle timer 1 expires, the lifecycle timer 1 is triggered, and the lightweight process management service destroys the VoIP lightweight process 1.

[0146] In some embodiments, the identifier of the lifecycle timer 1 includes the message ID of the VoIP call message 1 , and the lifecycle timer 1 corresponding to the VoIP call message 1 can be determined according to the message ID of the VoIP call message 1 .

[0147] S117 : When the lifecycle timer 1 is triggered, the lightweight process management service instructs to destroy the VoIP lightweight process 1 of the first VoIP application.

[0148] In step S117, the lightweight process management service indicates that the VoIP lightweight process 1 of the first VoIP application is to be destroyed, indirectly instructing the VoIP lightweight process 1 to perform pre-destruction processing; alternatively, in step S117, the lightweight process management service can also directly instruct the VoIP lightweight process 1 to perform pre-destruction processing. It can be understood that the role of the life cycle timer 1 corresponding to the VoIP call message 1 is to limit the first VoIP application to call the interface of the VoIP call management service within a specified time (i.e., the preset duration 1) to report the incoming call information of the VoIP call message 1, otherwise the VoIP lightweight process 1 corresponding to the VoIP call message 1 will be destroyed. Implementing the embodiment of the present application can prevent VoIP applications from using VoIP call messages to maliciously execute VoIP lightweight processes in the background for a long time.

[0149] S118 : The VoIP lightweight process 1 of the first VoIP application performs pre-destruction processing.

[0150] Steps S117 and S118 are optional. In some embodiments, the VoIP lightweight process 1 is notified in advance before being destroyed to perform pre-destruction processing as soon as possible to avoid loss of important data in the process. For example, the pre-destruction processing includes backing up important preset data in the VoIP lightweight process 1.

[0151] S119. The lightweight process management service destroys the VoIP lightweight process 1.

[0152] In some embodiments, when the lightweight process management service instructs the VoIP lightweight process 1 to perform pre-destruction processing, the lightweight process management service also starts the timer 2; the lightweight process management service executes S119 when the timer 2 expires.

[0153] In some embodiments, after performing pre-destruction processing, the VoIP lightweight process 1 feeds back confirmation information to the lightweight process management service, where the confirmation information is used to indicate completion of the pre-destruction processing; based on the confirmation information, the lightweight process management service executes S119.

[0154] In implementing the embodiment of the present application, the first VOIP application completes the function of the VoIP call process in the VoIP lightweight process based on the VoIP lightweight process expansion capability. During the call process, there is no need to pull up the application main process, which reduces the device power consumption and the required memory. At the same time, the following constraints are technically implemented: (1) APIs unrelated to VoIP calls are disabled to prevent the first VOIP application from doing things unrelated to VoIP calls after the VoIP lightweight process is pulled up, further reducing the impact on the device power consumption and memory. (2) The first VOIP application must report the incoming call information to the VoIP call management service within the specified time, otherwise the VoIP lightweight process will be forcibly destroyed. This constrains the behavior of the first VOIP application and prevents the risk of the first VOIP application using the VoIP lightweight process expansion capability to continue running in the background. The destruction of the VOIP lightweight process is not perceived by the user, avoiding a decline in user experience.

[0155] For example, as shown in FIG5A , after the notification management service displays the call notification of the VoIP call message 1, the called user (i.e., the user of the terminal device 100) can answer the VoIP call. The above-mentioned VoIP call method further includes a called party answering process, which includes but is not limited to part or all of steps S121 to S128.

[0156] S121. In response to the user's answering operation, the notification management service starts the answering service of the VoIP call management service.

[0157] As shown in Figure 5A, the Notification Management Service displays a call notification for VoIP call message 1 and detects a user's answer action. In response to the answer action, the Notification Management Service launches the VoIP Call Management Service's answering service. The call notification includes an answer button, which can be a touch operation such as clicking the answer button, or other operations such as voice, gesture, or using a connected Bluetooth headset. These operations are not specifically limited here.

[0158] S122. The answering service of the VoIP call management service creates a full-screen window and displays the answering landing page in the full-screen window.

[0159] In some embodiments, the answering landing page is non-transparent. In some embodiments, the answering landing page has a preset transparency and can be visually translucent. The answering landing page can be understood as a blank page.

[0160] S123. The answering service of the VoIP call management service calls the answering loading module of the VoIP lightweight process in the answering landing page.

[0161] S124. The answering loading module calls the VoIP lightweight process 1 of the first VoIP application through the cross-process loading mechanism.

[0162] In some embodiments, in step S121, the notification management service sends the message ID of the VoIP call message 1 to the answering service of the VoIP call management service; in step S122, the answering service creates a full-screen window corresponding to the message ID; in step S123, the answering service sends the message ID to the answering loading module, and the answering loading module calls the VoIP lightweight process 1 corresponding to the message ID to the first VoIP application through the cross-process loading mechanism.

[0163] S125 . VoIP lightweight process 1 loads the answering page of VoIP call message 1 , and the answering page displays that the VoIP call is in progress.

[0164] In some embodiments, the display content of the answering page may include one or more of the following: caller's avatar and name, call duration, hang-up button, etc. It is understood that the call duration and hang-up button can be used to indicate that a VoIP call is in progress.

[0165] S126. Through the cross-process loading mechanism, the answering loading module renders the answering page into the answering landing page.

[0166] S127. The answering loading module displays the answering landing page after rendering the answering page.

[0167] In some embodiments, the cross-process loading mechanism constrains the first VoIP application to display the answering page in accordance with the specifications of the full-screen answering landing page and perform subsequent hang-up processing. As shown in Figure 5B, when the first VoIP application is running in the background, the cross-process loading mechanism is used, and the answering loading module renders the answering page loaded by the VoIP lightweight process 1 to the full-screen answering landing page, and displays the rendered page; after displaying, from the user's visual point of view, the call notification displayed by the terminal device 100 is switched to the answering page 14, and the user cannot perceive the answering landing page. It can be understood that if the answering page is not loaded successfully, the user can see a non-transparent page covering the screen.

[0168] S128 . When the VoIP lightweight process 1 of the first VoIP application loads the answering page, it performs a call operation with the application server 200 for the VoIP call message 1 . The call operation is used to implement a VoIP call with the caller of the VoIP call message 1 .

[0169] Specifically, VoIP lightweight process 1 communicates with application server 200 via a pre-established persistent connection to establish a VoIP call with the caller of VoIP call message 1. In one implementation, the call execution operation includes: VoIP lightweight process 1 sending a confirmation message to application server 200 to instruct the user to confirm the call; application server 200 sending a confirmation message to the caller's terminal device 400; the first VoIP application on terminal device 400 collects the caller's audio and video data and sends it to VoIP lightweight process 1 on terminal device 100 via application server 200. VoIP lightweight process 1 then plays the caller's audio and video data on the answering page; and simultaneously, terminal device 100 collects the called user's audio and video data and sends it to the first VoIP application on terminal device 400 via application server 200.

[0170] 5C and 5D illustrate exemplary user interfaces for a user to answer a VoIP call.

[0171] Taking the call notification shown in FIG5C as an example, when the user clicks the answer button 205, the call notification displayed on the terminal device 100 changes to the answer page 14, which includes a hang-up button 207 and a real-time call duration 208. The user can conduct a VoIP voice call with the caller through the answer page 14. It is understood that if the caller is making a video call, the user can conduct a VoIP video call with the caller through the answer page.

[0172] By implementing the embodiments of this application, the cross-process loading capability of the answering loading module of the VoIP lightweight process allows the answering page of the VoIP lightweight process to be rendered into the answering landing page of the VoIP call management service when the user answers the call. To the user, the answering page still appears to be displayed within the original VoIP application. This maintains the user experience consistent with "launching the main application process to answer the call" without launching the main application process.

[0173] For example, as shown in FIG6 , after the notification management service displays the call notification of the VoIP call message 1, the called user (i.e., the user of the terminal device 100) can reject the VoIP call. The above-mentioned VoIP call method further includes a called party rejection process, which includes but is not limited to part or all of steps S131 to S140.

[0174] S131. The VoIP lightweight process 1 of the first VOIP application registers a rejection callback interface with the VoIP call management service.

[0175] In some embodiments, after the first VoIP application reports the incoming call information 1 of the VoIP call message 1 to the VoIP call management service in the VoIP lightweight process 1 in step S111, the first VoIP application also registers a rejection callback interface with the VoIP call management service in the VoIP lightweight process 1, i.e., creates a rejection callback interface for the VoIP call management service. In some embodiments, after the first VoIP application starts the VoIP lightweight process 1, it registers the rejection callback interface with the VoIP call management service.

[0176] S132: After detecting a user's rejection operation or a deletion operation for deleting a call notification, the notification management service calls a rejection service of the VoIP call management service.

[0177] In some embodiments, when the notification management service displays a call notification for a VoIP call message 1, it detects a user's rejection or deletion operation; in response to the rejection or deletion operation, the notification management service launches the rejection service of the VoIP call management service. The call notification includes a rejection button, and the rejection operation can be a touch operation of clicking the rejection button, or an operation by another party, such as a rejection operation implemented by voice, gesture, or a connected Bluetooth headset, which is not specifically limited here. The deletion operation can be an upward, left, or right swipe operation on the call notification, or other operations, which are not specifically limited here.

[0178] S133. The rejection service of the VoIP call management service instructs the management service to delete the call notification.

[0179] After the notification management service deletes the above call notification, the terminal device 100 stops displaying the call notification.

[0180] S134. The rejection service of the VoIP call management service calls the rejection callback interface of the VoIP lightweight process 1 and executes the rejection callback.

[0181] In the embodiment of the present application, the execution order of steps S133 and S134 is not specifically limited.

[0182] S135 . The VoIP lightweight process 1 of the first VoIP application performs a rejection process in the rejection callback.

[0183] S136 . The VoIP lightweight process 1 of the first VoIP application sends a rejection status to the application server 200 to instruct the user to reject the VoIP call corresponding to the VoIP call message 1 .

[0184] In this embodiment of the present application, the order in which steps S135 and S136 are executed is not specifically limited. In one implementation, the first VoIP application can perform a rejection process in the rejection callback and simultaneously communicate with application server 200 to inform application server 200 of the rejection status of VoIP call message 1. In one implementation, in step S136, along with the rejection status, VoIP lightweight process 1 also sends the message ID of VoIP call message 1 to application server 200 to indicate that the rejection status is specific to VoIP call message 1.

[0185] S137. The VoIP call management service reports the rejection status to the lightweight process management service.

[0186] S138. The lightweight process management service instructs the destruction of the VoIP lightweight process 1 of the first VoIP application.

[0187] S139: The VoIP lightweight process 1 of the first VoIP application performs pre-destruction processing.

[0188] S140: The lightweight process management service destroys the VoIP lightweight process 1.

[0189] For the specific implementation of steps S138 to S140, please refer to the relevant description of the aforementioned steps S117 to S119, which will not be repeated here.

[0190] By implementing the embodiment of the present application, the VoIP lightweight process can be destroyed in time after the user rejects the call, thereby reducing the waste of device power consumption and memory caused by the continued operation of the VoIP lightweight process after the rejection.

[0191] For example, as shown in FIG7 , when the notification management service displays a call notification of VoIP call message 1, the caller can proactively cancel the VoIP call, and the called party may not answer the call for a long time. The above-mentioned VoIP call method further includes a missed call process, which includes but is not limited to some or all of steps S141 to S146.

[0192] S141: Upon detecting that the caller cancels the VoIP call or the called user does not answer the call for a long time, the VoIP lightweight process 1 of the first VoIP application reports the missed call status to the VoIP call management service.

[0193] In some embodiments, when the caller cancels the VoIP call, the caller's terminal device 400 sends a second message to the application server 200 to instruct the caller to cancel the VoIP call; the application server 200 sends a cancellation message to the VoIP lightweight process 1 of the first VoIP application; based on the above second message, the VoIP lightweight process 1 of the first VoIP application reports the unanswered status to the VoIP call management service.

[0194] In some embodiments, within the first period after reporting the incoming call information 1 in step S111, if the VoIP lightweight process 1 does not load the answering page and perform a rejection process, it is determined to report the unanswered state to the VoIP call management service.

[0195] S142. Based on the unanswered state, the VoIP call management service instructs the notification management service to delete the call deletion notification.

[0196] In some embodiments, based on the missed call status, the VoIP call management service further generates a missed call notification for the VoIP call message 1 and instructs the notification management service to display the missed call notification.

[0197] S143. Based on the unanswered state, the VoIP call management service reports the unanswered state to the lightweight process management service.

[0198] S144: Based on the unanswered state, the lightweight process management service instructs the destruction of the VoIP lightweight process 1 of the first VoIP application.

[0199] S145 , the VoIP lightweight process 1 of the first VoIP application performs pre-destruction processing.

[0200] S146. The lightweight process management service destroys the VoIP lightweight process 1.

[0201] For the specific implementation of steps S144 to S146, please refer to the relevant description of the aforementioned steps S117 to S119, which will not be repeated here.

[0202] When implementing the embodiment of the present application, when the terminal device 100 displays a VoIP call notification, if the caller cancels the VoIP call or the called user does not answer the call for a long time, the VoIP lightweight process of the first VoIP application can be destroyed in time, thereby managing the life cycle of the VOIP lightweight process when the VoIP call is not connected, and avoiding the VoIP lightweight process from continuing to run when the call is not answered for a long time, thereby wasting device power consumption and memory.

[0203] For example, as shown in FIG8 , after the called user answers the VoIP call, the called user or the caller can hang up the VoIP call during the VoIP call. The above-mentioned VoIP call method further includes a call hanging-up process, which includes but is not limited to part or all of steps S151 to S157.

[0204] S151 . After detecting a hang-up operation of the called user or a caller hanging up the VoIP call, the first VoIP application destroys the answering page of the VoIP lightweight process 1 .

[0205] It can be understood that after detecting the hang-up operation of the called user or the caller hanging up the VoIP call, the VoIP lightweight process 1 stops loading the answering page.

[0206] S152: The VoIP lightweight process 1 of the first VoIP application reports a hang-up status to the VoIP call management service.

[0207] In some embodiments, if the caller hangs up the VoIP call during a VoIP call, the caller's terminal device 400 sends a first message to the application server 200 to instruct the caller to hang up the VoIP call; the application server 200 sends a first message to the VoIP lightweight process 1 of the first VoIP application; based on the above first message, the VoIP lightweight process 1 of the first VoIP application destroys the answering page and reports the hang-up status to the VoIP call management service.

[0208] In some embodiments, when the VoIP lightweight process 1 loads the answering page, it detects a user's hang-up operation. In response to the hang-up operation, the VoIP lightweight process 1 destroys the answering page and reports the hang-up status to the VoIP call management service. Referring to the answering page 14 shown in FIG5D , the hang-up operation can be clicking the hang-up button 207 on the answering page 14, or other operations, which are not specifically limited here.

[0209] S153. Based on the above hang-up state, the answering loading module of the VoIP lightweight process of the VoIP call management service destroys the answering landing page.

[0210] It can be understood that after the answering landing page is destroyed, the terminal device 100 stops displaying the answering page. At this time, the VoIP call has been hung up in the user's visual perception.

[0211] S154. Based on the above hang-up status, the VoIP call management service reports the hang-up status to the lightweight process management service.

[0212] S155 . Based on the above hang-up state, the lightweight process management service instructs to destroy the VoIP lightweight process 1 .

[0213] S156 : The VoIP lightweight process 1 of the first VoIP application performs pre-destruction processing.

[0214] S157. The lightweight process management service destroys the VoIP lightweight process 1.

[0215] For the specific implementation of steps S155 to S157, please refer to the relevant description of the aforementioned steps S117 to S119, which will not be repeated here.

[0216] By implementing the embodiment of the present application, when a user conducts a VoIP call after answering a VoIP call, if the called user or the caller can hang up the VoIP call, the VoIP lightweight process of the first VoIP application can be destroyed in a timely manner, thereby managing the life cycle of the VoIP lightweight process after the VoIP call is hung up, and avoiding the waste of device power consumption and memory caused by the VoIP lightweight process after hanging up.

[0217] As shown in FIG9 , in combination with the aforementioned embodiments, the present application provides a VoIP call method, which is applied to an electronic device and may include steps S201 to S204 . The specific implementation of the method may refer to the relevant description of the aforementioned embodiments. The electronic device may be the aforementioned terminal device 100 .

[0218] S201: Receive a VoIP call message sent by an application server of a first VoIP application through a push server, where the VoIP call message is used to request a VoIP call.

[0219] S202: Start a first VoIP lightweight process of a first VoIP application, and provide a VoIP call message to the first VoIP lightweight process.

[0220] The VoIP call message may be the aforementioned VoIP call message 1, and the first VoIP lightweight process may be the aforementioned VoIP lightweight process 1.

[0221] S203: Display a call notification based on the VoIP call message obtained by the first VoIP lightweight process.

[0222] For example, referring to the relevant descriptions of FIG. 4A to FIG. 4C , when the VoIP call message is used to request a voice call, the electronic device may display a call notification of the VoIP call message on the current lock screen interface or non-lock screen interface.

[0223] S204: The first VoIP lightweight process establishes a persistent connection with the application server.

[0224] The long connection may be a call connection for implementing a VoIP call service.

[0225] In one implementation, after displaying the call notification based on the VoIP call message obtained by the first VoIP lightweight process, the process further includes: receiving a first operation, the first operation being for answering the VoIP call; in response to the first operation, the first VoIP lightweight process loading a VoIP call answering page; displaying the answering page; and, based on the persistent connection, the first VoIP lightweight process executing a call operation with the application server. The first operation may be the aforementioned answering operation. For example, referring to the description related to FIG. 5A , after the called user answers the VoIP call, the called user answering process may be implemented using the first VoIP lightweight process. Referring to the description related to FIG. 5C and FIG. 5D , the call notification includes an answer button, the first operation may be clicking the answer button 205, and the answering page may be the answering page 14. The aforementioned call operation is used to initiate a VoIP call with the caller of the VoIP call message.

[0226] In one implementation, after the first VoIP lightweight process executes a call operation with the application server, the process further includes: receiving a second operation for hanging up the VoIP call; in response to the second operation, destroying the first VoIP lightweight process and stopping displaying the answering page. The second operation may be the aforementioned hang-up operation. For example, referring to the description related to FIG8 , after the called user hangs up the VoIP call, the first VoIP lightweight process is promptly destroyed; referring to the description related to FIG5D , the answering page includes a hang-up button 207, and the second operation may be clicking the hang-up button 207.

[0227] In one implementation, after the first VoIP lightweight process and the application server perform a call operation in response to the VoIP call message, the process further includes: receiving a first message from the application server, the first message being used to instruct the caller to hang up the VoIP call; and, based on the first message, destroying the first VoIP lightweight process and stopping displaying the answer page. For example, referring to the description related to FIG. 8 , after the caller hangs up the VoIP call, the first VoIP lightweight process is promptly destroyed.

[0228] In one implementation, after displaying the call notification based on the VoIP call message obtained by the first VoIP lightweight process, the process further includes: receiving a third operation, the third operation being used to reject the VoIP call corresponding to the VoIP call message or to delete the call notification; and destroying the first VoIP lightweight process in response to the third operation. The third operation may be the aforementioned reject operation. For example, referring to the description related to FIG6 , after the called user rejects the VoIP call, the first VoIP lightweight process is promptly destroyed; referring to the description related to FIG4A to FIG4C , the call notification includes a reject button 204, and the third operation may be clicking the reject button 204.

[0229] In one implementation, after displaying the call notification based on the VoIP call message obtained by the first VoIP lightweight process, the method further includes: upon detecting that the user has not answered the VoIP call within a first time period, destroying the first VoIP lightweight process. For example, referring to the description related to FIG. 7 , if the called user has not answered the VoIP call for an extended period of time, the first VoIP lightweight process is promptly destroyed.

[0230] In one implementation, after the first VoIP lightweight process and the application server perform a call operation in response to the VoIP call message, the process further includes: receiving a second message from the application server, the second message being used to instruct the caller to cancel the VoIP call; and destroying the first VoIP lightweight process based on the second message. For example, referring to the description related to FIG. 7 , after the caller cancels the VoIP call, the first VoIP lightweight process is promptly destroyed.

[0231] In one implementation, the first VoIP lightweight process is independent of the main application process of the first VoIP application.

[0232] In one implementation, the electronic device includes an API blacklist, and the first VoIP lightweight process is prohibited from calling APIs in the API blacklist. In another implementation, the electronic device may also include an API whitelist, and the API whitelist controls the APIs that the first VoIP lightweight process can call. For details, please refer to the relevant description of step S107.

[0233] In one implementation, before destroying the first VoIP lightweight process, the method further includes: the first VoIP lightweight process performs pre-destruction processing. For details, please refer to the description of the aforementioned step S118.

[0234] In one implementation, the electronic device also includes a push service, a lightweight process management service, a VoIP call management service and a notification management service. The above-mentioned receiving the VoIP call message sent by the application server of the first VoIP application through the push server includes: the push service receives the VoIP call message sent by the application server through the push server; the push service sends the VoIP call message to the lightweight process management service; the above-mentioned starting the first VoIP lightweight process of the first VoIP application and providing the VoIP call message to the first VoIP lightweight process includes: the lightweight process management service starts the first VoIP lightweight process of the first VoIP application and sends the VoIP call message to the first VoIP lightweight process; the above-mentioned display of the call notification based on the VoIP call message obtained by the first VoIP lightweight process includes: the first VoIP lightweight process sends the incoming call information of the VoIP call message to the VoIP call management service; the VoIP call management service instructs the notification management service to display the call notification of the VoIP call message based on the incoming call information.

[0235] For example, referring to the relevant description of Figure 4A, after the VoIP call message is sent to the Push service of the electronic device through the Push server 300, the VoIP lightweight process of the first VoIP application can be started using the lightweight process management service, and the call notification can be displayed using the VoIP call management service and the notification management service; the user experience can be kept consistent with the user experience of "pulling up the application main process to answer the call", but avoiding pulling up the application main process, reducing device power consumption and required memory.

[0236] In one implementation, after the push service sends a VoIP call message to the lightweight process management service, it also includes: the lightweight process management service starts a first timer; after the first VoIP lightweight process sends the incoming call information of the VoIP call message to the VoIP call management service, it also includes: the VoIP call management service sends a call status to the lightweight process management service, and the call status is used to indicate that the incoming call information has been reported; before the first timer expires, if the lightweight process management service receives the call status, the lightweight process management service closes the first timer; before the first timer expires, if the lightweight process management service does not receive the call status, then when the first timer expires, the lightweight process management service destroys the first VoIP lightweight process.

[0237] The first timer may be the aforementioned lifecycle timer 1. For example, referring to the relevant description of FIG4A , the first timer may be used to limit the first VoIP application to calling the interface of the VoIP call management service within a specified time to report the incoming call information of the VoIP call message; otherwise, the VoIP lightweight process corresponding to the VoIP call message will be destroyed, thereby preventing the first VoIP application from maliciously executing the VoIP lightweight process in the background for a long time by using the VoIP call message.

[0238] In one implementation, after the above-mentioned push service sends a VoIP call message to the lightweight process management service, it also includes: the lightweight process management service sends a first indication message of the VoIP call message to the VoIP call management service; after the above-mentioned first VoIP lightweight process sends the incoming call information of the VoIP call message to the VoIP call management service, it also includes: the VoIP call management service verifies the legitimacy of the incoming call information based on the first indication information; the above-mentioned VoIP call management service instructs the notification management service to display the call notification of the VoIP call message based on the incoming call information, including: when the incoming call information is verified to be legitimate, the notification management service displays the call notification of the VoIP call message based on the incoming call information.

[0239] For example, referring to the relevant description of Figure 4A, the lightweight process management service informs the VoIP call management service of the VoIP call message in advance, so that the VoIP call management service can perform security verification on the incoming call information of the VoIP call message, thereby avoiding the first VoIP application maliciously requesting to display call notifications of abnormal processes.

[0240] In one implementation, in response to a first operation, a first VoIP lightweight process loads an answering page for a VoIP call, including: in response to the first operation, a notification management service calls an answering service of a VoIP call management service; the answering service creates a first window, and the first window includes a first page; the answering service calls an answering loading module in the first page; the answering loading module uses a cross-process loading mechanism to call the first VoIP lightweight process to load the answering page for the VoIP call, and renders the answering page onto the first page; the above-mentioned display of the answering page includes: displaying the first window.

[0241] The first window can be the aforementioned full-screen window, and the first page can be the aforementioned answering landing page. For example, referring to the relevant description of Figure 5A, after the called user answers the VoIP call, the VoIP call management service and the first VoIP lightweight process can implement the called user answering process using a cross-process loading mechanism. The user experience remains consistent with the user experience of "launching the main application process to answer the call," but without launching the main application process.

[0242] In one implementation, the above-mentioned destruction of the first VoIP lightweight process and stopping displaying the answering page in response to the second operation, or the above-mentioned destruction of the first VoIP lightweight process and stopping displaying the answering page based on the first message, includes: in response to the second operation or based on the second message, the first VoIP lightweight process destroys the answering page; the first VoIP lightweight process sends a hang-up status to the VoIP call management service; based on the hang-up status, the VoIP call management service destroys the first page and sends a hang-up status to the lightweight process management service; based on the hang-up status, the lightweight process management service destroys the first VoIP lightweight process.

[0243] For example, referring to the relevant description of Figure 8, after the called user or caller hangs up the VoIP call, the first VoIP lightweight process, VoIP call management service and lightweight process management service are used to complete the call hang-up process, and the first VoIP lightweight process is destroyed in time, avoiding the impact of the VoIP lightweight process on the device power consumption and memory after hanging up.

[0244] In one implementation, the above-mentioned destruction of the first VoIP lightweight process in response to the third operation includes: in response to the third operation, the notification management service calls the rejection service of the VoIP call management service; the rejection service instructs the notification management service to delete the call notification; the rejection service instructs the first VoIP lightweight process to reject the VoIP call message; the first VoIP lightweight process sends a rejection status to the lightweight process management service, and the rejection status is used to indicate the rejection of the VoIP call; based on the rejection status, the lightweight process management service destroys the first VoIP lightweight process.

[0245] For example, referring to the relevant description of Figure 6, after the called user rejects the VoIP call or deletes the call notification, the first VoIP lightweight process, VoIP call management service and lightweight process management service are used to implement the called rejection process, and the first VoIP lightweight process is destroyed in time, avoiding the impact of the VoIP lightweight process on the device power consumption and memory after the rejection.

[0246] In one implementation, the above-mentioned destroying of the first VoIP lightweight process when it is detected that the user has not answered the VoIP call within the first time period, or the above-mentioned destroying of the first VoIP lightweight process based on the second message, includes: when it is detected that the user has not answered the VoIP call within the first time period or based on the second message, the first VoIP lightweight process sends a not answered status to the VoIP call management service; based on the not answered status, the VoIP call management service instructs the notification management service to delete the call notification and sends a not answered status to the lightweight process management service; based on the not answered status, the lightweight process management service destroys the first VoIP lightweight process.

[0247] For example, referring to the relevant description of Figure 7, after the called user has not answered the VoIP call for a long time or the caller can actively cancel the call, the first VoIP lightweight process, VoIP call management service and lightweight process management service are used to implement the called party rejection process, and the first VoIP lightweight process is destroyed in time, avoiding the impact of the VoIP lightweight process on the device power consumption and memory after the call is not answered.

[0248] In one implementation, the method further includes: when the lightweight process management service starts the first VoIP lightweight process of the first VoIP application, loading the callable APIs other than the APIs in the API blacklist into the process space of the first VoIP lightweight process. For details, please refer to the description of step S107.

[0249] The following describes the structure of a terminal device 100 provided in an embodiment of the present application.

[0250] 10 shows a schematic structural diagram of a terminal device 100. The terminal device 100 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, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light 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.

[0251] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0252] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0253] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0254] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0255] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0256] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the terminal device 100.

[0257] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.

[0258] 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 a 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 calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0259] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.

[0260] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the terminal device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the terminal device 100.

[0261] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0262] The USB interface 130 is an interface that complies with USB standards and specifications, and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the terminal device 100, or to transfer data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as AR devices.

[0263] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative illustration and does not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt a different interface connection method from the above embodiments, or a combination of multiple interface connection methods.

[0264] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the terminal device 100. While charging the battery 142, the charging management module 140 can also power the electronic device through the power management module 141.

[0265] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0266] The wireless communication function of the terminal device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0267] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 can be used to cover a single or multiple 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 other embodiments, the antennas can be used in conjunction with a tuning switch.

[0268] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the terminal device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0269] The 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-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0270] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. applied to the terminal device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0271] In some embodiments, the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0272] The terminal device 100 implements display functions through a GPU, display screen 194, and an application processor. The GPU is a microprocessor for image processing that connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0273] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, terminal device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0274] The terminal device 100 can realize the shooting function through the ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0275] The ISP processes data fed back by camera 193. For example, when taking a photo, 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, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise and brightness. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.

[0276] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0277] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the terminal device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0278] Video codecs are used to compress or decompress digital video. Terminal device 100 may support one or more video codecs. This allows terminal device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0279] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in the terminal device 100, such as image recognition, face recognition, speech recognition, and text comprehension.

[0280] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0281] Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.; non-volatile memory may include disk storage devices and flash memory.

[0282] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle; single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage cell potential level; universal flash storage (UFS), embedded multi media card (eMMC), etc. according to the storage specification.

[0283] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.

[0284] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .

[0285] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the terminal device 100. The external non-volatile memory communicates with the processor 110 via the external memory interface 120 to implement data storage. For example, files such as music and videos can be stored in the external non-volatile memory.

[0286] The terminal device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0287] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.

[0288] The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The terminal device 100 can listen to music or listen to hands-free calls through the speaker 170A.

[0289] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the terminal device 100 receives a call or voice message, the user can hear the voice by placing the receiver 170B close to the ear.

[0290] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.

[0291] The headphone jack 170D is used to connect a wired headphone.

[0292] The pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc.

[0293] The gyro sensor 180B can be used to determine the motion posture of the terminal device 100. In some embodiments, the angular velocity of the terminal device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting.

[0294] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.

[0295] The magnetic sensor 180D includes a Hall sensor, and the terminal device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case.

[0296] The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in various directions (generally three axes).

[0297] The distance sensor 180F is used to measure distance. The terminal device 100 can measure distance by infrared or laser.

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

[0299] The ambient light sensor 180L is used to sense the brightness of the ambient light.

[0300] The fingerprint sensor 180H is used to collect fingerprints.

[0301] The temperature sensor 180J is used to detect temperature.

[0302] The touch sensor 180K is also called a "touch control device." The touch sensor 180K can be provided on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be provided on the surface of the terminal device 100, at a location different from that of the display screen 194.

[0303] The bone conduction sensor 180M can acquire vibration signals.

[0304] The buttons 190 include a power button, a volume button, etc. The buttons 190 can be mechanical buttons or touch buttons.

[0305] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.

[0306] The indicator 192 may be an indicator light, which may be used to indicate charging status, power level changes, messages, missed calls, notifications, etc.

[0307] The SIM card interface 195 is used to connect a SIM card.

[0308] The structure of the server provided in the embodiment of the present application is introduced below.

[0309] FIG11 exemplarily shows the structure of an application server 200 provided in an embodiment of the present application. The structure of the push server 300 can refer to the relevant description of the application server 200 and will not be described in detail later.

[0310] As shown in Figure 11, the application server 200 may include: one or more processors 1001, a memory 1002, a communication interface 1003, a transmitter 1005, a receiver 1006, a coupler 1007, and an antenna 1008. These components may be connected via a bus 1004 or other means, with Figure 11 using a bus connection as an example.

[0311] The communication interface 1003 can be used for the application server 200 to communicate with other communication devices, such as the terminal device 100. Specifically, the communication interface 1003 can be a 3G communication interface, a 4G communication interface, a 5G communication interface, or a communication interface of a future new air interface. Not limited to a wireless communication interface, the application server 200 can also be configured with a wired communication interface 1003, such as a local access network (LAN) interface. The transmitter 1005 can be used to transmit and process the signal output by the processor 1001. The receiver 1006 can be used to receive and process the mobile communication signal received by the antenna 1008.

[0312] In some embodiments of the present application, transmitter 1005 and receiver 1006 can be considered a wireless modem. In application server 200, the number of transmitters 1005 and receivers 1006 can be one or more. Antenna 1008 can be used to convert electromagnetic energy in a transmission line into electromagnetic waves in free space, or vice versa. Coupler 1007 is used to split the mobile communication signal received by antenna 1008 into multiple paths and distribute them to multiple receivers 1006.

[0313] Memory 1002 is coupled to processor 1001 and is used to store various software programs and / or multiple sets of instructions. Specifically, memory 1002 may include high-speed random access memory and may also include non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. Memory 1002 may store a network communication program that can be used to communicate with one or more additional devices, one or more terminal devices, or one or more network devices.

[0314] In some embodiments of the present application, the memory 1002 may be used to store an implementation program of the application distribution method provided in one or more embodiments of the present application on the application server 200 side. For implementation of the application distribution method provided in one or more embodiments of the present application, please refer to the above embodiments.

[0315] The processor 1001 may be configured to read and execute computer-readable instructions. Specifically, the processor 1001 may be configured to call a program stored in the memory 1002, such as an implementation program of the application distribution method provided in one or more embodiments of the present application on the application server 200 side, and execute the instructions contained in the program.

[0316] It should be noted that the application server 200 shown in FIG11 is only one implementation of the embodiment of the present application. In actual applications, the application server 200 may also include more or fewer components, which is not limited here.

[0317] For more details about the functions and working principles of the application server 200, please refer to the relevant content in the above embodiments and will not be repeated here.

[0318] The various implementation modes of this application can be combined arbitrarily to achieve different technical effects.

[0319] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented 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 herein are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0320] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described 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.

[0321] In short, the above description is only an embodiment of the technical solution of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent replacements, improvements, etc. made based on the disclosure of this application should be included in the scope of protection of this application.

Claims

1. A VoIP call method, applied to an electronic device, characterized in that, The electronic device includes a first VoIP application, and the method includes: Receiving a VoIP call message sent by an application server of the first VoIP application through a push server, where the VoIP call message is used to request a VoIP call; Starting a first VoIP lightweight process of the first VoIP application and providing the VoIP call message to the first VoIP lightweight process; Displaying a call notification based on the VoIP call message obtained by the first VoIP lightweight process; The first VoIP lightweight process establishes a long connection with the application server.

2. The method according to claim 1, wherein After displaying the call notification based on the VoIP call message obtained by the first VoIP lightweight process, it further includes: Receiving a first operation for answering the VoIP call; In response to the first operation, the first VoIP lightweight process loads an answering page for the VoIP call; Displaying the answering page; Based on the long connection, the first VoIP lightweight process and the application server perform a call operation.

3. The method according to claim 2, wherein After the first VoIP lightweight process and the application server perform a call operation, it further includes: Receiving a second operation for hanging up the VoIP call; In response to the second operation, destroying the first VoIP lightweight process and stopping displaying the answering page.

4. The method according to claim 2, wherein After the first VoIP lightweight process and the application server perform a call operation for the VoIP call message, it further includes: Receiving a first message sent by the application server, where the first message is used to instruct the caller to hang up the VoIP call; Based on the first message, destroying the first VoIP lightweight process and stopping displaying the answering page.

5. The method according to claim 1, wherein After displaying the call notification based on the VoIP call message obtained by the first VoIP lightweight process, it further includes: Receiving a third operation for rejecting the VoIP call corresponding to the VoIP call message or deleting the call notification; In response to the third operation, destroying the first VoIP lightweight process.

6. The method according to claim 1, characterized in that After displaying the call notification based on the VoIP call message obtained by the first VoIP lightweight process, it further includes: When it is detected that the user does not answer the VoIP call within a first duration, destroying the first VoIP lightweight process.

7. The method according to claim 1, wherein After the first VoIP lightweight process and the application server perform a call operation for the VoIP call message, it further includes: Receiving a second message sent by the application server, where the second message is used to instruct the caller to cancel the call for the VoIP call; Based on the second message, destroying the first VoIP lightweight process.

8. The method according to any one of claims 1 to 7, characterized in that, The first VoIP lightweight process is independent of the application main process of the first VoIP application.

9. The method according to any one of claims 1 to 7, characterized in that, The electronic device includes an API blacklist, and the first VoIP lightweight process is prohibited from calling the APIs in the API blacklist.

10. The method according to any one of claims 1 to 7, characterized in that, Before destroying the first VoIP lightweight process, it further includes: The first VoIP lightweight process performs pre-destruction processing.

11. The method according to any one of claims 1 to 10, characterized in that, The electronic device further includes a push service, a lightweight process management service, a VoIP call management service, and a notification management service. The receiving of the VoIP call message sent by the application server of the first VoIP application through the push server includes: The push service receives the VoIP call message sent by the application server through the push server; The push service sends the VoIP call message to the lightweight process management service; The starting of the first VoIP lightweight process of the first VoIP application and providing the VoIP call message to the first VoIP lightweight process includes: The lightweight process management service starts the first VoIP lightweight process of the first VoIP application and sends the VoIP call message to the first VoIP lightweight process; The displaying of the call notification based on the VoIP call message obtained by the first VoIP lightweight process includes: The first VoIP lightweight process sends the incoming call information of the VoIP call message to the VoIP call management service; The VoIP call management service instructs the notification management service to display the call notification of the VoIP call message based on the incoming call information.

12. The method according to claim 11, wherein After the push service sends the VoIP call message to the lightweight process management service, it further includes: The lightweight process management service starts a first timer; After the first VoIP lightweight process sends the incoming call information of the VoIP call message to the VoIP call management service, it further includes: The VoIP call management service sends a call status to the lightweight process management service, and the call status is used to indicate that the incoming call information has been reported; Before the first timer times out, if the lightweight process management service receives the call status, the lightweight process management service closes the first timer; Before the first timer times out, if the lightweight process management service does not receive the call status, when the first timer times out, the lightweight process management service destroys the first VoIP lightweight process.

13. The method according to claim 11, wherein After the push service sends the VoIP call message to the lightweight process management service, it further includes: The lightweight process management service sends first indication information of the VoIP call message to the VoIP call management service; After the first VoIP lightweight process sends the incoming call information of the VoIP call message to the VoIP call management service, it further includes: The VoIP call management service verifies the legitimacy of the incoming call information according to the first indication information; The VoIP call management service instructs the notification management service to display the call notification of the VoIP call message based on the incoming call information, including: When the incoming call information is verified to be legal, the notification management service displays the call notification of the VoIP call message based on the incoming call information.

14. The method according to claim 11, wherein In response to the first operation, the first VoIP lightweight process loads the answering page of the VoIP call, including: In response to the first operation, the notification management service invokes the answer service of the VoIP call management service; The answer service creates a first window, and the first window includes a first page; The answer service invokes an answer loading module in the first page; The answer loading module uses a cross-process loading mechanism to invoke the first VoIP lightweight process to load the answer page of the VoIP call, and renders the answer page onto the first page; The displaying of the answer page includes: Displaying the first window.

15. The method according to claim 11, wherein The responding to the second operation to destroy the first VoIP lightweight process and stop displaying the answer page, or the destroying of the first VoIP lightweight process and stopping displaying the answer page based on the first message, includes: In response to the second operation or based on the second message, the first VoIP lightweight process destroys the answer page; The first VoIP lightweight process sends a hang-up status to the VoIP call management service; Based on the hang-up status, the VoIP call management service destroys the first page and sends the hang-up status to the lightweight process management service; Based on the hang-up status, the lightweight process management service destroys the first VoIP lightweight process.

16. The method according to claim 11, wherein The responding to the third operation to destroy the first VoIP lightweight process includes: In response to the third operation, the notification management service invokes the reject service of the VoIP call management service; The reject service instructs the notification management service to delete the call notification; The reject service instructs the first VoIP lightweight process to perform a reject process on the VoIP call message; The first VoIP lightweight process sends a reject status to the lightweight process management service, and the reject status is used to indicate rejecting the VoIP call; Based on the reject status, the lightweight process management service destroys the first VoIP lightweight process.

17. The method according to claim 11, wherein The destroying of the first VoIP lightweight process when it is detected that the user does not answer the VoIP call within the first duration, or the destroying of the first VoIP lightweight process based on the second message, includes: When it is detected that the user does not answer the VoIP call within the first duration or based on the second message, the first VoIP lightweight process sends an unanswered status to the VoIP call management service; Based on the unanswered status, the VoIP call management service instructs the notification management service to delete the call notification and sends the unanswered status to the lightweight process management service; Based on the unanswered status, the lightweight process management service destroys the first VoIP lightweight process.

18. The method according to claim 11, characterized in that, It further includes: When the lightweight process management service starts the first VoIP lightweight process of the first VoIP application, it loads the callable APIs other than the APIs in the API blacklist into the process space of the first VoIP lightweight process.

19. An electronic device, characterized in that, It includes: A processor and a memory, the memory being coupled to the processor, the memory being configured to store computer program code, the computer program code including computer instructions, when the processor reads the computer instructions from the memory, so that the electronic device executes the VoIP call method as claimed in claims 1 to 18.

20. A computer-readable storage medium, characterized in that, Including computer instructions, when the computer instructions are run on a terminal device, so that the electronic device executes the VoIP call method as claimed in claims 1 to 18.

Citation Information

Patent Citations

  • VoIP call method and related device

    CN120238525A

  • VoIP (Voice over Internet Protocol) network-based method for realizing overlength SIP (session initiation protocol) protocol signaling package transmission

    CN102394891A

  • Method for optimizing network topology of lightweight VoIP (voice over Internet protocol) system

    CN102946444A

  • VOIP (voice over internet phone) based automatic call testing method

    CN103297292A

  • Configuration and method for controlling voice connection

    CN103354547A