CN113179207B - Message processing method and electronic device - Google Patents
Message processing method and electronic device Download PDFInfo
- Publication number
- CN113179207B CN113179207B CN202110461110.8A CN202110461110A CN113179207B CN 113179207 B CN113179207 B CN 113179207B CN 202110461110 A CN202110461110 A CN 202110461110A CN 113179207 B CN113179207 B CN 113179207B
- Authority
- CN
- China
- Prior art keywords
- target
- message
- content
- historical
- information corresponding
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/21—Monitoring or handling of messages
- H04L51/216—Handling conversation history, e.g. grouping of messages in sessions or threads
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/52—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail for supporting social networking services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本申请公开了一种消息处理方法和电子设备,属于电子技术领域。其中,所述消息处理方法包括:在目标社交界面删除目标消息的情况下,获取与所述目标消息对应的目标识别信息;将所述目标消息的内容与历史消息内容进行匹配;在所述目标消息的内容与目标历史消息内容匹配的情况下,将所述目标识别信息与所述目标历史消息内容关联;其中,所述目标识别信息包括所述目标社交界面对应的第一社交对象信息、所述目标消息对应的第二社交对象信息、所述目标消息对应的索引位置信息和所述目标消息的内容对应的位置信息。
The present application discloses a message processing method and electronic device, which belong to the field of electronic technology. Wherein, the message processing method includes: in the case of deleting the target message on the target social interface, acquiring target identification information corresponding to the target message; matching the content of the target message with the content of historical messages; When the content of the message matches the content of the target historical message, the target identification information is associated with the content of the target historical message; wherein the target identification information includes the first social object information corresponding to the target social interface, all The second social object information corresponding to the target message, the index location information corresponding to the target message, and the location information corresponding to the content of the target message.
Description
技术领域technical field
本申请属于电子技术领域,具体涉及一种消息处理方法和电子设备。The present application belongs to the field of electronic technology, and specifically relates to a message processing method and electronic device.
背景技术Background technique
目前,电子设备已经成为人们重要的通讯工具。电子设备中包括各种社交软件,用户通过社交软件与好友随时随地聊天、交流,极大地缩短了人与人之间的距离。At present, electronic equipment has become an important communication tool for people. Electronic devices include various social software. Users can chat and communicate with their friends anytime and anywhere through social software, which greatly shortens the distance between people.
而随着电子设备中各种社交软件的层出不穷,电子设备中存储的社交数据也较多,如电子设备中存储了大量的聊天记录,从而因聊天记录占用电子设备的存储空间,导致电子设备的性能有所降低。因此,用户需要定期删除一些聊天记录,以优化电子设备的性能。With the continuous emergence of various social software in electronic devices, there is also a lot of social data stored in electronic devices. For example, a large number of chat records are stored in electronic devices, so chat records occupy the storage space of electronic devices, resulting in the loss of electronic devices. Performance has decreased. Therefore, users need to delete some chat history regularly to optimize the performance of the electronic device.
在现有技术中,用户一旦进行删除聊天记录的操作,系统就会彻底删除聊天记录,若是用户的误操作,或者用户需要再次查看已删除的聊天记录,则无迹可寻。In the prior art, once a user performs an operation of deleting a chat record, the system will delete the chat record completely. If the user makes a mistake, or the user needs to check the deleted chat record again, there is no trace.
发明内容SUMMARY OF THE INVENTION
本申请实施例的目的是提供一种消息处理方法,能够解决在现有技术中,用户需要再次查看已删除的聊天记录,无迹可寻的问题。The purpose of the embodiments of the present application is to provide a message processing method, which can solve the problem in the prior art that the user needs to check the deleted chat record again, and there is no trace.
第一方面,本申请实施例提供了一种消息处理方法,该方法包括:在目标社交界面删除目标消息的情况下,获取与所述目标消息对应的目标识别信息;将所述目标消息的内容与历史消息内容进行匹配;在所述目标消息的内容与目标历史消息内容匹配的情况下,将所述目标识别信息与所述目标历史消息内容关联;其中,所述目标识别信息包括所述目标社交界面对应的第一社交对象信息、所述目标消息对应的第二社交对象信息、所述目标消息对应的索引位置信息和所述目标消息的内容对应的位置信息。In a first aspect, an embodiment of the present application provides a message processing method, the method includes: in the case of deleting a target message on a target social interface, acquiring target identification information corresponding to the target message; Matching with the content of the historical message; in the case that the content of the target message matches the content of the target historical message, associate the target identification information with the content of the target historical message; wherein the target identification information includes the target The first social object information corresponding to the social interface, the second social object information corresponding to the target message, the index location information corresponding to the target message, and the location information corresponding to the content of the target message.
第二方面,本申请实施例提供了一种消息处理装置,该装置包括:获取模块,用于在目标社交界面删除目标消息的情况下,获取与所述目标消息对应的目标识别信息;匹配模块,用于将所述目标消息的内容与历史消息内容进行匹配;关联模块,用于在所述目标消息的内容与目标历史消息内容匹配的情况下,将所述目标识别信息与所述目标历史消息内容关联;其中,所述目标识别信息包括所述目标社交界面对应的第一社交对象信息、所述目标消息对应的第二社交对象信息、所述目标消息对应的索引位置信息和所述目标消息的内容对应的位置信息。In a second aspect, an embodiment of the present application provides a message processing device, the device includes: an acquisition module, configured to acquire target identification information corresponding to the target message when the target message is deleted on the target social interface; a matching module , used to match the content of the target message with the content of the historical message; an association module, used to match the content of the target message with the content of the target historical message, match the target identification information with the target history message content association; wherein the target identification information includes first social object information corresponding to the target social interface, second social object information corresponding to the target message, index location information corresponding to the target message, and the target Location information corresponding to the content of the message.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。In a third aspect, embodiments of the present application provide an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being The processor implements the steps of the method according to the first aspect when executed.
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a fourth aspect, an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method according to the first aspect are implemented .
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In a fifth aspect, an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction, and implement the first aspect the method described.
这样,在本申请的实施例中,当用户在目标社交界面删除目标消息时,获取目标消息对应的目标识别信息,目标识别信息包括目标社交界面对应的第一社交对象信息,如在好友A的聊天界面删除目标消息,则第一社交对象信息为好友A的账号信息;目标识别信息还包括目标消息对应的第二社交对象信息,如目标消息是好友A发送来的,则第二社交对象为好友A的账号信息;目标识别信息还包括目标消息对应的索引位置信息,索引位置信息是系统分配给目标消息的唯一的、可起到定位作用的信息;还包括目标消息的内容对应的位置信息,即目标消息中的内容在整个目标消息的排序。在获取目标识别信息之后,在现有的所有历史消息内容中,匹配与目标消息的内容一致的历史消息内容,当目标消息的内容与目标历史消息内容匹配的情况下,将前面获取的目标识别信息与目标历史消息内容进行关联,如绑定、标记等关联方式,从而完成对该目标消息的备份。可见,在本申请的实施例中,在删除目标消息之前,而是通过将目标识别信息与历史消息内容关联的方式对目标消息进行了备份,以避免因用户的误操作、或者用户需要再次查看已删除的聊天记录时,因无迹可寻给用户带来不便。In this way, in the embodiment of the present application, when the user deletes the target message on the target social interface, the target identification information corresponding to the target message is obtained, and the target identification information includes the first social object information corresponding to the target social interface. If the target message is deleted from the chat interface, the first social object information is the account information of friend A; the target identification information also includes the second social object information corresponding to the target message. If the target message is sent by friend A, the second social object is Friend A's account information; the target identification information also includes the index location information corresponding to the target message, which is the only information that the system assigns to the target message and can play a positioning role; it also includes the location information corresponding to the content of the target message , that is, the ordering of the contents of the target message in the entire target message. After acquiring the target identification information, among all the existing historical message contents, match the historical message contents consistent with the target message contents, and when the target message contents match the target historical message contents, identify the previously acquired target The information is associated with the content of the target historical message, such as binding, marking, etc., so as to complete the backup of the target message. It can be seen that in the embodiment of the present application, before deleting the target message, the target message is backed up by associating the target identification information with the content of the historical message, so as to avoid the user's misoperation or the user's need to view it again When the chat history has been deleted, it is inconvenient for the user because there is no trace.
附图说明Description of drawings
图1是本申请实施例的消息处理方法的流程图;1 is a flowchart of a message processing method according to an embodiment of the present application;
图2是本申请实施例的消息处理装置的框图;2 is a block diagram of a message processing apparatus according to an embodiment of the present application;
图3是本申请实施例的电子设备的硬件结构示意图之一;3 is one of the schematic diagrams of the hardware structure of the electronic device according to the embodiment of the present application;
图4是本申请实施例的电子设备的硬件结构示意图之二。FIG. 4 is the second schematic diagram of the hardware structure of the electronic device according to the embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art fall within the protection scope of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between "first", "second", etc. The objects are usually of one type, and the number of objects is not limited. For example, the first object may be one or more than one. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the associated objects are in an "or" relationship.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的消息处理方法进行详细地说明。The message processing method provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
参见图1,示出了本申请一个实施例的消息处理方法的流程图,该方法应用于电子设备,包括:Referring to FIG. 1 , a flowchart of a message processing method according to an embodiment of the present application is shown. The method is applied to an electronic device, including:
步骤S1:在目标社交界面删除目标消息的情况下,获取与目标消息对应的目标识别信息。Step S1: In the case of deleting the target message on the target social interface, acquire target identification information corresponding to the target message.
其中,目标识别信息包括目标社交界面对应的第一社交对象信息、目标消息对应的第二社交对象信息、目标消息对应的索引位置信息和目标消息的内容对应的位置信息。The target identification information includes first social object information corresponding to the target social interface, second social object information corresponding to the target message, index location information corresponding to the target message, and location information corresponding to the content of the target message.
可选地,目标社交界面为任意社交软件中的某好友的聊天界面或者某群体的聊天界面。Optionally, the target social interface is a chat interface of a friend or a chat interface of a group in any social software.
可选地,目标消息为目标社交界面中的聊天消息。Optionally, the target message is a chat message in the target social interface.
应用场景如,在好友A的聊天窗口,用户选择一条聊天消息,作为目标消息,点击“删除”选项,从而在该步骤中,删除该聊天消息。For example, in the chat window of friend A, the user selects a chat message as the target message, and clicks the "delete" option, so that in this step, the chat message is deleted.
在该步骤中,在删除目标消息的同时,获取与目标消息对应的目标识别信息。In this step, while deleting the target message, target identification information corresponding to the target message is acquired.
其中,第一方面,目标识别信息包括目标社交界面对应的第一社交对象信息。In the first aspect, the target identification information includes first social object information corresponding to the target social interface.
社交对象信息用于表示社交对象身份的信息,如在指定社交软件中,社交对象的账号信息、名称信息等用户身份信息。The social object information is used to indicate the identity of the social object, such as user identity information such as account information and name information of the social object in a designated social software.
对应地,目标社交界面对应的第一社交对象信息,即聊天界面对应的用户身份信息。例如,前述好友A的账号信息、名称信息等。Correspondingly, the first social object information corresponding to the target social interface is the user identity information corresponding to the chat interface. For example, the account information, name information, etc. of the aforementioned friend A.
第二方面,目标识别信息还包括目标消息对应的第二社交对象信息。In the second aspect, the target identification information further includes second social object information corresponding to the target message.
目标消息对应的第二社交对象信息,即发送目标消息的用户身份信息。例如,前述好友A的账号信息或者用户本人的账号信息。The second social object information corresponding to the target message, that is, the identity information of the user sending the target message. For example, the account information of the aforementioned friend A or the account information of the user himself.
第三方面,目标识别信息还包括目标消息对应的索引位置信息。In a third aspect, the target identification information further includes index position information corresponding to the target message.
用户在聊天的时候,系统会对每条聊天消息优先分配一个索引位置信息,索引位置信息是在同一日期下,按顺序分发的,比如2021年3月11日07点30分第一条聊天消息的索引位置信息就是“20210311073000001”。其中,按照索引位置信息中的字符顺序,“20210311”表示2021年3月11日,“0730”表示07点30分,“000001”表示第一条聊天消息。因此,每条聊天消息对应唯一的索引位置信息,后续无论用户怎么操作,索引位置信息都是不会发生变化的。When a user is chatting, the system will give priority to assigning an index location information to each chat message. The index location information is distributed in sequence on the same date, for example, the first chat message at 07:30 on March 11, 2021 The index position information is "20210311073000001". Among them, according to the character order in the index position information, "20210311" represents March 11, 2021, "0730" represents 07:30, and "000001" represents the first chat message. Therefore, each chat message corresponds to unique index location information, and the index location information will not change regardless of subsequent operations by the user.
因此,本实施例在删除目标消息的情况下,可将目标消息进行备份,而目标消息对应的索引位置信息用于在备份时候起到唯一定位的作用。Therefore, in this embodiment, when the target message is deleted, the target message can be backed up, and the index position information corresponding to the target message is used to play a unique positioning role during backup.
第四方面,目标识别信息还包括目标消息的内容对应的位置信息。In a fourth aspect, the target identification information further includes location information corresponding to the content of the target message.
在目标消息中,包括文字、标点符号等字符,所有的字符组合形成目标消息的内容,而所有的字符是按照一定顺序排列下来的。因此,对于目标消息来说,目标消息中的每个字符均对应有位置排序。而目标消息的内容对应的位置信息,即目标消息的内容在目标消息中的位置排序序号。In the target message, characters such as characters, punctuation marks, etc. are included, all the characters are combined to form the content of the target message, and all the characters are arranged in a certain order. Therefore, for the target message, each character in the target message has a positional ordering. The location information corresponding to the content of the target message, that is, the sequence number of the location of the content of the target message in the target message.
例如,目标消息为:“你好,今天天气怎么样”,对于“你”这一字符内容来说,其对应的位置信息为:(0);对于“你好”这两个字符内容来说,其对应的位置信息为:(0,1);对于“今天天气怎么样”这些字符内容来说,其对应的位置信息为:(3,9)。For example, the target message is: "Hello, how is the weather today", for the character content of "you", the corresponding position information is: (0); for the two character content of "hello" , the corresponding position information is: (0, 1); for the character content of "how is the weather today", the corresponding position information is: (3, 9).
需要说明的是,本实施例中的目标消息也可以是语音消息,在处理的过程中,可首先将语音消息转换为文字消息,再将转换后的文字消息进行备份。It should be noted that the target message in this embodiment may also be a voice message. During the processing, the voice message may be converted into a text message first, and then the converted text message may be backed up.
步骤S2:将目标消息的内容与历史消息内容进行匹配。Step S2: Match the content of the target message with the content of the historical message.
在该步骤中,历史消息内容为社交软件中未删除的历史消息内容,即未删除的聊天记录。In this step, the historical message content is the undeleted historical message content in the social software, that is, the undeleted chat record.
可选地,目标消息和历史消息内容属于同一社交软件中。Optionally, the content of the target message and the historical message belong to the same social software.
匹配的方式为:在历史消息内容中,查找与目标消息的内容一致的内容。The matching method is: in the historical message content, find the content that is consistent with the content of the target message.
例如,在大量的历史消息内容中查找“你好,今天天气怎么样”。For example, look for "Hello, what's the weather like today" in a large amount of historical message content.
其中,历史消息内容可以是第一社交对象相关的历史消息内容,也可以是其它社交对象相关的历史消息内容,由系统自己查找,以使得查找匹配效率更高一点。The historical message content may be the historical message content related to the first social object or the historical message content related to other social objects, which is searched by the system itself, so that the search and matching efficiency is higher.
步骤S3:在目标消息的内容与目标历史消息内容匹配的情况下,将目标识别信息与目标历史消息内容关联。Step S3: in the case that the content of the target message matches the content of the target historical message, associate the target identification information with the content of the target historical message.
在该步骤中,在目标消息的内容与目标历史消息内容匹配的情况下,即目标消息的内容与目标历史消息内容一致。In this step, if the content of the target message matches the content of the target historical message, that is, the content of the target message is consistent with the content of the target historical message.
可选地,该步骤中的关联方式为:在目标历史消息内容中添加字段,该字段即目标识别信息。Optionally, the association method in this step is: adding a field to the content of the target historical message, and the field is the target identification information.
可选地,该步骤中的关联方式为:将目标历史消息内容与目标识别信息绑定在一起。Optionally, the association method in this step is: binding the content of the target historical message and the target identification information together.
可选地,该步骤中的关联方式为:以目标识别信息,对目标历史消息内容进行标记。Optionally, the association method in this step is: marking the content of the historical message of the target with the target identification information.
因此,将目标识别信息与目标历史消息内容关联之后,完成对目标消息的备份。Therefore, after the target identification information is associated with the content of the target historical message, the backup of the target message is completed.
这样,在本申请的实施例中,当用户在目标社交界面删除目标消息时,获取目标消息对应的目标识别信息,目标识别信息包括目标社交界面对应的第一社交对象信息,如在好友A的聊天界面删除目标消息,则第一社交对象信息为好友A的账号信息;目标识别信息还包括目标消息对应的第二社交对象信息,如目标消息是好友A发送来的,则第二社交对象为好友A的账号信息;目标识别信息还包括目标消息对应的索引位置信息,索引位置信息是系统分配给目标消息的唯一的、可起到定位作用的信息;还包括目标消息的内容对应的位置信息,即目标消息中的内容在整个目标消息的排序。在获取目标识别信息之后,在现有的所有历史消息内容中,匹配与目标消息的内容一致的历史消息内容,当目标消息的内容与目标历史消息内容匹配的情况下,将前面获取的目标识别信息与目标历史消息内容进行关联,如绑定、标记等关联方式,从而完成对该目标消息的备份。可见,在本申请的实施例中,在删除目标消息之前,通过将目标识别信息与历史消息内容关联的方式对目标消息进行了备份,以避免因用户的误操作、或者用户需要再次查看已删除的聊天记录时,因无迹可寻给用户带来不便。In this way, in the embodiment of the present application, when the user deletes the target message on the target social interface, the target identification information corresponding to the target message is obtained, and the target identification information includes the first social object information corresponding to the target social interface. If the target message is deleted from the chat interface, the first social object information is the account information of friend A; the target identification information also includes the second social object information corresponding to the target message. If the target message is sent by friend A, the second social object is Friend A's account information; the target identification information also includes the index location information corresponding to the target message, which is the only information that the system assigns to the target message and can play a positioning role; it also includes the location information corresponding to the content of the target message , that is, the ordering of the contents of the target message in the entire target message. After acquiring the target identification information, among all the existing historical message contents, match the historical message contents consistent with the target message contents, and when the target message contents match the target historical message contents, identify the previously acquired target The information is associated with the content of the target historical message, such as binding, marking, etc., so as to complete the backup of the target message. It can be seen that in the embodiment of the present application, before deleting the target message, the target message is backed up by associating the target identification information with the content of the historical message, so as to avoid the user's misoperation or the user's need to check the deleted message again. When there is no trace of the chat record, it will bring inconvenience to the user.
另外,相比于直接备份目标消息的内容这一方法而言,本申请的实施例通过将目标消息的目标识别信息与现存的历史消息内容进行关联,即记录目标识别信息来实现备份,本申请的实施例还可避免因备份目标消息的内容,而导致占用存储空间的现象,可达到优化设备性能的效果。In addition, compared with the method of directly backing up the content of the target message, the embodiment of the present application realizes the backup by associating the target identification information of the target message with the existing historical message content, that is, recording the target identification information. The embodiment of the present invention can also avoid the phenomenon that the storage space is occupied due to the content of the backup target message, and can achieve the effect of optimizing the performance of the device.
在本申请另一个实施例的消息处理方法的流程中,用户还可在步骤S1之前,通过手动操作开启消息备份功能,以使得本申请的实施例得以实现。In the flow of the message processing method according to another embodiment of the present application, the user may also enable the message backup function by manual operation before step S1, so that the embodiment of the present application can be realized.
进一步地,用户通过手动操作关闭消息备份功能后,本申请的实施例备份的数据可全部删除,以进一步优化设备性能。Further, after the user manually disables the message backup function, all the data backed up in the embodiment of the present application may be deleted, so as to further optimize the device performance.
进一步地,备份的数据在设备中保留一定时间后,可自动删除,以进一步优化设备性能。Further, after the backed up data is retained in the device for a certain period of time, it can be automatically deleted to further optimize the performance of the device.
在本申请另一个实施例的消息处理方法的流程中,步骤S3,包括:In the flow of the message processing method according to another embodiment of the present application, step S3 includes:
子步骤A1:在目标消息的全部内容与一条历史消息中的目标历史消息内容匹配的情况下,将目标识别信息与目标历史消息内容关联。Sub-step A1: in the case that the entire content of the target message matches the content of the target historical message in a historical message, associate the target identification information with the content of the target historical message.
其中,目标消息的内容对应的位置信息为全部内容的位置信息。The location information corresponding to the content of the target message is the location information of all the content.
在本实施例中,目标消息的内容为:目标消息的全部内容。In this embodiment, the content of the target message is: the entire content of the target message.
例如,目标消息为:“你好,今天天气怎么样”,则目标消息的内容为:“你好,今天天气怎么样”。For example, if the target message is: "Hello, how is the weather today", the content of the target message is: "Hello, how is the weather today".
在本实施例中,在历史消息中,存在一条历史消息,包括与目标消息的全部内容完全相同的内容。In this embodiment, among the historical messages, there is one historical message, which includes the exact same content as the entire content of the target message.
例如,目标消息为:“你好,今天天气怎么样”,而在一条历史消息中,包括“你好,今天天气怎么样”的内容。For example, the target message is: "Hello, how is the weather today", while in a historical message, the content of "Hello, how is the weather today".
对应地,目标识别信息中包括的位置信息,即整个目标消息的全部内容的位置信息。Correspondingly, the location information included in the target identification information is the location information of the entire content of the entire target message.
例如,目标消息为:“你好,今天天气怎么样”,目标识别信息中的位置信息为(0,9)。For example, the target message is: "Hello, how is the weather today", and the location information in the target identification information is (0, 9).
可选地,在步骤S2的匹配的过程中,可优先以100%的匹配度,在历史消息内容中进行匹配,若匹配到有一条历史消息中的内容与目标消息的匹配度为100%,则说明该历史消息中的内容与目标消息完全一致,从而直接将目标识别信息与匹配的目标历史消息内容关联,进而一次性完成目标消息的备份。Optionally, in the matching process of step S2, the matching degree can be preferentially performed in the content of the historical message with a matching degree of 100%. It means that the content in the historical message is completely consistent with the target message, so that the target identification information is directly associated with the content of the matching target historical message, thereby completing the backup of the target message at one time.
可参考地,目标消息为:“你好,今天天气怎么样”,若匹配到同样的聊天消息,则进行标记,从而完成备份。For reference, the target message is: "Hello, what's the weather like today", and if the same chat message is matched, it will be marked to complete the backup.
在本实施例中,说明了一种情况。在该情况下,目标消息中的全部内容与一条历史消息中的内容完全一致,则直接将目标识别信息与该条历史消息中的内容进行关联。这样,在历史消息内容中,目标消息的全部内容集中在一个位置,便于后续查找。In this embodiment, a case is described. In this case, if all the content in the target message is completely consistent with the content in a historical message, the target identification information is directly associated with the content in the historical message. In this way, in the content of the historical message, all the content of the target message is concentrated in one location, which is convenient for subsequent searching.
在本申请另一个实施例的消息处理方法的流程中,步骤S3,包括:In the flow of the message processing method according to another embodiment of the present application, step S3 includes:
子步骤B1:在目标消息的部分内容与一条历史消息中的目标历史消息内容匹配的情况下,将目标识别信息与目标历史消息内容关联。Sub-step B1: in the case that the partial content of the target message matches the content of the target historical message in a historical message, associate the target identification information with the content of the target historical message.
其中,目标消息的内容对应的位置信息为部分内容在目标消息中对应的位置信息。The location information corresponding to the content of the target message is the location information corresponding to part of the content in the target message.
在目标消息的部分内容与一条历史消息中的目标历史消息内容匹配的情况下,重复将目标消息的内容与历史消息内容进行匹配,直至目标消息的全部内容与多条历史消息中的目标历史消息内容匹配。In the case where part of the content of the target message matches the content of the target historical message in one historical message, repeat the matching between the content of the target message and the content of the historical message, until the entire content of the target message matches the target historical message in the multiple historical messages Content matches.
在本实施例中,目标消息的内容为:目标消息的部分内容。In this embodiment, the content of the target message is: part of the content of the target message.
例如,目标消息为:“你好,今天天气怎么样”,则目标消息的内容为:“你好”。For example, if the target message is: "Hello, how is the weather today", the content of the target message is: "Hello".
在本实施例中,在历史消息中,存在一条历史消息,包括与目标消息的部分内容完全相同的内容。In this embodiment, among the historical messages, there is a historical message, which includes content that is completely identical to the partial content of the target message.
例如,目标消息为:“你好,今天天气怎么样”,而在一条历史消息中,包括“你好”的内容。For example, the target message is: "Hello, what's the weather like today", while in a historical message, the content of "Hello" is included.
对应地,目标识别信息中包括的位置信息,即部分内容在目标消息的位置信息。Correspondingly, the location information included in the target identification information, that is, the location information of the partial content in the target message.
例如,目标消息为:“你好,今天天气怎么样”,匹配的目标消息的内容为:“你好”,目标识别信息中的位置信息为(0,1)。For example, the target message is: "Hello, how is the weather today", the content of the matching target message is: "Hello", and the location information in the target identification information is (0, 1).
可选地,在步骤S2的匹配的过程中,可优先以100%的匹配度,在历史消息内容中进行匹配,若匹配不到任意一条历史消息中的内容与目标消息的匹配度为100%,则降低匹配度,继续匹配。若匹配到其中一条历史消息中的内容与目标消息的匹配度为90%,则说明该历史消息中的内容与目标消息的部分内容一致,从而匹配的这部分对应的位置信息,结合其它识别信息,与匹配的目标历史消息内容关联,进而完成目标消息一部分内容的备份。Optionally, in the matching process of step S2, the matching degree of 100% can be preferentially performed in the content of the historical message, if the content of any historical message cannot be matched with the target message, the matching degree is 100%. , then reduce the matching degree and continue matching. If the matching degree between the content in one of the historical messages and the target message is 90%, it means that the content in the historical message is consistent with the partial content of the target message, so the location information corresponding to this part of the match is combined with other identification information. , which is associated with the matching historical message content of the target, so as to complete the backup of a part of the content of the target message.
进一步地,按照上述匹配方式,分多次完成目标消息的全部内容的备份。Further, according to the above matching method, the backup of the entire content of the target message is completed in multiple times.
因此,在本实施例中,步骤S2和子步骤B1是重复进行的,直至完成目标消息全部内容的备份。Therefore, in this embodiment, step S2 and sub-step B1 are repeated until the backup of the entire content of the target message is completed.
可参考地,目标消息为:“你好,今天天气怎么样”,如果无法精准找到匹配的聊天消息,只能找到“你好,今天天气”,也可以在找到的聊天消息中进行标记,位置信息为(0,6);再找到“怎么样”之后,在找到的聊天消息中进行标记,位置信息为(7,9),从而完成备份。For reference, the target message is: "Hello, what's the weather like today", if you can't find a matching chat message accurately, you can only find "Hello, today's weather", or you can mark the found chat message, the location The information is (0, 6); after finding "how about" again, mark the found chat message, and the location information is (7, 9), thus completing the backup.
在本实施例中,说明了又一种情况。在该情况下,目标消息中的全部内容被拆开匹配,从而与多条历史消息中的内容匹配成功,则目标识别信息与多条历史消息进行关联,其中,每条历史消息关联的位置信息不同。这样,在历史消息内容中,目标消息的全部内容被分散在不同的位置,后续在查找时,可通过拼接完成目标消息的还原。In this embodiment, still another case is explained. In this case, all the content in the target message is disassembled and matched, so that the content in the multiple historical messages is successfully matched, and the target identification information is associated with the multiple historical messages, wherein the location information associated with each historical message different. In this way, in the content of the historical message, all the content of the target message is scattered in different positions, and the restoration of the target message can be completed by splicing during subsequent searches.
在本申请另一个实施例的消息处理方法的流程中,目标消息对应的索引位置信息包括产生目标消息的时间戳子信息。In the flow of the message processing method according to another embodiment of the present application, the index position information corresponding to the target message includes the timestamp sub-information for generating the target message.
对应地,步骤S2包括:Correspondingly, step S2 includes:
子步骤C1:将目标消息的内容与时间戳子信息相关的历史消息内容进行匹配。Sub-step C1: Match the content of the target message with the content of historical messages related to the timestamp sub-information.
其中,按照相关程度由强到弱的顺序依次获取对应的历史消息内容进行匹配,直至目标消息的内容与目标历史消息内容匹配。Wherein, the corresponding historical message contents are sequentially acquired and matched according to the order of the correlation degree from strong to weak, until the content of the target message matches the content of the target historical message.
在本实施例中,产生目标消息的时间戳子信息,即发送或者接收目标消息的时间信息。可选地,时间信息具体某一天的日期。In this embodiment, the timestamp sub-information of the target message is generated, that is, the time information of sending or receiving the target message. Optionally, the time information specifies the date of a certain day.
可选地,在本实施例提供的一种方案中,时间戳子信息之前的日期的相关程度强于时间戳子信息之后的日期;距离时间戳子信息较近的日期的相关程度强于距离时间戳子信息较远的日期。Optionally, in a solution provided in this embodiment, the correlation degree of the date before the timestamp sub-information is stronger than the date after the timestamp sub-information; the correlation degree of the date closer to the timestamp sub-information is stronger than the distance. The farther date of the timestamp subinformation.
可参考地,目标消息是19号发送或者接收的消息。For reference, the target message is a message sent or received on the 19th.
首先,若19号的历史消息中,有与目标消息完全匹配的一条历史消息,则直接在同日期匹配的该条历史消息中添加目标识别信息。First, if there is a historical message that completely matches the target message in the historical message on the 19th, the target identification information is directly added to the historical message that matches on the same date.
进一步地,19号的历史消息中,没有与目标消息完全匹配的一条历史消息,那么以超过50%的匹配度、低于100%的匹配度进行匹配,并在匹配的历史消息中关联对应的目标识别信息;以超过50%的匹配度进行多次匹配后,完成目标消息全部内容的匹配;其中,匹配的多条历史消息尽可能是同日期的历史消息。Further, in the historical messages on the 19th, if there is no historical message that completely matches the target message, then the matching degree is more than 50%, and the matching degree is less than 100%. Target identification information; after multiple matches with a matching degree of more than 50%, the matching of all the contents of the target message is completed; wherein, the matched multiple historical messages are historical messages of the same date as much as possible.
进一步地,19号的历史消息内容无法完成目标消息全部内容的匹配,就在前一个日期(18号)的历史消息内容中继续进行匹配。Further, the content of the historical message on the 19th cannot complete the matching of the entire content of the target message, and the matching is continued in the content of the historical message on the previous date (on the 18th).
进一步地,如果前一个日期的历史消息无法完成目标消息全部内容的匹配,就在后一个日期(20号)的历史消息内容中继续进行匹配。Further, if the historical message of the previous date cannot complete the matching of the entire content of the target message, the matching is continued in the historical message content of the next date (20th).
如此递归匹配,直至完成目标消息全部内容的匹配。This recursive matching is performed until the matching of the entire content of the target message is completed.
在本实施例中,在删除目标消息的情况下,首先根据目标消息所在的日期,匹配同日期的历史消息内容,然后再匹配相近日期的历史消息内容,这样,匹配的范围逐渐增加,可提高匹配效率。In this embodiment, in the case of deleting the target message, first, according to the date of the target message, the content of the historical message of the same date is matched, and then the content of the historical message of the similar date is matched. In this way, the matching range is gradually increased, which can improve the matching efficiency.
在本申请另一个实施例的消息处理方法的流程中,步骤S3之后,还包括:In the flow of the message processing method according to another embodiment of the present application, after step S3, the method further includes:
步骤D1:接收用户的第一输入。Step D1: Receive the first input from the user.
其中,第一输入用于搜索目标消息。Wherein, the first input is used to search for the target message.
第一输入包括用户在屏幕上进行的触摸输入,不限于点击、滑动、拖动等输入;第一输入还可以是第一操作,第一操作包括用户的隔空操作,不限于手势动作操作、脸部动作操作等,第一操作还包括用户在设备上对实体按键的操作,不限于按动等操作。而且,第一输入包括一个或者多个输入,其中,多个输入可以是连续的,也可以是间断的。The first input includes the user's touch input on the screen, which is not limited to input such as clicking, sliding, and dragging; the first input can also be a first operation, and the first operation includes the user's air-space operation, and is not limited to gesture action operations, Facial action operation, etc., the first operation also includes the user's operation on the physical button on the device, and is not limited to operations such as pressing. Furthermore, the first input includes one or more inputs, wherein the multiple inputs may be continuous or discontinuous.
在本实施例中,删除消息进行备份后,可提供一个入口,用于用户查看已删除的消息。In this embodiment, after the deleted message is backed up, an entry may be provided for the user to view the deleted message.
例如,在第一社交对象的聊天界面中,点击“更多”功能,以找到“最近删除聊天记录”的控件,用户点击“最近删除聊天记录”的控件,完成第一输入。For example, in the chat interface of the first social object, click the "more" function to find the control of "recently deleted chat history", and the user clicks the control of "recently deleted chat history" to complete the first input.
其中,最近删除聊天记录包括本实施例中的目标消息。Wherein, the recently deleted chat record includes the target message in this embodiment.
步骤D2:响应于第一输入,根据目标识别信息,在历史消息内容中确定与目标识别信息关联的目标历史消息内容。Step D2: In response to the first input, according to the target identification information, determine the target historical message content associated with the target identification information in the historical message content.
步骤D3:按照目标消息的内容对应的位置信息,输出目标历史消息内容,作为目标消息的内容。Step D3: According to the location information corresponding to the content of the target message, output the content of the target historical message as the content of the target message.
在该步骤中,首先在历史消息内容中,找到所有关联了任意识别信息的历史消息内容,即找到所有的备份消息;其次,基于第一社交对象信息,提取出关联信息包括第一社交对象信息的历史消息内容,也就是说,找到从第一社交对象信息对应的目标社交界面(如聊天界面)删除的所有消息;然后,根据历史消息内容中关联的索引位置信息,提取出来目标消息中的所有内容;最后,根据提取出来的历史消息内容中,关联的位置信息,将提取出来的历史消息内容进行排序,如将“你好,今天天气”占据(0,7)的排序位置,将“怎么样”占据(7,9)的排序位置,从而可拼出完整的目标消息“你好,今天天气怎么样”。In this step, firstly, in the historical message content, find all historical message contents associated with any identification information, that is, find all backup messages; secondly, based on the first social object information, extract the associated information including the first social object information , that is, find all messages deleted from the target social interface (such as a chat interface) corresponding to the first social object information; then, according to the index position information associated in the historical message content, extract the All content; finally, sort the extracted historical message content according to the associated location information in the extracted historical message content. How about" occupies the ranking position of (7, 9), so that the complete target message "Hello, how is the weather today" can be spelled out.
其中,在本实施例中,当目标消息的内容包括部分内容的情况下,重复步骤D2和步骤D3,直至完成全部内容的输出。Wherein, in this embodiment, when the content of the target message includes part of the content, steps D2 and D3 are repeated until the output of the entire content is completed.
步骤D4:根据目标消息对应的索引位置信息和第二社交对象信息,在目标社交界面中显示目标消息。Step D4: Display the target message in the target social interface according to the index position information corresponding to the target message and the second social object information.
其中,目标消息对应的索引位置信息包括产生目标消息的时间戳子信息。Wherein, the index position information corresponding to the target message includes the timestamp sub-information for generating the target message.
在该步骤中,根据产生目标消息的时间戳子信息,可以在目标社交界面中,找到目标消息在删除前的位置,同时结合发送目标消息的第二社交对象信息,可在目标社交界面中还原显示目标消息。In this step, according to the timestamp sub-information for generating the target message, the position of the target message before deletion can be found in the target social interface, and at the same time, combined with the information of the second social object sending the target message, it can be restored in the target social interface Display the target message.
其中,在目标社交界面中还原显示目标消息的过程中,还可结合索引位置信息中包括的:目标消息在当天的消息顺序,还原形成有序的聊天记录,从而实现聊天消息的精准还原。Among them, in the process of restoring and displaying the target message in the target social interface, it is also possible to combine the order of the target messages in the current day, which is included in the index location information, to restore to form an orderly chat record, so as to realize the accurate restoration of the chat message.
另外,索引位置信息还包括目标消息的类型。例如,当目标消息为文字类消息时,在索引位置信息的指定位置(如末端)添加“1”字符;当目标消息为语音类消息时,在索引位置信息的末端添加“2”字符。比如2021年3月11日07点30分第一条聊天消息(该聊天消息为语音消息)的索引位置信息就是“202103110730000012”。其中,按照索引位置信息中的字符顺序,“20210311”表示2021年3月11日,“0730”表示07点30分,“000001”表示第一条聊天消息,“2”表示语音类消息。In addition, the index position information also includes the type of the target message. For example, when the target message is a text message, add a "1" character to the specified position (such as the end) of the index position information; when the target message is a voice message, add a "2" character to the end of the index position information. For example, the index location information of the first chat message (the chat message is a voice message) at 07:30 on March 11, 2021 is "202103110730000012". Among them, according to the character order in the index position information, "20210311" represents March 11, 2021, "0730" represents 07:30, "000001" represents the first chat message, and "2" represents a voice message.
这样,在目标社交界面还原显示目标消息时,可根据索引位置信息,识别出目标消息在删除之前是否为语音消息,若是语音消息,则显示目标消息的同时,显示提示内容,以提示用户该消息的原始形式为语音形式。In this way, when the target message is restored and displayed on the target social interface, it can be identified based on the index location information whether the target message is a voice message before deletion, and if it is a voice message, the prompt content will be displayed while the target message is displayed to remind the user of the message. The original form is the phonetic form.
在本实施例中,基于本申请能够对删除消息进行备份的功能,当用户进行误删除操作、或者想要查看已删除消息时,可为用户复原聊天记录,从而满足用户需求。In this embodiment, based on the function of the application for backing up deleted messages, when the user deletes by mistake or wants to view the deleted message, the chat record can be restored for the user to meet the user's needs.
在本申请的实施例中,如果用户删除的是多条消息,甚至是整个聊天记录,只需要针对每条消息都进行单条消息的查找匹配,完成备份即可。In the embodiment of the present application, if the user deletes multiple messages, or even the entire chat record, it is only necessary to search and match a single message for each message, and complete the backup.
在本申请的实施例中,备份的数据存储在本地数据库中,后期用户可以在对应的朋友记录删除详情页中,选择想要恢复的单日聊天数据或者单条聊天记录,都可以根据备份的数进行恢复。In the embodiment of this application, the backed up data is stored in the local database, and the user can select the single-day chat data or a single chat record to be restored in the corresponding friend record deletion details page in the later stage, and the data can be backed up according to the data to restore.
在本申请的实施例中,也适用于对用户隐私等重要数据的保护。例如,聊天记录中涉及到用户隐私,用户可删除,而删除后消息与未删除的聊天消息融合在一起,从而实现了隐私的隐藏,更好的对用户的隐私进行了保护。The embodiments of the present application are also applicable to the protection of important data such as user privacy. For example, user privacy is involved in chat records, which can be deleted by the user, and the deleted messages are integrated with the undeleted chat messages, thereby realizing privacy hiding and better protecting the user's privacy.
综上,本申请主要是提供一种消息备份的功能,用户删除消息时,系统会自动备份一份数据,但是不是单独列出来的,而是和其它聊天消息绑定存储;同时,提供一种消息找回的功能,用户想要恢复消息时,直接读取其它聊天消息获取标记,然后恢复已删除的聊天消息。因此,本申请可以解决用户误删消息时,无法恢复的问题,更好地保护了用户的聊天记录。同时,本申请对已删除消息的备份方法,不影响其它功能的使用,提升了用户体验。To sum up, this application mainly provides a message backup function. When a user deletes a message, the system will automatically back up a copy of the data, but it is not listed separately, but is stored in combination with other chat messages; at the same time, it provides a With the function of message retrieval, when users want to recover messages, they can directly read other chat messages to get the tags, and then recover the deleted chat messages. Therefore, the present application can solve the problem that when a user deletes a message by mistake, it cannot be restored, and better protects the user's chat record. At the same time, the method for backing up deleted messages in the present application does not affect the use of other functions and improves user experience.
需要说明的是,本申请实施例提供的消息处理方法,执行主体可以为消息处理装置,或者该消息处理装置中的用于执行消息处理方法的控制模块。本申请实施例中以消息处理装置执行消息处理方法为例,说明本申请实施例提供的消息处理装置。It should be noted that, in the message processing method provided by the embodiments of the present application, the execution body may be a message processing apparatus, or a control module in the message processing apparatus for executing the message processing method. In the embodiment of the present application, the message processing device provided by the embodiment of the present application is described by taking the message processing method performed by the message processing device as an example.
图2示出了本申请另一个实施例的消息处理装置的框图,该装置包括:FIG. 2 shows a block diagram of a message processing apparatus according to another embodiment of the present application, and the apparatus includes:
获取模块10,用于在目标社交界面删除目标消息的情况下,获取与目标消息对应的目标识别信息;an obtaining
匹配模块20,用于将目标消息的内容与历史消息内容进行匹配;a
关联模块30,用于在目标消息的内容与目标历史消息内容匹配的情况下,将目标识别信息与目标历史消息内容关联;an
其中,目标识别信息包括目标社交界面对应的第一社交对象信息、目标消息对应的第二社交对象信息、目标消息对应的索引位置信息和目标消息的内容对应的位置信息。The target identification information includes first social object information corresponding to the target social interface, second social object information corresponding to the target message, index location information corresponding to the target message, and location information corresponding to the content of the target message.
这样,在本申请的实施例中,当用户在目标社交界面删除目标消息时,获取目标消息对应的目标识别信息,目标识别信息包括目标社交界面对应的第一社交对象信息,如在好友A的聊天界面删除目标消息,则第一社交对象信息为好友A的账号信息;目标识别信息还包括目标消息对应的第二社交对象信息,如目标消息是好友A发送来的,则第二社交对象为好友A的账号信息;目标识别信息还包括目标消息对应的索引位置信息,索引位置信息是系统分配给目标消息的唯一的、可起到定位作用的信息;还包括目标消息的内容对应的位置信息,即目标消息中的内容在整个目标消息的排序。在获取目标识别信息之后,在现有的所有历史消息内容中,匹配与目标消息的内容一致的历史消息内容,当目标消息的内容与目标历史消息内容匹配的情况下,将前面获取的目标识别信息与目标历史消息内容进行关联,如绑定、标记等关联方式,从而完成对该目标消息的备份。可见,在本申请的实施例中,在删除目标消息之前,而是通过将目标识别信息与历史消息内容关联的方式对目标消息进行了备份,以避免因用户的误操作、或者用户需要再次查看已删除的聊天记录时,因无迹可寻给用户带来不便。In this way, in the embodiment of the present application, when the user deletes the target message on the target social interface, the target identification information corresponding to the target message is obtained, and the target identification information includes the first social object information corresponding to the target social interface. If the target message is deleted from the chat interface, the first social object information is the account information of friend A; the target identification information also includes the second social object information corresponding to the target message. If the target message is sent by friend A, the second social object is Friend A's account information; the target identification information also includes the index location information corresponding to the target message, which is the only information that the system assigns to the target message and can play a positioning role; it also includes the location information corresponding to the content of the target message , that is, the ordering of the contents of the target message in the entire target message. After acquiring the target identification information, among all the existing historical message contents, match the historical message contents consistent with the target message contents, and when the target message contents match the target historical message contents, identify the previously acquired target The information is associated with the content of the target historical message, such as binding, marking, etc., so as to complete the backup of the target message. It can be seen that in the embodiment of the present application, before deleting the target message, the target message is backed up by associating the target identification information with the content of the historical message, so as to avoid the user's misoperation or the user's need to view it again When the chat history has been deleted, it is inconvenient for the user because there is no trace.
可选地,关联模块30,包括:Optionally, the
第一关联单元,用于在目标消息的全部内容与一条历史消息中的目标历史消息内容匹配的情况下,将目标识别信息与目标历史消息内容关联;a first association unit, configured to associate the target identification information with the content of the target historical message when the entire content of the target message matches the content of the target historical message in a historical message;
其中,目标消息的内容对应的位置信息为全部内容的位置信息。The location information corresponding to the content of the target message is the location information of all the content.
可选地,关联模块30,包括:Optionally, the
第二关联单元,用于在目标消息的部分内容与一条历史消息中的目标历史消息内容匹配的情况下,将目标识别信息与目标历史消息内容关联;目标消息的内容对应的位置信息为部分内容在目标消息中对应的位置信息;The second associating unit is configured to associate the target identification information with the content of the target historical message when the partial content of the target message matches the content of the target historical message in a historical message; the location information corresponding to the content of the target message is the partial content Corresponding location information in the target message;
其中,在目标消息的部分内容与一条历史消息中的目标历史消息内容匹配的情况下,重复将目标消息的内容与历史消息内容进行匹配,直至目标消息的全部内容与多条历史消息中的目标历史消息内容匹配。Wherein, in the case where part of the content of the target message matches the content of the target historical message in one historical message, the content of the target message is repeatedly matched with the content of the historical message until the entire content of the target message matches the target in the multiple historical messages. The content of historical messages matches.
可选地,目标消息对应的索引位置信息包括产生目标消息的时间戳子信息;Optionally, the index position information corresponding to the target message includes timestamp sub-information for generating the target message;
匹配模块20,包括:
第一匹配单元,用于将目标消息的内容与时间戳子信息相关的历史消息内容进行匹配;a first matching unit, configured to match the content of the target message with the content of the historical message related to the timestamp sub-information;
其中,按照相关程度由强到弱的顺序依次获取对应的历史消息内容进行匹配,直至目标消息的内容与目标历史消息内容匹配。Wherein, the corresponding historical message contents are sequentially acquired and matched according to the order of the correlation degree from strong to weak, until the content of the target message matches the content of the target historical message.
可选地,装置,还包括:Optionally, the device further includes:
第一输入接收模块,用于接收用户的第一输入;第一输入用于搜索目标消息;The first input receiving module is used to receive the first input of the user; the first input is used to search for the target message;
第一输入响应模块,用于响应于第一输入,根据目标识别信息,在历史消息内容中确定与目标识别信息关联的目标历史消息内容;a first input response module, configured to, in response to the first input, determine the target historical message content associated with the target identification information in the historical message content according to the target identification information;
输出模块,用于按照目标消息的内容对应的位置信息,输出目标历史消息内容,作为目标消息的内容;The output module is used to output the content of the target historical message as the content of the target message according to the location information corresponding to the content of the target message;
显示模块,用于根据目标消息对应的索引位置信息和第二社交对象信息,在目标社交界面中显示目标消息;a display module, configured to display the target message in the target social interface according to the index position information corresponding to the target message and the second social object information;
其中,目标消息对应的索引位置信息包括产生目标消息的时间戳子信息。Wherein, the index position information corresponding to the target message includes the timestamp sub-information for generating the target message.
本申请实施例中的消息处理装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personaldigital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(NetworkAttached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The message processing apparatus in this embodiment of the present application may be an apparatus, or may be a component, an integrated circuit, or a chip in a terminal. The apparatus may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant). , PDA), etc., the non-mobile electronic device may be a server, a network attached storage (NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc. The embodiments of the present application There is no specific limitation.
本申请实施例中的消息处理装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The message processing apparatus in this embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
本申请实施例提供的消息处理装置能够实现上述方法实施例实现的各个过程,为避免重复,这里不再赘述。The message processing apparatus provided in the embodiment of the present application can implement each process implemented by the foregoing method embodiment, and to avoid repetition, details are not repeated here.
可选地,如图3所示,本申请实施例还提供一种电子设备100,包括处理器101,存储器102,存储在存储器102上并可在所述处理器101上运行的程序或指令,该程序或指令被处理器101执行时实现上述消息处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in FIG. 3 , an embodiment of the present application further provides an
需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the aforementioned mobile electronic devices and non-mobile electronic devices.
图4为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 4 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备1000包括但不限于:射频单元1001、网络模块1002、音频输出单元1003、输入单元1004、传感器1005、显示单元1006、用户输入单元1007、接口单元1008、存储器1009、以及处理器1010等部件。The
本领域技术人员可以理解,电子设备1000还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1010逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图4中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the
其中,处理器1010,用于在目标社交界面删除目标消息的情况下,获取与所述目标消息对应的目标识别信息;将所述目标消息的内容与历史消息内容进行匹配;在所述目标消息的内容与目标历史消息内容匹配的情况下,将所述目标识别信息与所述目标历史消息内容关联;其中,所述目标识别信息包括所述目标社交界面对应的第一社交对象信息、所述目标消息对应的第二社交对象信息、所述目标消息对应的索引位置信息和所述目标消息的内容对应的位置信息。Wherein, the processor 1010 is configured to obtain target identification information corresponding to the target message when the target message is deleted on the target social interface; match the content of the target message with the content of historical messages; When the content of the target historical message matches the content of the target historical message, the target identification information is associated with the target historical message content; wherein the target identification information includes the first social object information corresponding to the target social interface, the The second social object information corresponding to the target message, the index location information corresponding to the target message, and the location information corresponding to the content of the target message.
这样,在本申请的实施例中,当用户在目标社交界面删除目标消息时,获取目标消息对应的目标识别信息,目标识别信息包括目标社交界面对应的第一社交对象信息,如在好友A的聊天界面删除目标消息,则第一社交对象信息为好友A的账号信息;目标识别信息还包括目标消息对应的第二社交对象信息,如目标消息是好友A发送来的,则第二社交对象为好友A的账号信息;目标识别信息还包括目标消息对应的索引位置信息,索引位置信息是系统分配给目标消息的唯一的、可起到定位作用的信息;还包括目标消息的内容对应的位置信息,即目标消息中的内容在整个目标消息的排序。在获取目标识别信息之后,在现有的所有历史消息内容中,匹配与目标消息的内容一致的历史消息内容,当目标消息的内容与目标历史消息内容匹配的情况下,将前面获取的目标识别信息与目标历史消息内容进行关联,如绑定、标记等关联方式,从而完成对该目标消息的备份。可见,在本申请的实施例中,在删除目标消息之前,而是通过将目标识别信息与历史消息内容关联的方式对目标消息进行了备份,以避免因用户的误操作、或者用户需要再次查看已删除的聊天记录时,因无迹可寻给用户带来不便。In this way, in the embodiment of the present application, when the user deletes the target message on the target social interface, the target identification information corresponding to the target message is obtained, and the target identification information includes the first social object information corresponding to the target social interface. If the target message is deleted from the chat interface, the first social object information is the account information of friend A; the target identification information also includes the second social object information corresponding to the target message. If the target message is sent by friend A, the second social object is Friend A's account information; the target identification information also includes the index location information corresponding to the target message, which is the only information that the system assigns to the target message and can play a positioning role; it also includes the location information corresponding to the content of the target message , that is, the ordering of the contents of the target message in the entire target message. After acquiring the target identification information, among all the existing historical message contents, match the historical message contents consistent with the target message contents, and when the target message contents match the target historical message contents, identify the previously acquired target The information is associated with the content of the target historical message, such as binding, marking, etc., so as to complete the backup of the target message. It can be seen that in the embodiment of the present application, before deleting the target message, the target message is backed up by associating the target identification information with the content of the historical message, so as to avoid the user's misoperation or the user's need to view it again When the chat history has been deleted, it is inconvenient for the user because there is no trace.
可选地,处理器1010,还用于在所述目标消息的全部内容与一条历史消息中的目标历史消息内容匹配的情况下,将所述目标识别信息与所述目标历史消息内容关联;其中,所述目标消息的内容对应的位置信息为全部内容的位置信息。Optionally, the processor 1010 is further configured to associate the target identification information with the content of the target historical message when the entire content of the target message matches the content of the target historical message in a historical message; wherein , the location information corresponding to the content of the target message is the location information of all the content.
可选地,处理器1010,还用于在所述目标消息的部分内容与一条历史消息中的目标历史消息内容匹配的情况下,将所述目标识别信息与所述目标历史消息内容关联;所述目标消息的内容对应的位置信息为所述部分内容在所述目标消息中对应的位置信息;其中,在所述目标消息的部分内容与一条历史消息中的目标历史消息内容匹配的情况下,重复将所述目标消息的内容与历史消息内容进行匹配,直至所述目标消息的全部内容与多条历史消息中的目标历史消息内容匹配。Optionally, the processor 1010 is further configured to associate the target identification information with the content of the target historical message in the case that part of the content of the target message matches the content of the target historical message in a historical message; The location information corresponding to the content of the target message is the location information corresponding to the partial content in the target message; wherein, in the case that the partial content of the target message matches the target historical message content in a historical message, Matching the content of the target message with the content of the historical message is repeated until the entire content of the target message matches the content of the target historical message in the plurality of historical messages.
可选地,所述目标消息对应的索引位置信息包括产生所述目标消息的时间戳子信息;处理器1010,还用于将所述目标消息的内容与所述时间戳子信息相关的历史消息内容进行匹配;其中,按照相关程度由强到弱的顺序依次获取对应的历史消息内容进行匹配,直至所述目标消息的内容与所述目标历史消息内容匹配。Optionally, the index position information corresponding to the target message includes the timestamp sub-information generating the target message; the processor 1010 is further configured to associate the content of the target message with the historical message related to the timestamp sub-information The content is matched; wherein, the corresponding historical message contents are sequentially acquired and matched according to the order of correlation degree from strong to weak, until the content of the target message matches the content of the target historical message.
可选地,用户输入单元1007,用于接收用户的第一输入;所述第一输入用于搜索所述目标消息;处理器1010,还用于响应于所述第一输入,根据所述目标识别信息,在历史消息内容中确定与所述目标识别信息关联的目标历史消息内容;按照所述目标消息的内容对应的位置信息,输出所述目标历史消息内容,作为所述目标消息的内容;显示单元1006,用于根据所述目标消息对应的索引位置信息和所述第二社交对象信息,在所述目标社交界面中显示所述目标消息;其中,所述目标消息对应的索引位置信息包括产生所述目标消息的时间戳子信息。Optionally, the user input unit 1007 is configured to receive a first input from a user; the first input is used to search for the target message; the processor 1010 is further configured to respond to the first input, according to the target identification information, determining the target historical message content associated with the target identification information in the historical message content; outputting the target historical message content as the content of the target message according to the location information corresponding to the content of the target message; A display unit 1006, configured to display the target message in the target social interface according to the index position information corresponding to the target message and the second social object information; wherein the index position information corresponding to the target message includes The timestamp sub-information of the target message is generated.
综上,本申请主要是提供一种消息备份的功能,用户删除消息时,系统会自动备份一份数据,但是不是单独列出来的,而是和其它聊天消息绑定存储;同时,提供一种消息找回的功能,用户想要恢复消息时,直接读取其它聊天消息获取标记,然后恢复已删除的聊天消息。因此,本申请可以解决用户误删消息时,无法恢复的问题,更好地保护了用户的聊天记录。同时,本申请对已删除消息的备份方法,不影响其它功能的使用,提升了用户体验。To sum up, this application mainly provides a message backup function. When a user deletes a message, the system will automatically back up a copy of the data, but it is not listed separately, but is stored in combination with other chat messages; at the same time, it provides a With the function of message retrieval, when users want to recover messages, they can directly read other chat messages to get the tags, and then recover the deleted chat messages. Therefore, the present application can solve the problem that when a user deletes a message by mistake, it cannot be restored, and better protects the user's chat record. At the same time, the method for backing up deleted messages in the present application does not affect the use of other functions and improves user experience.
应理解的是,本申请实施例中,输入单元1004可以包括图形处理器(GraphicsProcessing Unit,GPU)10041和麦克风10042,图形处理器10041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1006可包括显示面板10061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板10061。用户输入单元1007包括触控面板10071以及其他输入设备10072。触控面板10071,也称为触摸屏。触控面板10071可包括触摸检测装置和触摸控制器两个部分。其他输入设备10072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器1009可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器1010可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1010中。It should be understood that, in this embodiment of the present application, the
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述消息处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, each process of the above message processing method embodiment can be achieved, and can achieve the same In order to avoid repetition, the technical effect will not be repeated here.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(RandomAccess Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the foregoing embodiments. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述消息处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the above message processing method embodiments Each process can achieve the same technical effect. In order to avoid repetition, it will not be repeated here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in the reverse order depending on the functions involved. To perform functions, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to some examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present application can be embodied in the form of computer software products that are essentially or contribute to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk , CD), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) execute the methods described in the various embodiments of the present application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.
Claims (9)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110461110.8A CN113179207B (en) | 2021-04-27 | 2021-04-27 | Message processing method and electronic device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110461110.8A CN113179207B (en) | 2021-04-27 | 2021-04-27 | Message processing method and electronic device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN113179207A CN113179207A (en) | 2021-07-27 |
| CN113179207B true CN113179207B (en) | 2022-08-02 |
Family
ID=76927034
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110461110.8A Active CN113179207B (en) | 2021-04-27 | 2021-04-27 | Message processing method and electronic device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN113179207B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117851128B (en) * | 2024-01-05 | 2025-04-15 | 深圳麦风科技有限公司 | Data recovery method and device |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105072279A (en) * | 2015-08-25 | 2015-11-18 | 努比亚技术有限公司 | Backup device and method based on mobile terminal |
| CN110768894A (en) * | 2019-09-02 | 2020-02-07 | 上海掌门科技有限公司 | Method and equipment for deleting session message |
| CN112306748A (en) * | 2020-10-21 | 2021-02-02 | 深圳万兴软件有限公司 | Data recovery method, device and storage medium |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR101489194B1 (en) * | 2007-12-17 | 2015-02-03 | 삼성전자주식회사 | Deleting method of communication information |
| US9536227B2 (en) * | 2011-12-19 | 2017-01-03 | Microsoft Technology Licensing, Llc | Restoring deleted items with context |
| CN109286560B (en) * | 2018-11-19 | 2021-03-19 | 北京达佳互联信息技术有限公司 | Method and device for acquiring instant messaging message |
| CN112311660A (en) * | 2020-10-30 | 2021-02-02 | 维沃移动通信有限公司 | Message deleting method and device and electronic equipment |
| CN112540712B (en) * | 2020-12-07 | 2022-05-10 | 维沃移动通信有限公司 | Message processing method, apparatus, electronic device and storage medium |
-
2021
- 2021-04-27 CN CN202110461110.8A patent/CN113179207B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105072279A (en) * | 2015-08-25 | 2015-11-18 | 努比亚技术有限公司 | Backup device and method based on mobile terminal |
| CN110768894A (en) * | 2019-09-02 | 2020-02-07 | 上海掌门科技有限公司 | Method and equipment for deleting session message |
| CN112306748A (en) * | 2020-10-21 | 2021-02-02 | 深圳万兴软件有限公司 | Data recovery method, device and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113179207A (en) | 2021-07-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN113014476B (en) | Group creation method and device | |
| CN112307273B (en) | Information query method and device and electronic equipment | |
| CN112306347B (en) | Image editing method, image editing device and electronic equipment | |
| CN113518026B (en) | Message processing method and device and electronic equipment | |
| CN111954079B (en) | Image processing method, device, electronic equipment and medium | |
| WO2021254251A1 (en) | Input display method and apparatus, and electronic device | |
| CN113114845B (en) | Notification message display method and device | |
| CN113179207B (en) | Message processing method and electronic device | |
| CN112416212B (en) | Program access method, device, electronic device and readable storage medium | |
| CN113239212B (en) | Information processing method, device and electronic device | |
| CN111880701B (en) | Page switching method, device and electronic device | |
| CN113127653A (en) | Information display method and device | |
| CN117519884A (en) | Application remarking method and device, electronic equipment and storage medium | |
| CN112416143B (en) | Text information editing method and device and electronic equipment | |
| CN114124875B (en) | Voice message processing method, device, electronic equipment and medium | |
| CN113709300B (en) | Display method and device | |
| CN112765447B (en) | Data searching method and device and electronic equipment | |
| CN113315691B (en) | Video processing method, device and electronic equipment | |
| CN111198926A (en) | Business management method, device, electronic device and storage medium | |
| CN114398127A (en) | Message display method and device | |
| CN111967430A (en) | Message processing method and device, electronic equipment and readable storage medium | |
| CN111813303A (en) | Text processing method, apparatus, electronic device and readable storage medium | |
| CN107659720A (en) | A kind of information processing method, electronic equipment and computer-readable storage medium | |
| CN112578966B (en) | Application program switching method and device and electronic equipment | |
| CN112732464B (en) | Pasting method, device and electronic equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |