VoIP call method and related device

By starting a lightweight process in the VoIP application background to establish a long connection with the application server, the high power consumption and high memory problems during the VoIP application background are solved, and low-cost VoIP calls are achieved, maintaining the consistency of the user experience.

CN120238525APending Publication Date: 2025-07-01HUAWEI TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410042257.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-12-29
Filing Date
2024-01-10
Publication Date
2025-07-01

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.

Method used

By starting a VoIP lightweight process, receiving VoIP call messages and establishing a long connection with the application server, VoIP calls are realized without pulling up the main application process.

Benefits of technology

It reduces device power consumption and memory usage, maintains consistency of user experience, avoids unnecessary operation of VoIP lightweight processes in different scenarios, and improves system efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120238525A_ABST
    Figure CN120238525A_ABST
Patent Text Reader

Abstract

The present application discloses a VoIP call method and a related device, applied to an electronic device, the method comprising: receiving a VoIP call message sent by an application server of a first VoIP application through a push server, the VoIP call message being used for requesting 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 a VoIP call message obtained by the first VoIP lightweight process; and the first VoIP lightweight process establishes a long connection with the application server. Therefore, the VoIP call can be realized with lower power consumption and memory cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic technologies, and in particular, to a VoIP call method and related devices. Background Art

[0002] With the development of the mobile Internet and the improvement of people's living standards, more and more users use terminal devices such as mobile phones to make calls. Calls between mobile phones can be operator calls implemented through the operator network, or can be Internet Protocol (VoIP) calls implemented through the Internet. An application capable of implementing VoIP calls (this application can be abbreviated as a VoIP application) can be installed in a mobile phone; when the VoIP application is running in the foreground, a long connection can be established with an application server to perform end-cloud call communication, and VoIP calls between users can be implemented through the application server; when the VoIP application switches to the background, the system of the terminal device will freeze or directly destroy the process of the application from the perspective of device power consumption, and at this time, the VoIP application cannot communicate with the application server.

[0003] Currently, when the VoIP application switches to the background, how to implement VoIP calls at a lower cost remains to be studied. Summary of the Invention

[0004] Embodiments of this application provide a VoIP call method and related devices, which can implement VoIP calls with lower power consumption and memory costs.

[0005] In a first aspect, this application provides a VoIP call method applied to an electronic device. The electronic device includes a first VoIP application. 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; and establishing a long connection between the first VoIP lightweight process and the application server. By implementing the embodiments of this application, after receiving the VoIP call message through the push server, the VoIP lightweight process is started, and a long connection is established between the VoIP lightweight process and the application server to implement a VoIP call, without starting the main application process. In this way, VoIP calls can be implemented with lower device power consumption and memory costs.

[0006] In one implementation, after the VoIP call message obtained based on the first VoIP lightweight process displays a call notification, 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 answer page for the VoIP call; displaying the answer page; and based on the long connection, the first VoIP lightweight process performs a call operation with the application server. Implementing the embodiments of the present application, after the user answers the VoIP call, the answer page is loaded by the VoIP lightweight process, and the VoIP call is made based on the long connection created by the VoIP lightweight process. In this way, the user experience remains consistent with that of "pulling up the main application process for answering", but the pulling up of the main application process is avoided, reducing the device power consumption and required memory.

[0007] In one implementation, after the above-mentioned first VoIP lightweight process performs a call operation with the application server, 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 the display of the answer page. Implementing the embodiments of the present application, after the called user hangs up the VoIP call, the VoIP lightweight process is destroyed in a timely manner. In this way, the waste of device power consumption and memory caused by the continuous operation of the VoIP lightweight process after the called user hangs up the VoIP call is avoided.

[0008] In one implementation, after the above-mentioned first VoIP lightweight process and the application server perform a call operation on the VoIP call message, it further includes: receiving a first message sent by the application server for instructing the caller to hang up the VoIP call; based on the first message, destroying the first VoIP lightweight process and stopping the display of the answer page. Implementing the embodiments of the present application, after the caller hangs up the VoIP call, the VoIP lightweight process is destroyed in a timely manner. In this way, the waste of device power consumption and memory caused by the continuous operation of the VoIP lightweight process after the caller hangs up the VoIP call is avoided.

[0009] In one implementation, after the VoIP call message obtained based on the first VoIP lightweight process displays a call notification, 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. Implementing the embodiments of the present application, after the called user rejects the VoIP call, the VoIP lightweight process is destroyed in a timely manner. In this way, the waste of device power consumption and memory caused by the continuous operation of the VoIP lightweight process after the called user rejects the VoIP call is avoided.

[0010] In one implementation, after the VoIP call message obtained based on the first VoIP lightweight process displays a call notification, it further includes: when it is detected that the user does not answer the VoIP call within the first duration, destroying the first VoIP lightweight process. Implementing the embodiments of the present application, when the called user does not answer the VoIP call for a long time, the VoIP lightweight process is destroyed in a timely manner. In this way, it avoids the waste of device power consumption and memory caused by the continuous operation of the VoIP lightweight process when the VoIP call is not answered for a long time.

[0011] In one implementation, after the above-mentioned first VoIP lightweight process and the application server perform a call operation on 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 to the VoIP call; based on the second message, destroying the first VoIP lightweight process. Implementing the embodiments of the present application, after the caller cancels the call, the VoIP lightweight process is destroyed in a timely manner. In this way, it avoids the waste of device power consumption and memory caused by the continuous operation of the VoIP lightweight process after the caller cancels the call.

[0012] In one implementation, the first VoIP lightweight process is independent of the application main process of the first VoIP application. Implementing the embodiments of the present application, when starting the VoIP lightweight process, there is no need to start the application process, and using the VoIP lightweight process to implement VoIP calls reduces device power consumption and the required memory.

[0013] In one implementation, the electronic device includes an API blacklist, and the first VoIP lightweight process is prohibited from calling the APIs in the API blacklist. Implementing the embodiments of the present application, by managing the API blacklist, the behavior of the first VoIP application in the VoIP lightweight process can be restricted, and it can be specified that the first VoIP application cannot perform operations unrelated to VoIP calls.

[0014] In one implementation, before destroying the first VoIP lightweight process, it further includes: the first VoIP lightweight process performs pre-destruction processing. Implementing the embodiments of the present application, through the pre-destruction processing, important data loss is avoided.

[0015] In one implementation, the electronic device further includes a push service, a lightweight process management service, a VoIP call management service, and a notification management service. The application server that receives the first VoIP application receives the VoIP call message sent by the push server, including: 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; starting the first VoIP lightweight process of the first VoIP application and providing the VoIP call message to the first VoIP lightweight process, including: 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; based on the VoIP call message obtained by the first VoIP lightweight process to display a call notification, including: 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. Implementing the embodiments of the present application, after the VoIP call message is sent to the Push service of the electronic device through the push server, the lightweight process management service can be used to start the VoIP lightweight process of the first VoIP application, and the VoIP call management service and the notification management service are used to display the call notification; in terms of user experience, it can be kept consistent with the user experience of "pulling up the main process of the application to answer", but at the same time, pulling up the main process of the application is avoided, reducing the device power consumption and the required memory.

[0016] In one implementation, after the push service sends the VoIP call message to the lightweight process management service, it further includes: the lightweight process management service starts the 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 the 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. Implementing the embodiments of the present application, the first timer can be used to limit that the first VoIP application must call the interface of the VoIP call management service to report the incoming call information of the VoIP call message within a specified time, otherwise the VoIP lightweight process corresponding to the VoIP call message will be destroyed, avoiding the first VoIP application from maliciously executing the VoIP lightweight process in the background for a long time using the VoIP call message.

[0017] In one implementation, after the above push service sends a VoIP call message to the lightweight process management service, it further includes: the lightweight process management service sending first indication information of the VoIP call message to the VoIP call management service; after the above 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 verifying the legitimacy of the incoming call information according to the first indication information; the above VoIP call management service instructing the notification management service to display a 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 displaying a call notification of the VoIP call message based on the incoming call information. Implementing the embodiments of the present application, the lightweight process management service notifies the VoIP call management service of the VoIP call message in advance, facilitating the VoIP call management service to perform security verification on the incoming call information of the VoIP call message, thereby avoiding the first VoIP application maliciously requesting to display a call notification of an abnormal process.

[0018] In one implementation, in response to a first operation, the first VoIP lightweight process loads an answering page for a VoIP call, including: in response to the first operation, the notification management service calling an answering service of the VoIP call management service; the answering service creating a first window, the first window including a first page; the answering service calling an answering loading module in the first page; the answering loading module using a cross-process loading mechanism to call the first VoIP lightweight process to load the answering page for the VoIP call and rendering the answering page onto the first page; the above displaying the answering page including: displaying the first window. Implementing the embodiments of the present application, after the called user answers the VoIP call, through the cross-process loading ability of the answering loading module of the VoIP lightweight process, when the user answers, the answering page of the VoIP lightweight process can be rendered onto the first page of the VoIP call management service for display, and to the user it still looks like the answering page is being displayed within the first VoIP application. In this way, the user experience remains consistent with that of "pulling up the main process of the application to answer", but the pulling up of the main process of the application is avoided, reducing the device power consumption and required memory.

[0019] In one implementation, in response to the second operation, the first VoIP lightweight process is destroyed, and the answering page display is stopped. Alternatively, based on the first message, the first VoIP lightweight process is destroyed, and the answering page display is stopped, including: 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 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. Implementing the embodiments of the present application, after the called user or the caller hangs up the VoIP call, the first VoIP lightweight process is timely destroyed by using the VoIP call management service and the lightweight process management service, avoiding the impact of the VoIP lightweight process on the device power consumption and memory after hanging up.

[0020] In one implementation, in response to the third operation, the first VoIP lightweight process is destroyed, including: in response to the third operation, the management service is notified to call the reject service of the VoIP call management service; the reject service instructs the 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. Implementing the embodiments of the present application, after the called user rejects the VoIP call or deletes the call notification, the first VoIP lightweight process is timely destroyed by using the VoIP call management service and the lightweight process management service, avoiding the impact of the VoIP lightweight process on the device power consumption and memory after rejection.

[0021] In one implementation, when it is detected that the user does not answer the VoIP call within the first duration, the first VoIP lightweight process is destroyed. Alternatively, based on the second message, the first VoIP lightweight process is destroyed, including: 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 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. Implementing the embodiments 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 first VoIP lightweight process is timely destroyed by using the VoIP call management service and the lightweight process management service, avoiding the impact of the VoIP lightweight process on the device power consumption and memory after non-answer.

[0022] In one implementation, the above 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. Implementing the embodiments of the present application, by managing the API blacklist, the behavior of the first VoIP application in the VoIP lightweight process can be restricted, and the first VoIP application can be restricted from performing operations unrelated to VoIP calls.

[0023] In a second aspect, the present application provides a VoIP call method applied to an electronic device. 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, where 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 the 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 a call notification of the VoIP call message based on the incoming call information. Implementing the embodiments of the present application, after the VoIP call message is sent to the Push service of the electronic device through the push server, the lightweight process management service can start the VoIP lightweight process of the first VoIP application, and the VoIP call management service and the notification management service are used to display the call notification; in terms of user experience, it can be consistent with the user experience of "pulling up the main process of the application to answer", but the pulling up of the main process of the application is avoided, reducing the device power consumption and the required memory.

[0024] In one implementation, the lightweight process management service is provided with an application programming interface (API) blacklist, and when the lightweight process management service starts the first VoIP lightweight process, it prohibits the first VoIP lightweight process from calling the APIs in the API blacklist. Implementing the embodiments of the present application, by managing the API blacklist, the behavior of the first VoIP application in the VoIP lightweight process can be restricted, and the first VoIP application can be restricted from performing operations unrelated to VoIP calls.

[0025] 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, 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. Implementing the embodiments of the present application, the first timer can be used to limit that the first VoIP application must call the interface of the VoIP call management service to report the incoming call information of the VoIP call message within a specified time, otherwise the VoIP lightweight process corresponding to the VoIP call message will be destroyed, avoiding the first VoIP application maliciously executing the VoIP lightweight process in the background for a long time using the VoIP call message.

[0026] In one implementation, after the lightweight process management service receives a VoIP call message, it further includes: the lightweight process management service sends a first indication message 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 further includes: the VoIP call management service verifies the legality of the incoming call information according to the first indication message; the VoIP call management service instructs the notification management service to display a 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 a call notification of the VoIP call message based on the incoming call information. Implementing the embodiments of the present application, the lightweight process management service notifies the VoIP call management service of the VoIP call message in advance, facilitating the VoIP call management service to 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.

[0027] 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, it further includes: the first VoIP lightweight process establishes a communication connection with the application server, and the communication connection can be used for VoIP calls. Among them, the communication connection can be a long connection.

[0028] In one implementation, after the above-mentioned notification management service displays a call notification of a VoIP call message based on incoming call information, it further includes: in response to a first operation, the notification management service invokes the answering service of the VoIP call management service, where the first operation is used to answer the VoIP call requested by the VoIP call message; the answering service creates a first page; the answering service invokes an answering loading module in the first page; the answering loading module uses a cross-process loading mechanism to invoke a first VoIP lightweight process to load the answering page of the VoIP call and renders the answering page to the first page; the electronic device displays the first page after rendering the answering page; the first VoIP lightweight process conducts a VoIP call with the application server for the VoIP call message. Implementing the embodiments of the present application, after the called user answers the VoIP call, through the cross-process loading ability of the answering loading module of the VoIP lightweight process, when the user answers, the answering page of the VoIP lightweight process can be rendered to the first page of the VoIP call management service for display, and it still looks like the answering page is displayed within the first VoIP application to the user. In this way, the user experience remains consistent with that of "pulling up the main process of the application for answering", but it avoids pulling up the main process of the application, reducing the device power consumption and required memory.

[0029] In one implementation, after the above-mentioned notification management service displays a call notification of a VoIP call message based on incoming call information, it further includes: in response to a second operation, the notification management service invokes the rejection service of the VoIP call management service, where 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 perform a rejection process on the VoIP call message; the VoIP call management service sends a rejection status to the lightweight process management service, and 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. Implementing the embodiments of the present application, after the called user rejects the VoIP call or deletes the call notification, by using the VoIP call management service and the lightweight process management service, the first VoIP lightweight process is timely destroyed, avoiding the impact of the VoIP lightweight process on the device power consumption and memory after rejection.

[0030] In one implementation, after the rejection service of the above-mentioned VoIP call management service instructs the first VoIP lightweight process to perform a rejection process on the VoIP call message, it further includes: the first VoIP lightweight process sends a rejection status to the application server.

[0031] In one implementation, after the above-mentioned notification management service displays a call notification for a VoIP call message based on the incoming call information, it further includes: when it is detected that the caller cancels the VoIP call or the called user does not answer within the first duration, 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. Implementing the embodiments 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, by using the VoIP call management service and the lightweight process management service, the first VoIP lightweight process is timely destroyed, avoiding the impact of the VoIP lightweight process on the device power consumption and memory after non-answer.

[0032] In one implementation, after the above-mentioned first VoIP lightweight process makes a VoIP call with the application server for the VoIP call message, it further includes: when a hang-up operation is detected or the caller hangs 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 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. Implementing the embodiments of the present application, after the called user or the caller hangs up the VoIP call, by using the VoIP call management service and the lightweight process management service, the first VoIP lightweight process is timely destroyed, avoiding the impact of the VoIP lightweight process on the device power consumption and memory after hang-up.

[0033] In one implementation, before the lightweight process management service destroys the first VoIP lightweight process, it further includes: the lightweight process management service instructs the first VoIP lightweight process to perform pre-destruction processing; the first VoIP lightweight process performs pre-destruction processing. Implementing the embodiments of the present application, through the pre-destruction processing, important data loss is avoided.

[0034] In a third aspect, an embodiment of the present application provides an electronic device, which includes: a processor and a memory, the memory is coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor reads the computer instructions from the memory, the electronic device is enabled to perform the VoIP call described in the first aspect.

[0035] In a fourth aspect, an embodiment of the present application provides a computer storage medium, which includes computer instructions, and when the computer instructions run on an electronic device, the electronic device is enabled to perform the VoIP call in any possible implementation manner of any of the above aspects.

[0036] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on a computer, it causes the computer to execute the VoIP call in any possible implementation manner of any of the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a schematic diagram of the system architecture of a communication system provided by an embodiment of the present application;

[0038] Figure 2 It is a schematic flowchart of a VoIP call method provided by an embodiment of the present application;

[0039] Figure 3A It is a schematic flowchart of another VoIP call method provided by an embodiment of the present application;

[0040] Figure 3B It is a schematic diagram of the software structure of a software system provided by an embodiment of the present application;

[0041] Figure 4A It is a schematic flowchart of the call display process of a VoIP call method provided by an embodiment of the present application;

[0042] Figures 4B to 4D It is a schematic diagram of the interface of the VoIP call notification provided by an embodiment of the present application;

[0043] Figure 5A It is a schematic flowchart of the called party answering process of a VoIP call method provided by an embodiment of the present application;

[0044] Figures 5B to 5D It is a schematic diagram of the interface of the called party answering provided by an embodiment of the present application;

[0045] Figure 6 It is a schematic flowchart of the called party rejecting process of a VoIP call method provided by an embodiment of the present application;

[0046] Figure 7 It is a schematic flowchart of the unanswered process of a VoIP call method provided by an embodiment of the present application;

[0047] Figure 8 It is a schematic flowchart of the call hanging up process of a VoIP call method provided by an embodiment of the present application;

[0048] Figure 9 It is a schematic flowchart of a VoIP call method provided by an embodiment of the present application;

[0049] Figure 10 It is a schematic diagram of the structure of a terminal device provided by an embodiment of the present application;

[0050] Figure 11A structural schematic diagram of an application server provided by an embodiment of the present application. Detailed implementation manners

[0051] The technical solutions in the embodiments of the present application will be clearly and elaborately described below with reference to the accompanying drawings. Among them, in the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may mean A or B. The "and / or" in the text is only a relational description of the associated objects, indicating that there can be three relationships. For example, A and / or B may mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.

[0052] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality" is two or more than two.

[0053] The term "user interface (UI)" in the following embodiments of the present application is a media interface for interaction and information exchange between an application program or an 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 source code written in a specific computer language such as Java or Extensible Markup Language (XML). The interface source code is parsed and rendered on an electronic device and finally presented as content recognizable by the user. The common manifestation form of the user interface is the graphical user interface (GUI), which refers to the user interface related to computer operation displayed in a graphical manner. It can be visual interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, Widgets, etc. displayed on the display screen of the electronic device.

[0054] For the convenience of understanding, the related concepts involved in the embodiments of the present application will be described below.

[0055] VoIP: A voice call technology that enables voice calls, video calls, and multimedia conferences via the Internet Protocol (IP), i.e., calls are made via the Internet. Other informal names include IP telephony, Internet phone, Internet telephony, broadband telephony, and broadband phone service. VoIP can be used in many Internet-accessible devices, including VoIP phones, smartphones, and personal computers. Voice / video calls implemented through third-party applications on end devices usually belong to VoIP calls.

[0056] VoIP application: An application that can enable VoIP calls. A VoIP application can be an independent application or integrated into other applications (such as a phone application). A VoIP application can be a system application of an end device or a downloadable third-party application, such as WeCom and Changlian. A third-party application can be an application pre-installed on an end device or an application downloaded and installed by a user on an end device.

[0057] The communication system 10 involved in the VoIP call method provided in the embodiments of the present application will be introduced below.

[0058] Figure 1 An exemplary system architecture diagram of a communication system 10 provided in the embodiments of the present application is shown. As Figure 1 shown, the communication system 10 includes one or more end devices (such as end device 100, end device 400), one or more application servers (such as application server 200), and a Push server 300.

[0059] The end devices 100 and 400 are installed with a first VoIP application (such as the Changlian application). User 1 can make a VoIP call with the first VoIP application of the end device 400 of other users (such as User 2) through the first VoIP application of the end device 100. For example, the end device 100 receives a VoIP call from User 2 who logs in to the first VoIP application of the end device 400. The above VoIP call is used to request User 1 to make a VoIP call. In this case, User 2 can be called the caller or the calling user, and User 1 can be called the called user. The following takes the end device 100 as an example for illustration.

[0060] The terminal device 100 is installed or integrated with a Push service, which is used to receive messages pushed by the application servers of various applications. The pushed messages can be referred to as Push messages. It should be noted that if the Push message function of the first VoIP application on the terminal device 100 is enabled, when the terminal device 100 does not run the first VoIP application or runs the first VoIP application in the background, the Push service of the terminal device 100 can also receive and display the Push messages of the first VoIP application from the Push server 300.

[0061] The application server 200 can be used to push messages for the first VoIP application installed on each terminal device (such as the terminal device 100). In some embodiments, the application server 200 can be understood as the business server of the first VoIP application and is also used to provide other services of the application for the first VoIP application. For example, if the first VoIP application is the Changlian application, the application server 200 is also used to provide functions such as sending and receiving messages, conferences, and schedules for the Changlian application.

[0062] The Push server 300 can receive the Push messages sent by each application server and push the Push messages to the terminal devices installed with the corresponding applications, such as sending the Push messages of the first VoIP application to the terminal device 100.

[0063] In the embodiments of the present application, each terminal device (such as the terminal device 100, the terminal device 400), the application server 200, the application server 200 and the Push server 300, and the Push server 300 and the terminal device 100 can communicate through a communication network.

[0064] The above communication network may include local area networks (LANs) and / or wide area networks (WANs). The communication network can be implemented using any known network communication protocol, and the above network communication protocol can 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.

[0065] 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), a vehicle-mounted 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 special restrictions on the specific types of the terminal device 100 and the terminal device 400.

[0066] The application server 200 may be a single server, or a server cluster composed of multiple servers, or a cloud computing center. Similarly, the Push server 300 may be a single server, or a server cluster composed of multiple servers, or a cloud computing center. The embodiments of the present application do not specifically limit the names of the application server 200 and the Push server 300.

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

[0068] In a usage scenario, when the terminal device 100 switches the first VoIP application to the background, the device system will freeze or directly destroy the application main 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.

[0069] Exemplarily, as Figure 2 shown, in a VoIP call method provided by the embodiments of the present application, the Push server 300 provides an interface for the application server 200 to send VoIP call messages; when the terminal device 100 switches the first VoIP application to the background, the application server 200 may 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.

[0070] Specifically, (1) when the application server 200 receives a call request from the caller for user 1 who logs in to the first VoIP application on the terminal device 100, if the application server 200 has established a long connection with the first VoIP application of the terminal device 100 currently, it directly sends a VoIP call message to the terminal device 100; if the application server 200 has not established a long connection with the first VoIP application of the terminal device 100 currently, it sends a VoIP call message to the Push server 300; (2) the Push server 300 has established a Push long connection with the Push service of the terminal device 100, and the Push server 300 can send the above VoIP call message to the Push service through the Push long connection; (3) based on the above 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 a VoIP call message to the main process of the first VoIP application; (4) based on the above VoIP call message, the application main process of the first VoIP application on the terminal device 100 establishes a long connection with the application server 200, and then realizes a VoIP call with the caller through the application server 200.

[0071] The above VoIP call method can still receive VoIP call messages when the first VoIP application switches to the background, and then realizes the VoIP call of the first VoIP application. However, the above solution still has the following defects: every time the Push service receives a VoIP call message, it has to wake up the application main process of the first VoIP application; after starting the application main process, the system cannot control the behavior of the application main process, and the first VoIP application may execute services unrelated to VoIP calls; the system also cannot control the execution duration of the application main process, and there is a risk that the application abuses VoIP calls to keep the application running continuously; the above situations will all lead to increased device power consumption and wasted memory, causing adverse effects on the terminal device 100, and further affecting the user experience.

[0072] In addition, in the above solution, in cases where the caller cancels the call, the called user does not answer for a long time or hangs up after answering, considering that the user may still be using the application main process in the foreground or background of the terminal device 100 currently, the main process cannot be directly destroyed, and the following two processing methods can be adopted: The first method is not to control and let the application main process continue to run; the second method is to freeze the application main process. The first method will have a greater impact on device power consumption and memory, and the second method also has an impact on device memory. Memory will still be occupied when freezing.

[0073] Exemplarily, such as Figure 3AAs shown in the figure, in another VoIP call method provided by an embodiment of the present application, the terminal device 100 includes a first VoIP application and a Push service, and further includes a lightweight process management service, a VoIP call management service, and a notification management service.

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

[0075] The lightweight process management service is responsible for receiving the VoIP call message from the Push service, thereby triggering the first VoIP application to start a VoIP lightweight process, and sending the VoIP call message to this lightweight process for processing to implement a 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 answers the VoIP call and then hangs up the VoIP call, etc., controlling 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 behaviors that the VoIP lightweight process can implement.

[0076] Among them, the VoIP lightweight process is an independent process for implementing VoIP calls, isolated from the application main process. In the embodiments of the present application, the lightweight process can also be called other names, such as a subprocess.

[0077] The first VoIP application inherits the VoIP lightweight process extension ability in the development state; in the running state, based on this ability, it can run the VoIP lightweight process, and support the VoIP lightweight process to receive VoIP messages in the background, and process the VoIP call message in the VoIP lightweight process to implement a VoIP call; the above processing includes establishing a long connection with the application server 200, reporting the call status to the VoIP call management service, and loading the VoIP call answering page, etc. In the embodiments of the present application, the answering page can also be called an answering interface.

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

[0079] (1) An independent VoIP lightweight process. That is, when invoking the VoIP lightweight process extension ability of the first VoIP application to run, a lightweight process for implementing VoIP calls can be started, and this process is isolated from the application main process.

[0080] (2) The callable APIs are restricted. That is, when the VoIP lightweight process extension ability is invoked, the callable APIs of the started VoIP lightweight process are strictly restricted, and the APIs irrelevant to VoIP behavior can be disabled. In one implementation, the callable APIs of the VoIP lightweight process extension ability are set through a preset API whitelist, or the APIs prohibited from being called by the VoIP lightweight process extension ability are set through a preset API blacklist.

[0081] (3) Support background startup and receiving background messages. That is, it supports starting the VoIP lightweight process by invoking the VoIP lightweight process extension ability when the first VoIP application runs in the background. The VoIP lightweight process extension ability provides a callback method for receiving background messages, enabling the first VoIP application to implement receiving VoIP call messages in the background in the callback method. In the embodiments of the present application, "starting" can also be referred to as "pulling up".

[0082] (4) Support foreground loading. That is, the first VoIP application can implement the processing of related foreground services such as call notifications and answering pages in the VoIP lightweight process extension ability. The call interface and answering page can then be loaded to the foreground for display by the answering loading module of the VoIP lightweight process.

[0083] The VoIP call management service includes an answering loading module of the VoIP lightweight process, which is responsible for receiving the call status reported by the VoIP lightweight process, performing call notification display by docking with the notification management service, and processing the operations of the user answering or rejecting a VoIP call; at the same time, it supports cross-process loading of the answering page of the VoIP lightweight process and rendering it into the VoIP call management service.

[0084] The notification management service is used to display VoIP call notifications and supports the display of controls such as answering buttons and rejecting buttons.

[0085] In the VoIP call method provided by the embodiments of the present application, the Push service realizes VoIP calls by waking up the VoIP lightweight process of the VoIP application, and completes the closed-loop of processes such as calling, answering, rejecting, and hanging up VoIP calls in the VoIP lightweight process. The main application process does not need to be started throughout the process, reducing the impact on device power consumption and memory. By managing the life cycle of the VoIP lightweight process, the risk that the VoIP application abuses VoIP calls to keep the process running continuously is eliminated, further reducing power consumption and memory occupancy; by managing the API access rights of the VoIP lightweight process, the first VoIP application can be prevented from performing behaviors irrelevant to VoIP calls; in addition, the user is unaware of the background processing of the VoIP lightweight process, avoiding affecting the user experience.

[0086] The software structure of the terminal device 100 involved in the embodiments of the present application will be introduced below.

[0087] The software system of the terminal device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present invention, the Android system with a layered architecture is taken as an example to exemplarily illustrate the software structure of the terminal device 100. The terminal device 100 may also adopt other software systems, not limited to the Android system.

[0088] Figure 3B It is a software structure block diagram of a terminal device 100 provided by the embodiments of the present application.

[0089] The layered architecture divides the software into several layers, and each layer has 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 into an application layer, an application framework layer, a hardware abstraction layer (HAL), and a kernel layer from top to bottom. Among them:

[0090] The application layer may include a series of application packages. As Figure 3B shown, the application layer may include a first VoIP application, such as Changlian and Enterprise WeChat, and may also include other applications such as a camera, a gallery, a calendar, a call, WLAN, Bluetooth, music, video, and text messages.

[0091] In some embodiments, a subclass is developed for the first VoIP application in the development state, and the VoIP lightweight process extension ability is inherited in this subclass, that is, the application package (android application package, APK) of the first VoIP application integrates the program file with the VoIP lightweight process extension ability. The software system of the terminal device 100 has a bottom support module with the VoIP lightweight process extension ability, which supports the first VoIP application to run a VoIP lightweight process independent of the application main process based on this ability when the first VoIP application is in the running state after the terminal device 100 installs the first VoIP application, so as to implement VoIP calls. Specifically, reference can be made to Figure 3A and the relevant descriptions in the subsequent embodiments, which will not be elaborated here. The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions.

[0092] Such as Figure 3BAs shown in the figure, 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 software module.

[0093] Among them, the notification management service enables an application to display notification information in the status bar. It can be used to convey notification-type messages, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to inform that the download is complete, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or a scroll bar text, such as the notification of a background-running application, or a notification that appears on the screen in the form of a dialogue window. For example, it can prompt text information in the status bar, emit a prompt sound, vibrate the electronic device, blink the indicator light, etc.

[0094] In the embodiments of the present application, the notification management service can be used to display call notifications of VoIP call messages on the lock screen interface and the non-lock screen interface. Through the call notifications displayed by the notification management service, the user can answer or reject VoIP calls, and can also delete the call notifications. The functions of the Push service, the VoIP call management service, the lightweight process management service, and the notification management service can refer to Figure 3A the relevant descriptions in and subsequent embodiments, which will not be elaborated here.

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

[0096] The core library contains two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core library of Android.

[0097] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0098] The HAL layer and the kernel layer are used to perform corresponding operations in response to the function calls of the system services in the application framework layer.

[0099] The kernel layer is the layer between the hardware and the software. The kernel layer may include an input system, a sensor driver, and a display driver, and may also include an audio driver, a camera driver, etc. The input system is used to monitor the user's input operations, such as the operations of answering, answering or hanging up a VoIP call, and deleting a call notification.

[0100] Exemplarily, the display driver can drive the display screen to display the VoIP call notification and the answering page of the VoIP call. The sensor driver can drive a sensor (such as a touch sensor) to detect the user's input operations (such as answering operation, rejecting operation, hanging up operation, etc.). The audio driver can drive the microphone to collect the user's voice data for the VoIP call. The camera driver can drive the camera to collect video images for the VoIP call.

[0101] The following details the specific implementation of the VoIP call method provided by the embodiments of the present application.

[0102] 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 the VoIP call management service to complete the processes such as VoIP call notification display, answering, and rejecting.

[0103] Exemplarily, Figure 4A FIG. shows a VoIP call method provided by the embodiments of the present application. The method includes a lightweight process startup process, which includes some or all of steps S101 to S109.

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

[0105] Wherein, the VoIP call message 1 is used to request a VoIP call. The VoIP call message 1 may include some or all of the following: message identity (ID), caller account, caller avatar, caller name, called user's account, etc.

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

[0107] In some embodiments, when 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 has not been 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 through the Push long connection.

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

[0109] In some embodiments, after the Push service of the terminal device 100 receives the VoIP call message 1, it verifies the message legality and performs deduplication processing on the message, rejecting duplicate VoIP call messages 1; then, it sends the VoIP call message 1 that passes the verification to the lightweight process management service. For the specific implementation of verifying the message legality and performing deduplication processing on the message, the embodiments of the present application do not make specific limitations.

[0110] In the embodiments of the present application, after receiving the VoIP call message 1, the lightweight process management service may execute one or more of steps S104, S106, S107, and S109.

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

[0112] S105. The VoIP call management service saves the indication information 1, and the indication information 1 is subsequently used to verify the legality of the incoming call information of the VoIP call message 1.

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

[0114] S106. The lightweight process management service of the terminal device 100 invokes the VoIP lightweight process extension ability 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.

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

[0116] In some embodiments, the lightweight process management service manages an API blacklist that prohibits calls to the VoIP lightweight process extension capabilities (i.e., the API blacklist prohibited from being called by the VoIP lightweight process). When the lightweight process management service invokes the VoIP lightweight process extension capabilities of the first VoIP application to start the VoIP lightweight process 1, the APIs in the API blacklist will not be loaded into the process space of the VoIP lightweight process 1, that is, the VoIP lightweight process 1 cannot call the APIs in the API blacklist. In one implementation, the lightweight process management service obtains the total API list; when starting the VoIP lightweight process 1, the APIs in the total API list except those in the API blacklist are loaded into the process space of the VoIP lightweight process 1.

[0117] In some other embodiments, the lightweight process management service can also manage an API whitelist that can be called by the VoIP lightweight process extension capabilities. When the lightweight process management service invokes the VoIP lightweight process extension capabilities of the first VoIP application to start the VoIP lightweight process 1, the APIs in the API whitelist are loaded into the process space of the VoIP lightweight process 1, and the VoIP lightweight process 1 cannot call the APIs outside the API whitelist.

[0118] The lightweight process management service manages the API blacklist / API whitelist, which can restrict the behavior of the first VoIP application in the VoIP lightweight process and can limit the first VoIP application from performing operations unrelated to VoIP calls.

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

[0120] In some embodiments, the first VoIP application can implement the method for receiving background messages in a subclass of the VoIP lightweight process extension capabilities. Through this method, the VoIP lightweight process 1 can receive the VoIP call message 1 sent by the lightweight process management service in the background.

[0121] S109. The lightweight process management service of the terminal device 100 starts the life cycle timer 1, and the timing duration of this timer is the preset duration 1.

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

[0123] In some embodiments, after the lightweight process management service executes step S106 (i.e., calls the VoIP lightweight process extension ability to start the VoIP lightweight process 1), it executes step S109. In some embodiments, after the lightweight process management service executes step S106, when it receives the confirmation information fed back by the VoIP lightweight process 1, it executes S109; the above confirmation information is used to indicate that the VoIP lightweight process 1 has been successfully started.

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

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

[0126] In some embodiments, the above communication connection is a long connection. After starting the VoIP lightweight process 1, the VoIP lightweight process 1 of the first VoIP application can establish a long connection with the application server 200 in advance by using the receiving method of the VoIP lightweight process extension ability. In this way, based on the call notification of the VoIP call message 1, after the user answers the incoming call of the VoIP call message 1, the first VoIP application can quickly realize a VoIP call with the caller by using the pre-established long connection, and the user experience is better.

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

[0128] 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.

[0129] S112. The VoIP call management service verifies the legality of the incoming call information 1 according to the indication information 1. If it is legal, it executes S113.

[0130] In some embodiments, when the incoming call information 1 contains the message ID of the VoIP call message and the message IDs in the incoming call information 1 and the indication information 1 are the same, it is determined that the incoming call information 1 is legal; otherwise, it is illegal.

[0131] In the foregoing step S104, the lightweight process management service notifies the VoIP call management service of the indication information 1 of the VoIP call message 1 in advance, facilitating 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 preventing the first VoIP application from maliciously requesting to display call notifications for abnormal processes.

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

[0133] 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.

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

[0135] In some embodiments, the notification management service supports displaying call notifications on the lock screen interface and supports answering without unlocking, facilitating users to answer VoIP calls more quickly.

[0136] Exemplarily, as Figure 4B shown, 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, the call notification content 203, the answer button 205, and the reject button 204. As Figure 4B shown, if the caller makes a voice call through the first VoIP application, the call notification content 203 may be "Inviting you to a voice call". If the caller makes a video call through the first VoIP application, the call notification content 203 may also be "Inviting you to a video call".

[0137] Exemplarily, as Figure 4C shown, before step S113, the terminal device 100 displays a non-lock screen interface (such as the main interface 13). After step S113, the notification management service triggers the terminal device 100 to display a call notification on the above non-lock screen interface.

[0138] Exemplarily, as Figure 4D shown, 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".

[0139] S114. The VoIP call management service reports the call status to the lightweight process management service, which is used to indicate the call notification of the VoIP call message 1 that has been displayed.

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

[0141] In some embodiments, the VoIP call management service executes step S114 after executing step S113. In some embodiments, after the VoIP call management service executes step S113, it executes S114 only when it receives the confirmation information fed back by the notification management service; this confirmation information is used to indicate that the call notification has been displayed.

[0142] S115. If the 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.

[0143] 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.

[0144] Before the lifecycle timer 1 times out (i.e., before timing out), if the lightweight process management service receives the above call status, it is considered that the first VoIP application has completed the display of the call notification for 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 times out, the lifecycle timer 1 is triggered, and the lightweight process management service destroys the VoIP lightweight process 1.

[0145] 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.

[0146] S117. When the lifecycle timer 1 is triggered, the lightweight process management service will instruct to destroy the VoIP lightweight process 1 of the first VoIP application.

[0147] 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 function of the lifecycle timer 1 corresponding to the VoIP call message 1 is to limit that the first VoIP application must 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 embodiments of the present application can prevent a VoIP application from maliciously executing the VoIP lightweight process in the background for a long time using the VoIP call message.

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

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

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

[0151] In some embodiments, when the lightweight process management service instructs the VoIP lightweight process 1 to perform pre-destruction processing, a timer 2 is also started; the lightweight process management service executes S119 when the timer 2 times out.

[0152] In some embodiments, after the VoIP lightweight process 1 performs pre-destruction processing, it feeds back a confirmation message to the lightweight process management service, and the confirmation message is used to indicate the completion of pre-destruction processing; based on this confirmation message, the lightweight process management service then executes S119.

[0153] Implementing the embodiments 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 extension ability. During the call, it is not necessary to start the main application process, which reduces the device power consumption and the required memory occupancy. At the same time, the following constraints are achieved technically: (1) Disable the APIs unrelated to VOIP calls to prevent the first VOIP application from doing things unrelated to VOIP calls after the VOIP lightweight process is started, further reducing the impact on device power consumption, memory, etc. (2) The first VOIP application must report the incoming call information to the VOIP call management service within a specified time. Otherwise, the VOIP lightweight process will be forcibly destroyed, which restricts the behavior of the first VOIP application and prevents the risk that the first VOIP application uses the VOIP lightweight process extension ability to run continuously in the background. Destroying the VOIP lightweight process is not perceptible to the user, avoiding the degradation of the user experience.

[0154] Exemplarily, as Figure 5A shown, 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 VOIP call method further includes a called answer process, which includes but is not limited to some or all of steps S121 to S128.

[0155] S121. In response to the user's answer operation, the notification management service starts the answer service of the VOIP call management service.

[0156] As Figure 5A shown, the notification management service displays the call notification of the VOIP call message 1 and detects the user's answer operation; in response to the answer operation, the notification management service starts the answer service of the VOIP call management service. Among them, the call notification includes an answer button, and the above answer operation can be a touch operation of clicking the answer button, or other operations, such as an answer operation implemented by voice, gesture, or a connected Bluetooth headset, which is not specifically limited here.

[0157] S122. The answer service of the VOIP call management service creates a full-screen window and displays an answer landing page in the full-screen window.

[0158] In some embodiments, the answer landing page is non-transparent. In some embodiments, the transparency of the answer landing page is a preset value and can be semi-transparent visually. The answer landing page can be understood as a blank page.

[0159] S123. The answer service of the VOIP call management service calls the answer loading module of the VOIP lightweight process in the answer landing page.

[0160] S124. Through the cross-process loading mechanism, the answering loading module invokes the VoIP lightweight process 1 of the first VoIP application.

[0161] In some embodiments, in step S121, the notification management service sends the message ID of 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 invokes the VoIP lightweight process 1 corresponding to the message ID from the first VoIP application through the cross-process loading mechanism.

[0162] S125. The VoIP lightweight process 1 loads the answering page of VoIP call message 1, and the answering page shows that a VoIP call is in progress.

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

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

[0165] S127. The answering loading module presents the answering landing page after rendering the answering page.

[0166] In some embodiments, through the cross-process loading mechanism, it is restricted that the first VoIP application must display the answering page according to the specifications of the full-screen answering landing page and perform subsequent hang-up processing. As Figure 5B shown, when the first VoIP application is running in the background, through the cross-process loading mechanism, the answering loading module renders the answering page loaded by the VoIP lightweight process 1 into the full-screen answering landing page and presents the rendered page; after presentation, from the user's visual perspective, the call notification displayed on the terminal device 100 switches to the answering page 14, and the user cannot perceive the answering landing page. It can be understood that if the answering page fails to be loaded successfully, the user can see an opaque page covering the screen.

[0167] S128. When the VoIP lightweight process 1 of the first VoIP application loads the answering page, a call operation is performed on VoIP call message 1 with the application server 200, and the call operation is used to implement a VoIP call with the caller of VoIP call message 1.

[0168] Specifically, the VoIP lightweight process 1 communicates with the application server 200 through a pre-established long connection to implement a VoIP call with the caller of the VoIP call message 1. In one implementation, the above-mentioned call operation includes: the VoIP lightweight process 1 sends a confirmation message to the application server 200 to indicate that the user confirms to answer the call; the application server 200 sends a confirmation message to the terminal device 400 of the caller; the first VoIP application of the terminal device 400 collects the audio and video data of the caller and sends it to the VoIP lightweight process 1 of the terminal device 100 through the application server 200, and the VoIP lightweight process 1 plays the audio and video data of the caller on the answering page; at the same time, the terminal device 100 collects the audio and video data of the called user and sends it to the first VoIP application of the terminal device 400 through the application server 200.

[0169] Exemplarily, Figure 5C and Figure 5D shows an exemplary user interface for a user to answer a VoIP call.

[0170] Taking Figure 5C the shown call notification as an example, when it is detected that the user clicks the answer button 205, the call notification displayed on the terminal device 100 changes to the answer page 14. The answer page 14 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 can be understood that if the caller dials a video call, the user can conduct a VoIP video call with the caller through the answer page.

[0171] Implementing the embodiments of the present application, through the cross-process loading ability of the answer loading module of the VoIP lightweight process, when the user answers the call, the answer page of the VoIP lightweight process can be rendered to the answer landing page of the VoIP call management service for display, and it still looks like the answer page is displayed within the first VoIP application to the user. In this way, the user experience remains consistent with the user experience of "pulling up the main process of the application to answer the call", but the pulling up of the main process of the application is avoided.

[0172] Exemplarily, as Figure 6 shown, 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 also includes a called rejection process, which includes but is not limited to some or all of steps S131 to S140.

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

[0174] 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 the foregoing step S111, it also registers a reject callback interface with the VoIP call management service in the VoIP lightweight process 1, that is, the VoIP call management service creates a reject callback interface for the reject callback function. In some embodiments, after the first VoIP application starts the VoIP lightweight process 1, it registers a reject callback function interface with the VoIP call management service.

[0175] S132. After detecting a user's reject operation or a delete operation for deleting a call notification, notify the management service to call the reject service of the VoIP call management service.

[0176] In some embodiments, when the notification management service displays the call notification of the VoIP call message 1, it detects a user's reject operation or delete operation; in response to the foregoing reject operation or delete operation, the notification management service launches the reject service of the VoIP call management service. Among them, the call notification includes a reject button, and the foregoing reject operation may be a touch operation of clicking the reject button, or other operations, such as a reject operation implemented by voice, gesture, or a connected Bluetooth headset, which is not specifically limited herein. The foregoing delete operation may be a swipe up, left, or right operation on the call notification, or other operations, which is also not specifically limited herein.

[0177] S133. The reject service of the VoIP call management service instructs the notification management service to delete the foregoing call notification.

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

[0179] S134. The reject service of the VoIP call management service calls the reject callback interface of the VoIP lightweight process 1 to perform a reject callback.

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

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

[0182] S136. The VoIP lightweight process 1 of the first VoIP application sends a reject status to the application server 200 to indicate that the user rejects the VoIP call corresponding to the VoIP call message 1.

[0183] In the embodiments of the present application, the execution order of steps S135 and S136 is not specifically limited. In one implementation, the first VoIP application may perform a rejection process in the rejection callback while communicating with the application server 200 to inform the application server 200 of the rejection status for the VoIP call message 1. In one implementation, along with the rejection status in step S136, the VoIP lightweight process 1 of the first VoIP application also sends the message ID of the VoIP call message 1 to the application server 200 to indicate that the rejection status is for the VoIP call message 1.

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

[0185] S138. The lightweight process management service instructs to destroy the VoIP lightweight process 1 of the first VoIP application.

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

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

[0188] For the specific implementation of steps S138 to S140, reference may be made to the relevant descriptions of the foregoing steps S117 to S119, which will not be elaborated here.

[0189] Implementing the embodiments of the present application can timely destroy the VoIP lightweight process after the user rejects the call, reducing the waste of device power consumption and memory caused by the continued operation of the VoIP lightweight process after rejection.

[0190] Exemplarily, as Figure 7 shown, when the notification management service displays the call notification of the VoIP call message 1, the caller can actively cancel the VoIP call, and the called party may also not answer for a long time. The above VoIP call method further includes an unanswered process, which includes but is not limited to some or all of steps S141 to S146.

[0191] S141. When it is detected that the caller cancels the VoIP call or the called user does not answer for a long time, the VoIP lightweight process 1 of the first VoIP application reports the unanswered status to the VoIP call management service.

[0192] In some embodiments, when the caller cancels the VoIP call, the terminal device 400 of the caller sends a second message to the application server 200 to indicate that the caller cancels 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.

[0193] In some embodiments, within the first duration 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 status to the VoIP call management service.

[0194] S142. Based on the above unanswered status, the VoIP call management service instructs the notification management service to delete the above-mentioned deletion call notification.

[0195] In some embodiments, based on the above unanswered status, the VoIP call management service also generates an unanswered call notification for the VoIP call message 1 and instructs the notification management service to display the above unanswered call notification.

[0196] S143. Based on the above unanswered status, the VoIP call management service reports the above unanswered status to the lightweight process management service.

[0197] S144. Based on the above unanswered status, the lightweight process management service instructs to destroy the VoIP lightweight process 1 of the first VoIP application.

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

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

[0200] For the specific implementation of steps S144 to S146, reference can be made to the relevant descriptions of the foregoing steps S117 to S119, which will not be elaborated here.

[0201] Implementing the embodiments of the present application, when the VoIP call notification is displayed on the terminal device 100, when the caller cancels the VoIP call or the called user does not answer for a long time, the VoIP lightweight process of the first VoIP application can be destroyed in time, controlling the life cycle of the VoIP lightweight process in the case of an unanswered VoIP call, and avoiding the continuous operation of the VoIP lightweight process wasting device power consumption and memory when not answered for a long time.

[0202] Exemplarily, as Figure 8 shown, after the called user answers the VoIP call, during the VoIP call, the called user or the caller can hang up the VoIP call. The above VoIP call method also includes a call hang-up process, which includes but is not limited to some or all of steps S151 to S157.

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

[0204] 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 of the first VoIP application stops loading the answering page.

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

[0206] In some embodiments, if the caller hangs up the VoIP call during the VoIP call, the terminal device 400 of the caller sends a first message to the application server 200 to indicate that the caller hangs 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.

[0207] In some embodiments, when the VoIP lightweight process 1 loads the answering page, it detects the hang-up operation of the user; 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. Refer to Figure 5D the answering page 14 shown in FIG. The above hang-up operation may be an operation of clicking the hang-up button 207 on the answering page 14, or other operations, which are not specifically limited here.

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

[0209] It can be understood that after destroying the answering landing page, the terminal device 100 stops displaying the answering page, and at this time, the VoIP call is perceived by the user as being hung up.

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

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

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

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

[0214] For the specific implementation of steps S155 to S157, reference can be made to the relevant descriptions of the foregoing steps S117 to S119, which will not be elaborated here.

[0215] When implementing the embodiments of the present application and conducting a VoIP call after the user answers the 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, controlling 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.

[0216] As Figure 9 shown, in combination with the foregoing embodiments, the present application provides a VoIP call method, which is applied to an electronic device. The method may include steps S201 to S204, and the specific implementation of the method may refer to the relevant descriptions of the foregoing embodiments. Among them, the electronic device may be the foregoing terminal device 100.

[0217] S201. Receive a VoIP call message sent by the application server of the first VoIP application through the push server. The VoIP call message is used to request a VoIP call.

[0218] S202. Start the first VoIP lightweight process of the first VoIP application and provide the VoIP call message to the first VoIP lightweight process.

[0219] Among them, the VoIP call message may be the foregoing VoIP call message 1, and the first VoIP lightweight process may be the foregoing VoIP lightweight process 1.

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

[0221] Exemplarily, referring to Figures 4A to 4C the relevant descriptions, 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.

[0222] S204. The first VoIP lightweight process establishes a long connection with the application server.

[0223] Among them, the above long connection may be a call connection for implementing the VoIP call service.

[0224] In one implementation manner, 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, where the first operation is used to answer the VoIP call; in response to the first operation, the first VoIP lightweight process loads the answering page of the VoIP call; displays the answering page; and based on the long connection, the first VoIP lightweight process and the application server perform a call operation. Among them, the first operation may be the foregoing answering operation. Exemplarily, referring to Figure 5AAccording to the relevant description, after the called user answers the VoIP call, the first VoIP lightweight process can be used to implement the called answer process; see Figure 5C and Figure 5D According to the relevant description, the call notification includes an answer button, the first operation can be an operation of clicking the answer button 205, and the answer page can be the answer page 14. The above call operation is used to implement a VoIP call with the caller of the above VoIP call message.

[0225] In one implementation, after the above first VoIP lightweight process performs a call operation with the application server, it further includes: receiving a second operation, where the second operation is used to hang up the VoIP call; in response to the second operation, destroying the first VoIP lightweight process and stopping the display of the answer page. Among them, the second operation can be the aforementioned hang-up operation. Exemplarily, refer to Figure 8 According to the relevant description, after the called user hangs up the VoIP call, the first VoIP lightweight process is destroyed in a timely manner; see Figure 5D According to the relevant description, the answer page includes a hang-up button 207, and the second operation can be an operation of clicking the hang-up button 207.

[0226] In one implementation, after the above first VoIP lightweight process performs a call operation with the application server for the VoIP call message, it further includes: receiving a first message sent by the application server, where the first message is used to indicate that the caller hangs up the VoIP call; based on the first message, destroying the first VoIP lightweight process and stopping the display of the answer page. Exemplarily, refer to Figure 8 According to the relevant description, after the caller hangs up the VoIP call, the first VoIP lightweight process is destroyed in a timely manner.

[0227] In one implementation, after the above call notification is displayed based on the VoIP call message obtained by the first VoIP lightweight process, it further includes: receiving a third operation, where the third operation is used to reject the VoIP call corresponding to the VoIP call message or delete the call notification; in response to the third operation, destroying the first VoIP lightweight process. Among them, the third operation can be the aforementioned rejection operation. Exemplarily, refer to Figure 6 According to the relevant description, after the called user rejects the VoIP call, the first VoIP lightweight process is destroyed in a timely manner; see Figures 4A to 4C According to the relevant description, the call notification includes a reject button 204, and the third operation can be an operation of clicking the reject button 204.

[0228] In one implementation, after the above call notification is displayed 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 the first duration, destroying the first VoIP lightweight process. Exemplarily, refer to Figure 7Regarding the related description, when the called user does not answer the VoIP call for a long time, the first VoIP lightweight process is destroyed in a timely manner.

[0229] In one implementation, after the above-mentioned first VoIP lightweight process and the application server perform a call operation on 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 to the VoIP call; based on the second message, destroying the first VoIP lightweight process. Exemplarily, referring to Figure 7 Regarding the related description, after the caller cancels the call of the VoIP call, the first VoIP lightweight process is destroyed in a timely manner.

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

[0231] In one implementation, the electronic device includes an API blacklist, and the first VoIP lightweight process is prohibited from calling the APIs in the API blacklist. In one implementation, the electronic device may also include an API whitelist to control the APIs that the first VoIP lightweight process can call. Specifically, the related description of step S107 can be referred to.

[0232] In one implementation, before destroying the first VoIP lightweight process, it further includes: the first VoIP lightweight process performs pre-destruction processing. Specifically, the related description of the foregoing step S118 can be referred to.

[0233] In one implementation, the electronic device further includes a push service, a lightweight process management service, a VoIP call management service, and a notification management service. The above-mentioned 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 above-mentioned 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 above-mentioned 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.

[0234] Exemplarily, referring to Figure 4AAccording to the related description, after the VoIP call message is sent to the Push service of the electronic device through the Push server 300, the lightweight process management service can start the VoIP lightweight process of the first VoIP application, and the VoIP call management service and the notification management service are used to display the call notification; in terms of user experience, it can be consistent with the user experience of "pulling up the main process of the application to answer the call", but at the same time, it avoids pulling up the main process of the application, reducing the device power consumption and the required memory.

[0235] In one implementation, after the above-mentioned 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 above-mentioned 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.

[0236] Among them, the first timer can be the aforementioned lifecycle timer 1. Exemplarily, referring to Figure 4A the related description, the first timer can be used to limit that the first VoIP application must call the interface of the VoIP call management service to report the incoming call information of the VoIP call message within a specified time, otherwise the VoIP lightweight process corresponding to the VoIP call message will be destroyed, avoiding the first VoIP application from maliciously executing the VoIP lightweight process in the background for a long time using the VoIP call message.

[0237] In one implementation, after the above-mentioned push service sends the VoIP call message to the lightweight process management service, it further includes: the lightweight process management service sends the first indication information 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 further includes: the VoIP call management service verifies the legality of the incoming call information according to 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 legal, the notification management service displays the call notification of the VoIP call message based on the incoming call information.

[0238] Exemplarily, referring to Figure 4ARegarding the related description, the lightweight process management service notifies the VoIP call management service of the VoIP call message in advance, facilitating the VoIP call management service to perform security verification on the incoming call information of the VoIP call message, thereby preventing the first VoIP application from maliciously requesting to display call notifications in an abnormal process.

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

[0240] Among them, the first window can be the aforementioned full-screen window, and the first page can be the aforementioned answering landing page. Exemplarily, referring to Figure 5A Regarding the related description, after the called user answers the VoIP call, the VoIP call management service and the first VoIP lightweight process can implement the called answering process using the cross-process loading mechanism. The user experience remains consistent with that of "pulling up the main process of the application for answering", but it avoids pulling up the main process of the application.

[0241] In one implementation, the above-mentioned in response to a second operation, destroying the first VoIP lightweight process and stopping the display of the answering page, or the above-mentioned based on a first message, destroying the first VoIP lightweight process and stopping the display of the answering page, includes: in response to the second operation or based on a 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 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.

[0242] Exemplarily, referring to Figure 8 Regarding the related description, after the called user or the caller hangs up the VoIP call, using the first VoIP lightweight process, the VoIP call management service and the lightweight process management service, the call hang-up process is completed, and the first VoIP lightweight process is destroyed in a timely manner, avoiding the impact of the VoIP lightweight process on the device power consumption and memory after hanging up.

[0243] 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, notifying the management service to call the rejection service of the VoIP call management service; the rejection service instructs the management service to delete the call notification; the rejection service instructs the first VoIP lightweight process to perform a rejection process on 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.

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

[0245] In one implementation, when it is detected that the user does not answer the VoIP call within the first duration, the first VoIP lightweight process is destroyed, or, when the first VoIP lightweight process is destroyed based on the second message, it 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 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.

[0246] Exemplarily, referring to Figure 7 the relevant description, after the called user does not answer the VoIP call for a long time or the caller can actively cancel the call, the first VoIP lightweight process, the VoIP call management service, and the lightweight process management service are used to implement the called rejection process, and the first VoIP lightweight process is destroyed in a timely manner, avoiding the impact of the VoIP lightweight process on the device power consumption and memory after non-answer.

[0247] In one implementation, the above 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. Specifically, reference can be made to the relevant description of step S107.

[0248] Next, the structure of a terminal device 100 provided by an embodiment of the present application is introduced.

[0249] Figure 10The structural schematic diagram of the terminal device 100 is shown. 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, a headphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric 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.

[0250] It can be understood that the structure schematically shown in the embodiments of the present invention does 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 those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0251] 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), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0252] The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.

[0253] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0254] 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, etc.

[0255] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: The processor 110 can be coupled to the touch sensor 180K through the I2C interface, enabling the processor 110 to communicate with the touch sensor 180K through the I2C bus interface to implement the touch function of the terminal device 100.

[0256] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple groups of I2S buses. The processor 110 can be coupled to the audio module 170 through the I2S bus to implement communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the I2S interface to implement the function of answering a call through a Bluetooth headset.

[0257] The PCM interface can also be used for audio communication to sample, quantize, and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled through the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering a call through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0258] The UART interface is a general-purpose serial data bus 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 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

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

[0260] The GPIO interface can be configured by software. The GPIO interface can be configured as 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, the display screen 194, the wireless communication module 160, the audio module 170, the 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.

[0261] The USB interface 130 is an interface that complies with the USB standard specification, and can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transfer data between the terminal device 100 and peripheral devices. It can also be used to connect a headset to play audio through the headset. This interface can also be used to connect other electronic devices, such as AR devices, etc.

[0262] It can be understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are only illustrative descriptions and do not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

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

[0264] 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 the inputs from the battery 142 and / or the charging management module 140 and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, the wireless communication module 160, etc. The power management module 141 may also be used to monitor parameters such as the battery capacity, the number of battery charge cycles, and the battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be disposed in the same device.

[0265] The wireless communication function of the terminal device 100 may be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.

[0266] The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the terminal device 100 may be used to cover a single or multiple communication frequency bands. Different antennas may also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 may be multiplexed as the diversity antenna of the wireless local area network. In some other embodiments, the antenna may be used in combination with a tuning switch.

[0267] The mobile communication module 150 can provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to the terminal device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter, amplify, etc. 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 through the antenna 1 for radiation. In some embodiments, at least some functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be provided in the same device.

[0268] The modulation and demodulation processor may include a modulator and a demodulator. Among them, 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. Subsequently, the demodulator 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 transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, receiver 170B, etc.), or displays an image or video through the display screen 194. In some embodiments, the modulation and demodulation processor may be an independent device. In other embodiments, the modulation and demodulation processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.

[0269] The wireless communication module 160 may provide solutions for wireless communications applied to the terminal device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite systems (GNSSs), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 160 may 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 may also receive the signals to be sent from the processor 110, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna 2 for radiation.

[0270] In some embodiments, antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and antenna 2 is coupled to the wireless communication module 160, enabling the terminal device 100 to communicate with the network and other devices through wireless communication technologies. The wireless communication technologies 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 technologies, etc. The GNSS may include Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), BeiDou Navigation Satellite System (BDS), Quasi-Zenith Satellite System (QZSS), and / or Satellite Based Augmentation Systems (SBAS).

[0271] The terminal device 100 implements the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, connected to 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, which execute program instructions to generate or change the display information.

[0272] The display screen 194 is used to display images, videos, etc. The 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 (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

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

[0274] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light passes through the lens and is transmitted to the camera photosensitive element. The optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also optimize the noise and brightness of the image through algorithms. The ISP can also optimize parameters such as the exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0275] The camera 193 is used to capture static 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 optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it 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 standard RGB, YUV, etc. formats. In some embodiments, the terminal device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0276] 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, etc.

[0277] The video codec is used to compress or decompress digital videos. The terminal device 100 can support one or more video codecs. In this way, the terminal device 100 can play or record videos in multiple coding formats, such as: Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0278] The NPU is a neural-network (NN) computing processor. By drawing on the structure of the biological neural network, such as the transmission pattern between human brain neurons, it can quickly process the input information and can also continuously self-learn. Through the NPU, applications such as intelligent cognition of the terminal device 100 can be realized, such as: image recognition, face recognition, speech recognition, text understanding, etc.

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

[0280] The random access memory can 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 called DDR5 SDRAM), etc.; the non-volatile memory can include disk storage devices, flash memory.

[0281] Flash memory can be classified according to its operating principle into NOR Flash, NAND Flash, 3D NAND Flash, etc. According to the number of potential levels of storage cells, it can include single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. According to storage specifications, it can include universal flash storage (UFS), embedded multi media Card (eMMC), etc.

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

[0283] The non-volatile memory can also store executable programs and data of users and application programs, etc. It can be pre-loaded into the random access memory for the processor 110 to directly read and write.

[0284] 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 through the external memory interface 120 to implement the data storage function. For example, files such as music and videos are saved in the external non-volatile memory.

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

[0286] The audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 can be disposed in the processor 110, or some functional modules of the audio module 170 can be disposed in the processor 110.

[0287] The speaker 170A, also known as the "loudspeaker", is used to convert an audio electrical signal into a sound signal. The terminal device 100 can listen to music or hands-free calls through the speaker 170A.

[0288] The receiver 170B, also known as the "earpiece", is used to convert audio electrical signals into sound signals. When the terminal device 100 answers a call or a voice message, the receiver 170B can be placed close to the human ear to receive the voice.

[0289] The microphone 170C, also known as the "microphone" or "transmitter", is used to convert sound signals into electrical signals.

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

[0291] The pressure sensor 180A is used to sense pressure signals and can convert pressure signals 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.

[0292] The gyroscope 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., the x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake during shooting.

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

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

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

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

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

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

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

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

[0301] The touch sensor 180K, also known as the "touch control device". The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 together form a touch screen, also known as the "touch control screen". The touch sensor 180K is used to detect touch operations acting thereon or nearby. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In some other embodiments, the touch sensor 180K can also be disposed on the surface of the terminal device 100, at a different position from the display screen 194.

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

[0303] The keys 190 include a power-on key, volume keys, etc. The keys 190 can be mechanical keys. They can also be touch keys.

[0304] The motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration prompts and can also be used for touch vibration feedback.

[0305] The indicator 192 can be an indicator light and can be used to indicate the charging state, power change, message, missed call, notification, etc.

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

[0307] The structure of the server provided by the embodiments of the present application will be introduced below.

[0308] Figure 11 The structure of an application server 200 provided by the embodiments of the present application is exemplarily shown. The structure of the Push server 300 can refer to the relevant description of the application server 200 and will not be elaborated hereinafter.

[0309] As Figure 11 shown, the application server 200 can 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 can be connected through a bus 1004 or other means. Figure 11 Taking the connection through the bus as an example. Among them:

[0310] 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, etc. Not limited to wireless communication interfaces, 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 perform transmission processing on the signals output by the processor 1001. The receiver 1006 can be used to perform reception processing on the mobile communication signals received by the antenna 1008.

[0311] In some embodiments of the present application, the transmitter 1005 and the receiver 1006 can be regarded as a wireless modem. In the application server 200, the number of the transmitter 1005 and the receiver 1006 can both be one or more. The antenna 1008 can be used to convert the electromagnetic energy in the transmission line into electromagnetic waves in free space, or convert the electromagnetic waves in free space into electromagnetic energy in the transmission line. The coupler 1007 is used to divide the mobile communication signals received by the antenna 1008 into multiple paths and distribute them to multiple receivers 1006.

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

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

[0314] The processor 1001 can be used to read and execute computer-readable instructions. Specifically, the processor 1001 can be used to call the program stored in the memory 1002, such as the implementation program of the application program distribution method provided by one or more embodiments of the present application on the application server 200 side, and execute the instructions included in the program.

[0315] It should be noted that Figure 11 The illustrated application server 200 is only one implementation manner of the embodiments of the present application. In actual applications, the application server 200 can also include more or fewer components, which are not limited herein.

[0316] For more details about the functions and working principles of the application server 200, reference can be made to the relevant content in the above embodiments, which will not be elaborated here.

[0317] The various embodiments of the present application can be combined arbitrarily to achieve different technical effects.

[0318] In the above embodiments, they can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part 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, the processes or functions described in the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state disk (SSD)), etc.

[0319] Those of ordinary skill in the art can understand all or part of the processes in the above-described method embodiments. These processes can be completed by relevant hardware instructed by a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-described method embodiments. The foregoing storage media include: ROM or random access memory RAM, magnetic disks, or optical disks, etc., which can store program codes of various types.

[0320] In summary, the above are only embodiments of the technical solutions of the present invention and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made based on the disclosure of the present invention should be included within the protection scope of the present invention.

Claims

1. A VoIP calling 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, wherein 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 persistent connection with the application server.

2. The method according to claim 1, characterized in that: After the VoIP call message obtained based on the first VoIP lightweight process displays a call notification, the method further includes: receiving a first operation, where the first operation is used to answer the VoIP call; In response to the first operation, the first VoIP lightweight process loads an answering page for the VoIP call; Display the answering page; Based on the long connection, the first VoIP lightweight process performs a call operation with the application server.

3. The method according to claim 2, characterized in that After the first VoIP lightweight process performs a call operation with the application server, the method further includes: receiving a second operation, where the second operation is used to hang up the VoIP call; In response to the second operation, the first VoIP lightweight process is destroyed, and the answering page stops being displayed.

4. The method according to claim 2, characterized in that: After the first VoIP lightweight process and the application server perform a call operation on the VoIP call message, the method further includes: receiving a first message sent by the application server, wherein the first message is used to instruct the caller to hang up the VoIP call; Based on the first message, the first VoIP lightweight process is destroyed, and the answering page is stopped from being displayed.

5. The method according to claim 1, characterized in that: After the VoIP call message obtained based on the first VoIP lightweight process displays a call notification, the method further includes: receiving a third operation, wherein the third operation is used to reject the VoIP call corresponding to the VoIP call message or delete the call notification; In response to the third operation, the first VoIP lightweight process is destroyed.

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

7. The method according to claim 1, characterized in that After the first VoIP lightweight process and the application server perform a call operation on the VoIP call message, the method further includes: receiving a second message sent by the application server, wherein the second message is used to instruct the caller to cancel the VoIP call; Based on the second message, the first VoIP lightweight process is destroyed.

8. The method according to any one of claims 1 to 7, characterized in that: The first VoIP lightweight process is independent of the main application 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 an API 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, the method 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, and 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 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 a first VoIP lightweight process of the first VoIP application, and sends the VoIP call message to the first VoIP lightweight process; The displaying a 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 a call notification of the VoIP call message based on the incoming call information.

12. The method according to claim 11, characterized in that After the push service sends the VoIP call message to the lightweight process management service, the method 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 method further includes: The VoIP call management service sends a call status to the lightweight process management service, where 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; If the lightweight process management service does not receive the call status before the first timer times out, the lightweight process management service destroys the first VoIP lightweight process when the first timer times out.

13. The method according to claim 11, characterized in that After the push service sends the VoIP call message to the lightweight process management service, the method 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, the method 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 a 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.

14. The method according to claim 11, characterized in that In response to the first operation, the first VoIP lightweight process loads an answering page for the VoIP call, including: In response to the first operation, the notification management service calls the 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 the 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 of the VoIP call, and renders the answering page on the first page; The displaying of the answering page includes: The first window is displayed.

15. The method according to claim 11, characterized in that The destroying of the first VoIP lightweight process and stopping displaying the answering page in response to the second operation, or the destroying of the first VoIP lightweight process and stopping displaying the answering page based on the first message, comprises: 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 the hang-up status to the lightweight process management service; Based on the hang-up state, the lightweight process management service destroys the first VoIP lightweight process.

16. The method according to claim 11, characterized in that In response to the third operation, destroying the first VoIP lightweight process includes: In response to the third operation, the notification management service calls a 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 rejection of the VoIP call; Based on the rejection status, the lightweight process management service destroys the first VoIP lightweight process.

17. The method according to claim 11, characterized in that When it is detected that the user does not answer the VoIP call within a first time period, destroying the first VoIP lightweight process, or, based on the second message, destroying the first VoIP lightweight process, includes: When it is detected that the user has not answered the VoIP call within a first duration 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 state, the VoIP call management service instructs the notification management service to delete the call notification and sends the missed state to the lightweight process management service; Based on the missed call status, the lightweight process management service destroys the first VoIP lightweight process.

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

19. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is coupled to the processor, and the memory is used to store computer program code, wherein the computer program code includes computer instructions. When the processor reads the computer instructions from the memory, the electronic device executes the VoIP call method as described in claims 1 to 18.

20. A computer-readable storage medium, characterized in that: It comprises computer instructions, and when the computer instructions are executed on a terminal device, the electronic device executes the VoIP call method as claimed in claims 1 to 18.

Citation Information

Cited By

  • VOIP call method and related apparatus

    EP4742625A1

  • VOIP call method and related apparatus

    WO2025140675A1