Message pushing method and electronic equipment
Through networked devices, non-real-time networked devices can be used to push messages and register and receive messages, solving the problem that non-real-time networked devices cannot receive messages, realizing timely information push, and improving user experience.
Patent Information
- Application Number
- CN202410172110.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-06
- Publication Date
- 2025-08-08
AI Technical Summary
Non-real-time networking devices cannot interact directly with the server, resulting in the inability to receive push messages, affecting the user experience.
Through networked devices, non-real-time networked devices can complete the message push registration and reception process, and use short-range communication technologies such as Bluetooth or NFC to communicate indirectly with the push notification server to realize message push.
Non-real-time networking devices can receive application messages in a timely manner and improve user experience.
Smart Images

Figure CN120455532A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of terminal technology, and in particular to a message push method and an electronic device. Background Art
[0002] With the widespread adoption of mobile internet and smart devices, push messaging technology has become increasingly important. It's more than just a simple means of delivering information; it's a crucial bridge connecting app developers and users. Through push messaging, apps can deliver timely information to users, enhancing user experience and the overall value of the app.
[0003] Currently, app push notifications are typically implemented using cloud servers. However, devices without an internet connection cannot directly interact with the server and therefore cannot receive push notifications. This prevents users from receiving relevant information in a timely manner, impacting the user experience. Summary of the Invention
[0004] An embodiment of the present invention provides a message push method. By implementing the method, an electronic device that is not connected to the network in real time can realize the registration and reception process of message push with the help of a connected device.
[0005] In a first aspect, an embodiment of the present invention provides a message push method, applied to a first device, comprising: receiving first registration information sent by a second device, the second device being a non-real-time networked device, the first registration information including a device identifier of the second device and an application identifier of a first application; generating second registration information based on the first registration information, the second registration information including the device identifier of the first device and the application identifier of the first application; and sending the second registration information to a push notification server.
[0006] In conjunction with the first aspect, in some embodiments, after sending the second registration information to the push notification server, the method further includes: receiving a first token from the push notification server, the first token corresponding to the first device and the first application; and sending the first token to the server of the first application, so that the server of the first application can send the first token to the push notification server when a message needs to be pushed to the first device.
[0007] In conjunction with the first aspect, in some embodiments, before receiving the first registration information sent by the second device, the method further includes: sending the second registration information to a push notification server; receiving a second token sent by the push notification server, the second token corresponding to the first device and the first application; and sending the second token to the server of the second application, so that the server of the second application can send the second token to the push notification server when it needs to push a message to the first device.
[0008] In conjunction with the first aspect, in some embodiments, the method further includes: receiving a push message sent by a push notification server, and sending the push message to the second device.
[0009] In combination with the above embodiment, before sending the push message to the second device, the method further includes: processing the push message to obtain an application identifier and message content, and determining that the push message is a push message sent to the second device based on the application identifier or the message content.
[0010] In conjunction with the first aspect, in some implementations, the non-real-time networked device includes: a device that does not have the ability to access the Internet, and a device that has the ability to connect to the Internet but is not connected to the Internet.
[0011] In a second aspect, an embodiment of the present invention provides a message push method, which is applied to a communication system including a first device and a second device, wherein the first device is a networked device and the second device is a non-real-time networked device. The method comprises: the first device receiving first registration information sent by the second device, the first registration information including a device identifier of the second device and an application identifier of a first application. The first device generates second registration information based on the first registration information, the second registration information including the device identifier of the first device and the application identifier of the first application. The first device sends the second registration information to a push notification server.
[0012] In some embodiments, after the first device sends the second registration information to the push notification server, the method further includes: the first device receiving a first token sent by the push notification server, the first token corresponding to the first device and the first application. The first device sends the first token to the first application server, so that the first application server can send the first token to the push notification server when a message needs to be pushed to the first device.
[0013] In some embodiments, before the first device receives the first registration information sent by the second device, the method further includes: the first device sending the second registration information to a push notification server. The first device receives a second token sent by the push notification server, where the second token corresponds to the first device and the first application. The first device sends the second token to the server of the second application, so that the server of the second application can send the second token to the push notification server when it needs to push a message to the first device.
[0014] In conjunction with the second aspect, in some embodiments, the method further includes: the first device receiving a push message sent by a push notification server, and the first device sending the push message to the second device.
[0015] In combination with the previous embodiment, the method further includes: the second device processing the push message to obtain an application identifier and message content. If the push message is determined to be a push message sent to the second device based on the application identifier or the message content, the second device displays the message content.
[0016] In conjunction with the previous embodiment, before the first device sends the push message to the second device, the method further includes: the first device processing the push message to obtain an application identifier and message content. The first device determines that the push message is a push message for the second device based on the application identifier or the message content.
[0017] In conjunction with the second aspect, in some implementations, non-real-time networked devices include: devices that do not have the ability to access the Internet, and devices that have network capabilities but are not connected to the Internet.
[0018] In a third aspect, an embodiment of the present invention provides a message push method, applied to a second device, comprising: installing a first application; sending first registration information to the first device, the first registration information including the device identifier of the second device and the application identifier of the first application; receiving a push message from the first device, the push message including a push message from the first application; processing the push message from the first application to obtain the application identifier of the first application and the message content; and displaying the message content.
[0019] In combination with the third aspect, in some implementations, before displaying the message content, the method further includes: determining, based on the application identifier of the first application or the message content, whether the push message is a push message sent to itself.
[0020] In a fourth aspect, an embodiment of the present invention provides an electronic device, which includes a memory, a processor and a sensor, wherein: the memory is used to store a computer program, and the processor is used to call the computer program so that the electronic device executes the method of the first aspect mentioned above.
[0021] In a fifth aspect, an embodiment of the present invention provides a computer program product comprising instructions, characterized in that when the computer program product is run on an electronic device, the electronic device executes the method of the first aspect.
[0022] In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium comprising instructions, which, when executed on an electronic device, causes the electronic device to execute the method of the first aspect.
[0023] In the seventh aspect, an embodiment of the present invention provides an electronic device, characterized in that the electronic device includes a memory, a processor and a sensor, the memory is used to store a computer program, and the processor is used to call the computer program so that the electronic device executes the method of the aforementioned third aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram of an electronic device receiving an application push message provided by an embodiment of the present invention;
[0025] Figure 2 A schematic diagram of a communication system 10 provided in an embodiment of the present invention;
[0026] Figure 3A A schematic structural diagram of an electronic device 100 provided in an embodiment of the present invention;
[0027] Figure 3B A software structure block diagram of an electronic device 100 provided in an embodiment of the present invention;
[0028] Figures 4A to 4D The user interface of the electronic device 200 involved in the message push process provided by the embodiment of the present invention;
[0029] Figure 5 The user interface of the electronic device 100 involved in the message push process provided by the embodiment of the present invention;
[0030] Figure 6 A flowchart of a message push method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The following will clearly describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of the present invention.
[0032] Figure 1 The diagram exemplarily shows an electronic device receiving an application push message.
[0033] like Figure 1As shown, after the application is installed, when the electronic device runs the application for the first time, the application can request permission from the operating system to push messages. After the user authorizes, the operating system can request a registration token from the push notification server through the communication module of the electronic device. The push notification server can generate a registration token based on the request, and there is a corresponding relationship between this registration token and the electronic device that sends the request and the application. After receiving the registration token sent by the push notification server, the electronic device can send the registration token to the application server, thereby realizing the registration process of message push. Afterwards, when the application needs to push a message, the application server can send the message to be pushed, as well as all or part of the registration tokens it holds, to the push notification server. The push notification server can send the application identifier and the message that the above-mentioned application server needs to push to the electronic device corresponding to all or part of the aforementioned registration tokens, thereby realizing the whole process of application message push.
[0034] Currently, there are significant differences in the data communication and information reception capabilities of different devices. Non-real-time connected devices, a type of device with weak communication capabilities, are devices that cannot connect to the internet at a certain point in time or for a sustained period of time. This can include devices that lack internet access due to design or technical limitations. Although these devices cannot directly access the internet, they typically have short-range communication capabilities and can wirelessly transmit data with nearby devices. In addition, non-real-time connected devices also include those that have internet connectivity but are not connected to the internet. Although these devices have internet connectivity, they may be temporarily disconnected for various reasons, such as the lack of an available network connection or the user choosing not to connect to the internet.
[0035] For apps on devices without real-time connectivity, since they're not connected to the internet, they can't register for push notifications. Alternatively, even if they complete the registration process, the device hosting the app won't receive push notifications from the push notification server. This prevents users of these devices from receiving timely app-related information, severely impacting their user experience.
[0036] First, a structural diagram of the communication system 10 provided in an embodiment of the present application is introduced.
[0037] refer to Figure 2 , Figure 2 FIG. 1 shows a communication system 10 provided in an embodiment of the present application. Figure 2 As shown, the communication system 10 may include: an electronic device 100 and an electronic device 200. The electronic device 100 is a networked device, and the electronic device 200 is a non-real-time networked device.
[0038] In an embodiment of the present application, the electronic device 100 and the electronic device 200 can communicate with each other. The communication methods between the two may include: communicating based on short-range communication technology, such as Bluetooth (BT), near field communication (NFC), or radio frequency identification (RFID). In some implementations, a pairing relationship can also be established between the electronic device 100 and the electronic device 200. Taking the establishment of a Bluetooth pairing relationship between the electronic device 100 and the electronic device 200 as an example, the electronic device 100 and the electronic device 200 can both have a Bluetooth communication module. The electronic device 100 can search for electronic devices near the electronic device 100 through the Bluetooth communication module, and the electronic devices it searches for may include the electronic device 200. Afterwards, the electronic device 100 can be paired with the electronic device 200.
[0039] In the embodiment of the present application, the electronic device 100 can also communicate with the push notification server and the application server. Although the electronic device 200 is not connected to the Internet and cannot directly communicate with the push notification server and the application server, it can indirectly communicate with the two servers through the forwarding of the electronic device 100.
[0040] In some implementations, the push notification server and the application server may be the same server. In other implementations, the push notification server and the application server may be different servers.
[0041] By implementing the method provided in the embodiments of this application, when the electronic device 200 has the first application installed and the electronic device 100 does not, even without an Internet connection, the electronic device 200 can, with the help of the electronic device 100, receive and display push messages from the first application. Thus, independently installed applications on the electronic device 200 can also promptly inform the user of relevant information via push messages, thereby improving the user experience. This method will be described in detail in subsequent embodiments of this application and will not be explained in detail here.
[0042] Figure 3A A schematic structural diagram of the electronic device 100 is shown.
[0043] The electronic device 100 in the embodiment of the present invention can be implemented as a mobile phone, a tablet computer, etc. The embodiment of the present application does not limit the specific type of the electronic device 100.
[0044] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0045] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0046] 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 memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0047] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0048] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0049] 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 USB interface.
[0050] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.
[0051] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0052] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0053] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0054] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0055] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0056] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), BT, global navigation satellite system (GNSS), frequency modulation (FM), NFC, infrared technology (IR), etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0057] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0058] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0059] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0060] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0061] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0062] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0063] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.
[0064] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0065] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.
[0066] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting it into or removing it from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0067] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The software system can be an Android system, a Hongmeng system, etc. The embodiments of the present application do not specifically limit the software system of the electronic device 100. Here, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.
[0068] Figure 3B It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
[0069] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0070] The application layer can include a series of application packages.
[0071] like Figure 3B As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
[0072] The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0073] like Figure 3BAs shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0074] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.
[0075] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0076] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0077] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).
[0078] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0079] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.
[0080] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
[0081] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0082] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0083] The system library can include multiple functional modules, such as the surface manager, push capability management service, 2D graphics engine (such as SGL), media libraries, etc.
[0084] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0085] The distributed push capability management service may generate second registration information based on the first registration information sent by the electronic device 200. The first registration information may include the device identifier of the electronic device 200 and the application identifier of the first application, and the second registration information may include the device identifier of the electronic device 100 and the application identifier of the first application.
[0086] In addition, in some implementations, after receiving a push message from the push notification server, the distributed push capability management service may also process the push message to obtain an application identifier and message content. It may then use the application identifier or message content to determine whether the push message is intended for electronic device 200. The above process will be described in detail in subsequent embodiments of this application and will not be explained in detail here.
[0087] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0088] A 2D graphics engine is a drawing engine for 2D drawings.
[0089] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.
[0090] The following describes the workflow of the software and hardware of the electronic device 100 in conjunction with capturing a photo scene.
[0091] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, touch operation timestamp, and other information). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the control of the camera application icon, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer to capture a still image or video through the camera 193.
[0092] The electronic device 200 in the embodiment of the present invention can be implemented as a smart wearable device, such as a smart watch, a smart bracelet, etc. The embodiment of the present application does not limit the specific type of the electronic device 200.
[0093] The following is an exemplary description of the user interface involved in the electronic device 200 during the message push process provided in the embodiment of the present application.
[0094] Figure 4A The user interface 410 is shown as an example. The user interface 410 may be an application list interface of the electronic device 200, which includes a plurality of application icons. Figure 4A As shown, the multiple application icons include an icon 411 of a weather application.
[0095] Detecting the user's input operation (such as a touch operation) on the icon 411, the electronic device 200 can run the weather application in response to the above input operation. When the electronic device 200 runs the application for the first time, the electronic device 200 can display the following information: Figure 4B The user interface 420 shown is a permission request interface for asking the user whether to allow the weather application to push application messages. Figure 4B As shown, the user interface 420 includes a button 421 and a button 422. The button 421 is used to trigger the electronic device 200 to prohibit the weather application from pushing application messages, and the button 422 is used to trigger the electronic device 200 to allow the weather application to push application messages.
[0096] Upon detecting a user input operation (e.g., a touch operation) on icon 422, electronic device 200 may generate and send registration information to electronic device 100 in response to the input operation. The registration information may include the device identifier of electronic device 200 and the application identifier of the weather application. Electronic device 100 may then assist electronic device 200 in completing message push registration for the weather application on the push notification server.
[0097] In addition, in some implementations, an input operation (eg, a touch operation) performed by a user on the icon 422 is detected. In response to the input operation, the electronic device 200 may display the following information: Figure 4CThe user interface 430 shown is a query interface for asking the user whether to allow the electronic device 200 to share the push messages sent by the weather application with the electronic device 100. If permitted, the electronic device 100 can also display the push messages of the weather application. The user interface 430 of the electronic device 100 includes a button 431 and a button 432. Among them, the button 421 is used to trigger the electronic device 200 to prohibit the electronic device 200 from sharing the push messages sent by the weather application with the electronic device 100, and the button 422 is used to trigger the electronic device 200 to allow the electronic device 200 to share the push messages sent by the weather application with the electronic device 100.
[0098] Afterwards, the electronic device 200 may receive the push message of the weather application sent by the electronic device 100. The electronic device 200 may display the push message. Figure 4D As shown, electronic device 200 may display user interface 440, which may be a watch face interface including notification control 441. Notification control 441 may include an icon for a weather application and a push message from the weather application. The push message from the weather application may be implemented as text: "Today's temperature is 8-13°C, light rain, remember to bring an umbrella."
[0099] Figure 5 The user interface 510 is exemplarily shown. The user interface 510 may be a notification page provided by a watch application in the electronic device 100, including a share selection bar 511. The share selection bar 511 is used for the user to select whether to share push messages of applications installed on the electronic device 100 and having permission to push messages to the electronic device 200.
[0100] For example, Figure 5 As shown, the push message mirror column 511 may include a switch 511a, which corresponds to the health application. If the switch 511a is turned on, the electronic device 100 may share the push message of the health application with the electronic device 200.
[0101] In the above example, the user selects whether electronic device 100 shares the push message of the application with electronic device 200. It is understood that electronic device 100 may also determine whether to share the push message of the application with electronic device 200 in other ways, such as by electronic device 100 independently determining based on the application identifier in the push message or the message content.
[0102] Figure 6 Flowchart of a message push method provided by an embodiment of the present invention. The method is applied to electronic device 100. Figure 6 As shown, the method includes:
[0103] Step S101: The electronic device 100 receives the first registration information sent by the electronic device 200. The first registration information includes the device identifier of the electronic device 200 and the application identifier of the first application.
[0104] The first application is an application installed in the electronic device 200 and has permission to push messages on the electronic device 200. In some implementations, the first application may be an application pre-installed on the electronic device 200. In other implementations, the first application may also be an application downloaded and installed by the electronic device 200 from an external application store or other application source.
[0105] In some implementations, after receiving the registration information sent by the electronic device 200, the electronic device 100 may store the registration information.
[0106] After executing step S101, the electronic device 100 may choose to execute different steps according to whether it has the first application installed and whether the registration for message push has been completed for the first application. Specifically, if the electronic device 100 does not have the first application installed, or the electronic device 100 has not completed the registration for message push for the first application, then the electronic device 100 may execute steps S102 to S104. If the electronic device 100 has the first application installed and has completed the registration for message push for the first application, then the electronic device 100 may skip steps S102 to S104 and execute step S105.
[0107] Step S102: The electronic device 100 generates second registration information according to the first registration information. The second registration information includes the device identifier of the electronic device 100 and the application identifier of the first application.
[0108] The electronic device 100 may update the device identification of the electronic device 200 in the first registration information to the device identification of the electronic device 100 itself, thereby generating the second registration information.
[0109] Step S103: The electronic device 100 sends the second registration information to the push notification server.
[0110] Step S104: The electronic device 100 receives the registration token sent by the push notification server, and sends the registration token to the first application server.
[0111] The registration token sent by the push notification server is a registration token generated by the push notification server according to the received second registration information. The registration token corresponds to the electronic device 100 and the first application.
[0112] By executing steps S101 to S104, the electronic device 100 can complete the registration process of message push on the push notification server by treating the first application installed in the electronic device 200 as the first application installed by itself. Since the push notification server treats the first application as an application installed by the electronic device 100. Therefore, when pushing messages subsequently, the push notification server will send a push message of the first application to the electronic device 100. After receiving the push message of the first application, the electronic device 100 can forward the push message to the electronic device 200, thereby helping non-networked devices to realize the process of receiving application push messages.
[0113] If the electronic device 100 has the first application installed and has already completed message push registration for the first application, then in this case, the electronic device 100 is already able to receive the push message sent by the first application server via the push notification server. Therefore, after executing step S101, the electronic device 100 skips steps S102 to S104 and executes step S105, which can avoid the electronic device 100 from repeatedly registering the first application on the push notification server and reduce the redundancy of the execution steps.
[0114] In some implementations, if the electronic device 100 installs the first application and has completed the registration for message push for the first application, then after executing step S101, the electronic device 100 may also execute steps S102 to S103, that is, the electronic device 100 may repeat the registration for message push for the first application on the push notification server.
[0115] Afterwards, in some implementations, the electronic device 100 may perform step S104, i.e., the electronic device 100 may receive the registration token sent by the push notification server and send the registration token to the first application server. In some examples, the registration token sent by the push notification server during this process may be the same as the registration token issued when the electronic device 100 first registered for message push for the first application. In other examples, the registration token may be different from the registration token issued when the electronic device 100 first registered for message push for the first application.
[0116] In other implementations, since the electronic device 100 has previously completed the registration of message push for the first application, the push notification server will not send the registration token to the electronic device 100. The electronic device 100 may skip step S104.
[0117] Step S105: The electronic device 100 receives a push message sent by the push notification server.
[0118] The push message sent by the push notification server can include an application identifier and message content. The application identifier is the identifier of the application that pushes the message, and the message content is the information that the application wants to push to the device.
[0119] In some implementations, the push message may also include application account information, such as a mobile phone number, account name, etc.
[0120] In some implementations, if the electronic device 100 also has the first application installed, or the electronic device 200 shares a push message of the first application with the electronic device 100, then the electronic device 100 may display the message content of the push message.
[0121] In some implementations, after executing step S105, electronic device 100 may execute steps S106-S107. By executing steps S106-S107, upon receiving the push message, electronic device 100 directly forwards the push message to electronic device 200, which then determines whether to display the push content in the push message.
[0122] Step S106 : The electronic device 100 sends the push message to the electronic device 200 .
[0123] Step S107: If the electronic device 200 determines that the push message is sent to itself based on the application identifier or message content in the push message, the electronic device 200 displays the push content in the push message.
[0124] After receiving the push message, the electronic device 200 can determine whether the push message is sent to itself based on the device identifier or application identifier in the push message. In some implementations, if the first application is installed in the electronic device 200, the electronic device 200 can determine that the push message is sent to itself. Otherwise, the electronic device 200 can determine that the push message is not sent to itself.
[0125] In other implementations, as described above, a push message may include not only an application identifier and message content, but also account information. If the first application is installed on electronic device 200, and the account information of the application stored in electronic device 200 is the same as the account information included in the push message, then electronic device 200 may determine that the push message is a push message sent to itself. Otherwise, electronic device 200 may determine that the push message is not a push message sent to itself.
[0126] If it is determined that the push message is sent to itself, then the electronic device 200 can display the push content in the push message. If it is determined that the push message is not sent to itself, then the electronic device 200 can not perform subsequent processing on the push message.
[0127] In some implementations, if the electronic device 200 does not have the first application installed, but the electronic device 100 shares the push message of the first application with the electronic device 200, then after receiving the push message sent by the electronic device 100, the electronic device 200 may also display the message content of the push message.
[0128] In some other implementations, after executing step S105, the electronic device 100 may execute steps S108 to S109.
[0129] By executing steps S108-S109, after receiving the push message, the electronic device 100 can first determine whether the push message is a push message sent to the electronic device 200 based on the content of the push message. If so, the electronic device 100 forwards the push message to the electronic device 200.
[0130] Step S108 : If the electronic device 100 determines that the push message is intended for the electronic device 200 based on the application identifier or message content in the push message, the electronic device 100 sends the push message to the electronic device 200 .
[0131] After receiving the push message, the electronic device 100 may determine whether the push message is a push message sent to the electronic device 200 based on the device identifier or application identifier included in the push message.
[0132] In some implementations, if the first application is not installed in the electronic device 100, the electronic device 100 may determine that the push message is a push message sent to the electronic device 200. Otherwise, the electronic device 100 may determine that the push message is not a push message sent to the electronic device 200.
[0133] In some implementations, if the first application is installed in electronic device 100, but the account information of the application stored in electronic device 100 is different from the account information included in the push message, then electronic device 100 may determine that the push message is a push message sent to electronic device 200. Otherwise, electronic device 200 may determine that the push message is not a push message sent to electronic device 200.
[0134] After determining that the push message is a push message sent to the electronic device 200, the electronic device 100 may send the push message to the electronic device 200. If it is determined that the push message is not a push message sent to the electronic device 200, the electronic device 100 may automatically display the push content in the push message.
[0135] In some implementations, if the electronic device 200 does not have the first application installed, but the electronic device 100 and the electronic device 200 share a push message of the first application, then the electronic device 100 may also send the push message to the electronic device 200.
[0136] Step S109: The electronic device 200 displays the push content in the push message.
[0137] The electronic device 200 may display the push content in the push message. In some implementations, the electronic device 200 may also simultaneously display the application identifier in the push message.
[0138] Thus, the electronic device 100 can help the electronic device 200 that is not connected to the network in real time to receive application push messages, so that applications installed on the non-real-time connected device can also promptly inform the user of relevant information through message push, thereby improving the user experience.
Claims
1. A message push method, characterized in that: The method is applied to a first device, and includes: receiving first registration information sent by a second device, where the second device is a non-real-time networked device, and the first registration information includes a device identifier of the second device and an application identifier of the first application; generating second registration information according to the first registration information, where the second registration information includes a device identifier of the first device and an application identifier of the first application; The second registration information is sent to the push notification server.
2. The method according to claim 1, characterized in that After sending the second registration information to the push notification server, the method further includes: Receive a first token sent by the push notification server, where the first token corresponds to the first device and the first application; The first token is sent to the server of the first application, so that the server of the first application sends the first token to the push notification server when a message needs to be pushed to the first device.
3. The method according to claim 1, characterized in that Before receiving the first registration information sent by the second device, the method further includes: Sending the second registration information to the push notification server; Receive a second token sent by the push notification server, where the second token corresponds to the first device and the first application; The second token is sent to the server of the second application, so that the server of the second application sends the second token to the push notification server when a message needs to be pushed to the first device.
4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Receiving a push message sent by the push notification server; The push message is sent to the second device.
5. The method according to claim 4, characterized in that Before sending the push message to the second device, the method further includes: Processing the push message to obtain an application identifier and message content; Determine, according to the application identifier or the message content, that the push message is a push message sent to the second device.
6. The method according to any one of claims 1 to 5, characterized in that The non-real-time networking devices include: Devices that do not have the ability to access the Internet, and devices that have Internet access capabilities but are not connected to the Internet.
7. A message push method, characterized in that: The method is applied to a communication system, the communication system including a first device and a second device, the first device being a networked device and the second device being a non-real-time networked device, the method including: The first device receives first registration information sent by the second device, where the first registration information includes a device identifier of the second device and an application identifier of the first application; The first device generates second registration information according to the first registration information, where the second registration information includes a device identifier of the first device and an application identifier of the first application; The first device sends the second registration information to a push notification server.
8. The method according to claim 7, characterized in that After the first device sends the second registration information to the push notification server, the method further includes: The first device receives a first token sent by the push notification server, where the first token corresponds to the first device and the first application; The first device sends the first token to the server of the first application, so that the server of the first application sends the first token to the push notification server when it needs to push a message to the first device.
9. The method according to claim 7, characterized in that Before the first device receives the first registration information sent by the second device, the method further includes: The first device sends the second registration information to the push notification server; The first device receives a second token sent by the push notification server, where the second token corresponds to the first device and the first application; The first device sends the second token to the server of the second application, so that the server of the second application sends the second token to the push notification server when it needs to push a message to the first device.
10. The method according to any one of claims 7 to 9, characterized in that: The method further comprises: The first device receives a push message sent by the push notification server; The first device sends the push message to the second device.
11. The method according to claim 10, characterized in that The method further comprises: The second device processes the push message to obtain an application identifier and message content; If it is determined, based on the application identifier or the message content, that the push message is a push message sent to the second device, the second device displays the message content.
12. The method according to claim 11, characterized in that Before the first device sends the push message to the second device, the method further includes: The first device processes the push message to obtain an application identifier and message content; The first device determines, based on the application identifier or the message content, that the push message is a push message sent to the second device.
13. The method according to any one of claims 7 to 12, characterized in that: The non-real-time networking devices include: Devices that do not have the ability to access the Internet, and devices that have Internet access capabilities but are not connected to the Internet.
14. A message push method, characterized in that: The method is applied to a second device, and includes: Install the first application; Sending first registration information to the first device, where the first registration information includes a device identifier of the second device and an application identifier of the first application; receiving a push message sent by the first device, wherein the push message includes a push message of the first application; Processing the push message of the first application to obtain an application identifier and message content of the first application; The message content is displayed.
15. The method according to claim 14, characterized in that Before displaying the message content, the method further includes: Determine, according to the application identifier of the first application or the message content, that the push message is a push message sent to the user.
16. An electronic device, characterized in that: The electronic device includes a memory, a processor, and a sensor. The memory is used to store a computer program, and the processor is used to call the computer program, so that the electronic device executes the method according to any one of claims 1 to 7.
17. A computer program product comprising instructions, characterized in that When the computer program product is run on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 7.
18. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 7.
19. An electronic device, characterized in that: The electronic device includes a memory, a processor, and a sensor. The memory is used to store a computer program, and the processor is used to call the computer program, so that the electronic device executes the method according to claim 14 or claim 15.
20. A computer program product comprising instructions, characterized in that When the computer program product is run on an electronic device, the electronic device is caused to perform the method according to claim 14 or claim 15.
21. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device executes the method according to claim 14 or claim 15.