Method for determining target instant messaging message and related device

By determining the largest shared subqueue between the first message queue and the historical message queue in the instant messaging message collection system, new messages are accurately identified, which solves the problem of low collection accuracy in the existing technology and improves the efficiency of instant messaging message collection. Effect.

CN118433144BActive Publication Date: 2024-10-18ALI HEALTH TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410896987.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-10-18
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

When the existing technology uses automated testing tools to collect instant messaging messages, it is difficult to accurately determine new messages, resulting in omissions and confusion, which affects the accuracy of collection.

Method used

By obtaining instant messaging messages from the specified instant messaging session of the instant messaging client every specified time period, a maximum shared subqueue between the first message queue and the historical instant messaging message queue is formed, and the messages that do not belong to the maximum shared subqueue are determined as Target instant messaging messages.

Benefits of technology

It improves the accuracy of instant messaging message collection, reduces leakage and confusion, and ensures accurate identification and processing of new messages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118433144B_ABST
    Figure CN118433144B_ABST
Patent Text Reader

Abstract

The embodiment of this specification provides a method and related device for determining a target instant messaging message, the method comprising: obtaining a first specified number of instant messaging messages from a specified instant messaging session of an instant messaging client at specified time periods, from near to far according to the generation time; the first specified number of instant messaging messages forms a first message queue; determining the largest common subqueue between the first message queue and the second message queue; when there are instant messaging messages in the first message queue that do not belong to the largest common subqueue, taking the instant messaging messages in the first message queue that do not belong to the largest common subqueue as the target instant messaging message. In this way, new messages relative to historical instant messaging messages can be determined more accurately from the acquired instant messaging messages.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the field of data processing technology, and in particular to a method for determining a target instant messaging message and related devices. Background Art

[0002] At present, under the premise of ensuring data collection compliance, enterprises will collect instant messaging messages in instant messaging sessions with users to provide better services to users. For example, based on the collected instant messaging messages, enterprises can understand user needs, analyze user communication habits and preferences, and then improve service content and service quality in a targeted manner.

[0003] In the related art, some automated testing tools are usually used to identify the user interface of the instant messaging session to realize the collection of instant messaging messages. However, when using automated testing tools for collection, it is difficult to accurately determine the new messages relative to the historical instant messaging messages from the acquired instant messaging messages, which easily leads to omissions, confusion and other problems, affecting the accuracy of instant messaging message collection. Summary of the invention

[0004] In view of this, multiple embodiments of the present specification are dedicated to providing a method and related apparatus for determining a target instant messaging message, which can more accurately determine new messages relative to historical instant messaging messages among the acquired instant messaging messages.

[0005] One embodiment of the present specification provides a method for determining a target instant messaging message, the method comprising: obtaining a first specified number of instant messaging messages from a specified instant messaging session of an instant messaging client at specified time periods, from near to far according to the generation time; the first specified number of instant messaging messages forms a first message queue; determining a maximum common subqueue between the first message queue and a second message queue; wherein the second message queue includes instant messaging messages obtained from a historical instant messaging message set corresponding to the specified instant messaging session; the maximum common subqueue is a queue formed by the maximum number of consecutively arranged identical instant messaging messages between the first message queue and the second message queue; in the case where there are instant messaging messages in the first message queue that do not belong to the maximum common subqueue, the instant messaging messages in the first message queue that do not belong to the maximum common subqueue are used as target instant messaging messages.

[0006] One embodiment of the present specification provides a device for determining a target instant messaging message, the device comprising: an acquisition module; used to acquire a first specified number of instant messaging messages from a specified instant messaging session of an instant messaging client at specified time periods, from near to far according to the generation time; the first specified number of instant messaging messages form a first message queue; a determination module; used to determine the largest common subqueue between the first message queue and the second message queue; wherein the second message queue includes instant messaging messages obtained from the historical instant messaging message set corresponding to the specified instant messaging session; the largest common subqueue is a queue formed by the largest number of consecutively arranged identical instant messaging messages between the first message queue and the second message queue; when there are instant messaging messages in the first message queue that do not belong to the largest common subqueue, the instant messaging messages in the first message queue that do not belong to the largest common subqueue are used as target instant messaging messages.

[0007] One embodiment of the present specification provides a computer device, which includes a memory and a processor, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the method for determining a target instant messaging message described in any of the above embodiments.

[0008] One embodiment of the present specification provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one computer program, and when the at least one computer program is executed by a processor, the method for determining a target instant messaging message described in any of the above embodiments can be implemented.

[0009] The multiple implementation methods provided in this specification determine the largest common subqueue between the first message queue and the second message queue, and use the instant messaging messages in the first message queue that do not belong to the largest common subqueue as target instant messaging messages. The common part between the first message queue and the historical instant messaging messages is used as a reference benchmark, so that new messages relative to historical instant messaging messages can be found more accurately from the instant messaging messages included in the first message queue, thereby improving the accuracy of instant messaging message collection. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 A schematic diagram of a method for determining a target instant messaging message provided in accordance with an embodiment of the present specification.

[0011] Figure 2 This is an application example diagram of the method for determining a target instant messaging message provided in this specification.

[0012] Figure 3This is another example diagram of application of the method for determining a target instant messaging message provided in this specification.

[0013] Figure 4 This is another application example diagram of the method for determining a target instant messaging message provided in this specification.

[0014] Figure 5 A schematic diagram of a device for determining a target instant messaging message provided in one embodiment of the present specification.

[0015] Figure 6 A schematic diagram of a computer device is provided for one embodiment of the present specification. DETAILED DESCRIPTION

[0016] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0017] In the description of the embodiments of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0018] At present, some companies usually manage and operate private domain platforms for users, for example, providing services to users by creating groups or private chats on instant messaging applications. Usually, in order to deeply understand user needs and improve service quality, instant messaging messages in the user interface (UI) of the instant messaging session with users are collected and then used for subsequent analysis or processing.

[0019] In order to collect instant messaging messages in the user interface, usually an automated testing tool or OCR technology is used to identify various visual elements in the user interface at a certain frequency, such as buttons, texts, pictures, icons, videos, etc., so that instant messaging messages can be collected. After each instant messaging message in the user interface is identified, it is necessary to determine the newly generated messages relative to the historical instant messaging messages of the instant messaging session to update the collection results.

[0020] In the related art, only the latest instant messaging message is collected from the user interface each time, that is, the instant messaging message with the most recent generation time. Then it is compared with the last collected instant messaging message to determine whether it is a newly generated message relative to the historical instant messaging message. If the comparison results are inconsistent, it is a newly generated message, otherwise it is not a newly generated message. However, this method makes it difficult to accurately determine the new message relative to the historical instant messaging message from the collected instant messaging messages. For example, when the collection frequency is not high enough, or when there are duplicate instant messaging messages in the user interface, it may cause omissions and confusion, affecting the accuracy of instant messaging message collection.

[0021] Therefore, it is necessary to provide a method for determining the target instant messaging message, which can more accurately determine the new message relative to the historical instant messaging message among the acquired instant messaging messages, so as to reduce the occurrence of problems such as missed messages and confusion, and improve the accuracy of instant messaging message collection.

[0022] This specification provides an example of an application scenario of a method for determining a target instant messaging message. The method for determining a target instant messaging message can be applied to an instant messaging message collection system of a medical service platform. The medical service platform can provide users with medical services such as diagnosis, treatment, and consultation. Among them, for some patient users with chronic diseases, medical services on a private domain platform can also be provided. Doctors on the medical service platform can provide services to patient users through group chat or private chat on the private domain platform, such as answering patient questions and providing disease management advice.

[0023] When providing services to users through group chat, due to the large number of users and the small number of doctors in the group, it may be difficult to respond to each user's question, that is, each instant messaging message in the group chat, in a timely manner, so it is necessary to call a large language model as a question-and-answer assistant to respond. The medical service platform can continuously collect instant messaging messages in group chats through the instant messaging message collection system, and then construct the content of the newly generated target instant messaging message in the group chat interface as a prompt instruction each time, and call the large language model to answer, and then reply to the answer content one by one in the group chat to ensure the timeliness of answering questions and improve service quality and user experience.

[0024] Specifically, first, the instant messaging message collection system can collect the UI interface of the group chat once a second, identify the element information in the UI interface, including position, size, color, text, screen status, etc., and extract the instant messaging message data in the interface. The instant messaging message collection system can identify the elements of the UI interface by calling the automated testing tool and save the extracted instant messaging message data on the server. In order to ensure that no messages are missed, each time the collection is performed, the latest 20 instant messaging messages in the interface can be selected and extracted in descending order of generation time.

[0025] Then, for the 20 IM messages extracted each time, the IM message collection system can determine the target IM message from them, and construct a prompt instruction based on the content of the target IM message, so as to call the large language model to answer and then reply in the group chat. The target IM message is used to represent the new message in the 20 IM messages relative to the historical IM messages, that is, the newly generated IM message in the current group chat UI interface. Usually, the target IM message can be a new question currently sent by the user in the group chat, which requires the doctor to answer.

[0026] For the process of determining the target instant messaging message, specifically, the instant messaging message collection system can compare the 20 instant messaging messages extracted each time with the 60 historical instant messaging messages stored in the server arranged from recent to earliest according to the generation time. Among them, the 20 instant messaging messages extracted each time can form a first message queue, and the 60 historical instant messaging messages can form a second message queue. Each instant messaging message and each historical instant messaging message can have a hash value obtained by hash calculation as its unique identifier.

[0027] When performing the comparison, you can first search for historical instant messaging messages with the same hash value in the second message queue based on the hash value corresponding to the instant messaging message with the longest generation time in the first message queue, that is, the tail message, and use the position of the found historical instant messaging message in the second message queue as the starting comparison position. Then, based on the instant messaging message after the tail message in the first message queue, compare the hash value with the historical instant messaging message in the second message queue located at the position after the starting comparison position to determine whether the two are consistent. If they are consistent, continue to compare the instant messaging messages after the first message queue in the second message queue until a certain instant messaging message in the first message queue cannot be compared in the second message queue. It can be understood that the maximum common subqueue between the first message queue and the second message queue can be determined based on the above comparison process. Finally, the instant messaging message in the first message queue that does not belong to the maximum common subqueue is determined as the target instant messaging message.

[0028] See also Figure 1 . One embodiment of this specification provides a method for determining a target instant messaging message, and the method for determining a target instant messaging message can be applied to an instant messaging message collection system. The instant messaging message collection system can run in an electronic device with certain computing and processing capabilities. For example, the electronic device can be a server. The server can have a network communication module, a processor, and a memory, etc. The server can also be a distributed server, which can be a system with multiple processors, memories, network communication modules, etc. operating in collaboration. Alternatively, the server can also be a server cluster formed by several servers. Alternatively, with the development of science and technology, the server can also be a new technical means that can realize the corresponding functions of the embodiments of the specification. For example, it can be a new form of "server" based on quantum computing.

[0029] In this embodiment, the method for determining the target instant messaging message may specifically include the following steps.

[0030] Step S110: acquiring a first specified number of instant messaging messages from a specified instant messaging session of an instant messaging client at specified time intervals according to the generation time from recent to earliest; the first specified number of instant messaging messages forms a first message queue.

[0031] In this embodiment, the specified time period can be used to represent the time interval between two consecutive acquisitions of instant messaging messages for a specified instant messaging session. Specifically, the specified time period can correspond to the frequency of acquiring instant messaging messages for a specified instant messaging session. The longer the time interval represented by the specified time period, the lower the frequency of acquiring instant messaging messages, and vice versa. For example, the specified time period can be 1 second. For a higher frequency requirement for acquiring instant messaging messages, it can also be 0.8 seconds, 0.5 seconds, etc. For a lower frequency requirement for acquiring instant messaging messages, it can also be 2 seconds, 5 seconds, etc.

[0032] In this embodiment, the instant messaging client can be used as an application software for real-time communication between users. Specifically, in the process of providing private domain services, users can send instant messaging messages for consultation in the form of private chat or group chat through the instant messaging client, and receive feedback reply messages through the instant messaging client. For example, in the private domain service scenario of the medical service platform, the platform doctor can create a group in the instant messaging client to provide services to patient users in the group, such as answering patient questions and making treatment recommendations. Users can send instant messaging messages in the group through the instant messaging client. The content of the message can be the questions they want to ask the doctor. After the doctor replies, the user can receive the corresponding reply message.

[0033] It can be understood that multiple instant messaging sessions can be included in the instant messaging client. In this embodiment, the designated instant messaging session can be an instant messaging session for providing private domain services. Specifically, the designated instant messaging session can be different depending on the classification of the user. For example, in the private domain service scenario of the medical service platform, in order to improve the pertinence of the service, the platform can manage and operate multiple different instant messaging groups, each group can correspond to a type of patient user, such as a group can be created for diabetic patient users, and another group can be created for heart disease patient users. In this embodiment, the designated instant messaging session can be a group session created for a specified user category, or it can be a personal session for private chat with a specified user.

[0034] In this embodiment, the first message queue may be a data queue obtained by arranging the instant messaging messages in the specified instant messaging session from the most recent to the most recent order according to the time when they were generated in the specified instant messaging session. Specifically, each element in the first message queue represents an instant messaging message. The head element represents the instant messaging message generated most recently in the specified instant messaging session, that is, the most recent instant messaging message in the specified instant messaging session; the tail element represents the instant messaging message generated the most recently in the specified instant messaging session, that is, the earliest instant messaging message in the specified instant messaging session.

[0035] In this embodiment, the first specified number is used to represent the number of instant messaging messages obtained from the specified instant messaging session each time. In order to avoid missing messages, it is necessary to make the instant messaging messages obtained each time include the instant messaging messages obtained last time. Therefore, the first specified number can be set according to the speed of generating new messages in the specified instant messaging session and the time interval of the specified time period. Specifically, for example, the first specified number is set to 20, and can also be set to 10 or 15, and can also be set to 30, 40, etc.

[0036] In this embodiment, the instant messaging message collection system can directly obtain the first specified number of instant messaging messages in real time by calling the interface if it has access rights to the instant messaging client and is authorized by the user.

[0037] In some implementations, if the instant messaging message collection system does not have access rights to the instant messaging client, then with the authorization of the user, the instant messaging message collection system can perform element recognition on the UI interface of the specified instant messaging session by means of UI interface element collection, so as to obtain the first specified number of instant messaging messages from the recognized element information. Specifically, for example, the element recognition in the UI interface can be realized by using an automated testing tool or OCR technology.

[0038] Step S120: Determine the largest common subqueue between the first message queue and the second message queue; wherein the second message queue includes instant messaging messages obtained from the historical instant messaging message set corresponding to the specified instant messaging session; the largest common subqueue is a queue formed by the largest number of consecutively identical instant messaging messages between the first message queue and the second message queue; when there are instant messaging messages that do not belong to the largest common subqueue in the first message queue, the instant messaging messages in the first message queue that do not belong to the largest common subqueue are used as target instant messaging messages.

[0039] In some cases, the instant messaging message collection system can determine the common part of the first message queue and the historical instant messaging message set by determining the largest common subqueue between the first message queue and the second message queue. With the largest common subqueue as a reference, it is possible to distinguish the newly added instant messaging messages in the first message queue that already exist in the historical instant messaging message set and those that clearly do not belong to the historical instant messaging messages, thereby taking the instant messaging messages that do not belong to the historical instant messaging message set as target instant messaging messages.

[0040] In this embodiment, the second message queue may be a data queue obtained by arranging the acquired instant messaging messages in the time sequence of generation in the specified instant messaging session from near to far. Specifically, each element in the second message queue represents a historical instant messaging message. The head element in the second message queue represents the instant messaging message generated most recently in the historical instant messaging message set, and the tail element represents the instant messaging message generated the furthest in the historical instant messaging message set. For example, the instant messaging messages acquired from the historical instant messaging message set may include message 1 generated at 10:30, message 2 generated at 10:31, and message 3 generated at 10:32. Then the second message queue may be {message 1, message 2, message 3}, message 3 being the head element and message 1 being the tail element.

[0041] In this embodiment, the historical instant messaging message collection may include instant messaging messages that have appeared in a specified instant messaging session from the start of the instant messaging message collection system to each acquisition of the first message queue. The historical instant messaging message collection may be stored in a server of the instant messaging message collection system, and the historical instant messaging message collection may be directly accessed in the system when acquiring the second message queue. In some embodiments, the historical instant messaging messages may also be stored in a database outside the instant messaging message collection system, and may be called when acquiring the second message queue to access the historical instant messaging message collection.

[0042] In this implementation, the number of instant messaging messages obtained from the historical instant messaging message set as the second message queue elements may be the same as the first specified number, or may be less than the first specified number.

[0043] In some embodiments, the instant messaging message collection system can obtain a second specified number of instant messaging messages from the historical instant messaging message set corresponding to the specified instant messaging session in order of generation time from recent to far to form the second message queue; wherein the historical instant messaging message set is independent of the instant messaging client; and the second specified number is greater than the first specified number.

[0044] In some cases, by obtaining a second specified number of instant messaging messages greater than the first specified number from a set of historical instant messaging messages, the determined maximum common sub-queue can cover the tail of the first message queue, thereby ensuring that the elements in the first message queue that belong to the historical instant messaging set are found, which correspondingly improves the accuracy of determining the target instant messaging message.

[0045] In some implementations, the second specified number may be greater than twice the first specified number, which has a relatively good effect on improving the accuracy of determining the target instant messaging message.

[0046] In this embodiment, the target instant messaging message is used to represent the new message relative to the historical instant messaging set in the instant messaging messages obtained from the specified instant messaging session each time. The target instant messaging message may include the other parts of the first message queue except the overlapping part with the largest common subqueue. Specifically, the first message queue formed by the instant messaging messages obtained respectively in two adjacent specified time periods may have a common part. It can be understood that the instant messaging messages included in the common part belong to the historical instant messaging set, that is, the instant messaging messages in the common part are historical instant messaging messages. The target instant messaging message may include the unique part of the first message queue corresponding to the next specified time period except the common part. It can be understood that the instant messaging messages included in the unique part belong to the newly generated instant messaging messages in the specified instant messaging session in the next time period, that is, new messages relative to the historical instant messaging set. For example, different instant messaging messages are identified by numbers, and the two first message queues obtained in two adjacent specified time periods may include {1, 3, 4, 5, 8} and {4, 5, 8, 6, 7}, and the second message queue obtained from the historical instant messaging message set may be {1, 2, 3, 4, 3, 2, 1, 3, 4, 5, 8}, then the maximum common subqueue may be {4, 5, 8}, and accordingly, the target instant messaging message may be {6, 7}.

[0047] In this embodiment, the instant messaging message collection system can compare the first message queue and the second message queue based on a sequence comparison algorithm to determine the largest common subqueue between the two. In some embodiments, the instant messaging message collection system can also use a dynamic programming algorithm to determine the largest common subqueue between the first message queue and the second message queue.

[0048] In some embodiments, the instant messaging message collection system can respectively obtain the message text corresponding to the instant messaging messages in the first message queue and the message text corresponding to the instant messaging messages in the second message queue; wherein the content of the instant messaging messages in the first message queue includes at least one of the following: voice, text, picture or video; based on the message text of the first message queue and the message text of the second message queue, determine the maximum common subqueue.

[0049] In some cases, since various types of instant messaging messages such as voice, text, pictures or videos may be generated in a specified instant messaging session, the accuracy of extracting message texts is relatively high when extracting instant messaging messages using interface recognition. Therefore, by obtaining the message texts corresponding to various types of message contents and determining the maximum common subqueue between the first message queue and the second message queue based on the message texts, the accuracy of the maximum common subqueue can be improved, thereby improving the accuracy of the target instant messaging message.

[0050] In some embodiments, the message text corresponding to the instant messaging message can be used to express the content of the instant messaging message. Specifically, the first message queue and the second message queue may involve instant messaging messages of various contents, such as text messages, voice messages, picture messages, video messages, etc. For text messages, the instant messaging message collection system can directly identify and extract them from the user interface of the specified instant messaging session. For voice messages, the instant messaging message collection system can convert them into text to obtain the corresponding message text. For picture messages or video messages, the instant messaging message collection system can first save them locally, then upload the message content to the cloud storage server and obtain the corresponding URL (Uniform Resource Locator), and use the obtained URL text as the message text corresponding to the instant messaging message.

[0051] In some embodiments, the instant messaging message collection system can use the placeholder text corresponding to the picture or video as the message text when the message content of the instant messaging message includes pictures or videos; or, when the message content of the instant messaging message includes voice, identify the message text from the voice.

[0052] In some cases, using placeholder text as the message text for picture messages or video messages can reduce the amount of computing required by the instant messaging message collection system, improve the efficiency of determining the target instant messaging message, and save certain computing resources.

[0053] In some embodiments, the placeholder text may be used as temporary message content of a picture message or a video message to indicate the content type of the instant messaging message and the queue position information of the instant messaging message in the first message queue or the second message queue. Specifically, a unified placeholder text may be used to identify picture messages, while another unified placeholder text may be used to identify video messages to distinguish them. For example, a picture message may use "picture" as the placeholder text, and a video message may use "video" as the placeholder text.

[0054] In some implementations, different placeholder texts may be used to identify multiple picture messages. For example, for three picture messages, "Picture 1", "Picture 2", and "Picture 3" may be used as placeholder texts, respectively. For multiple video messages, placeholder texts may also be used in a similar manner.

[0055] In some implementations, the instant messaging message collection system may perform matching in the second message queue according to the message text corresponding to each instant messaging message in the first message queue, so as to determine the largest common sub-queue.

[0056] In some embodiments, the instant messaging message collection system may also obtain the unique identifier of the message text in the first message queue and the unique identifier of the message text in the second message queue respectively; match multiple unique identifiers of the first message queue with multiple unique identifiers of the second message queue to obtain the maximum common subqueue.

[0057] In some cases, matching the instant messaging messages in the first message queue with the instant messaging messages in the second message queue through unique identifiers of the message texts can improve the efficiency of the matching calculation and can improve the data security of the instant messaging messages.

[0058] In some embodiments, the unique identifier of the message text is used to indicate the instant messaging message in the first message queue or the second message queue to distinguish different instant messaging messages. Specifically, the unique identifier of the message text can be obtained based on the data encoding of the message text. For example, each message text content, the name of the specified instant messaging session, and the user name can be hashed, and the resulting hash value is used as the unique identifier of the message text. Of course, in some embodiments, the unique identifier can also be obtained using other calculation or encoding methods. For example, a universal unique identifier (UUID) can also be used as the unique identifier of the message text. This specification does not make specific limitations on this, and it is sufficient to be able to indicate or distinguish different instant messaging messages.

[0059] In some embodiments, the instant messaging message collection system can align the first message queue and the second message queue according to the maximum common subqueue; when there is an instant messaging message in the first message queue whose generation time is later than the generation time of the first instant messaging message in the second message queue, the instant messaging message in the first message queue whose generation time is later than the generation time of the first instant messaging message in the second message queue is used as the target instant messaging message.

[0060] In some embodiments, after determining the largest common subqueue between the first message queue and the second message queue, the largest common subqueue can be used as a reference to align the first message queue and the second message queue in the dimension of generation time. In this way, since the position of the largest common subqueue in the second message queue is close to the head of the queue, and the position in the first message queue is close to the tail of the queue, the head instant messaging message in the second message queue, that is, the instant messaging message with the most recent generation time in the historical instant messaging message set, can be used as a separator between the historical instant messaging message and the target instant messaging message in the first message queue. It can be understood that in the first message queue, the instant messaging messages from the head instant messaging message to the back to the separator element are new messages relative to the historical instant messaging message set, and their generation time is later than the head instant messaging message in the second message queue, so they can be used as target instant messaging messages.

[0061] By using the method for determining the target instant messaging message provided in the above implementation, it is possible to effectively and more accurately determine the target instant messaging message from the first message queue, thereby improving the data collection accuracy of the instant messaging message collection system. First, since the number of instant messaging messages obtained each time is relatively large, it is not limited to the latest messages, but covers a certain number of historical instant messaging messages. Therefore, even if the collection frequency is not enough, the possibility of missing messages is not high. Secondly, when there are a certain number of repetitions in the acquired instant messaging messages, omissions can be avoided and data confusion can be prevented.

[0062] See also Figure 2 and Figure 3 . Figure 2 This is an application example of a method for determining a target instant messaging message in a common situation. The first message queue includes 7 instant messaging messages, the second message queue includes 14 instant messaging messages obtained from a historical instant messaging message set, and the number marked in each instant messaging message represents the corresponding hash value. It can be seen that the largest common subqueue between the first message queue and the second message queue includes the five instant messaging messages {1, 5, 6, 7, 8}. Accordingly, it can be determined that the target instant messaging message includes the two instant messaging messages {9, 10} in the first message queue. Figure 3 An application example of a method for determining a target instant messaging message when a certain number of duplicates exist in the acquired instant messaging messages. It can be seen that even if the two instant messaging messages {7, 8} appear twice in a row in the first message queue, since the maximum common subqueue length between the first message queue and the second message queue is long, after aligning the first message queue and the second message queue, it is still possible to accurately distinguish that the second occurrence of {7, 8} is the target instant messaging message.

[0063] In some embodiments, the instant messaging message collection system can also correct the instant messaging messages in the second message queue from the head to the largest common subqueue according to the first message queue when the largest common subqueue does not include the head instant messaging message of the second message queue.

[0064] In some cases, in a specified instant messaging message session, an instant messaging message may be withdrawn. However, if the instant messaging message has been collected by the instant messaging message collection system and saved in the historical instant messaging message collection after it was sent and before it was withdrawn, then after the withdrawal, since the second message queue obtained from the historical instant messaging message collection still includes the withdrawn instant messaging message, while the first message queue obtained does not include the withdrawn instant messaging message, or the withdrawn instant messaging message is represented in the form of a placeholder, the maximum common subqueue between the first message queue and the second message queue may not be determined accurately, which may affect the accuracy of the target instant messaging message, causing the instant messaging messages in the specified instant messaging session collected by the instant messaging message collection system to be disordered as a whole.

[0065] It can be understood that if there is a situation where the largest shared subqueue does not include the first instant messaging message of the second message queue, it can be determined that there is a message withdrawal in the first message queue, and the withdrawn instant messaging message in the second message queue includes the instant messaging messages from the first to the first of the largest shared subqueue. At this time, by taking the first message queue as a reference, the instant messaging messages from the first to the first of the largest shared subqueue in the second message queue are corrected, which can make the instant messaging messages in the second message queue more accurate, thereby avoiding the problem of inaccurate subsequent determination of the largest shared subqueue to a certain extent. At the same time, it can also enable the instant messaging message collection system to avoid repeated processing when performing subsequent processing on the collected instant messaging messages, such as avoiding repeated replies when replying to messages, thereby improving service quality.

[0066] See also Figure 4 . Figure 4 This is an application example of a method for determining a target instant messaging message when a message is withdrawn in the first message queue. It can be seen that if a message is withdrawn in the first message queue, the position of the withdrawn instant messaging message in the first message queue and the second message queue can be accurately found by aligning the largest common subqueue, and the content of the withdrawn instant messaging message can be determined through the second message queue.

[0067] In some implementations, the instant messaging message collection system can also use the instant messaging messages from the head of the second message queue to the largest shared subqueue to correct the first message queue. Similarly, the problem of inaccurate subsequent determination of the largest shared subqueue can be avoided to a certain extent.

[0068] In some implementations, the instant messaging message collection system may further add the target instant messaging message to the historical instant messaging message collection.

[0069] In some cases, by adding the target instant messaging message determined after each specified time period to the historical instant messaging message set, when the target instant messaging message is determined after the next specified time period, the historical instant messaging message that can be obtained from the historical instant messaging message set is more comprehensive, thereby improving the accuracy of the target instant messaging message. In this way, the instant messaging message collection system can obtain a complete and comprehensive instant messaging message set for a specified instant messaging session through the dynamically saved historical instant messaging message set, which is convenient for subsequent processing.

[0070] In some embodiments, when placeholder text is used as the message text of an instant messaging message, the actual content of the instant messaging message can be simultaneously saved on the system server, or uploaded to the cloud server, and the corresponding URL can be obtained. If the target instant messaging message includes an instant messaging message using placeholder text, the instant messaging message collection system can also update the placeholder text using the actual content or URL of the instant messaging message. Specifically, the update can be performed before the target instant messaging message is added to the historical instant messaging message collection, or after the target instant messaging message is added to the historical instant messaging message collection. In this way, the content of the instant messaging message obtained by the instant messaging message collection system can be more complete and comprehensive.

[0071] See also Figure 5 An embodiment of the present specification may also provide a device for determining a target instant messaging message, and the device may include the following modules.

[0072] An acquisition module; used to acquire a first specified number of instant messaging messages from a specified instant messaging session of an instant messaging client at specified time periods, from near to far according to the generation time; the first specified number of instant messaging messages forms a first message queue;

[0073] A determination module; used to determine the largest common subqueue between the first message queue and the second message queue; wherein the second message queue includes instant messaging messages obtained from the historical instant messaging message set corresponding to the specified instant messaging session; the largest common subqueue is a queue formed by the largest number of consecutively identical instant messaging messages between the first message queue and the second message queue;

[0074] In the case that there is an instant communication message that does not belong to the largest common sub-queue in the first message queue, the instant communication message that does not belong to the largest common sub-queue in the first message queue is used as a target instant communication message.

[0075] The specific functions and effects achieved by the device for determining the target instant messaging message can be explained with reference to other embodiments of this specification, and will not be repeated here. The various modules in the device for determining the target instant messaging message can be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0076] The embodiments of the present specification also provide a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a computer, the computer executes the method for determining a target instant messaging message in any of the above embodiments.

[0077] The embodiments of this specification also provide a computer program product including instructions, which, when executed by a computer, enables the computer to execute the method for determining a target instant messaging message in any of the above embodiments.

[0078] See also Figure 6 The present embodiment may provide a computer device, the computer device comprising: a memory, and one or more processors communicatively connected to the memory; the memory stores instructions executable by the one or more processors, the instructions are executed by the one or more processors, so that the one or more processors implement the method for determining the target instant messaging message in any of the above embodiments.

[0079] In some embodiments, the computer device may include a processor, a non-volatile storage medium, an internal memory, a communication interface, a display device, and an input device connected by a system bus. The non-volatile storage medium may store an operating system and related computer programs.

[0080] The user information or user account information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, etc.) involved in multiple implementation methods of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0081] It should be understood that the specific examples herein are only intended to help those skilled in the art to better understand the embodiments of the present specification, rather than to limit the scope of the present invention.

[0082] It can be understood that in the various implementations of this specification, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the implementation methods of this specification.

[0083] It can be understood that the various embodiments described in this specification can be implemented individually or in combination, and the embodiments of this specification are not limited to this.

[0084] Unless otherwise specified, all technical and scientific terms used in the embodiments of this specification have the same meaning as those generally understood by those skilled in the art of the technical field of this specification. The terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the scope of this specification. The term "and / or" used in this specification includes any and all combinations of one or more related listed items. The singular forms of "a", "above", and "the" used in the embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0085] It can be understood that the processor of the embodiment of this specification can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method implementation can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (Digital Signal ProBessor, DSP), an application-specific integrated circuit (Application SpeBifiB IntegratedBirBuit, ASIB), a field programmable gate array (Field ProgrammaAle Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiment of this specification can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of this specification can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0086] It is understood that the memory in the embodiments of this specification may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (programmaAle ROM, PROM), an erasable programmable read-only memory (erasaAlePROM, EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory may be a random access memory (RAM). It should be noted that the memory of the system and method described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0087] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this specification.

[0088] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method implementation methods and will not be repeated here.

[0089] In the several embodiments provided in this specification, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0090] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0091] In addition, each functional unit in each embodiment of the present specification may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0092] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this specification, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of this specification. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0093] The above is only a specific implementation of this specification, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in this specification, which should be included in the protection scope of this specification. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for determining a target instant messaging message, characterized in that: The method comprises: Obtaining a first specified number of instant messaging messages from a specified instant messaging session of an instant messaging client at specified time periods from the nearest to the earliest generation time; the first specified number of instant messaging messages forming a first message queue; Determine the largest common subqueue between the first message queue and the second message queue; wherein the second message queue includes instant messaging messages obtained from the historical instant messaging message set corresponding to the specified instant messaging session; the largest common subqueue is a queue formed by the largest number of consecutively identical instant messaging messages between the first message queue and the second message queue; aligning the first message queue and the second message queue according to the largest common subqueue; When there is an instant messaging message in the first message queue whose generation time is later than the generation time of the first instant messaging message in the second message queue, the instant messaging message in the first message queue whose generation time is later than the generation time of the first instant messaging message in the second message queue is used as the target instant messaging message.

2. The method according to claim 1, characterized in that The step of determining the maximum common subqueue between the first message queue and the second message queue includes: From the historical instant messaging message set corresponding to the specified instant messaging session, a second specified number of instant messaging messages are obtained from the generation time from recent to far to form the second message queue; wherein the historical instant messaging message set is independent of the instant messaging client; and the second specified number is greater than the first specified number.

3. The method according to claim 1, characterized in that The step of determining the maximum common subqueue between the first message queue and the second message queue includes: Respectively obtaining the message text corresponding to the instant communication message in the first message queue and the message text corresponding to the instant communication message in the second message queue; wherein the content of the instant communication message in the first message queue includes at least one of the following: voice, text, picture or video; The maximum common sub-queue is determined based on the message text of the first message queue and the message text of the second message queue.

4. The method according to claim 3, characterized in that The steps of respectively obtaining the message text corresponding to the instant messaging message in the first message queue and the message text corresponding to the instant messaging message in the second message queue include: In the case where the message content of the instant messaging message includes a picture or a video, using a placeholder text corresponding to the picture or the video as the message text; or, In the case that the message content of the instant communication message includes voice, the message text is recognized from the voice.

5. The method according to claim 3, characterized in that: The step of determining the maximum common subqueue based on the message text of the first message queue and the message text of the second message queue includes: Respectively obtain the unique identifier of the message text in the first message queue and the unique identifier of the message text in the second message queue; The multiple unique identifiers of the first message queue are matched with the multiple unique identifiers of the second message queue to obtain the maximum common sub-queue.

6. The method according to claim 1, characterized in that The method further comprises: In a case where the largest common subqueue does not include the head instant messaging message of the second message queue, the instant messaging messages from the head to the largest common subqueue in the second message queue are corrected according to the first message queue.

7. The method according to claim 1, characterized in that The method further comprises: The target instant messaging message is added to the historical instant messaging message set.

8. A device for determining a target instant messaging message, characterized in that: The device comprises: An acquisition module; used to acquire a first specified number of instant messaging messages from a specified instant messaging session of an instant messaging client at specified time periods, from near to far according to the generation time; the first specified number of instant messaging messages forms a first message queue; A determination module; used to determine the maximum common subqueue between the first message queue and the second message queue; wherein the second message queue includes instant messaging messages obtained from the historical instant messaging message set corresponding to the specified instant messaging session; the maximum common subqueue is a queue formed by the maximum number of consecutively arranged identical instant messaging messages between the first message queue and the second message queue; the first message queue and the second message queue are aligned according to the maximum common subqueue; in the case that there are instant messaging messages in the first message queue whose generation time is later than the generation time of the first instant messaging message in the second message queue, the instant messaging messages in the first message queue whose generation time is later than the generation time of the first instant messaging message in the second message queue are used as target instant messaging messages.

9. A computer device, characterized in that: The computer device includes a memory and a processor, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and when the at least one computer program is executed by a processor, the method according to any one of claims 1 to 7 can be implemented.

Citation Information

Patent Citations

  • Message pushing method and device, processor, electronic equipment and storage medium

    CN116405547A