Method and system for identifying an object based on instant messaging
By capturing screenshots from the chat window of an instant messaging client and matching chat history data with timestamps, the accuracy and compliance issues of RPA in identifying chat participants' identities are resolved, achieving secure, accurate, and efficient identity recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING DEEP DOT INTELLIGENCE TECH CO LTD
- Filing Date
- 2026-04-27
- Publication Date
- 2026-06-09
AI Technical Summary
In existing instant messaging technologies, Robotic Process Automation (RPA) struggles to accurately identify the identity of chat participants, impacting the accuracy and data consistency of automated processes. Furthermore, cracking IM client interfaces poses both technical and compliance risks.
By capturing screenshots from the chat window of the instant messaging client, extracting chat history data and matching it with historical data, and using timestamp matching degree and data matching degree to identify the ID of the chat object, the system avoids cracking the IM client API and frequent click operations.
It enables secure, accurate, and efficient identification of chat participants, reduces risk control and compliance risks, and improves the stability and efficiency of automated processes.
Smart Images

Figure CN122179407A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent recognition technology, specifically to a method and system for recognizing objects based on instant messaging. Background Technology
[0002] Instant Messaging (IM) is a communication method that enables real-time information exchange between users. It can quickly deliver messages and complete collaborative communication, and has been widely used in enterprise digital office and social customer management scenarios. It is a core carrier for internal and external communication within enterprises. To improve operational efficiency, enterprises that adopt IM tools generally deploy managed systems of Robotic Process Automation (RPA) to automatically control IM clients and automate business processes.
[0003] Because RPA needs to frequently switch between chat windows of different chat objects, and the interface only displays user nicknames and avatars that are easily repeated and changed, RPA has difficulty accurately distinguishing and locking the identity of a unique chat object during the switching process, which in turn affects the accuracy of the automated process and the consistency of data.
[0004] Existing technologies obtain the unique ID of chat partners by cracking IM clients and directly calling their internal data interfaces. However, this approach carries significant technical and compliance risks. It is not only prone to system failures due to interface changes, but may also result in account bans due to violations of platform security policies. Summary of the Invention
[0005] In view of this, this application provides a method and system for identifying objects based on instant messaging, which can accurately identify the identity of chat objects and avoid technical and compliance risks.
[0006] To solve the above problems, the technical solution provided in this application is as follows:
[0007] This application provides a method for identifying objects based on instant messaging. The method includes: obtaining a first screenshot from a first chat window in an instant messaging (IM) client; the first screenshot includes at least one chat record to be identified, the chat record to be identified includes a message to be identified and a corresponding timestamp to be identified; extracting data to be identified from the message to be identified; and identifying the ID identifier corresponding to the chat object in the first chat window based on the mapping relationship between historical data and ID identifiers, provided that the matching degree between the data to be identified and historical data is greater than or equal to a first matching degree threshold, and the matching degree between the timestamp to be identified and the historical timestamp corresponding to the historical data is greater than a second matching degree threshold.
[0008] One possible implementation involves extracting data to be identified from a message to be identified, including: converting text information in images and / or text in the message to be identified into first text data; and determining that the data to be identified includes the first text data.
[0009] One possible implementation, extracting data to be identified from a message to be identified, further includes: converting image information in an image in the message to be identified into first image data; determining that the data to be identified includes the first image data; and / or, converting text information in text converted from speech in the message to be identified into second text data; determining that the data to be identified includes the second text data.
[0010] One possible implementation method, before obtaining the first screenshot from the first chat window in the instant messaging (IM) client, further includes: obtaining a second screenshot from a second chat window in the IM client; the second screenshot includes at least one historical chat record, which includes historical messages and corresponding historical timestamps; extracting historical data from the historical messages; clicking on the information interface in the second chat window to obtain the ID identifier of the chat object; and determining the mapping relationship between the historical data and the ID identifier.
[0011] One possible implementation involves extracting historical data from historical messages, including: converting text information in images and / or text in historical messages into third text data; determining that the historical data includes the third text data; and / or converting image information in images in historical messages into second image data; determining that the historical data includes the second image data; and / or converting text information in text converted from speech in historical messages into fourth text data; determining that the historical data includes the fourth text data.
[0012] One possible implementation method includes: when the data to be identified includes first text data and the historical data includes third text data, the text similarity between the first text data and the third text data is greater than or equal to a first similarity threshold, and the timestamp similarity between the timestamp corresponding to the first text data and the timestamp corresponding to the third text data is greater than or equal to a second similarity threshold; and / or, when the data to be identified includes second text data and the historical data includes fourth text data, the text similarity between the second text data and the fourth text data is greater than or equal to the first similarity threshold, and the timestamp similarity between the timestamp corresponding to the second text data and the timestamp corresponding to the fourth text data is greater than or equal to the second similarity threshold; and / or, when the data to be identified includes first image data and the historical data includes second image data, the image similarity between the first image data and the second image data is greater than or equal to a third similarity threshold, and the timestamp similarity between the timestamp corresponding to the first image data and the timestamp corresponding to the timestamp corresponding to the second image data is greater than or equal to the second similarity threshold; and, based on the mapping relationship between historical data and ID identifiers, identifying the ID identifier corresponding to the chat object in the first chat window.
[0013] One possible implementation involves extracting a first key phrase from the first text data and a second key phrase from the third text data when the data to be identified includes first text data and historical data includes third text data; and extracting a first key phrase from the first text data and a second key phrase from the third text data when the text similarity between the first and second key phrases is greater than or equal to a phrase similarity threshold, and the timestamp similarity between the timestamp corresponding to the first text data and the timestamp corresponding to the third text data is greater than or equal to a second similarity threshold; and / or, when the data to be identified includes second text data and historical data includes fourth text data, extracting a third key phrase from the second text data and a fourth key phrase from the fourth text data; and extracting a third key phrase from the fourth text data when the text similarity between the third and fourth key phrases is greater than or equal to a phrase similarity threshold, and the timestamp similarity between the timestamp corresponding to the second text data and the timestamp corresponding to the fourth text data is greater than or equal to a second similarity threshold; and identifying the ID identifier corresponding to the chat object in the first chat window based on the mapping relationship between historical data and ID identifiers.
[0014] One possible implementation method further includes: storing historical data, historical timestamps, ID identifiers, and the mapping relationship between historical data and ID identifiers in a database; retrieving the database so that, when the matching degree between the data to be identified and the historical data is greater than or equal to a first matching degree threshold, and the matching degree between the timestamp to be identified and the historical timestamp corresponding to the historical data is greater than a second matching degree threshold, the ID identifier corresponding to the chat object in the first chat window can be identified based on the mapping relationship between historical data and ID identifiers.
[0015] One possible implementation method also includes: when the time difference between the historical timestamp and the timestamp to be identified is greater than a time threshold, cleaning up historical data, ID identifiers, and the mapping relationship between historical data and ID identifiers.
[0016] This application also provides a system for identifying objects based on instant messaging. The system includes: a Robotic Process Automation (RPA) module; the RPA module is used to obtain a first screenshot from a first chat window in an instant messaging (IM) client; the first screenshot includes at least one chat record to be identified, the chat record to be identified includes a message to be identified and a corresponding timestamp to be identified; extracting data to be identified from the message to be identified; and identifying the ID identifier corresponding to the chat object in the first chat window based on the mapping relationship between historical data and ID identifiers, provided that the matching degree between the data to be identified and historical data is greater than or equal to a first matching degree threshold, and the matching degree between the timestamp to be identified and the historical timestamp corresponding to the historical data is greater than a second matching degree threshold.
[0017] The method for identifying objects based on instant messaging provided in this application includes obtaining a first screenshot from a first chat window in an instant messaging (IM) client; the first screenshot includes at least one chat record to be identified, which includes a message to be identified and a corresponding timestamp to be identified; extracting data to be identified from the message to be identified; and identifying the ID of the chat object in the first chat window based on the mapping relationship between historical data and ID identifiers, without needing to click to view the chat object's details or crack the IM client's API calls, thus enabling secure, accurate, and efficient identification of the chat object's identity while mitigating technical and compliance risks. Attached Figure Description
[0018] Figure 1 A flowchart illustrating a method for identifying objects based on instant messaging, provided in an embodiment of this application;
[0019] Figure 2 A flowchart illustrating another method for identifying objects based on instant messaging, provided in an embodiment of this application;
[0020] Figure 3 A flowchart illustrating yet another method for identifying objects based on instant messaging, provided in an embodiment of this application;
[0021] Figure 4 A flowchart illustrating yet another method for identifying objects based on instant messaging, provided in an embodiment of this application;
[0022] Figure 5This is a schematic diagram of a system for identifying objects based on instant messaging, provided as an embodiment of this application. Detailed Implementation
[0023] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the embodiments of this application will be further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0024] With the rapid development of digital office and social customer management in enterprises, internal collaboration and external customer communication are highly dependent on IM tools. Such platforms can support the needs of scenarios such as employee collaboration, external marketing, after-sales service and customer service.
[0025] To improve customer service efficiency, enterprises commonly deploy managed systems based on Windows cloud desktops and RPA. RPA simulates human operation of an IM client in the cloud, automating customer service tasks such as message sending and receiving, task allocation, chat object identification, and information synchronization. However, during system operation, RPA needs to frequently switch between contact chat windows, while the IM interface only displays easily duplicated and modified chat object nicknames and avatars. This makes it difficult for the system to accurately identify the identity of the real chat object corresponding to the current chat window, affecting the accuracy of the automated process and data consistency. Therefore, how to enable RPA to accurately and efficiently identify the unique identity of the chat object corresponding to the chat window has become a core technical problem that urgently needs to be solved in this field.
[0026] To address the aforementioned issues, the relevant technology involves reverse engineering to crack the IM client and calling its internal private Application Programming Interface (API) to obtain the unique ID of the chat partner. However, the applicant discovered that this solution poses significant technical and compliance risks. It is susceptible to system failure due to platform API updates, and violations of platform security policies could result in account bans, causing losses to the company.
[0027] Furthermore, the related technology employs RPA to simulate clicking to view chat object details after each chat window switch, parsing the chat object's unique ID from the pop-up chat object details interface. While this solution avoids directly cracking the API, the frequent operations and fixed behavior patterns make it easy for IM platform risk control to identify as abnormal automated behavior, posing a risk to account risk control. Additionally, frequent interface operations increase network latency and system load, resulting in low overall processing efficiency.
[0028] Therefore, to avoid the technical and compliance risks caused by cracking IM clients and calling their internal private APIs to obtain the unique ID of chat objects, or the low processing efficiency and account risk control risks caused by frequently using fixed behavior patterns and clicking to view the details of chat objects to obtain their unique IDs, this application provides a method for identifying objects based on instant messaging. By obtaining a screenshot of the chat window in the IM client, the method extracts the data to be identified from the messages to be identified in the chat records to be identified included in the screenshot. When the matching degree between the data to be identified and historical data, and the matching degree between the timestamp of the data to be identified and the historical timestamp of the historical data, are both satisfied, the chat object to be identified can be identified according to the ID identifier mapped from the historical data, thus determining the identity of the chat object to be identified.
[0029] Because historical data is mapped to a unique ID, this solution can determine the ID of the object to be identified in the chat window by comparing the matching degree between the data to be identified in the screenshot of the chat window and the historical data, as well as the matching degree of the timestamps corresponding to the two. This eliminates the need to click to view the details of the chat object, making it less likely to trigger risk control and reducing the possibility of being identified and triggered by the risk control system. It also eliminates the need to crack the IM client's API, thus avoiding technical and compliance risks. It can safely, accurately, and efficiently identify the identity of the chat object, ensuring the stable operation of the enterprise's automated customer service process.
[0030] See Figure 1 The figure is a flowchart of a method for identifying objects based on instant messaging, provided in an embodiment of this application.
[0031] The method for identifying objects based on instant messaging provided in this application includes:
[0032] S101: Obtain a first screenshot from the first chat window in the instant messaging (IM) client; the first screenshot includes at least one chat record to be identified, the chat record to be identified includes the message to be identified and the corresponding timestamp to be identified.
[0033] The chat window is the interactive interface used by IM clients to present conversation content. During communication within the IM client, chat partners use the chat window to send and receive messages and display conversations. The chat window typically displays the interaction messages between the communicating parties, the chat partner's avatar, nickname, and other information. It can also provide an entry point to the chat partner's details page to view complete information, such as their ID.
[0034] The embodiments of this application do not specifically limit the size of the first screenshot, which can be set according to actual application needs. For example, the first screenshot can be a screenshot of the maximum visible area of the first chat window.
[0035] The first screenshot includes at least one chat record to be identified. Each chat record includes a corresponding message to be identified and a corresponding timestamp to be identified. For example, the first screenshot includes the i-th chat record to be identified, which includes the i-th message to be identified and the i-th timestamp to be identified, where i is a positive integer greater than or equal to 1.
[0036] The timestamp to be identified may include the timestamp of the message to be identified being sent or the timestamp of the message to be identified being received.
[0037] This application does not specifically limit the type of message to be identified. For example, it may include image messages, text messages, voice messages, etc. Image messages may include image messages containing text and image messages without text.
[0038] S102: Extract the data to be identified from the message to be identified.
[0039] In order to accurately compare the matching degree between the message to be identified and the historical messages, this application embodiment extracts comparable data to be identified from the message to be identified, so as to facilitate the subsequent determination of the matching degree between the data to be identified and the historical data.
[0040] S103: When the matching degree between the data to be identified and the historical data is greater than or equal to the first matching degree threshold, and the matching degree between the timestamp to be identified and the historical timestamp corresponding to the historical data is greater than the second matching degree threshold, the ID identifier corresponding to the chat object in the first chat window is identified according to the mapping relationship between the historical data and the ID identifier.
[0041] To improve the accuracy of chat object identification, this application embodiment not only compares whether the data to be identified matches the historical data, but also compares whether the timestamp corresponding to the data to be identified matches the historical timestamp corresponding to the historical data. Only when both meet the matching conditions, the ID identifier of the object to be identified is identified according to the mapping relationship between historical data and ID identifier, thereby avoiding misidentification caused by identifying the ID identifier of the object to be identified when the data matches but the time does not match.
[0042] The embodiments of this application do not specifically limit the values of the first matching degree threshold and the second matching degree threshold, and can be set according to actual application requirements.
[0043] The method for identifying objects based on instant messaging provided in this application includes obtaining a first screenshot from a first chat window in an instant messaging (IM) client; the first screenshot includes at least one chat record to be identified, the chat record to be identified includes a message to be identified and a corresponding timestamp to be identified; extracting data to be identified from the message to be identified; when the matching degree between the data to be identified and historical data is greater than or equal to a first matching degree threshold, and the matching degree between the timestamp to be identified and the historical timestamp corresponding to the historical data is greater than a second matching degree threshold, the ID identifier corresponding to the chat object in the first chat window is identified according to the mapping relationship between historical data and ID identifiers. This method can identify the ID identifier corresponding to the chat object in the first chat window without needing to click to view the chat object's details or crack the IM client's API calls, thus enabling secure, accurate, and efficient identification of the chat object's identity while mitigating technical and compliance risks.
[0044] In one possible implementation, in the instant messaging-based object identification method provided in this application embodiment, when the first screenshot includes multiple chat records to be identified, if the number of chat records to be identified that meet both the data matching condition and the timestamp matching condition is greater than or equal to the quantity threshold, then the ID identifier corresponding to the chat object in the first chat window can be identified based on the mapping relationship between historical data and ID identifiers, thereby improving the accuracy of chat object identification.
[0045] Specifically, the first screenshot may include multiple chat records to be identified, each of which includes the corresponding message to be identified and the corresponding timestamp to be identified.
[0046] Extract the corresponding data to be identified from each message to be identified. If the matching degree between N data to be identified and N historical data is greater than or equal to the first matching degree threshold, and the matching degree between the timestamps of N data to be identified and N historical data is greater than the second matching degree threshold, and N is greater than or equal to the quantity threshold, then identify the ID of the chat object in the first chat window based on the mapping relationship between historical data and ID identifier.
[0047] The embodiments of this application do not specifically limit the value of the quantity threshold, which can be set according to the actual application requirements.
[0048] See Figure 2 The figure is a flowchart of another method for identifying objects based on instant messaging provided in an embodiment of this application.
[0049] One possible implementation is that, in the instant messaging-based object identification method provided in this application embodiment, different data to be identified can be extracted according to different message types.
[0050] Specifically, extracting the data to be identified from the message to be identified can include:
[0051] S201: Convert the text information in the image and / or text in the message to be identified into first text data; determine that the data to be identified includes the first text data.
[0052] The embodiments of this application do not specifically limit the method of converting text information into first text data. The method can be specifically set according to the actual application requirements. For example, optical character recognition (OCR) technology can be used.
[0053] It should be understood that the embodiments of this application can only convert the text information in the image into first text data by means of OCR technology when the image in the message to be identified contains text information.
[0054] Extracting the data to be identified from the message to be identified may also include:
[0055] S202: Convert the image information in the image of the message to be recognized into first image data; determine that the data to be recognized includes the first image data; and / or, convert the text information in the text converted from speech in the message to be recognized into second text data; determine that the data to be recognized includes the second text data.
[0056] Extracting the data to be identified from the message to be identified can include:
[0057] Convert the text information in the image and / or text in the message to be recognized into first text data; determine that the data to be recognized includes the first text data; and / or convert the image information in the image in the message to be recognized into first image data; determine that the data to be recognized includes the first image data; and / or convert the text information in the speech-to-text conversion in the message to be recognized into second text data; determine that the data to be recognized includes the second text data.
[0058] The embodiments of this application do not specifically limit the relationship between the image in S201 and the image in S202. They can be the same image or different images, which will not be elaborated here.
[0059] See Figure 3 The figure is a flowchart of another method for identifying objects based on instant messaging provided in an embodiment of this application.
[0060] In one possible implementation, before obtaining the first screenshot from the first chat window in the IM client, the method for identifying objects based on instant messaging provided in this application embodiment may further include:
[0061] S301: Obtain a second screenshot from the second chat window in the IM client; the second screenshot includes at least one historical chat record, which includes historical messages and corresponding historical timestamps.
[0062] This application does not specifically limit the type of historical messages. For example, they may include image messages, text messages, voice messages, etc. Image messages may include image messages containing text and image messages without text.
[0063] One possible implementation is to address situations where chat content styles vary significantly across different time periods. This application embodiment can provide multiple historical chat records to improve matching accuracy.
[0064] S302: Extract historical data from historical messages.
[0065] S303: Click the information interface in the second chat window to obtain the ID identifier of the chat object.
[0066] In order to determine the identity of the chat partner, this embodiment of the application requires clicking on the information interface in the second chat window at a historical moment to obtain the ID identifier of the chat partner recorded in the information interface.
[0067] The embodiments of this application do not specifically limit the execution time of S303. For example, it can be executed when chatting with the chat partner for the first time.
[0068] The embodiments of this application do not specifically limit the execution order of S301 and S303. They can be set according to actual needs. For example, S301 can be executed first and then S303 can be executed; or S303 can be executed first and then S301 can be executed; or S301 and S303 can be executed simultaneously.
[0069] S304: Determine the mapping relationship between historical data and ID identifiers.
[0070] It should be understood that S301-S304 illustrates the mapping relationship between the ID identifier of a chat object in the second chat window and the historical data of the chat object in the second chat window at a historical moment. The chat object in the second chat window is the same as the chat object in the first chat window. In fact, embodiments of this application can also identify the mapping relationship between the ID identifier of other chat objects and the historical data of other chat objects, which will not be elaborated here.
[0071] This application embodiment obtains a second screenshot of a second chat window in an IM client, extracts historical data from historical messages in the historical chat records included in the second screenshot, and obtains the mapping relationship between the historical data and the chat object's ID identifier based on the ID identifier of the chat object recorded in the information interface of the second chat window. Therefore, when it is necessary to identify the identity of a chat object in a new chat window (first chat window) later, it is only necessary to determine whether the data to be identified extracted from the new chat window matches the historical data, and whether their corresponding timestamps match. If the matching conditions are met, the chat object's ID identifier can be identified based on the ID identifier mapped from the historical data, eliminating the need to click on the information interface in the new chat window to obtain the chat object's ID identifier. This avoids frequent clicking on the information interface in the chat window to obtain the chat object's ID identifier, mitigates account risk control risks, and improves identification efficiency.
[0072] One possible implementation is that, in the instant messaging-based object identification method provided in this application embodiment, different historical data can be extracted according to different historical message types.
[0073] Specifically, extracting historical data from historical messages can include:
[0074] Convert the text information in the images and / or text in the historical messages into third text data; determine that the historical data includes the third text data; and / or convert the image information in the images in the historical messages into second image data; determine that the historical data includes the second image data; and / or convert the text information in the speech-to-text format of the historical messages into fourth text data; determine that the historical data includes the fourth text data.
[0075] Accordingly, in the method for identifying objects based on instant messaging provided in this application embodiment, when the matching degree between the data to be identified and historical data is greater than or equal to a first matching degree threshold, and the matching degree between the timestamp to be identified and the historical timestamp corresponding to the historical data is greater than a second matching degree threshold, the method for identifying the ID identifier corresponding to the chat object in the first chat window based on the mapping relationship between historical data and ID identifiers may include:
[0076] When the data to be identified includes first text data and the historical data includes third text data, the text similarity between the first text data and the third text data is greater than or equal to the first similarity threshold, and the timestamp similarity between the timestamp corresponding to the first text data and the timestamp corresponding to the third text data is greater than or equal to the second similarity threshold.
[0077] And / or, when the data to be identified includes second text data and the historical data includes fourth text data, the text similarity between the second text data and the fourth text data is greater than or equal to the first similarity threshold, and the timestamp similarity between the timestamp corresponding to the second text data and the timestamp corresponding to the fourth text data is greater than or equal to the second similarity threshold.
[0078] And / or, when the data to be identified includes first image data and the historical data includes second image data, the image similarity between the first image data and the second image data is greater than or equal to a third similarity threshold, and the timestamp similarity between the timestamp corresponding to the first image data and the timestamp corresponding to the second image data is greater than or equal to the second similarity threshold.
[0079] Based on the mapping relationship between historical data and ID identifiers, the ID identifiers corresponding to the chat objects in the first chat window are identified.
[0080] The embodiments of this application do not specifically limit the values of the first similarity threshold, the second similarity threshold, and the third similarity threshold, and can be set according to actual application needs.
[0081] When both the data to be identified and the historical data include text data, the matching degree between the two can be determined by a text similarity calculation algorithm. This application does not specifically limit the type of text similarity calculation algorithm used; it can be set according to actual application needs, such as using cosine similarity algorithm, longest common subsequence algorithm, edit distance algorithm, etc.
[0082] When both the data to be identified and the historical data include image data, the matching degree between the two can be determined by an image similarity calculation algorithm. This application does not specifically limit the type of image similarity calculation algorithm used; it can be set according to actual application requirements, such as hash algorithms, histogram algorithms, pixel matching algorithms, etc.
[0083] Based on the above, the following describes the method for identifying objects based on instant messaging provided in the embodiments of this application, taking into account different types of historical messages and different types of messages to be identified.
[0084] See Figure 4 The figure is a flowchart of another method for identifying objects based on instant messaging provided in an embodiment of this application.
[0085] The method for identifying objects based on instant messaging provided in this application embodiment may include:
[0086] S401: Obtain a second screenshot from the second chat window in the IM client; the second screenshot includes at least one historical chat record, which includes historical messages and corresponding historical timestamps.
[0087] S402: Convert the text information in the images and / or text in the historical messages into third text data; determine that the historical data includes the third text data; and / or, convert the image information in the images in the historical messages into second image data; determine that the historical data includes the second image data; and / or, convert the text information in the text converted from speech in the historical messages into fourth text data; determine that the historical data includes the fourth text data.
[0088] S403: Click the information interface in the second chat window to obtain the ID identifier of the chat object.
[0089] S404: Determine the mapping relationship between historical data and ID identifiers.
[0090] S405: Obtain a first screenshot from the first chat window in the instant messaging (IM) client; the first screenshot includes at least one chat record to be identified, the chat record to be identified includes the message to be identified and the corresponding timestamp to be identified.
[0091] S406: Convert the text information in the image and / or text in the message to be recognized into first text data; determine that the data to be recognized includes the first text data; and / or, convert the image information in the image in the message to be recognized into first image data; determine that the data to be recognized includes the first image data; and / or, convert the text information in the text converted from speech in the message to be recognized into second text data; determine that the data to be recognized includes the second text data.
[0092] S407: When the data to be identified includes first text data and the historical data includes third text data, the text similarity between the first text data and the third text data is greater than or equal to a first similarity threshold, and the timestamp similarity between the timestamp corresponding to the first text data and the timestamp corresponding to the third text data is greater than or equal to a second similarity threshold; and / or, when the data to be identified includes second text data and the historical data includes fourth text data, the text similarity between the second text data and the fourth text data is greater than or equal to a first similarity threshold, and the timestamp similarity between the timestamp corresponding to the second text data and the timestamp corresponding to the fourth text data is greater than or equal to a second similarity threshold; and / or, when the data to be identified includes first image data and the historical data includes second image data, the image similarity between the first image data and the second image data is greater than or equal to a third similarity threshold, and the timestamp similarity between the timestamp corresponding to the first image data and the timestamp corresponding to the timestamp corresponding to the second image data is greater than or equal to a second similarity threshold; based on the mapping relationship between historical data and ID identifiers, the ID identifier corresponding to the chat object in the first chat window is identified.
[0093] One possible implementation, in order to reduce the impact of noise information on similarity comparison results and improve the accuracy of matching and recognition results, is the method for identifying objects based on instant messaging provided in this application embodiment, which specifically includes:
[0094] When the data to be identified includes first text data and the historical data includes third text data, the first key phrase of the first text data is extracted, and the second key phrase of the third text data is extracted; when the text similarity between the first key phrase and the second key phrase is greater than or equal to the phrase similarity threshold, and the timestamp similarity between the timestamp corresponding to the first text data and the timestamp corresponding to the third text data is greater than or equal to the second similarity threshold.
[0095] And / or, when the data to be identified includes second text data and the historical data includes fourth text data, extract the third key phrase of the second text data and extract the fourth key phrase of the fourth text data; when the text similarity between the third key phrase and the fourth key phrase is greater than or equal to the phrase similarity threshold, and the timestamp similarity between the timestamp corresponding to the second text data and the timestamp corresponding to the fourth text data is greater than or equal to the second similarity threshold.
[0096] Based on the mapping relationship between historical data and ID identifiers, the ID identifiers corresponding to the chat objects in the first chat window are identified.
[0097] The embodiments of this application do not specifically limit the value of the phrase similarity threshold, which can be set according to the actual application requirements.
[0098] One possible implementation, taking the data to be identified as including first text data and historical data including third text data as an example, in the embodiments of this application, when extracting the first key phrase of the first text data and the second key phrase of the third text data, the first emoticon and the first punctuation mark of the first text data can also be removed, and the second emoticon and the second punctuation mark of the third text data can be removed, thereby reducing the impact of punctuation marks and emoticons on the matching accuracy.
[0099] Correspondingly, when the data to be identified includes the second text data and the historical data includes the fourth text data, the third key phrase of the second text data is extracted, and the third emoticon and the third punctuation mark of the second text data are removed; the fourth key phrase of the fourth text data is extracted, and the fourth emoticon and the fourth punctuation mark of the fourth text data are removed, which will not be elaborated here.
[0100] To improve the accuracy of timestamp matching, the embodiments of this application can also perform standardization processing on the above timestamps, which will not be elaborated here.
[0101] One possible implementation of the instant messaging-based object identification method provided in this application embodiment further includes:
[0102] Store historical data, historical timestamps, ID identifiers, and the mapping relationship between historical data and ID identifiers in the database.
[0103] The database is searched so that, if the matching degree between the data to be identified and the historical data is greater than or equal to the first matching degree threshold, and the matching degree between the timestamp to be identified and the historical timestamp corresponding to the historical data is greater than the second matching degree threshold, the ID identifier corresponding to the chat object in the first chat window can be identified based on the mapping relationship between historical data and ID identifier.
[0104] In one possible implementation, this application embodiment can further store the chat object's data that meets the matching conditions into the database after each identification of the chat object's ID identifier, so that the chat object can be identified in the future based on the latest historical data and the mapping relationship of the ID identifier.
[0105] Since chat logs are constantly updated, outdated chat logs may lose their matching value due to different or even completely different content. To improve matching accuracy, enhance recognition accuracy, and control database size, the method for identifying objects based on instant messaging provided in this application embodiment further includes:
[0106] When the time difference between the historical timestamp and the timestamp to be identified is greater than the time threshold, clean up the historical data, ID identifiers, and the mapping relationship between historical data and ID identifiers.
[0107] For example, historical data can be regarded as recorded dynamic fingerprints. When the recorded dynamic fingerprints expire, they are cleared and new or latest dynamic fingerprints are recorded. The new or latest dynamic fingerprints are then compared with the dynamic fingerprints to be identified to improve the accuracy of identification.
[0108] The embodiments of this application do not specifically limit the value of the time threshold, which can be set according to the actual application requirements.
[0109] Based on the instant messaging object identification method provided in the above embodiments, this application also provides a system based on instant messaging object identification.
[0110] See Figure 5 The figure is a schematic diagram of a system for identifying objects based on instant messaging, provided in an embodiment of this application.
[0111] The system for identifying objects based on instant messaging provided in this application includes: Robotic Process Automation (RPA) module 100.
[0112] The Robotic Process Automation (RPA) module 100 is used to obtain a first screenshot from a first chat window in an instant messaging (IM) client; the first screenshot includes at least one chat record to be identified, which includes a message to be identified and a corresponding timestamp to be identified; extract data to be identified from the message to be identified; and identify the ID of the chat object in the first chat window based on the mapping relationship between historical data and ID identifiers, provided that the matching degree between the data to be identified and historical data is greater than or equal to a first matching degree threshold, and the matching degree between the timestamp to be identified and the historical timestamp corresponding to the historical data is greater than a second matching degree threshold.
[0113] The system for identifying objects based on instant messaging provided in this application includes a Robotic Process Automation (RPA) module. The RPA module is used to obtain a first screenshot from a first chat window in an instant messaging (IM) client. The first screenshot includes at least one chat record to be identified, which includes a message to be identified and a corresponding timestamp to be identified. Data to be identified is extracted from the message. If the matching degree between the data to be identified and historical data is greater than or equal to a first matching degree threshold, and the matching degree between the timestamp to be identified and the historical timestamp corresponding to the historical data is greater than a second matching degree threshold, the system identifies the ID identifier corresponding to the chat object in the first chat window based on the mapping relationship between historical data and ID identifiers. This eliminates the need to click to view the chat object's details or crack the IM client's API calls, thus enabling secure, accurate, and efficient identification of the chat object's identity while mitigating technical and compliance risks.
[0114] Furthermore, since the time spent obtaining the first screenshot from the IM client and extracting the data to be identified from the message to be identified in this embodiment is much shorter than the time spent clicking to view the details of the chat object, waiting for the interface to render, and parsing the interface, this embodiment can improve the efficiency of chat object identification and the throughput of the system workflow.
[0115] Meanwhile, since the embodiments of this application rely entirely on the publicly available and legitimate chat window interface information of the IM client, and do not rely on the internal private API of the undisclosed IM client, they are not affected by changes in the internal API of the IM client, resulting in a long system lifecycle and low maintenance costs.
[0116] In one possible implementation, the Robotic Process Automation (RPA) module 100 is further used to obtain a second screenshot from a second chat window in an IM client; the second screenshot includes at least one historical chat record, which includes historical messages and corresponding historical timestamps; historical data is extracted from the historical messages; the information interface in the second chat window is clicked to obtain the ID identifier of the chat object; and the mapping relationship between the historical data and the ID identifier is determined.
[0117] One possible implementation of the instant messaging-based object identification system provided in this application embodiment includes: a first identification module 200 and a second identification module 300.
[0118] The first recognition module 200 is configured to convert text information in images and / or text in a message to be recognized into first text data; determine that the data to be recognized includes the first text data; and / or convert image information in images in a message to be recognized into first image data; determine that the data to be recognized includes the first image data; and / or convert text information in text converted from speech in a message to be recognized into second text data; determine that the data to be recognized includes the second text data.
[0119] The second recognition module 300 is used to convert the text information in the images and / or text in the historical messages into third text data; determine that the historical data includes the third text data; and / or, convert the image information in the images in the historical messages into second image data; determine that the historical data includes the second image data; and / or, convert the text information in the text converted from speech in the historical messages into fourth text data; determine that the historical data includes the fourth text data.
[0120] The Robotic Process Automation (RPA) module 100 is further configured to: when the data to be identified includes first text data and the historical data includes third text data, wherein the text similarity between the first text data and the third text data is greater than or equal to a first similarity threshold, and the timestamp similarity between the timestamp corresponding to the first text data and the timestamp corresponding to the third text data is greater than or equal to a second similarity threshold; and / or, when the data to be identified includes second text data and the historical data includes fourth text data, wherein the text similarity between the second text data and the fourth text data is greater than or equal to the first similarity threshold, and the timestamp similarity between the timestamp corresponding to the second text data and the timestamp corresponding to the timestamp corresponding to the fourth text data is greater than or equal to a second similarity threshold; and / or, when the data to be identified includes first image data and the historical data includes second image data, wherein the image similarity between the first image data and the second image data is greater than or equal to a third similarity threshold, and the timestamp similarity between the timestamp corresponding to the first image data and the timestamp corresponding to the timestamp corresponding to the timestamp corresponding to the timestamp corresponding to the timestamp corresponding to the timestamp of the second image data is greater than or equal to a second similarity threshold; identify the ID identifier corresponding to the chat object in the first chat window based on the mapping relationship between historical data and ID identifiers.
[0121] One possible implementation, the system for identifying objects based on instant messaging provided in this application embodiment, includes: a database 400.
[0122] Database 400 is used to store historical data, historical timestamps, ID identifiers, and the mapping relationship between historical data and ID identifiers.
[0123] The Robotic Process Automation (RPA) module 100 is also used to retrieve the database 400 so that, when the matching degree between the data to be identified and the historical data is greater than or equal to the first matching degree threshold, and the matching degree between the timestamp to be identified and the historical timestamp corresponding to the historical data is greater than the second matching degree threshold, the ID identifier corresponding to the chat object in the first chat window can be identified based on the mapping relationship between the historical data and the ID identifier.
[0124] Database 400 is also used to clean up historical data, ID identifiers, and the mapping relationship between historical data and ID identifiers when the time difference between the historical timestamp and the timestamp to be identified is greater than a time threshold.
[0125] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0126] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for identifying an object based on instant messaging, characterized in that, The method includes: A first screenshot is obtained from the first chat window in the instant messaging (IM) client; the first screenshot includes at least one chat record to be identified, and the chat record to be identified includes the message to be identified and the corresponding timestamp to be identified. Extract the data to be identified from the message to be identified; If the matching degree between the data to be identified and the historical data is greater than or equal to the first matching degree threshold, and the matching degree between the timestamp to be identified and the historical timestamp corresponding to the historical data is greater than the second matching degree threshold, the chat object in the first chat window is identified according to the mapping relationship between the historical data and the ID identifier.
2. The method according to claim 1, characterized in that, The step of extracting the data to be identified from the message to be identified includes: Convert the text information in the image and / or text in the message to be identified into first text data; determine that the data to be identified includes the first text data.
3. The method according to claim 2, characterized in that, The step of extracting the data to be identified from the message to be identified further includes: Convert the image information in the image of the message to be identified into first image data; determine that the data to be identified includes the first image data; And / or, convert the text information in the speech-to-text message to be identified into second text data; determine that the data to be identified includes the second text data.
4. The method according to claim 2 or 3, characterized in that, Before obtaining the first screenshot from the first chat window in the instant messaging (IM) client, the method further includes: A second screenshot is obtained from the second chat window in the IM client; the second screenshot includes at least one historical chat record, the historical chat record includes historical messages and the corresponding historical timestamp; Extract historical data from the historical messages; Click on the information interface in the second chat window to obtain the ID identifier of the chat object; Determine the mapping relationship between the historical data and the ID identifier.
5. The method according to claim 4, characterized in that, The extraction of historical data from the historical messages includes: Convert the text information in the images and / or text in the historical messages into third-party text data; determine that the historical data includes the third-party text data; And / or, convert the image information in the images of the historical messages into second image data; determine that the historical data includes the second image data; And / or, convert the text information in the speech-to-text format of the historical messages into fourth text data; determine that the historical data includes the fourth text data.
6. The method according to claim 5, characterized in that, The method includes: When the data to be identified includes the first text data and the historical data includes the third text data, the case is that the text similarity between the first text data and the third text data is greater than or equal to the first similarity threshold, and the timestamp similarity between the timestamp corresponding to the first text data and the timestamp corresponding to the third text data is greater than or equal to the second similarity threshold. And / or, when the data to be identified includes the second text data and the historical data includes the fourth text data, the case is that the text similarity between the second text data and the fourth text data is greater than or equal to the first similarity threshold, and the timestamp similarity between the timestamp corresponding to the second text data and the timestamp corresponding to the fourth text data is greater than or equal to the second similarity threshold. And / or, when the data to be identified includes the first image data and the historical data includes the second image data, the image similarity between the first image data and the second image data is greater than or equal to a third similarity threshold, and the timestamp similarity between the timestamp corresponding to the first image data and the timestamp corresponding to the second image data is greater than or equal to the second similarity threshold. Based on the mapping relationship between the historical data and the ID identifier, the chat object in the first chat window is identified as corresponding to the ID identifier.
7. The method according to claim 6, characterized in that, When the data to be identified includes the first text data and the historical data includes the third text data, extract the first key phrase from the first text data and extract the second key phrase from the third text data; The text similarity between the first key phrase and the second key phrase is greater than or equal to the phrase similarity threshold, and the timestamp similarity between the timestamp corresponding to the first text data and the timestamp corresponding to the third text data is greater than or equal to the second similarity threshold. And / or, when the data to be identified includes the second text data and the historical data includes the fourth text data, extract the third key phrase of the second text data and extract the fourth key phrase of the fourth text data; The text similarity between the third key phrase and the fourth key phrase is greater than or equal to the phrase similarity threshold, and the timestamp similarity between the timestamp corresponding to the second text data and the timestamp corresponding to the fourth text data is greater than or equal to the second similarity threshold. Based on the mapping relationship between the historical data and the ID identifier, the chat object in the first chat window is identified as corresponding to the ID identifier.
8. The method according to any one of claims 1-7, characterized in that, The method further includes: The historical data, the historical timestamps, the ID identifiers, and the mapping relationship between the historical data and the ID identifiers are stored in the database; The database is searched so that, when the matching degree between the data to be identified and the historical data is greater than or equal to a first matching degree threshold, and the matching degree between the timestamp to be identified and the historical timestamp corresponding to the historical data is greater than a second matching degree threshold, the chat object in the first chat window is identified according to the mapping relationship between the historical data and the ID identifier.
9. The method according to claim 8, characterized in that, The method further includes: When the time difference between the historical timestamp and the timestamp to be identified is greater than a time threshold, the historical data, the ID identifier, and the mapping relationship between the historical data and the ID identifier are cleared.
10. A system for identifying objects based on instant messaging, characterized in that, The system includes: a Robotic Process Automation (RPA) module; The RPA module is used to obtain a first screenshot from a first chat window in an instant messaging (IM) client; the first screenshot includes at least one chat record to be identified, the chat record to be identified includes a message to be identified and a corresponding timestamp to be identified; extract data to be identified from the message to be identified; when the matching degree between the data to be identified and historical data is greater than or equal to a first matching degree threshold, and the matching degree between the timestamp to be identified and the historical timestamp corresponding to the historical data is greater than a second matching degree threshold, identify the chat object in the first chat window corresponding to the ID identifier according to the mapping relationship between the historical data and the ID identifier.