WO2021244548A1 - 即时消息处理方法和装置 - Google Patents

即时消息处理方法和装置 Download PDF

Info

Publication number
WO2021244548A1
WO2021244548A1 PCT/CN2021/097770 CN2021097770W WO2021244548A1 WO 2021244548 A1 WO2021244548 A1 WO 2021244548A1 CN 2021097770 W CN2021097770 W CN 2021097770W WO 2021244548 A1 WO2021244548 A1 WO 2021244548A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
local
queue
status
smart terminal
Prior art date
Application number
PCT/CN2021/097770
Other languages
English (en)
French (fr)
Inventor
张心
Original Assignee
安徽华米信息科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 安徽华米信息科技有限公司 filed Critical 安徽华米信息科技有限公司
Publication of WO2021244548A1 publication Critical patent/WO2021244548A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/224Monitoring or handling of messages providing notification on incoming messages, e.g. pushed notifications of received messages

Definitions

  • This specification relates to the technical field of smart terminals, and in particular to an instant message processing method, device, equipment and system.
  • an instant message processing method which is applied to a smart terminal, and the method includes:
  • the smart terminal When the smart terminal detects a change in the message status in the local notification bar, it analyzes the changed target message;
  • the analysis result is encapsulated in a predetermined format, it is sent to the wearable device associated with the smart terminal, so that the wearable device performs corresponding state change processing on the messages in the local message queue according to the analysis result;
  • the analysis result encapsulated in a predetermined format includes: a message ID used to uniquely identify a message, a message state used to identify a type of state change, and message content.
  • the parsing of the changed target message includes:
  • a message ID is assigned to the new message, and the message ID is used to uniquely identify the corresponding message.
  • the allocating a message ID for the new message includes:
  • the previously allocated ID of the old message is acquired, and the previously allocated ID is used as the message ID.
  • an instant message processing method applied to a wearable device includes:
  • the message status and the message ID are obtained from the analysis result, and corresponding status change processing is performed on the message according to the message status and the message ID.
  • the performing corresponding state change processing on the message according to the message state and the message ID includes:
  • the message status is the deletion of the old message
  • search for historical messages matching the message ID from the local message queue and delete the target message from the message queue.
  • the adding the new message reminder to the local message queue includes:
  • the message is a message with content, continue to obtain the message content of the message in the analysis result, and add a new message reminder including the display of the message content to the local message queue;
  • the message is a message without content, continue to obtain the message source of the message in the analysis result, determine the corresponding reminder format according to the message source, and add a new message reminder in the local message queue according to the reminder format.
  • the method further includes:
  • the wearable device detects the local message queue according to the predefined detection cycle
  • the message ID of the deleted message is sent to the associated smart terminal, so that the smart terminal deletes the message matching the message ID from the local notification bar.
  • an instant message processing device including:
  • Message change analysis module used to control the smart terminal to analyze the changed target message when it detects a change in the message status in the local notification bar;
  • Parsing result sending module used to encapsulate the parsing result in a predetermined format and send it to the wearable device associated with the smart terminal, so that the wearable device can perform corresponding status to the message in the local message queue according to the parsing result Change processing
  • the analysis result encapsulated in a predetermined format includes: a message ID used to uniquely identify a message, a message state used to identify a type of state change, and message content.
  • the message change analysis module is configured to:
  • a message ID is assigned to the new message, and the message ID is used to uniquely identify the corresponding message.
  • the message change analysis module is configured to:
  • the message change analysis module is further used for:
  • the previously allocated ID of the old message is acquired, and the previously allocated ID is used as the message ID.
  • an instant message processing device including:
  • Parsing result receiving module used to control the wearable device to receive the parsing result encapsulated in a predetermined format and sent by the associated smart terminal.
  • the parsing result is that when the smart terminal detects that there is a change in the message status in the local notification bar, it is for the change The message is parsed;
  • State change processing module used to obtain the message state and message ID from the analysis result, the target message state, and perform corresponding state change processing on the message according to the message state and message ID.
  • the state change processing module is configured to:
  • the message status is the deletion of the old message
  • search for historical messages matching the message ID from the local message queue and delete the target message from the message queue.
  • the state change processing module is configured to:
  • the target message is a message with content, continue to obtain the message content of the target message in the analysis result, and add a new message reminder including the display of the message content to the local message queue;
  • the target message is a message with no content, continue to obtain the message source of the target message in the analysis result, determine the corresponding reminder format according to the message source, and add a new message reminder in the local message queue according to the reminder format .
  • the device further includes:
  • Message queue synchronization module used to control the wearable device to detect the local message queue according to a predefined detection cycle. If it detects that one or more historical messages have been deleted from the local message queue, the message ID of the deleted message is sent to the associated intelligence Terminal, so that the smart terminal deletes the message matching the message ID from the local notification bar.
  • an intelligent terminal device which includes a sensor, a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the program Realize the instant message processing method as described in the first aspect.
  • a wearable device which includes a sensor, a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the program when the program is executed. Realize the instant message processing method as described in the second aspect.
  • an instant message processing method which assigns a unique ID to each new message received by the smart terminal. After the message status changes in the notification bar of the smart terminal or the message queue of the wearable device, according to The unique ID corresponding to the message matches the message on the other associated device side, and the corresponding change processing is performed according to the predefined processing strategy. Regardless of the device on which the user performs the message operation, the result of the operation is automatically synchronized to the device on the other side, avoiding repeated operations by the user and improving the user experience.
  • any one of the embodiments of the present specification does not need to achieve all the above-mentioned effects.
  • Fig. 1 is a flowchart of an instant message processing method applied to a smart terminal according to an exemplary embodiment of this specification.
  • Fig. 2 is a flow chart showing that the instant message processing method shown in an exemplary embodiment of the present specification is applied to a wearable device.
  • Fig. 3 is a flowchart of a new message reminding method shown in an exemplary embodiment of this specification.
  • Fig. 4 is a flow chart of the instant message processing method shown in an exemplary embodiment of the present specification applied to a wearable device.
  • Fig. 5 is a schematic diagram showing that the instant message processing device according to an exemplary embodiment of the present specification is applied to a smart terminal.
  • Fig. 6 is a schematic diagram showing that the instant message processing apparatus according to an exemplary embodiment of the present specification is applied to a wearable device.
  • first, second, third, etc. may be used in this specification to describe various information, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as second information, and similarly, the second information may also be referred to as first information.
  • word “if” as used herein can be interpreted as "when” or “when” or “in response to a certainty”.
  • Wearable devices have become more and more widely used in modern society.
  • instant message reminders are a very important function. For example, after the smart terminal associated with the wearable device receives a WeChat message, while the WeChat message is displayed in the notification bar of the mobile phone, the wearable device can also receive the push and display the WeChat message in the message queue.
  • the instant message processing mechanism between the wearable device and the associated smart terminal is still not perfect, and there is still a lot of room for improvement, which can further enhance the user experience.
  • the embodiments of this specification provide an instant message processing method and an instant message processing device applying the method.
  • the instant message processing method can be applied to wearable devices, smart terminals, or to wearable devices and A system composed of smart terminals.
  • an instant message processing method provided in this embodiment of this specification is applied to the smart terminal side, and the method includes the following steps:
  • the parsing result encapsulated in a predetermined format includes: a message ID for uniquely identifying a message, a message classification, a message state for identifying a type of state change, and the source of the message and the content of the message.
  • a wearable device is a portable device that is directly worn on the body or integrated into the user's clothes or accessories. Wearable devices usually have a variety of sensors for detecting pulse waves, counting steps, and so on. At the same time, wearable devices mostly exist in the form of portable accessories that have some computing functions and can be connected to mobile phones and various terminals. For example, the wearable device may be a smart watch, smart glasses, smart necklace, etc., which are not limited in this specification.
  • Wearable devices can establish an association relationship with smart terminals through pre-pairing and connection operations.
  • a smart watch can complete pairing and connection operations with a mobile phone via Bluetooth.
  • the smart watch is pre-configured with a matching verification code (added by the manufacturer, or edited and configured by the user)
  • the mobile phone scans the smart watch via Bluetooth
  • it can enter the matching verification above in the corresponding dialog box Code to realize the pairing operation with the smart watch;
  • the pairing is successful, as long as the smart watch is within the Bluetooth scanning range of the mobile phone, the Bluetooth connection between the smart watch and the mobile phone can be maintained, thereby ensuring that the smart watch and the mobile phone Maintain an association relationship between.
  • smart terminals such as mobile phones can realize data transmission with wearable devices such as smart watches through the Bluetooth connection described above.
  • the smart terminal sends a prompt message to the wearable device, and the wearable device sends a reception confirmation message to Smart terminals, etc.
  • Both the smart terminal and the wearable device can be installed with a corresponding APP, so that after an association relationship between the smart terminal and the wearable device is established, the APP can realize data transmission and other functions in this manual.
  • the message status can be synchronized between the message notification bar of the smart terminal and the message queue of the wearable device.
  • the message can be pushed synchronously to the wearable device associated with the smart terminal side.
  • the associated smart terminal side and the wearable device side can use Bluetooth
  • the connection and other communication methods maintain the association relationship.
  • step S101 when the smart terminal detects that there is a change in the message status in the local notification bar, it analyzes the changed target message and obtains the analysis result.
  • the analysis result may include the message ID, message classification, message status, message source, and message content of the target message.
  • Message ID the unique ID of each message reminder, for example, a unique ID can be assigned to the new message reminder when the new message reminder is received in the notification bar of the smart terminal.
  • the status change type of the target message can be analyzed first to determine whether the status change type of the notification bar is a new target received information.
  • the process of assigning a new message ID is entered to assign an ID to the new message, and the ID is used to uniquely identify the corresponding message. After the new message ID allocation process ends, the newly allocated ID is added to the analysis result as the message ID.
  • the status change type is operating an old message, since the old message was previously displayed as a "new message" in the smart terminal notification bar for the first time, it has been assigned a unique ID by the smart terminal, and the old message previously assigned can be directly obtained at this time ID, the previously assigned ID will be added to the analysis result as the message ID.
  • the smart terminal can perform unique ID allocation for the notification bar messages within the current boot time.
  • the ID allocation record table can be obtained first, and the ID allocation record table records the ID allocated by the smart terminal for each new message received by the notification bar during the current startup time; based on the previous allocation The ID is calculated incrementally, the calculation result is determined as the ID allocated for the new message received this time, and the newly allocated ID is recorded in the ID allocation record table.
  • the smart terminal starts counting from 0, and assigns ID001 to the first message in the notification bar within this power-on time, and assigns ID002 to the second message in the notification bar within this power-on time... and so on, each time the notification bar receives When the new message arrives, 1 is added to the previous ID as the newly assigned ID, so that all the new messages in the notification bar within this boot time will be assigned IDs.
  • the purpose of assigning a message ID to each message is for when the message status changes in the notification bar of the smart terminal or the message queue of the wearable device, because the same message reminder of the devices on both sides has the same ID, it can correspond to Notify the other side device to make corresponding state changes based on the message ID.
  • the accumulated message reminders usually have the maximum value, and the user will periodically check and clear the message reminders.
  • it can also be set ID allocation range, to avoid too long startup time this time, and the accumulated ID value is too large, occupying processing resources. Specifically, when the ID value to be allocated exceeds the preset ID allocation range, the existing ID count is reset to zero, and the allocation starts from ID001 again.
  • Message classification It can be divided into content messages and non-content messages. According to the message classification, the display mode of the message in the notification bar of the smart terminal or the message queue of the wearable device can be determined.
  • messages with content may be social communication messages, such as WeChat messages, DingTalk messages, and so on
  • messages without content may be application push messages, such as application upgrade messages, application notification messages, and so on.
  • New message reminder that is, a new message is received in the notification bar of the smart terminal.
  • Old message withdrawal refers to the withdrawal operation of a message sent to the smart terminal by other device users in the communication software. Such as WeChat message withdrawal, etc., the withdrawal operation will also display a message reminder in the notification bar.
  • the notification bar of the smart terminal uses a message reminder to display the specific content of the message; after the operation is withdrawn, the notification bar of the smart terminal still exists, but the specific content of the message is no longer displayed, but displayed as " Withdrawn".
  • Message source used to determine which smart terminal or system application the message comes from, for example, the message source is a phone call, missed call, SMS, WeChat, Xiaomi Sports, etc.
  • the analysis result is encapsulated in a predetermined format. After encapsulation, it is a data packet including a message ID field, a message classification field, a message status field, a message source field, and a message content field.
  • the wearable device associated with the smart terminal enables the wearable device to perform corresponding state change processing on the messages in the local message queue according to the analysis result.
  • the method of performing corresponding state change processing on the messages in the local message queue on the side of the wearable device according to the analysis result can be seen in FIG. 2, and the method includes the following steps:
  • the wearable device receives a parsing result encapsulated in a predetermined format and containing the status change of the target message sent by the associated smart terminal. The message is parsed;
  • S202 Obtain a message status and a message ID from the analysis result, and perform corresponding status change processing on the message according to the message status and the message ID.
  • performing corresponding state change processing on the message according to the message state and the message ID includes at least the following methods:
  • the message reminder can be specifically displayed as the subject of the message, the specific content of the message, and the sender of the message.
  • step (1-1) when the new message reminder is added to the local message queue, referring to Figure 3, it can be divided into the following steps:
  • S202b When the target message is a content message, continue to obtain the message content of the target message in the analysis result, and add a new message reminder including the display of the message content in the local message queue;
  • the specific message content can be displayed in the notification bar of the smart terminal or the message queue of the wearable device; for messages without content, the message notification can be displayed in the notification bar of the smart terminal or the message queue of the wearable device.
  • the specific manifestation can be "you have a new message reminder" and so on.
  • the target message is a message with no content
  • the message source is a missed call
  • the local message queue can display "You have "A missed call”
  • the source of the message is the application "Mi Sports”
  • “Mi Sports has a new message” can be displayed in the local message queue.
  • step (1-2) the local message queue of the wearable device has followed the notification bar of the associated smart terminal for corresponding state change processing; that is, before the operation is withdrawn, the local message queue of the wearable device has passed the message Reminder, display the specific content of the message; after the withdrawal operation, the message reminder still exists in the local message queue of the wearable device, but the specific content of the message is no longer displayed, but the original specific content is displayed as "retracted” .
  • no processing is performed.
  • the case that there is no historical message matching the message ID may be that the user has already performed a clearing operation on a certain message before receiving the reminder of withdrawal of the message.
  • the above embodiments respectively illustrate how to synchronize the change to the wearable device on the other side when the state of the notification bar of the smart terminal changes from the side of the smart terminal and the side of the wearable device. From the side of the wearable device, how to synchronize the change to the smart terminal on the other side when the state of the local message queue of the wearable device changes.
  • an instant message processing method provided in this embodiment of this specification is applied to the wearable device side, and the method includes the following steps:
  • the wearable device detects the local message queue according to a predefined detection period
  • step S402 Is one or more historical messages deleted from the local message queue? If one or more historical messages are deleted from the local message queue, step S403 is executed, otherwise no operation is performed;
  • S403 Send the message ID of the deleted message to the associated smart terminal, so that the smart terminal deletes the message matching the message ID from the local notification bar.
  • the deleted message ID is sent to the smart terminal.
  • the message format sent to the smart terminal is a data packet containing the message ID; when the user deletes multiple historical messages, the message format sent to the smart terminal contains multiple Data packet of an array of message IDs.
  • the instant message processing method provided in this manual assigns a unique ID to each new message received by the smart terminal. After the message status changes in the notification bar of the smart terminal or the message queue of the wearable device, according to this The unique ID corresponding to the message reminder matches the message reminder on the side of another associated device, and the corresponding change processing is performed according to the predefined processing strategy. Regardless of the device on which the user performs the message operation, the result of the operation is automatically synchronized to the device on the other side, avoiding repeated operations by the user and improving the user experience.
  • the embodiment of this specification also provides an instant message processing apparatus.
  • the apparatus may include: a message change analysis module 510 and an analysis result sending module 520.
  • Message change analysis module 510 used to control the smart terminal to analyze the changed target message when it detects a change in the message status in the local notification bar.
  • Analysis result sending module 520 used to encapsulate the analysis result in a predetermined format and send it to the wearable device associated with the smart terminal, so that the wearable device corresponds to the message in the local message queue according to the analysis result State change processing, wherein the parsing result encapsulated in a predetermined format includes: a message ID for uniquely identifying a message, a message classification, a message state for identifying a state change type, and the source of the message and the content of the message.
  • the message change analysis module is configured to:
  • a message ID is assigned to the new message, and the message ID is used to uniquely identify the corresponding message.
  • the message change analysis module is configured to:
  • the message change analysis module is further used for:
  • the ID previously assigned to the old message is acquired, and the previously assigned ID is used as the message ID.
  • the embodiment of this specification also provides an instant message processing device.
  • the device may include: an analysis result receiving module 610 and a state change processing module 620.
  • Parsing result receiving module 610 used to control the wearable device to receive the parsing result encapsulated in a predetermined format and sent by the associated smart terminal. The changed message is parsed.
  • the state change processing module 620 is configured to obtain the message state and the message ID from the analysis result, and perform corresponding state change processing on the message according to the message state and the message ID.
  • the state change processing module is configured to:
  • the message status is the deletion of the old message
  • search for historical messages matching the message ID from the local message queue and delete the target message from the message queue.
  • the state change processing module is configured to:
  • the target message is a message with content, continue to obtain the message content of the target message in the analysis result, and add a new message reminder including the display of the message content to the local message queue;
  • the target message is a message with no content, continue to obtain the message source of the target message in the analysis result, determine the corresponding reminder format according to the message source, and add a new message reminder in the local message queue according to the reminder format .
  • the device further includes:
  • Message queue synchronization module used to control the wearable device to detect the local message queue according to a predefined detection cycle. If it detects that one or more historical messages have been deleted from the local message queue, the message ID of the deleted message is sent to the associated intelligence Terminal, so that the smart terminal deletes the message matching the message ID from the local notification bar.
  • the embodiment of this specification also provides a wearable device, the wearable device at least includes a sensor, a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the program when the program is executed.
  • the wearable device receives a parsing result encapsulated in a predetermined format sent by an associated smart terminal, where the parsing result is obtained by parsing the changed message when the smart terminal detects a change in the message status in the local notification bar;
  • the message status and the message ID are obtained from the analysis result, and corresponding status change processing is performed on the message according to the message status and the message ID.
  • the embodiments of this specification also provide a smart terminal device, the wearable device at least includes a memory, a processor, and a computer program stored on the memory and running on the processor, where the processor executes the program as follows method:
  • the smart terminal When the smart terminal detects a change in the message status in the local notification bar, it analyzes the changed target message;
  • the analysis result is encapsulated in a predetermined format, it is sent to the wearable device associated with the smart terminal, so that the wearable device performs corresponding state change processing on the messages in the local message queue according to the analysis result;
  • the analysis result encapsulated in a predetermined format includes: a message ID used to uniquely identify a message, a message state used to identify a type of state change, and message content.
  • the embodiments of this specification also provide a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the following methods are realized:
  • the wearable device receives a parsing result encapsulated in a predetermined format sent by an associated smart terminal, where the parsing result is obtained by parsing the changed message when the smart terminal detects a change in the message status in the local notification bar;
  • the message status and the message ID are obtained from the analysis result, and corresponding status change processing is performed on the message according to the message status and the message ID.
  • the embodiments of this specification also provide a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the following methods are realized:
  • the smart terminal When the smart terminal detects a change in the message status in the local notification bar, it analyzes the changed target message;
  • the analysis result is encapsulated in a predetermined format, it is sent to the wearable device associated with the smart terminal, so that the wearable device performs corresponding state change processing on the messages in the local message queue according to the analysis result;
  • the analysis result encapsulated in a predetermined format includes: a message ID used to uniquely identify a message, a message state used to identify a type of state change, and message content.
  • the relevant part can refer to the part of the description of the method embodiment.
  • the device embodiments described above are merely illustrative, where the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in this specification. Those of ordinary skill in the art can understand and implement without creative work.
  • a typical implementation device is a computer.
  • the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email receiving and sending device, and a game control A console, a tablet computer, a wearable device, or a combination of any of these devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请提供了一种即时消息处理方法,为智能终端收到的每条新消息分配唯一ID,在智能终端的通知栏或可穿戴设备的消息队列发生消息状态的变化后,根据该消息对应的唯一ID匹配另一关联设备侧的消息,并按照预定义的处理策略进行对应的变化处理。

Description

即时消息处理方法和装置 技术领域
本说明书涉及智能终端技术领域,尤其涉及一种即时消息处理方法、装置、设备及系统。
背景技术
可穿戴设备在现代社会得到了越来越广泛的应用,在目前的可穿戴设备中,即时消息提醒是很重要的一个功能。
发明内容
根据本说明书实施例的第一方面,提供一种即时消息处理方法,应用于智能终端,所述方法包括:
智能终端检测到本地通知栏有消息状态发生变化时,针对发生变化的目标消息进行解析;
将解析结果按照预定格式封装后,发送给与所述智能终端关联的可穿戴设备,以使所述可穿戴设备按照解析结果对本地消息队列中的消息进行对应的状态变化处理;
其中,所述按照预定格式封装的解析结果包括:用于唯一标识消息的消息ID、用于标识状态变化类型的消息状态、以及消息内容。
可选地,所述针对发生变化的目标消息进行解析,包括:
针对所述发生变化的目标消息进行解析,根据解析结果确定所述目标消息的状态变化类型;
若所述状态变化类型为接收到新消息,则为所述新消息分配一个消息ID,所述消息ID用于唯一标识对应消息。
可选地,所述为所述新消息分配一个消息ID,包括:
获取消息ID分配记录表,所述消息ID分配记录表中记录了所述智能终端在本次开机时间内,为通知栏接收的每条新消息分别分配的消息ID;
基于上一次分配的消息ID进行增量计算,将计算结果确定为本次接收的新消息分配的消息ID,并将新分配的消息ID记录在消息ID分配记录表中。
可选地,若所述状态变化类型为操作旧消息,则获取所述旧消息先前被分配的ID,将该先前被分配的ID作为消息ID。
根据本说明书实施例的第二方面,提供一种即时消息处理方法,应用于可穿戴设备,所述方法包括:
接收关联的智能终端发送的按照预定格式封装的解析结果,所述解析结果为智能终端检测到本地通知栏有消息状态发生变化时,针对发生变化的消息进行解析得到的;
从所述解析结果中获取消息状态和消息ID,根据所述消息状态和消息ID对所述消息进行对应的状态变化处理。
可选地,所述根据所述消息状态和消息ID对所述消息进行对应的状态变化处理, 包括:
在所述消息状态为新消息提醒的情况下,记录所述消息和所述消息ID的对应关系,在本地消息队列中增加所述新消息提醒;
在所述消息状态为旧消息撤回的情况下,从本地消息队列中查找与所述消息ID匹配的历史消息,从所述本地消息队列中将所述消息的消息内容修改为已撤回;
在所述消息状态为旧消息删除的情况下,从本地消息队列中查找与所述消息ID匹配的历史消息,从所述消息队列中将所述目标消息删除。
可选地,所述在本地消息队列中增加所述新消息提醒,包括:
从所述解析结果中获取所述消息的消息分类;
若所述消息为有内容消息,则继续在解析结果中获取所述消息的消息内容,在本地消息队列中增加包括消息内容显示的新消息提醒;
若所述消息为无内容消息,则继续在解析结果中获取所述消息的消息来源,根据所述消息来源确定对应的提醒格式,在本地消息队列中按照所述提醒格式增加新消息提醒。
可选地,所述方法还包括:
可穿戴设备按照预定义的检测周期检测本地消息队列;
若检测到本地消息队列被删除一条或多条历史消息,则将被删除消息的消息ID发送给关联的智能终端,以使所述智能终端从本地通知栏删除与所述消息ID匹配的消息。
根据本说明书实施例的第三方面,提供一种即时消息处理装置,所述装置包括:
消息变化解析模块:用于控制智能终端检测到本地通知栏有消息状态发生变化时,针对发生变化的目标消息进行解析;
解析结果发送模块:用于将解析结果按照预定格式封装后,发送给与所述智能终端关联的可穿戴设备,以使所述可穿戴设备按照解析结果对本地消息队列中的消息进行对应的状态变化处理;
其中,所述按照预定格式封装的解析结果包括:用于唯一标识消息的消息ID、用于标识状态变化类型的消息状态、以及消息内容。
可选地,所述消息变化解析模块,用于:
针对所述发生变化的目标消息进行解析,根据解析结果确定所述目标消息的状态变化类型;
若所述状态变化类型为接收到新消息,则为所述新消息分配一个消息ID,所述消息ID用于唯一标识对应消息。
可选地,所述消息变化解析模块,用于:
获取消息ID分配记录表,所述消息ID分配记录表中记录了所述智能终端在本次开机时间内,为通知栏接收的每条新消息分别分配的消息ID;
基于上一次分配的消息ID进行增量计算,将计算结果确定为本次接收的新消息分配的消息ID,并将新分配的消息ID记录在消息ID分配记录表中。
可选地,所述消息变化解析模块,还用于:
若所述状态变化类型为操作旧消息,则获取所述旧消息先前被分配的ID,将该先前被分配的ID作为消息ID。
根据本说明书实施例的第四方面,提供一种即时消息处理装置,所述装置包括:
解析结果接收模块:用于控制可穿戴设备接收关联的智能终端发送的按照包含预定格式封装的解析结果,所述解析结果为智能终端检测到本地通知栏有消息状态发生变化时,针对发生变化的消息进行解析得到的;
状态变化处理模块:用于从所述解析结果中获取消息状态和消息ID,所述目标消息状态,根据所述消息状态和消息ID对所述消息进行对应的状态变化处理。
可选地,所述状态变化处理模块,用于:
在所述消息状态为新消息提醒的情况下,记录所述消息和所述消息ID的对应关系,在本地消息队列中增加所述新消息提醒;
在所述消息状态为旧消息撤回的情况下,从本地消息队列中查找与所述消息ID匹配的历史消息,从所述本地消息队列中将所述消息的消息内容修改为已撤回;
在所述消息状态为旧消息删除的情况下,从本地消息队列中查找与所述消息ID匹配的历史消息,从所述消息队列中将所述目标消息删除。
可选地,所述状态变化处理模块,用于:
从所述解析结果中获取所述目标消息的消息分类;
若所述目标消息为有内容消息,则继续在解析结果中获取所述目标消息的消息内容,在本地消息队列中增加包括消息内容显示的新消息提醒;
若所述目标消息为无内容消息,则继续在解析结果中获取所述目标消息的消息来源,根据所述消息来源确定对应的提醒格式,在本地消息队列中按照所述提醒格式增加新消息提醒。
可选地,所述装置还包括:
消息队列同步模块:用于控制可穿戴设备按照预定义的检测周期检测本地消息队列,若检测到本地消息队列被删除一条或多条历史消息,则将被删除消息的消息ID发送给关联的智能终端,以使所述智能终端从本地通知栏删除与所述消息ID匹配的消息。
根据本说明书实施例的第七方面,提供一种智能终端设备,其包括传感器,存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,处理器执行所述程序时实现如第一方面所述的即时消息处理方法。
根据本说明书实施例的第八方面,提供一种可穿戴设备,其包括传感器,存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,处理器执行所述程序时实现如第二方面所述的即时消息处理方法。
根据本说明书实施例,提供了一种即时消息处理方法,为智能终端收到的每条新消息分配唯一ID,在智能终端的通知栏或可穿戴设备的消息队列发生消息状态的变化后,根据该消息对应的唯一ID匹配另一关联设备侧的消息,并按照预定义的处理策略进行对应的变化处理。用户不管哪一侧设备进行消息操作,都自动同步该操作结果到另一侧设备,避免用户重复操作,提升用户体验。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本说明书实施例。
此外,本说明书实施例中的任一实施例并不需要达到上述的全部效果。
附图说明
为了更清楚地说明本说明书实施例或相关技术,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本说明书实施例中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。
图1是本说明书一示例性实施例示出的即时消息处理方法应用于智能终端的一种流程图。
图2是本说明书一示例性实施例示出的即时消息处理方法应用于可穿戴设备的一种流程图。
图3是本说明书一示例性实施例示出的新消息提醒方法的一种流程图。
图4是本说明书一示例性实施例示出的即时消息处理方法应用于可穿戴设备的一种流程图。
图5是本说明书一示例性实施例示出的即时消息处理装置应用于智能终端的一种示意图。
图6是本说明书一示例性实施例示出的即时消息处理装置应用于可穿戴设备的一种示意图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本说明书相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本说明书的一些方面相一致的装置和方法的例子。
在本说明书使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书。在本说明书和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本说明书可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
可穿戴设备在现代社会得到了越来越广泛的应用,在目前的可穿戴设备中,即时消息提醒是很重要的一个功能。比如,与可穿戴设备关联的智能终端接收到一条微信消息后,在手机通知栏显示该微信消息的同时,可穿戴设备也可以收到推送,在消息队列中显示该微信消息。
在传统方案中,可穿戴设备与关联智能终端之间的即时消息的处理机制仍然不够完善,还有较大的改善空间,能够进一步提升用户体验。
针对以上问题,本说明书实施例提供一种即时消息处理方法,以及应用该方法的即时消息处理装置,一般地,该即时消息处理方法可应用于可穿戴设备、智能终端或应用于可穿戴设备和智能终端组成的系统。
参见图1所示,为本说明书实施例提供的一种即时消息处理方法,该即时消息处理方法应用于智能终端侧,所述方法包括如下步骤:
S101,智能终端检测到本地通知栏有消息状态发生变化时,针对发生变化的目标消息进行解析;
S102,将解析结果按照预定格式封装后,发送给与所述智能终端关联的可穿戴设备,以使所述可穿戴设备按照解析结果对本地消息队列中的消息进行对应的状态变化处理;
其中,所述按照预定格式封装的解析结果包括:用于唯一标识消息的消息ID、消息分类、用于标识状态变化类型的消息状态、以及消息来源与消息内容。
可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备通常具有多种传感器,用于检测脉搏波,计步等。同时可穿戴设备多以具备部分计算功能、可连接手机及各类终端的便携式配件形式存在。举例而言,可穿戴设备可以为智能手表、智能眼镜、智能项链等,本说明书并不对此进行限制。
可穿戴设备可以通过预先的配对和连接操作,与智能终端之间建立起关联关系。比如,智能手表可以通过蓝牙与手机之间完成配对和连接操作。其中,若智能手表上预配置有匹配验证码(由生产方添加,也可以由用户编辑配置),则手机在通过蓝牙扫描到智能手表后,可以通过在相应的对话框内输入上述的匹配验证码,以实现与智能手表之间的配对操作;进一步地,在配对成功后,只要智能手表位于手机的蓝牙扫描范围内,智能手表与手机之间即可保持蓝牙连接,从而确保智能手表与手机之间维持关联关系。
同时,手机等智能终端可以通过诸如上述的蓝牙连接,实现与智能手表等可穿戴设备之间的数据传输,比如智能终端将提示消息发送至可穿戴设备,以及可穿戴设备将接收确认消息发送至智能终端等。
智能终端和可穿戴设备上均可安装有相应的APP,使得智能终端与可穿戴设备之间建立关联关系后,可以通过该APP实现数据传输,以及本说明书中的其他功能。
在智能终端与可穿戴设备之间建立关联关系后,可在智能终端的消息通知栏和可穿戴设备的消息队列之间实现消息状态的同步。
例如,在智能终端侧接收到一条新消息后,可将该消息同步推送给与该智能终端侧相关联的可穿戴设备,可以知道,该相关联的智能终端侧与可穿戴设备侧可通过蓝牙连接等通信方式保持关联关系。
在步骤S101中,智能终端检测到本地通知栏有消息状态发生变化时,针对发生变化的目标消息进行解析,并获得解析结果。具体而言,该解析结果可包括目标消息的消息ID、消息分类、消息状态、消息来源与消息内容。
下面分别对解析结果中包含的内容进行具体说明。
1)消息ID:每条消息提醒所具有的唯一ID,例如,可在智能终端的通知栏接收到新消息提醒时为该新消息提醒分配一个唯一ID。
在本说明书的一种可选实施例中,可在智能终端针对发生变化的目标消息进行解析时,先解析该目标消息的状态变化类型,判断通知栏的状态变化类型是否为接收到新的目标消息。
若状态变化类型为接收到新消息,则进入新消息ID分配流程,为所述新消息分配一个ID,所述ID用于唯一标识对应的消息。在新消息ID分配流程结束后,将该新分配的ID作为消息ID加入解析结果中。
若状态变化类型为操作旧消息,由于该旧消息先前作为“新消息”第一次显示在智 能终端通知栏时,已经被智能终端分配了唯一ID,则此时可直接获取旧消息先前被分配的ID,将该先前被分配的ID作为消息ID加入解析结果中。
在新消息ID分配流程中,可由智能终端对本次开机时间内的通知栏消息进行唯一ID分配。具体而言,可先获取ID分配记录表,该ID分配记录表中记录了所述智能终端在本次开机时间内,为通知栏接收的每条新消息分别分配的ID;基于上一次分配的ID进行增量计算,将计算结果确定为本次接收的新消息分配的ID,并将新分配的ID记录在ID分配记录表中。
举例说明,智能终端从0开始计数,为本次开机时间内通知栏的第一条消息分配ID001,为本次开机时间内通知栏的第二条消息分配ID002…依次类推,每次通知栏接收到新消息后,均在前一个ID的基础上增加1,作为新分配的ID,以此为本次开机时间内通知栏的所有新消息分配ID。
在本步骤中,为每条消息对应分配消息ID是为了在智能终端的通知栏或可穿戴设备的消息队列中发生消息状态变化时,由于两侧设备同一条消息提醒具有相同的ID,可对应通知另一侧设备基于消息ID进行相应的状态变化。
而不管是智能终端的通知栏,还是可穿戴设备的消息队列,其中累计的消息提醒通常具有最大值,且用户会定期查看并清理消息提醒,在一种可选地实施例中,还可设ID分配范围,避免本次开机时间过长,累计ID数值过大,占用处理资源。具体而言,当待分配的ID值超出该预先设定的ID分配范围时,将已有的ID计数归零,重新从ID001开始分配。
2)消息分类:可分为有内容消息和无内容消息。根据消息分类可决定该消息在智能终端的通知栏或可穿戴设备的消息队列中的显示方式。
具体而言,有内容消息可为社交通信类消息,如微信消息、钉钉消息等等,无内容消息可为应用推送消息,如应用升级消息、应用通知消息等等。
3)消息状态:分为新消息提醒、旧消息撤回和旧消息删除。
新消息提醒,即智能终端的通知栏接收到一条新消息。
旧消息撤回,即在通信软件中,其他设备用户对发送给智能终端的某一条消息的撤回操作。如微信消息撤回等,该撤回操作也会在通知栏显示消息提醒。
在撤回操作之前,智能终端通知栏通过消息提醒,显示该消息的具体内容;在撤回操作之后,智能终端通知栏该消息提醒仍然存在,但不再显示该消息的具体内容,而是显示为“已撤回”。
4)消息来源:用于确定消息来自哪个智能终端或者哪个系统应用,例如消息来源为电话、未接电话、短信、微信、小米运动等等。
5)消息内容:当消息分类为无消息内容时,该部分为空;当消息分类为有消息内容时,该部分为需要展示的消息内容。
在步骤S102中,将解析结果按照预定格式进行封装,封装后即为包括消息ID字段、消息分类字段、消息状态字段、消息来源字段与消息内容字段的数据包,将该数据包发送给与所述智能终端关联的可穿戴设备,以使所述可穿戴设备按照解析结果对本地消息队列中的消息进行对应的状态变化处理。
具体地,可穿戴设备侧按照解析结果对本地消息队列中的消息进行对应的状态变化处理的方法可参见图2所示,所述方法包括如下步骤:
S201,可穿戴设备接收关联的智能终端发送的按照预定格式封装的、包含目标消息 状态变化的解析结果,所述解析结果为智能终端检测到本地通知栏有消息状态发生变化时,针对发生变化的消息进行解析得到的;
S202,从所述解析结果中获取消息状态和消息ID,根据所述消息状态和消息ID对所述消息进行对应的状态变化处理。
具体而言,根据所述消息状态和消息ID对所述消息进行对应的状态变化处理,至少包括以下几种方式:
(1-1)在所述消息状态为新消息提醒的情况下,记录所述消息和所述消息ID的对应关系,在本地消息队列中增加所述新消息提醒;
(1-2)在消息状态为旧消息撤回的情况下,从本地消息队列中查找与所述消息ID匹配的历史消息,从所述本地消息队列中将查找到的历史消息的消息内容修改为已撤回;
(1-3)在消息状态为旧消息删除的情况下,从本地消息队列中查找与所述消息ID匹配的历史消息,从所述消息队列中将查找到的历史消息删除。
在进行新消息提醒时,消息提醒可具体展示为消息主题、消息具体内容和消息发送者。
其中,在步骤(1-1)中,在本地消息队列中增加所述新消息提醒时,参见图3,可分为如下步骤:
S202a,接收到解析结果后,从所述解析结果中获取所述目标消息的消息分类;
S202b,在所述目标消息为有内容消息的情况下,继续在解析结果中获取所述目标消息的消息内容,在本地消息队列中增加包括消息内容显示的新消息提醒;
S202c,在所述目标消息为无内容消息的情况下,则继续在解析结果中获取所述目标消息的消息来源,根据所述消息来源确定对应的提醒格式,在本地消息队列中按照所述提醒格式增加新消息提醒。
针对有内容消息,可在智能终端通知栏或可穿戴设备的消息队列中显示具体消息内容;针对无内容消息,可在智能终端通知栏或可穿戴设备的消息队列中显示消息通知,消息通知的具体表现形式可为“你有一条新的消息提醒”等。
举例说明:若所述目标消息为无内容消息,则继续在接收到的解析结果中获取所述目标消息的消息来源,当消息来源为未接电话时,可在本地消息队列中显示“您有一个未接电话”,当消息来源为应用软件“小米运动”时,可在本地消息队列中显示“小米运动有一条新消息”。
可以知道,经过步骤(1-2)后,可穿戴设备的本地消息队列已跟随关联智能终端的通知栏进行对应的状态变化处理;即,在撤回操作之前,可穿戴设备的本地消息队列通过消息提醒,显示该消息的具体内容;在撤回操作之后,可穿戴设备的本地消息队列该消息提醒仍然存在,但不再显示该消息的具体内容,而是在原具体内容显示处显示为“已撤回”。
在一种可选地实施例中,若未查找到与所述消息ID匹配的历史消息,则不作处理。不存在该与所述消息ID匹配的历史消息的情况可能为:用户在接收到某条消息的撤回提醒之前已经对该消息进行了清除操作。
上述实施例分别从智能终端侧和可穿戴设备侧说明当智能终端通知栏出现状态变化时,如何将变化同步到另一侧可穿戴设备。下面从可穿戴设备侧,说明当可穿戴设备的本地消息队列发生状态变化时,如何将变化同步到另一侧智能终端。
参见图4所示,为本说明书实施例提供的一种即时消息处理方法,该即时消息处理方法应用于可穿戴设备侧,所述方法包括如下步骤:
S401,可穿戴设备按照预定义的检测周期检测本地消息队列;
S402,所述本地消息队列是否被删除一条或多条历史消息?若本地消息队列被删除一条或多条历史消息,执行步骤S403,否则不操作;
S403,将被删除消息的消息ID发送给关联的智能终端,以使所述智能终端从本地通知栏删除与所述消息ID匹配的消息。
在可穿戴设备侧,消息状态变化种类少于智能终端侧。即可穿戴设备侧,本地消息队列中的消息状态变化情况只有旧消息删除一种,不存在新消息提醒和旧消息撤回。在检测本地消息队列时,只需要检测队列中是否有消息被删除。
若有消息被删除,则将该被删除的消息ID发送给智能终端。具体而言,当用户仅删除一条历史消息时,发送给智能终端的消息格式即为包含消息ID的数据包;当用户删除多条历史消息时,发送给智能终端的消息格式即为包含多条消息ID组成的数组的数据包。
综上所述,本说明书提供的即时消息处理方法,为智能终端收到的每条新消息分配唯一ID,在智能终端的通知栏或可穿戴设备的消息队列发生消息状态的变化后,根据该消息提醒对应的唯一ID匹配另一关联设备侧的消息提醒,并按照预定义的处理策略进行对应的变化处理。用户不管哪一侧设备进行消息操作,都自动同步该操作结果到另一侧设备,避免用户重复操作,提升用户体验。
相应于上述方法实施例,本说明书实施例还提供一种即时消息处理装置,参见图5所示,所述装置可以包括:消息变化解析模块510和解析结果发送模块520。
消息变化解析模块510:用于控制智能终端检测到本地通知栏有消息状态发生变化时,针对发生变化的目标消息进行解析。
解析结果发送模块520:用于将解析结果按照预定格式封装后,发送给与所述智能终端关联的可穿戴设备,以使所述可穿戴设备按照解析结果对本地消息队列中的消息进行对应的状态变化处理,其中,所述按照预定格式封装的解析结果包括:用于唯一标识消息的消息ID、消息分类、用于标识状态变化类型的消息状态、以及消息来源与消息内容。
可选地,所述消息变化解析模块,用于:
针对所述发生变化的目标消息进行解析,根据解析结果确定所述目标消息的状态变化类型;
若所述状态变化类型为接收到新消息,则为所述新消息分配一个消息ID,所述消息ID用于唯一标识对应消息。
可选地,所述消息变化解析模块,用于:
获取消息ID分配记录表,所述消息ID分配记录表中记录了所述智能终端在本次开机时间内,为通知栏接收的每条新消息分别分配的消息ID;
基于上一次分配的消息ID进行增量计算,将计算结果确定为本次接收的新消息分配的消息ID,并将新分配的消息ID记录在消息ID分配记录表中。
可选地,所述消息变化解析模块,还用于:
若所述状态变化类型为操作旧消息,则获取所述旧消息先前被分配的ID,将该先 前被分配的ID作为消息ID。
相应于上述方法实施例,本说明书实施例还提供一种即时消息处理装置,参见图6所示,所述装置可以包括:解析结果接收模块610状态变化处理模块620。
解析结果接收模块610:用于控制可穿戴设备接收到关联的智能终端发送的按照包含预定格式封装的解析结果,所述解析结果为智能终端检测到本地通知栏有消息状态发生变化时,针对发生变化的消息进行解析得到的。
状态变化处理模块620:用于从所述解析结果中获取消息状态和消息ID,按照根据所述消息状态和消息ID对所述消息进行对应的状态变化处理。
可选地,所述状态变化处理模块,用于:
在所述消息状态为新消息提醒的情况下,记录所述消息和所述消息ID的对应关系,在本地消息队列中增加所述新消息提醒;
在所述消息状态为旧消息撤回的情况下,从本地消息队列中查找与所述消息ID匹配的历史消息,从所述本地消息队列中将所述消息的消息内容修改为已撤回;
在所述消息状态为旧消息删除的情况下,从本地消息队列中查找与所述消息ID匹配的历史消息,从所述消息队列中将所述目标消息删除。
可选地,所述状态变化处理模块,用于:
从所述解析结果中获取所述目标消息的消息分类;
若所述目标消息为有内容消息,则继续在解析结果中获取所述目标消息的消息内容,在本地消息队列中增加包括消息内容显示的新消息提醒;
若所述目标消息为无内容消息,则继续在解析结果中获取所述目标消息的消息来源,根据所述消息来源确定对应的提醒格式,在本地消息队列中按照所述提醒格式增加新消息提醒。
可选地,所述装置还包括:
消息队列同步模块:用于控制可穿戴设备按照预定义的检测周期检测本地消息队列,若检测到本地消息队列被删除一条或多条历史消息,则将被删除消息的消息ID发送给关联的智能终端,以使所述智能终端从本地通知栏删除与所述消息ID匹配的消息。
本说明书实施例还提供一种可穿戴设备,所述可穿戴设备至少包括传感器,存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,处理器执行所述程序时实现如下方法:
可穿戴设备接收关联的智能终端发送的按照预定格式封装的解析结果,所述解析结果为智能终端检测到本地通知栏有消息状态发生变化时,针对发生变化的消息进行解析得到的;
从所述解析结果中获取消息状态和消息ID,根据所述消息状态和消息ID对所述消息进行对应的状态变化处理。
本说明书实施例还提供一种智能终端设备,所述可穿戴设备至少包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,处理器执行所述程序时实现如下方法:
智能终端检测到本地通知栏有消息状态发生变化时,针对发生变化的目标消息进行解析;
将解析结果按照预定格式封装后,发送给与所述智能终端关联的可穿戴设备,以使所述可穿戴设备按照解析结果对本地消息队列中的消息进行对应的状态变化处理;
其中,所述按照预定格式封装的解析结果包括:用于唯一标识消息的消息ID、用于标识状态变化类型的消息状态、以及消息内容。
本说明书实施例还提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现实现如下方法:
可穿戴设备接收关联的智能终端发送的按照预定格式封装的解析结果,所述解析结果为智能终端检测到本地通知栏有消息状态发生变化时,针对发生变化的消息进行解析得到的;
从所述解析结果中获取消息状态和消息ID,根据所述消息状态和消息ID对所述消息进行对应的状态变化处理。
本说明书实施例还提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现实现如下方法:
智能终端检测到本地通知栏有消息状态发生变化时,针对发生变化的目标消息进行解析;
将解析结果按照预定格式封装后,发送给与所述智能终端关联的可穿戴设备,以使所述可穿戴设备按照解析结果对本地消息队列中的消息进行对应的状态变化处理;
其中,所述按照预定格式封装的解析结果包括:用于唯一标识消息的消息ID、用于标识状态变化类型的消息状态、以及消息内容。
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本说明书方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。
以上所述仅是本说明书实施例的具体实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本说明书实施例原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本说明书实施例的保护范围。

Claims (20)

  1. 一种即时消息处理方法,应用于智能终端,所述方法包括:
    智能终端检测到本地通知栏有消息状态发生变化时,针对发生变化的目标消息进行解析;
    将解析结果按照预定格式封装后,发送给与所述智能终端关联的可穿戴设备,以使所述可穿戴设备按照解析结果对本地消息队列中的消息进行对应的状态变化处理;
    其中,所述按照预定格式封装的解析结果包括:用于唯一标识消息的消息ID、用于标识状态变化类型的消息状态、以及消息内容。
  2. 根据权利要求1所述的即时消息处理方法,其中,所述针对发生变化的目标消息进行解析,包括:
    针对所述发生变化的目标消息进行解析,根据解析结果确定所述目标消息的状态变化类型;
    若所述状态变化类型为接收到新消息,则为所述新消息分配一个消息ID,所述消息ID用于唯一标识对应消息。
  3. 根据权利要求2所述的即时消息处理方法,其中,所述为所述新消息分配一个消息ID,包括:
    获取消息ID分配记录表,所述消息ID分配记录表中记录了所述智能终端在本次开机时间内,为通知栏接收的每条新消息分别分配的消息ID;
    基于上一次分配的消息ID进行增量计算,将计算结果确定为本次接收的新消息分配的消息ID,并将新分配的消息ID记录在消息ID分配记录表中。
  4. 根据权利要求2所述的即时消息处理方法,其中,
    若所述状态变化类型为操作旧消息,则获取所述旧消息先前被分配的ID,将该先前被分配的ID作为消息ID。
  5. 一种即时消息处理方法,应用于可穿戴设备,所述方法包括:
    接收关联的智能终端发送的按照预定格式封装的解析结果,所述解析结果为智能终端检测到本地通知栏有消息状态发生变化时,针对发生变化的消息进行解析得到的;
    从所述解析结果中获取消息状态和消息ID,根据所述消息状态和消息ID对所述消息进行对应的状态变化处理。
  6. 根据权利要求5所述的即时消息处理方法,其中,所述根据所述消息状态和消息ID对所述消息进行对应的状态变化处理,包括:
    在所述消息状态为新消息提醒的情况下,记录所述消息和所述消息ID的对应关系,在本地消息队列中增加所述新消息提醒;
    在所述消息状态为旧消息撤回的情况下,从本地消息队列中查找与所述消息ID匹配的历史消息,从所述本地消息队列中将查找到的历史消息的消息内容修改为已撤回;
    在所述消息状态为旧消息删除的情况下,从本地消息队列中查找与所述消息ID匹配的历史消息,从所述本地消息队列中将查找到的历史消息删除。
  7. 根据权利要求6所述的即时消息处理方法,其中,所述在本地消息队列中增加所述新消息提醒,包括:
    从所述解析结果中获取所述消息的消息分类;
    若所述消息为有内容消息,则继续在解析结果中获取所述消息的消息内容,在本地消息队列中增加包括消息内容显示的新消息提醒;
    若所述消息为无内容消息,则继续在解析结果中获取所述消息的消息来源,根据所述消息来源确定对应的提醒格式,在本地消息队列中按照所述提醒格式增加新消息提醒。
  8. 根据权利要求5所述的即时消息处理方法,其中,所述方法还包括:
    可穿戴设备按照预定义的检测周期检测本地消息队列;
    若检测到本地消息队列被删除一条或多条历史消息,则将被删除消息的消息ID发 送给关联的智能终端,以使所述智能终端从本地通知栏删除与所述消息ID匹配的消息。
  9. 一种即时消息处理装置,所述装置包括:
    消息变化解析模块:用于控制智能终端检测到本地通知栏有消息状态发生变化时,针对发生变化的目标消息进行解析;
    解析结果发送模块:用于将解析结果按照预定格式封装后,发送给与所述智能终端关联的可穿戴设备,以使所述可穿戴设备按照解析结果对本地消息队列中的消息进行对应的状态变化处理;其中,所述按照预定格式封装的解析结果包括:用于唯一标识消息的消息ID、用于标识状态变化类型的消息状态、以及消息内容。
  10. 根据权利要求9所述的即时消息处理装置,其中,所述消息变化解析模块,用于:
    针对所述发生变化的目标消息进行解析,根据解析结果确定所述目标消息的状态变化类型;
    若所述状态变化类型为接收到新消息,则为所述新消息分配一个消息ID,所述消息ID用于唯一标识对应消息。
  11. 根据权利要求10所述的即时消息处理装置,其中,所述消息变化解析模块,用于:
    获取消息ID分配记录表,所述消息ID分配记录表中记录了所述智能终端在本次开机时间内,为通知栏接收的每条新消息分别分配的消息ID;
    基于上一次分配的消息ID进行增量计算,将计算结果确定为本次接收的新消息分配的消息ID,并将新分配的消息ID记录在消息ID分配记录表中。
  12. 根据权利要求9所述的即时消息处理装置,其中,所述消息变化解析模块,还用于:
    若所述状态变化类型为操作旧消息,则获取所述旧消息先前被分配的ID,将该先前被分配的ID作为消息ID。
  13. 一种即时消息处理装置,所述装置包括:
    解析结果接收模块:用于控制可穿戴设备接收关联的智能终端发送的按照包含预定格式封装的解析结果,所述解析结果为智能终端检测到本地通知栏有消息状态发生变化时,针对发生变化的消息进行解析得到的;
    状态变化处理模块:用于从所述解析结果中获取消息状态和消息ID,根据所述消息状态和消息ID对所述消息进行对应的状态变化处理。
  14. 根据权利要求13所述的即时消息处理装置,其中,所述状态变化处理模块,用于:
    在所述消息状态为新消息提醒的情况下,记录所述消息和所述消息ID的对应关系,在本地消息队列中增加所述新消息提醒;
    在所述消息状态为旧消息撤回的情况下,从本地消息队列中查找与所述消息ID匹配的历史消息,从所述本地消息队列中将查找到的历史消息的消息内容修改为已撤回;
    在所述消息状态为旧消息删除的情况下,从本地消息队列中查找与所述消息ID匹配的历史消息,从所述本地消息队列中将查找到的历史消息删除。
  15. 根据权利要求14所述的即时消息处理装置,其中,所述状态变化处理模块,用于:
    从所述解析结果中获取所述消息的消息分类;
    若所述消息为有内容消息,则继续在解析结果中获取所述消息的消息内容,在本地消息队列中增加包括消息内容显示的新消息提醒;
    若所述消息为无内容消息,则继续在解析结果中获取所述消息的消息来源,根据所述消息来源确定对应的提醒格式,在本地消息队列中按照所述提醒格式增加新消息提醒。
  16. 根据权利要求13所述的即时消息处理装置,其中,所述装置还包括:
    消息队列同步模块:用于控制可穿戴设备按照预定义的检测周期检测本地消息队列,若检测到本地消息队列被删除一条或多条历史消息,则将被删除消息的消息ID发送给关联的智能终端,以使所述智能终端从本地通知栏删除与所述消息ID匹配的消息。
  17. 一种智能终端设备,包括传感器,存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,处理器执行所述程序时实现如权利要求1-4任一项所述的即时消息处理方法。
  18. 一种可穿戴设备,包括传感器,存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,处理器执行所述程序时实现如权利要求5-8任一项所述的即时消息处理方法。
  19. 一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如权利要求1-4任一项所述的即时消息处理方法。
  20. 一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如权利要求5-8任一项所述的即时消息处理方法。
PCT/CN2021/097770 2020-06-05 2021-06-01 即时消息处理方法和装置 WO2021244548A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010507534.9 2020-06-05
CN202010507534.9A CN113765771A (zh) 2020-06-05 2020-06-05 一种即时消息处理方法和装置

Publications (1)

Publication Number Publication Date
WO2021244548A1 true WO2021244548A1 (zh) 2021-12-09

Family

ID=78785106

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/097770 WO2021244548A1 (zh) 2020-06-05 2021-06-01 即时消息处理方法和装置

Country Status (2)

Country Link
CN (1) CN113765771A (zh)
WO (1) WO2021244548A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116743693B (zh) * 2022-10-24 2024-05-07 荣耀终端有限公司 一种消息同步方法、电子设备和存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130236877A1 (en) * 2011-11-02 2013-09-12 Andrew H. B. Zhou Systems and methods for providing educational products and services via cloud massive online open course
CN104573100A (zh) * 2015-01-29 2015-04-29 无锡江南计算技术研究所 一种带自增量标识的分步式数据库同步方法
CN106021153A (zh) * 2016-05-16 2016-10-12 安徽华米信息科技有限公司 数据传输方法及装置、智能电子设备
CN109992087A (zh) * 2019-04-09 2019-07-09 努比亚技术有限公司 可穿戴设备数据显示的优化方法、可穿戴设备及存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104869560B (zh) * 2014-02-26 2018-09-07 宇龙计算机通信科技(深圳)有限公司 消息通知方法、消息通知装置、移动设备和消息通知系统
US9774723B2 (en) * 2015-02-24 2017-09-26 Pebble Technology, Corp. System architecture for a wearable device
CN108351683B (zh) * 2015-12-08 2020-10-09 华为技术有限公司 消息处理方法及移动终端
CN109995938A (zh) * 2019-03-15 2019-07-09 努比亚技术有限公司 一种通知显示方法、手机、可穿戴设备和计算可读存储介质
CN110098845B (zh) * 2019-05-10 2023-06-06 努比亚技术有限公司 消息处理方法、可穿戴设备、移动终端及可读存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130236877A1 (en) * 2011-11-02 2013-09-12 Andrew H. B. Zhou Systems and methods for providing educational products and services via cloud massive online open course
CN104573100A (zh) * 2015-01-29 2015-04-29 无锡江南计算技术研究所 一种带自增量标识的分步式数据库同步方法
CN106021153A (zh) * 2016-05-16 2016-10-12 安徽华米信息科技有限公司 数据传输方法及装置、智能电子设备
CN109992087A (zh) * 2019-04-09 2019-07-09 努比亚技术有限公司 可穿戴设备数据显示的优化方法、可穿戴设备及存储介质

Also Published As

Publication number Publication date
CN113765771A (zh) 2021-12-07

Similar Documents

Publication Publication Date Title
KR102509679B1 (ko) IEEE 802.11 표준에 정의된 TWT(target wake time)를 이용하여 무선 매체에 대한 접근을 지원하는 전자 장치
CN106856630B (zh) 资源分配方法、装置、用户设备和基站
US20130117271A1 (en) Method and Apparatus for Automatically Classifying Application in Mobile Terminal
US10198176B2 (en) Method of managing one or more notifications and electronic device for same
CN109905545B (zh) 一种消息处理方法及终端、计算机可读存储介质
US20150156300A1 (en) Method for filtering spam in electronic device and the electronic device
CN104639423B (zh) 一种信息交互方法、装置及终端
CN107872494B (zh) 一种消息推送方法和装置
KR101506964B1 (ko) 메시지 쓰레드들을 우선순위화하기 위한 방법들 및 디바이스들
US10681200B2 (en) Message processing method and system, and related device
KR102211783B1 (ko) 전자 장치의 그룹 페이징 방법 및 그 전자 장치
CN105898085B (zh) 骚扰通信账号的识别方法及装置
CN107341033A (zh) 一种数据统计方法、装置、电子设备和存储介质
CN104185141A (zh) 基于蓝牙信标设备的用户区域停留时间的检测系统和方法
US20180026923A1 (en) Electronic device and email management method therefor
CN107223363A (zh) 一种分配调度请求sr资源的方法和装置
CN108900855A (zh) 直播内容录制方法及装置
WO2021244548A1 (zh) 即时消息处理方法和装置
CN107465601B (zh) 推送信息处理方法及装置
EP4270970A1 (en) Method and device for multimedia data sharing
US10530732B2 (en) Method for using a content subscription list and electronic device supporting the same
CN114679745A (zh) 终止无线感知测量进程的方法、装置、设备及存储介质
CN112838980B (zh) 一种消息处理方法、系统、装置、电子设备及存储介质
CN110795314B (zh) 一种检测慢节点的方法、装置及计算机可读存储介质
CN107368360B (zh) 一种定时任务执行方法及定时任务服务器

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21818286

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21818286

Country of ref document: EP

Kind code of ref document: A1