Notification message acquisition method and apparatus, electronic device, and storage medium

By integrating UWP sub-applications into Win32 applications, creating push channels and generating push URIs, the problem of Win32 applications being unable to use WNS services is solved, and Win32 applications are enabled to receive and display notification messages, improving the applicability and user experience of the application.

CN117675749BActive Publication Date: 2025-10-21BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311560820.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-21
Publication Date
2025-10-21
Estimated Expiration
2043-11-21

AI Technical Summary

Technical Problem

In the prior art, Win32 applications cannot use the WNS service of the Windows operating system, resulting in an inability to receive push message notifications.

Method used

By integrating a UWP sub-application into a Win32 application, creating a push channel and generating a push URI, the application server and operating system services are used to obtain and display notification messages.

Benefits of technology

It enables Win32 applications to receive and display notification messages, improves the applicability and user experience of the application, and promotes the activity and daily activity of the application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117675749B_ABST
    Figure CN117675749B_ABST
Patent Text Reader

Abstract

The present disclosure provides a notification message acquisition method and device, electronic equipment and storage medium, and relates to the fields of Internet, human-computer interaction, etc. The specific implementation scheme is as follows: a target application acquires a push URI created by a first sub-application, and sends the push URI and target information to an operating system service through an application server; wherein the target information is used by the operating system service to acquire a target notification message to be pushed, and the push URI is used by the operating system service to determine a target operating system; the target operating system receives the target notification message sent by the operating system service, and displays it on a notification bar. Thus, the push URI created by the sub-application integrated in the application can be used to effectively acquire the notification message, for example, for the application that cannot use the push message notification service of the operating system, a sub-application that can use the push message notification service can be integrated in the application, and the notification message can be acquired based on the sub-application, thereby improving the applicability of the method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to technical fields such as human-computer interaction and the Internet, and in particular to a method, device, electronic device, and storage medium for obtaining notification messages. Background Art

[0002] Currently, apps (applications) can obtain push messages or notification messages through the operating system's push message notification service. For example, for Windows operating systems, UWP (Universal Windows Platform) apps can use the Windows operating system's WNS (Windows Push Notification Services) to obtain notification messages. Summary of the Invention

[0003] The present disclosure provides a method, apparatus, electronic device, and storage medium for acquiring a notification message.

[0004] According to one aspect of the present disclosure, a method for obtaining a notification message is provided, comprising:

[0005] Obtaining a push uniform resource identifier (URI) through a target application in an electronic device; wherein the push URI is created by a first sub-application in the target application;

[0006] Sending the push URI and target information to the operating system service via the target application via the application server; wherein the target information is used by the operating system service to obtain the target notification message to be pushed, and the push URI is used by the operating system service to determine the target operating system located in the electronic device from at least one operating system;

[0007] Receiving, through the target operating system, the target notification message sent by the operating system service;

[0008] The target notification message is displayed in a notification bar by the target operating system.

[0009] According to another aspect of the present disclosure, another method for obtaining a notification message is provided, including:

[0010] Receive a push URI and target information sent by a target application; wherein the push URI is created by the first sub-application in the target application;

[0011] Sending the push URI and the target information to the operating system service; wherein the target information is used by the operating system service to obtain a target notification message to be pushed, and the push URI is used by the operating system service to determine a target operating system from at least one operating system and send the target notification message to the target operating system;

[0012] The target notification message is used by the target operating system to be displayed in a notification bar.

[0013] According to another aspect of the present disclosure, a device for obtaining a notification message is provided, comprising:

[0014] An acquisition module, configured to acquire a push uniform resource identifier (URI) through a target application in an electronic device; wherein the push URI is created by a first sub-application in the target application;

[0015] a sending module, configured to send the push URI and target information to the operating system service via the target application via the application server; wherein the target information is used by the operating system service to obtain a target notification message to be pushed, and the push URI is used by the operating system service to determine a target operating system located in the electronic device from at least one operating system;

[0016] A receiving module, configured to receive the target notification message sent by the operating system service through the target operating system;

[0017] A display module is used to display the target notification message in a notification bar through the target operating system.

[0018] According to another aspect of the present disclosure, another device for obtaining a notification message is provided, including:

[0019] A receiving module, configured to receive a push URI and target information sent by a target application; wherein the push URI is created by the first sub-application in the target application;

[0020] a sending module, configured to send the push URI and the target information to the operating system service; wherein the target information is used by the operating system service to obtain a target notification message to be pushed, and the push URI is used by the operating system service to determine a target operating system from at least one operating system and send the target notification message to the target operating system;

[0021] The target notification message is used by the target operating system to be displayed in a notification bar.

[0022] According to another aspect of the present disclosure, there is provided an electronic device, including:

[0023] at least one processor; and

[0024] a memory communicatively connected to the at least one processor; wherein,

[0025] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for obtaining notification messages proposed in the above-mentioned first aspect of the present disclosure, or execute the method for obtaining notification messages proposed in the above-mentioned other aspect of the present disclosure.

[0026] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium of computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method for obtaining notification messages proposed in the above-mentioned first aspect of the present disclosure, or to execute the method for obtaining notification messages proposed in the above-mentioned other aspect of the present disclosure.

[0027] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which, when executed by a processor, implements the method for obtaining notification messages proposed in the above-mentioned first aspect of the present disclosure, or implements the method for obtaining notification messages proposed in the above-mentioned other aspect of the present disclosure.

[0028] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.

[0030] Figure 1 A flowchart of a method for obtaining a notification message provided in the first embodiment of the present disclosure;

[0031] Figure 2 A flowchart of a method for obtaining notification messages provided in the second embodiment of the present disclosure;

[0032] Figure 3 This is a flowchart of a method for obtaining notification messages provided in the third embodiment of the present disclosure;

[0033] Figure 4 A flowchart of a method for obtaining notification messages provided in the fourth embodiment of the present disclosure;

[0034] Figure 5 This is a flowchart of a method for obtaining notification messages provided in Embodiment 5 of the present disclosure;

[0035] Figure 6This is a flowchart of a method for obtaining notification messages provided in Embodiment 6 of the present disclosure;

[0036] Figure 7 A schematic diagram of the implementation principle provided by the embodiment of the present disclosure;

[0037] Figure 8 A schematic diagram of the structure of a device for obtaining notification messages provided in Embodiment 7 of the present disclosure;

[0038] Figure 9 A schematic diagram of the structure of a device for obtaining notification messages provided in the eighth embodiment of the present disclosure;

[0039] Figure 10 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0040] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0041] Starting from the Win10 operating system, the Windows operating system has added a WNS service, wherein the WNS service can only be used by UWP applications, that is, the Windows operating system only allows UWP applications to receive WNS messages.

[0042] Currently, the mainstream desktop application types are Win32 applications, but Win32 applications cannot use WNS services, that is, Win32 applications cannot implement Windows push message notifications.

[0043] In response to the technical problem that only UWP applications can use WNS services at this stage, and the Windows operating system does not allow Win32 applications to receive WNS messages, this application provides a method, device, electronic device and storage medium for obtaining notification messages.

[0044] The following describes a method, device, electronic device, and storage medium for acquiring notification messages according to embodiments of the present disclosure with reference to the accompanying drawings.

[0045] Figure 1 This is a flowchart of the method for obtaining notification messages provided in the first embodiment of the present disclosure.

[0046] The embodiment of the present disclosure takes the method for obtaining notification messages configured in a notification message obtaining device as an example. The notification message obtaining device can be applied to any electronic device so that the electronic device can perform the notification message obtaining function.

[0047] Among them, the electronic device can be any device with computing capabilities, such as a personal computer, a mobile terminal, etc. The mobile terminal can be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, and other hardware devices with various operating systems, touch screens and / or display screens.

[0048] like Figure 1 As shown, the method for obtaining the notification message may include the following steps:

[0049] Step S101 : acquiring a push URI through a target application in an electronic device; wherein the push URI is created by a first sub-application in the target application.

[0050] In an embodiment of the present disclosure, the first sub-application in the target application can create a push channel for interacting with the operating system in the electronic device, and create a push URI (Uniform Resource Identifier) ​​associated with the push channel, so that the target application can obtain the push URI created by the first sub-application.

[0051] The push URI is used to identify a push channel, which is used to communicate with an operating system (such as Windows operating system) and operating system services (such as Windows Server and WPN services).

[0052] Step S102, the target application sends a push URI and target information to the operating system service via the application server; wherein the target information is used by the operating system service to obtain the target notification message to be pushed, and the push URI is used by the operating system service to determine the target operating system located in the electronic device from at least one operating system.

[0053] Among them, the target information (such as message push content) is used to obtain the target notification message to be pushed. For example, the target information can be membership expiration reminders, friend messages, activity messages and other information.

[0054] In an embodiment of the present disclosure, the target application can send a push URI and target information for obtaining the target notification message to be pushed to the operating system service through the application server. Accordingly, after receiving the push URI and target information, the operating system service can obtain the target notification message to be pushed based on the target information, and determine the sub-application (i.e., the first sub-application) that created the push URI based on the push URI, and determine the operating system in the device where the first sub-application is located from at least one operating system (referred to as the target operating system in this disclosure).

[0055] Step S103: receiving a target notification message sent by the operating system service through the target operating system.

[0056] In the embodiment of the present disclosure, after determining the target operating system, the operating system service may send a target notification message to the target operating system, and correspondingly, the target operating system may receive the target notification message sent by the operating system service.

[0057] Step S104: display the target notification message in the notification bar through the target operating system.

[0058] In an embodiment of the present disclosure, after receiving the target notification message, the target operating system may display the target notification message in a notification bar (or message bar).

[0059] The method for obtaining notification messages of the embodiment of the present disclosure obtains the push URI created by the first sub-application through the target application, and sends the push URI and target information to the operating system service via the application server, wherein the target information is used by the operating system service to obtain the target notification message to be pushed, and the push URI is used by the operating system service to determine the target operating system located in the electronic device from at least one operating system; the target operating system receives the target notification message sent by the operating system service and displays the target notification message in the notification bar. In this way, it is possible to effectively obtain notification messages based on the push URI created by the sub-application integrated in the application. For example, for an application that cannot use the push message notification service of the operating system, a sub-application that can use the push message notification service can be integrated within the application, and notification messages can be obtained based on the sub-application, thereby improving the applicability of the method.

[0060] It should be noted that in the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information are all carried out with the user's consent, and are in compliance with relevant laws and regulations and do not violate public order and good morals.

[0061] In order to clearly illustrate how the target application obtains the push URI created by the first sub-application in the above embodiment, the present disclosure also proposes a method for obtaining a notification message.

[0062] Figure 2 This is a flowchart of the method for obtaining notification messages provided in the second embodiment of the present disclosure.

[0063] like Figure 2 As shown, the method for obtaining the notification message may include the following steps:

[0064] Step S201: creating a push channel through a first sub-application in a target application in an electronic device; wherein the push channel is used to receive a notification message sent by a target operating system.

[0065] In an embodiment of the present disclosure, the first sub-application in the target application can create a push channel, where the push channel is used to interact with the target operating system in the electronic device. For example, the push channel can be used to receive notification messages sent by the target operating system.

[0066] Step S202: Create a push URI associated with the push channel through the first sub-application.

[0067] In an embodiment of the present disclosure, the first sub-application may create a push URI associated with the push channel, wherein the push URI is used to identify the push channel.

[0068] Step S203: delivering a push URI to a second sub-application in the target application through the first sub-application.

[0069] The second sub-application and the target application belong to the same category. For example, taking the target operating system as a Windows operating system as an example, the second sub-application and the target application may both be Win32 applications.

[0070] In an embodiment of the present disclosure, the first sub-application may transmit a push URI to the second sub-application in the target application.

[0071] As an example, the first sub-application can perform inter-process communication based on a command line to pass a push URI to the second sub-application. For example, the first sub-application can use a command line to start the second sub-application, where the command line includes a push URI, so that the second sub-application can obtain the push URI from the command line.

[0072] Step S204: delivering the push URI to the target application through the second sub-application.

[0073] In an embodiment of the present disclosure, the second sub-application may deliver a push URI to the target application.

[0074] As an example, the second sub-application can perform inter-process communication based on shared memory to pass the push URI to the target application. For example, the second sub-application can write the push URI to the shared memory, so that the target application can read the push URI from the shared memory.

[0075] As another example, the second sub-application can perform inter-process communication based on message communication to pass the push URI to the target application. For example, the second sub-application can write the push URI to the message queue of the window, so that the target application can obtain the push URI from the message queue.

[0076] As another example, the second sub-application can perform inter-process communication based on a command line to pass a push URI to the target application. For example, the second sub-application can use a command line to start the target application, where the command line includes the push URI, so that the target application can obtain the push URI from the command line.

[0077] It should be understood that the above communication method is only an example, but the present disclosure is not limited to this. In actual application, the second sub-application can also use other inter-process communication methods to pass the push URI to the target application. The embodiment of the present disclosure does not limit this.

[0078] In summary, it is possible to transmit push URIs between two applications in different ways, which can improve the flexibility and applicability of the method.

[0079] Step S205: Send the push URI and target information to the operating system service via the target application via the application server.

[0080] The target information is used by the operating system service to obtain the target notification message to be pushed, and the push URI is used by the operating system service to determine the target operating system located in the electronic device from at least one operating system.

[0081] Step S206: Receive a target notification message sent by the operating system service through the target operating system.

[0082] Step S207: Display the target notification message in the notification bar through the target operating system.

[0083] For explanations of steps S205 to S207 , reference may be made to the relevant descriptions in any embodiment of the present disclosure and will not be repeated here.

[0084] In the method for obtaining notification messages of the embodiment of the present disclosure, after the first sub-application creates a push URI, the first sub-application can pass the push URI to the target application based on the second sub-application belonging to the same application category as the target application, which can improve the effectiveness of passing the push URI to the target application.

[0085] In order to clearly illustrate the above embodiment, the present disclosure further proposes a method for obtaining a notification message.

[0086] Figure 3 This is a flowchart of the method for obtaining notification messages provided in the third embodiment of the present disclosure.

[0087] like Figure 3 As shown, the method for obtaining the notification message may include the following steps:

[0088] Step S301: Obtain a push URI through a target application in an electronic device.

[0089] The push URI is created by the first sub-application in the target application and is used to identify the push channel created by the first sub-application.

[0090] Step S302: Send the push URI and target information to the operating system service via the target application via the application server.

[0091] The target information is used by the operating system service to obtain the target notification message to be pushed, and the push URI is used by the operating system service to determine the target operating system located in the electronic device from at least one operating system.

[0092] Step S303: Receive a target notification message sent by the operating system service through the target operating system.

[0093] Step S304: Display the target notification message in the notification bar through the target operating system.

[0094] For explanations of steps S301 to S304 , reference may be made to the relevant descriptions in any embodiment of the present disclosure, and no further details will be given here.

[0095] Step S305 , in response to the triggering operation of the target notification message, the first sub-application is awakened through the push channel created by the target operating system based on the first sub-application, and the target notification message is sent to the first sub-application.

[0096] In an embodiment of the present disclosure, when a user trigger operation (such as a click operation) for a target notification message is detected, the target operating system can wake up the first sub-application based on the push channel created by the first sub-application, and send the target notification message to the first sub-application based on the push channel.

[0097] Step S306: wake up the second sub-application through the first sub-application, and deliver the target notification message to the second sub-application.

[0098] In an embodiment of the present disclosure, the first sub-application may wake up the second sub-application. For example, the first sub-application may wake up the second sub-application through a command line and transmit a target notification message to the second sub-application.

[0099] Step S307: wake up the target application through the second sub-application and deliver a target notification message to the target application.

[0100] In an embodiment of the present disclosure, the second sub-application may wake up the target application. For example, the second sub-application may wake up the second sub-application through a command line and transmit a target notification message to the second sub-application.

[0101] Step S308: Display relevant pages associated with the target notification message through the target application.

[0102] In an embodiment of the present disclosure, after receiving the target notification message, the target application may display a related page associated with the target notification message.

[0103] The method for obtaining notification messages in the embodiment of the present disclosure, when the target application is not started, if the user clicks the message content of the target notification message in the notification bar, the target application can be activated or woken up, so that the user can quickly obtain the latest information associated with the target notification message from the target application, which can not only improve the user's usage experience, but also promote user activity and increase the daily active volume of the target application (i.e., the number of daily active users).

[0104] In order to clearly illustrate how the target application sends the push URI and target information to the operating system service in any of the above embodiments, the present disclosure also proposes a method for obtaining a notification message.

[0105] Figure 4 This is a flowchart of the method for obtaining notification messages provided in the fourth embodiment of the present disclosure.

[0106] like Figure 4 As shown, the method for obtaining the notification message may include the following steps:

[0107] Step S401: Obtain a push URI through a target application in the electronic device.

[0108] The push URI is created by the first sub-application in the target application.

[0109] For explanation of step S401, please refer to the relevant description in any embodiment of the present disclosure, and will not be repeated here.

[0110] In any embodiment of the present disclosure, the application category to which the target application belongs may be different from the application category to which the first sub-application belongs. For example, the application category to which the target application belongs may be the first category, wherein applications belonging to the first category are applications that are not allowed to obtain notification messages from the operating system service, and the application category to which the first sub-application belongs may be the second category, wherein applications belonging to the second category may be applications that are allowed to obtain notification messages from the operating system service.

[0111] For example, taking the target operating system as the Windows operating system, the target application may be a Win32 application, and the first sub-application may be a UWP application.

[0112] Therefore, for target applications (such as Win32 applications) that are not allowed to obtain notification messages from operating system services, push message notifications can also be implemented based on the first sub-application in the target application (such as UWP applications), which can improve the applicability of this method.

[0113] Step S402: Send a first message acquisition request carrying a push URI and target information to an application server through a target application, wherein the first message acquisition request is used by the application server to send a second message acquisition request carrying a push URI and target information to an operating system service; wherein the second message acquisition request is used by the operating system service to obtain a target notification message according to the target information, and determine a target operating system located in the electronic device from at least one operating system according to the push URI, and send a target notification message to the target operating system.

[0114] In an embodiment of the present disclosure, the target application can send a first message acquisition request carrying a push URI and target information to the application server. Accordingly, after receiving the first message acquisition request, the application server can respond to the first message acquisition request and send a second message acquisition request carrying a push URI and target information to the operating system service.

[0115] After receiving the second message acquisition request, the operating system service can respond to the second message acquisition request, obtain the target notification message to be pushed according to the target information, and determine the sub-application (i.e., the first sub-application) that creates the push channel identified by the push URI based on the push URI, and determine the operating system in the device where the first sub-application is located (referred to as the target operating system in this disclosure) from at least one operating system, and send the target notification message to the target operating system.

[0116] In any embodiment of the present disclosure, after receiving the first message acquisition request, the application server may perform the following operations:

[0117] 1. In response to the first message acquisition request, the application server queries the SID (Security Identifier) ​​and message push key associated with the first sub-application in the target application.

[0118] The SID and the message push key are allocated to the first sub-application in response to receiving the registration information sent by the first sub-application, reviewing the registration information, and in response to the registration information passing the review.

[0119] As an example, taking the target operating system as the Windows operating system and the first sub-application as the UWP sub-application, the UWP sub-application can submit registration information to the Windows App Store for review. After the review is passed, the UWP sub-application will be assigned a SID and a message push key.

[0120] In an embodiment of the present disclosure, after the first sub-application is allocated the SID and message push key, it can upload the allocated SID and message push key to the application server through the target application for storage, so that after the application server receives the first message acquisition request sent by the target application, it can query and obtain the SID and message push key associated with the first sub-application.

[0121] 2. The application server sends a second message acquisition request to the operating system service based on the SID, message push key, push URI and target information. That is, the second message acquisition request carries: SID, message push key, push URI and target information.

[0122] Accordingly, after receiving the second message acquisition request, the operating system service may perform the following operations:

[0123] 1. The operating system service authenticates the first sub-application based on the SID and message push key.

[0124] In the embodiment of the present disclosure, the operating system service can authenticate the first sub-application based on the SID and the message push key, and determine whether the first sub-application passes the authentication. If the first sub-application fails the authentication, there is no need to perform subsequent operations, that is, there is no need to query the target notification message and push the target notification message to the target operating system. If the first sub-application passes the authentication, subsequent operations can be performed.

[0125] 2. In response to the first sub-application passing the authentication, the operating system service obtains the target notification message to be pushed according to the target information.

[0126] In the embodiment of the present disclosure, when the first sub-application passes the authentication, the operating system service can query the target notification message to be pushed according to the target information.

[0127] 3. The operating system service determines a target operating system located in the electronic device from at least one operating system according to the push URI.

[0128] In an embodiment of the present disclosure, the operating system service may determine, based on the push URI, to create a first sub-application for the push channel identified by the push URI, and determine, from at least one operating system, a target operating system in the device where the first sub-application is located.

[0129] 4. Send a target notification message to the target operating system.

[0130] In summary, the message acquisition request sent by the application server to the operating system service carries not only the push URI and the target information for obtaining the target notification message to be pushed, but also the SID and message push key for authentication. On the one hand, it can ensure that only authorized applications can receive notification messages to prevent unauthorized applications from obtaining sensitive information or performing malicious operations; on the other hand, the notification message may contain the user's personal data or sensitive information. By authenticating the application, it can be ensured that only applications authorized by the user can access this information, thereby protecting the user's privacy; on the other hand, some malicious applications may try to disguise themselves as legitimate applications and receive notification messages. By authenticating the application, the identity of the application can be verified and fraud can be prevented; on the other hand, by authenticating the application, the permissions of different applications can be controlled. For example, some applications may only be allowed to receive notification messages related to them, while other applications may be prohibited from receiving any notification messages.

[0131] Step S403: Receive a target notification message sent by the operating system service through the target operating system.

[0132] Step S404: Display the target notification message in the notification bar through the target operating system.

[0133] The explanation of steps S403 to S404 can be found in the relevant description of any embodiment of the present disclosure, and will not be repeated here.

[0134] The method for obtaining notification messages in the embodiment of the present disclosure obtains notification messages from the operating system service by sending a request message from the application server to the operating system service, which can improve the effectiveness and timeliness of obtaining notification messages.

[0135] In order to clearly illustrate the above embodiment, the present disclosure further proposes a method for obtaining a notification message.

[0136] Figure 5 This is a flowchart of the method for obtaining notification messages provided in Example 5 of the present disclosure.

[0137] like Figure 5 As shown, the method for obtaining the notification message can be applied to the application server, including the following steps:

[0138] Step S501: receiving a push URI and target information sent by a target application; wherein the push URI is created by the first sub-application in the target application.

[0139] Step S502, sending a push URI and target information to the operating system service; wherein, the target information is used by the operating system service to obtain the target notification message to be pushed, and the push URI is used by the operating system service to determine the target operating system from at least one operating system and send the target notification message to the target operating system; wherein, the target notification message is used by the target operating system to display in the notification bar.

[0140] It should be noted that the explanation of the target application, the first sub-application, the operating system service and the target operating system in any of the aforementioned embodiments is also applicable to this embodiment, and the implementation principles are similar, so they will not be repeated here.

[0141] The method for obtaining notification messages of the embodiment of the present disclosure receives the push URI and target information sent by the target application through the application server; wherein the push URI is created by the first sub-application in the target application; according to the SID, message push key, push URI and target information, a message acquisition request is sent to the operating system service; wherein the message acquisition request is used for the operating system service to perform the following operations: according to the SID and message push key, the first sub-application is authenticated; in response to the first sub-application passing the authentication, the target notification message is obtained according to the target information; according to the push URI, the target operating system located in the electronic device is determined from at least one operating system; the target notification message is sent to the target operating system; wherein the target notification message is used for the target operating system to display in the notification bar. In this way, it is possible to effectively obtain notification messages based on the push URI created by the sub-application integrated in the application. For example, for an application that cannot use the push message notification service of the operating system, a sub-application that can use the push message notification service can be integrated within the application, and notification messages can be obtained based on the sub-application, thereby improving the applicability of the method.

[0142] In order to clearly illustrate how the application server sends the push URI and target information to the operating system service in the above embodiment, the present disclosure also proposes a method for obtaining a notification message.

[0143] Figure 6 This is a flowchart of the method for obtaining notification messages provided in Example 6 of the present disclosure.

[0144] like Figure 6 As shown, the method for obtaining the notification message can be applied to the application server, including the following steps:

[0145] Step S601: receiving a push URI and target information sent by a target application; wherein the push URI is created by the first sub-application in the target application.

[0146] Step S602: query the SID and message push key associated with the first sub-application in the target application.

[0147] The SID and the push key are allocated to the first sub-application in response to receiving the registration information sent by the first sub-application, reviewing the registration information, and in response to the registration information passing the review.

[0148] Step S603: Send a message acquisition request to the operating system service based on the SID, message push key, push URI and target information; wherein, the message acquisition request is used for the operating system service to perform the following operations: authenticate the first sub-application based on the SID and the message push key; in response to the first sub-application passing the authentication, obtain the target notification message based on the target information; determine the target operating system located in the electronic device from at least one operating system based on the push URI; send the target notification message to the target operating system; wherein, the target notification message is used for the target operating system to display in the notification bar.

[0149] It should be noted that the explanation of the target application, the first sub-application, the operating system service and the target operating system in any of the aforementioned embodiments is also applicable to this embodiment, and the implementation principles are similar, so they will not be repeated here.

[0150] In the method for obtaining notification messages of the embodiment of the present disclosure, the message acquisition request sent by the application server to the operating system service carries not only the push URI and target information for obtaining the target notification message to be pushed, but also the SID and message push key for authentication. On the one hand, it can ensure that only authorized applications can receive notification messages, so as to prevent unauthorized applications from obtaining sensitive information or performing malicious operations; on the other hand, the notification message may contain the user's personal data or sensitive information. By authenticating the application, it can be ensured that only applications authorized by the user can access this information, thereby protecting the user's privacy; on the other hand, some malicious applications may attempt to disguise themselves as legitimate applications and receive notification messages. By authenticating the application, the identity of the application can be verified and fraud can be prevented; on the other hand, by authenticating the application, the permissions of different applications can be controlled. For example, some applications may only be allowed to receive notification messages related to them, while other applications may be prohibited from receiving any notification messages.

[0151] In any embodiment of the present disclosure, the target operating system is a Windows operating system, the operating system service is a Windows service, the target application is a Win32 application, the first sub-application is a UWP sub-application, and the second sub-application is a Win32com sub-application. The implementation principle of the present disclosure can be as follows: Figure 7 As shown, it mainly includes the following steps:

[0152] 1. Integrate a UWP installation package (package) into a Win32 application (such as a network disk application or a network disk application client), where the UWP installation package contains a UWP sub-application (UWP App) and a Win32com sub-application (Win32com App);

[0153] 2. The UWP sub-application is responsible for interacting with the Windows operating system. For example, the UWP sub-application can create a push channel to interact with the Windows operating system and create a push URI associated with the push channel;

[0154] 3. The UWP sub-application passes the push URI to the background task process Win32com sub-application. For example, the UWP sub-application can pass the push URI to the Win32com sub-application through the command line;

[0155] 4. The Win32com sub-application communicates with the Win32 application through inter-process communication via shared memory, message communication, command line, etc., and passes the push URI to the Win32 application;

[0156] 5. The Win32 application passes the push URI and the specified message push content (referred to as target information in this disclosure) to the application server (such as a network disk server);

[0157] 6. The application server queries the SID and message push key associated with the UWP sub-application, and sends a push message acquisition request to Windows Server. The push message acquisition request carries: push URI, message push content, SID, and message push key;

[0158] 7. Windows Server authenticates the UWP sub-application based on the SID and the message push key. In response to successful authentication, Windows Server obtains the push notification message to be pushed (referred to as the target notification message in this disclosure) based on the message push content, and determines the target operating system from various operating systems based on the push URI.

[0159] 8. Windows Server sends a target notification message to the target operating system;

[0160] 9. The target operating system displays the target notification message in the notification bar;

[0161] 10. When the target operating system detects a user triggering an action for the target notification message, it wakes up the UWP sub-application based on the push channel created by the UWP sub-application and sends the target notification message to the UWP sub-application.

[0162] 11. The UWP sub-application wakes up the Win32com sub-application and passes the target notification message to the Win32com sub-application;

[0163] 12. The Win32com sub-application wakes up the Win32 application and delivers the target notification message to the Win32 application;

[0164] 13. The Win32 application displays relevant pages associated with the target notification message.

[0165] In summary, Win32 applications can implement Windows push message notifications and obtain push notification messages such as membership expiration reminders, friend messages, and event messages. Moreover, when the Win32 application is not started, if the user clicks on the message content of the push notification message, the Win32 application can be activated, thereby increasing the daily activity of the Win32 application (i.e., the number of daily active users).

[0166] With the above Figures 1 to 4 Corresponding to the method for obtaining notification messages provided in the embodiment, the present disclosure further provides a device for obtaining notification messages. Figures 1 to 4 The method for obtaining the notification message provided in the embodiment corresponds to the method, so the implementation of the method for obtaining the notification message is also applicable to the device for obtaining the notification message provided in the embodiment of the present disclosure, and will not be described in detail in the embodiment of the present disclosure.

[0167] Figure 8 This is a structural diagram of the device for obtaining notification messages provided in Example 7 of the present disclosure.

[0168] like Figure 8 As shown, the notification message acquisition device 800 may include: an acquisition module 810 , a sending module 820 , a receiving module 830 and a display module 840 .

[0169] The acquisition module 810 is configured to acquire a push uniform resource identifier (URI) through a target application in the electronic device; wherein the push URI is created by the first sub-application in the target application.

[0170] The sending module 820 is used to send the push URI and target information to the operating system service through the target application via the application server; wherein, the target information is used by the operating system service to obtain the target notification message to be pushed, and the push URI is used by the operating system service to determine the target operating system located in the electronic device from at least one operating system.

[0171] The receiving module 830 is configured to receive a target notification message sent by an operating system service through a target operating system.

[0172] The display module 840 is configured to display the target notification message in the notification bar via the target operating system.

[0173] In a possible implementation of the embodiment of the present disclosure, the acquisition module 810 is used to: create a push channel through a first sub-application in a target application; wherein the push channel is used to receive notification messages sent by a target operating system; create a push URI associated with the push channel through the first sub-application; deliver the push URI to a second sub-application in the target application through the first sub-application; wherein the second sub-application and the target application belong to the same category; and deliver the push URI to the target application through the second sub-application.

[0174] In one possible implementation of the embodiment of the present disclosure, the acquisition module 810 is used to: write the push URI into the shared memory through the second sub-application, and read the push URI from the shared memory through the target application; or, write the push URI into the message queue through the second sub-application, and obtain the push URI from the message queue through the target application; or, start the target application using a command line through the second sub-application, and obtain the push URI from the command line through the target application.

[0175] In a possible implementation of the embodiment of the present disclosure, the notification message acquisition device 800 may further include:

[0176] The first wake-up module is configured to, in response to a triggering operation on a target notification message, wake up the first sub-application through a target operating system based on a push channel and send the target notification message to the first sub-application.

[0177] The second wake-up module is configured to wake up the second sub-application through the first sub-application and transmit a target notification message to the second sub-application.

[0178] The third wake-up module is configured to wake up the target application through the second sub-application and transmit a target notification message to the target application.

[0179] The display module 840 is further configured to display relevant pages associated with the target notification message through the target application.

[0180] In a possible implementation of an embodiment of the present disclosure, the sending module 820 is used to: send a first message acquisition request carrying a push URI and target information to an application server through a target application; wherein the first message acquisition request is used for the application server to send a second message acquisition request carrying a push URI and target information to an operating system service; wherein the second message acquisition request is used for the operating system service to obtain a target notification message based on the target information, and determine a target operating system located in the electronic device from at least one operating system based on the push URI, and send a target notification message to the target operating system.

[0181] In a possible implementation of the embodiment of the present disclosure, the first message acquisition request is specifically used for the application server to perform the following operations: query the security identifier SID and message push key associated with the first sub-application in the target application; send a second message acquisition request to the operating system service based on the SID, message push key, push URI and target information; wherein the SID and message push key are in response to receiving the registration information sent by the first sub-application, reviewing the registration information, and being allocated to the first sub-application in response to the registration information passing the review.

[0182] In a possible implementation of an embodiment of the present disclosure, the second message acquisition request is used for the operating system service to perform the following operations: authenticate the first sub-application based on the SID and the message push key; in response to the first sub-application passing the authentication, obtain the target notification message based on the target information; determine the target operating system located in the electronic device from at least one operating system based on the push URI; and send the target notification message to the target operating system.

[0183] In a possible implementation of the embodiment of the present disclosure, the target application is an application that is not allowed to obtain notification messages from the operating system service, and the first sub-application is an application that is allowed to obtain notification messages from the operating system service.

[0184] The device for obtaining notification messages in the embodiment of the present disclosure obtains the push URI created by the first sub-application through the target application, and sends the push URI and target information to the operating system service via the application server, wherein the target information is used by the operating system service to obtain the target notification message to be pushed, and the push URI is used by the operating system service to determine the target operating system located in the electronic device from at least one operating system; the target operating system receives the target notification message sent by the operating system service and displays the target notification message in the notification bar. In this way, it is possible to effectively obtain notification messages based on the push URI created by the sub-application integrated in the application. For example, for an application that cannot use the push message notification service of the operating system, a sub-application that can use the push message notification service can be integrated within the application, and notification messages can be obtained based on the sub-application, thereby improving the applicability of the method.

[0185] With the above Figures 5 and 6 Corresponding to the method for obtaining notification messages provided in the embodiment, the present disclosure further provides a device for obtaining notification messages. Figures 5 and 6 The method for obtaining the notification message provided in the embodiment corresponds to the method, so the implementation of the method for obtaining the notification message is also applicable to the device for obtaining the notification message provided in the embodiment of the present disclosure, and will not be described in detail in the embodiment of the present disclosure.

[0186] Figure 9 This is a structural diagram of the device for obtaining notification messages provided in the eighth embodiment of the present disclosure.

[0187] like Figure 9 As shown, the notification message acquisition device 900 may include: a receiving module 910 and a sending module 920.

[0188] The receiving module 910 is configured to receive a push URI and target information sent by a target application; wherein the push URI is created by the first sub-application in the target application.

[0189] Sending module 920 is used to send a push URI and target information to the operating system service; wherein, the target information is used by the operating system service to obtain the target notification message to be pushed, and the push URI is used by the operating system service to determine the target operating system from at least one operating system and send the target notification message to the target operating system; wherein, the target notification message is used by the target operating system to display in the notification bar.

[0190] In one possible implementation of the embodiment of the present disclosure, the sending module 920 is configured to: query the SID and message push key associated with the first sub-application in the target application; and send a message acquisition request to the operating system service based on the SID, the message push key, the push URI, and the target information; wherein the SID and the push key are allocated to the first sub-application in response to receiving registration information sent by the first sub-application, reviewing the registration information, and in response to the registration information passing the review;

[0191] Among them, the message acquisition request is used for the operating system service to perform the following operations: authenticate the first sub-application based on the SID and the message push key; in response to the first sub-application passing the authentication, obtain the target notification message based on the target information; determine the target operating system from at least one operating system based on the push URI; and send the target notification message to the target operating system.

[0192] The device for obtaining notification messages in the disclosed embodiment receives a push URI and target information sent by a target application through an application server; wherein the push URI is created by a first sub-application in the target application; and sends a message acquisition request to an operating system service based on the SID, message push key, push URI, and target information. wherein the message acquisition request is used by the operating system service to perform the following operations: authenticate the first sub-application based on the SID and message push key; in response to the first sub-application passing the authentication, obtain a target notification message based on the target information; determine a target operating system located in an electronic device from at least one operating system based on the push URI; and send a target notification message to the target operating system; wherein the target notification message is used by the target operating system to display it in the notification bar. Thus, it is possible to effectively obtain notification messages based on the push URI created by the sub-application integrated into the application. For example, for an application that cannot use the operating system's push message notification service, a sub-application that can use the push message notification service can be integrated within the application and notification messages can be obtained based on the sub-application, thereby improving the applicability of the method.

[0193] In order to implement the above embodiments, the present disclosure also provides an electronic device, which may include at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor so that the at least one processor can execute the notification message acquisition method proposed in any of the above embodiments of the present disclosure.

[0194] In order to implement the above embodiments, the present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method for obtaining notification messages proposed in any of the above embodiments of the present disclosure.

[0195] In order to implement the above embodiments, the present disclosure further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the method for obtaining the notification message proposed in any of the above embodiments of the present disclosure.

[0196] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0197] Figure 10A schematic block diagram of an example electronic device that can be used to implement an embodiment of the present disclosure is shown. The electronic device may include the server and client in the above-mentioned embodiments. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0198] like Figure 10 As shown, the device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 1002 or a computer program loaded from a storage unit 1007 into a RAM (Random Access Memory) 1003. Various programs and data required for the operation of the device 1000 can also be stored in the RAM 1003. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An I / O (Input / Output) interface 1005 is also connected to the bus 1004.

[0199] Various components in device 1000 are connected to I / O interface 1005, including an input unit 1006, such as a keyboard, mouse, etc.; an output unit 1007, such as various types of displays, speakers, etc.; a storage unit 1008, such as a magnetic disk, optical disk, etc.; and a communication unit 1009, such as a network card, modem, wireless communication transceiver, etc. The communication unit 1009 allows device 1000 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0200] The computing unit 1001 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Unit), various specialized AI (Artificial Intelligence) computing chips, various computing units that run machine learning model algorithms, a DSP (Digital Signal Processor), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 performs the various methods and processes described above, such as the method for obtaining notification messages described above. For example, in some embodiments, the method for obtaining notification messages described above can be implemented as a computer software program that is tangibly embodied in a machine-readable medium, such as the storage unit 1008. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 1000 via the ROM 1002 and / or the communication unit 1009. When the computer program is loaded into the RAM 1003 and executed by the computing unit 1001, one or more steps of the method for obtaining notification messages described above can be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to execute the above-mentioned method for obtaining the notification message in any other appropriate manner (for example, by means of firmware).

[0201] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System on Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0202] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0203] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0204] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0205] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.

[0206] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact via a communication network. The client-server relationship is established by computer programs running on the respective computers and establishing a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, a host product within the cloud computing service ecosystem that addresses the management difficulties and poor scalability of traditional physical hosts and VPS services. The server may also be a server in a distributed system or a server integrated with blockchain.

[0207] It's important to note that artificial intelligence (AI) is the study of how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). This encompasses both hardware and software technologies. AI hardware technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily encompass computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graphs.

[0208] According to the technical solution of the embodiment of the present disclosure, the push URI created by the first sub-application is obtained through the target application, and the push URI and target information are sent to the operating system service via the application server, wherein the target information is used by the operating system service to obtain the target notification message to be pushed, and the push URI is used by the operating system service to determine the target operating system located in the electronic device from at least one operating system; the target operating system receives the target notification message sent by the operating system service and displays the target notification message in the notification bar. In this way, it is possible to effectively obtain notification messages based on the push URI created by the sub-application integrated in the application. For example, for an application that cannot use the push message notification service of the operating system, a sub-application that can use the push message notification service can be integrated within the application, and notification messages can be obtained based on the sub-application, thereby improving the applicability of the method.

[0209] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.

[0210] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A method for obtaining a notification message, comprising: Obtaining a push uniform resource identifier (URI) through a target application in the electronic device; wherein the push URI is created by a first sub-application in the target application; wherein the target application is an application that is not allowed to obtain notification messages from an operating system service, and the first sub-application is an application that is allowed to obtain notification messages from the operating system service; Sending the push URI and target information to the operating system service via the target application via the application server, the target information including the message push content; wherein the target information is used by the operating system service to obtain the target notification message to be pushed, and the push URI is used by the operating system service to determine the target operating system located in the electronic device from at least one operating system; Receiving, through the target operating system, the target notification message sent by the operating system service; The target notification message is displayed in a notification bar by the target operating system.

2. The method according to claim 1, wherein The step of obtaining a push uniform resource identifier (URI) through a target application in the electronic device includes: Creating a push channel through the first sub-application in the target application; wherein the push channel is used to receive notification messages sent by the target operating system; Creating, by the first sub-application, the push URI associated with the push channel; delivering the push URI to a second sub-application in the target application through the first sub-application; wherein the second sub-application and the target application belong to the same category; The push URI is delivered to the target application through the second sub-application.

3. The method according to claim 2, wherein: The delivering the push URI to the target application through the second sub-application includes: Writing the push URI into a shared memory through the second sub-application, and reading the push URI from the shared memory through the target application; or, Writing the push URI into a message queue through the second sub-application, and obtaining the push URI from the message queue through the target application; or, The target application is started by the second sub-application using a command line, and the push URI is obtained from the command line by the target application.

4. The method according to claim 2, wherein: After displaying the target notification message in the notification bar by the target operating system, the method further includes: In response to a triggering operation on the target notification message, waking up the first sub-application based on the push channel through the target operating system, and sending the target notification message to the first sub-application; waking up the second sub-application through the first sub-application, and delivering the target notification message to the second sub-application; waking up the target application by using the second sub-application and delivering the target notification message to the target application; The target application displays a related page associated with the target notification message.

5. The method according to any one of claims 1 to 4, wherein The sending the push URI and target information to the operating system service via the application server through the target application includes: Sending a first message acquisition request carrying the push URI and the target information to the application server through the target application; The first message acquisition request is used by the application server to send a second message acquisition request carrying the push URI and the target information to the operating system service; Among them, the second message acquisition request is used by the operating system service to obtain the target notification message according to the target information, and to determine the target operating system located in the electronic device from at least one operating system according to the push URI, and to send the target notification message to the target operating system.

6. The method according to claim 5, wherein: The first message acquisition request is specifically used by the application server to perform the following operations: Querying a security identifier SID and a message push key associated with the first sub-application in the target application; Sending the second message acquisition request to the operating system service according to the SID, the message push key, the push URI and the target information; The SID and the message push key are allocated to the first sub-application in response to receiving the registration information sent by the first sub-application, reviewing the registration information, and in response to the registration information passing the review.

7. The method according to claim 6, wherein: The second message acquisition request is used by the operating system service to perform the following operations: authenticating the first sub-application according to the SID and the message push key; In response to the first sub-application passing the authentication, obtaining the target notification message according to the target information; Determining a target operating system located in the electronic device from at least one operating system according to the push URI; The target notification message is sent to the target operating system.

8. A method for obtaining a notification message, comprising: Receiving a push URI and target information sent by a target application; wherein the push URI is created by a first sub-application in the target application; wherein the target application is an application that is not allowed to obtain notification messages from an operating system service, and the first sub-application is an application that is allowed to obtain notification messages from the operating system service; Sending the push URI and the target information to the operating system service, where the target information includes the message push content; wherein the target information is used by the operating system service to obtain a target notification message to be pushed, and the push URI is used by the operating system service to determine a target operating system from at least one operating system and send the target notification message to the target operating system; The target notification message is used by the target operating system to be displayed in a notification bar.

9. The method according to claim 8, wherein The sending the push URI and the target information to the operating system service includes: Querying the SID and message push key associated with the first sub-application in the target application; Sending the message acquisition request to the operating system service according to the SID, the message push key, the push URI and the target information; The SID and the push key are allocated to the first sub-application in response to receiving registration information sent by the first sub-application, reviewing the registration information, and in response to the registration information passing the review; The message acquisition request is used by the operating system service to perform the following operations: authenticating the first sub-application according to the SID and the message push key; In response to the first sub-application passing the authentication, obtaining the target notification message according to the target information; Determining the target operating system from at least one operating system according to the push URI; The target notification message is sent to the target operating system.

10. A device for obtaining a notification message, comprising: An acquisition module, configured to acquire a push uniform resource identifier (URI) through a target application in an electronic device; wherein the push URI is created by a first sub-application in the target application; wherein the target application is an application that is not allowed to obtain notification messages from an operating system service, and the first sub-application is an application that is allowed to obtain notification messages from the operating system service; a sending module, configured to send the push URI and target information to the operating system service via the target application via the application server, the target information including the message push content; wherein the target information is used by the operating system service to obtain the target notification message to be pushed, and the push URI is used by the operating system service to determine the target operating system located in the electronic device from at least one operating system; A receiving module, configured to receive the target notification message sent by the operating system service through the target operating system; A display module is used to display the target notification message in a notification bar through the target operating system.

11. The device according to claim 10, wherein The acquisition module is used to: Creating a push channel through the first sub-application in the target application; wherein the push channel is used to receive notification messages sent by the target operating system; Creating, by the first sub-application, the push URI associated with the push channel; delivering the push URI to a second sub-application in the target application through the first sub-application; wherein the second sub-application and the target application belong to the same category; The push URI is delivered to the target application through the second sub-application.

12. The device according to claim 11, wherein The acquisition module is used to: Writing the push URI into a shared memory through the second sub-application, and reading the push URI from the shared memory through the target application; or, Writing the push URI into a message queue through the second sub-application, and obtaining the push URI from the message queue through the target application; or, The target application is started by the second sub-application using a command line, and the push URI is obtained from the command line by the target application.

13. The device according to claim 11, wherein The device further comprises: a first awakening module, configured to awaken the first sub-application based on the push channel through the target operating system in response to a triggering operation on the target notification message, and send the target notification message to the first sub-application; A second wake-up module, configured to wake up the second sub-application through the first sub-application and deliver the target notification message to the second sub-application; a third awakening module, configured to awaken the target application through the second sub-application and deliver the target notification message to the target application; The display module is further configured to display relevant pages associated with the target notification message through the target application.

14. The device according to any one of claims 10 to 13, wherein: The sending module is used to: Sending a first message acquisition request carrying the push URI and the target information to the application server through the target application; The first message acquisition request is used by the application server to send a second message acquisition request carrying the push URI and the target information to the operating system service; Among them, the second message acquisition request is used by the operating system service to obtain the target notification message according to the target information, and to determine the target operating system located in the electronic device from at least one operating system according to the push URI, and to send the target notification message to the target operating system.

15. The device according to claim 14, wherein The first message acquisition request is specifically used by the application server to perform the following operations: Querying a security identifier SID and a message push key associated with the first sub-application in the target application; Sending the second message acquisition request to the operating system service according to the SID, the message push key, the push URI and the target information; The SID and the message push key are allocated to the first sub-application in response to receiving the registration information sent by the first sub-application, reviewing the registration information, and in response to the registration information passing the review.

16. The device according to claim 15, wherein The second message acquisition request is used by the operating system service to perform the following operations: authenticating the first sub-application according to the SID and the message push key; In response to the first sub-application passing the authentication, obtaining the target notification message according to the target information; Determining a target operating system located in the electronic device from at least one operating system according to the push URI; The target notification message is sent to the target operating system.

17. A device for obtaining a notification message, comprising: a receiving module, configured to receive a push URI and target information sent by a target application; wherein the push URI is created by a first sub-application in the target application; wherein the target application is an application that is not allowed to obtain notification messages from an operating system service, and the first sub-application is an application that is allowed to obtain notification messages from the operating system service; a sending module, configured to send the push URI and the target information to the operating system service, the target information including the message push content; wherein the target information is used by the operating system service to obtain a target notification message to be pushed, and the push URI is used by the operating system service to determine a target operating system from at least one operating system and send the target notification message to the target operating system; The target notification message is used by the target operating system to be displayed in a notification bar.

18. The device according to claim 17, wherein The sending module is used to: Querying the SID and message push key associated with the first sub-application in the target application; Sending the message acquisition request to the operating system service according to the SID, the message push key, the push URI and the target information; The SID and the push key are allocated to the first sub-application in response to receiving registration information sent by the first sub-application, reviewing the registration information, and in response to the registration information passing the review; The message acquisition request is used by the operating system service to perform the following operations: authenticating the first sub-application according to the SID and the message push key; In response to the first sub-application passing the authentication, obtaining the target notification message according to the target information; Determining the target operating system from at least one operating system according to the push URI; The target notification message is sent to the target operating system.

19. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for obtaining the notification message described in any one of claims 1-7, or execute the method for obtaining the notification message described in claim 8 or 9.

20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the method for obtaining a notification message according to any one of claims 1 to 7, or to execute the method for obtaining a notification message according to claim 8 or 9.

21. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the steps of the method for obtaining a notification message according to any one of claims 1 to 7, or implements the steps of the method for obtaining a notification message according to claim 8 or 9.

Citation Information

Patent Citations

  • Conversation and terminal response feedback method and device based on push notification

    CN104184821A