CN113905001B - Automatic reply method, device, computer equipment and readable storage medium - Google Patents

Automatic reply method, device, computer equipment and readable storage medium Download PDF

Info

Publication number
CN113905001B
CN113905001B CN202111078834.0A CN202111078834A CN113905001B CN 113905001 B CN113905001 B CN 113905001B CN 202111078834 A CN202111078834 A CN 202111078834A CN 113905001 B CN113905001 B CN 113905001B
Authority
CN
China
Prior art keywords
screenshot
message
server
last message
reply
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111078834.0A
Other languages
Chinese (zh)
Other versions
CN113905001A (en
Inventor
张星亮
吴剑文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Workec Technology Co ltd
Original Assignee
Shenzhen Workec Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Workec Technology Co ltd filed Critical Shenzhen Workec Technology Co ltd
Priority to CN202111078834.0A priority Critical patent/CN113905001B/en
Publication of CN113905001A publication Critical patent/CN113905001A/en
Application granted granted Critical
Publication of CN113905001B publication Critical patent/CN113905001B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/02User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail using automatic reactions or user delegation, e.g. automatic replies or chatbot-generated messages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]

Abstract

The invention is applicable to the technical field of computers, and provides an automatic reply method, an automatic reply device, computer equipment and a readable storage medium thereof, wherein the method comprises the following steps: acquiring a keyboard starting request input by a user on a session interface; intercepting the last message in the session interface according to the keyboard starting request to generate a first screenshot; when the last message accords with the preset condition, the first screenshot is sent to the server, so that the server converts the first screenshot into text information and acquires reply information corresponding to the text information; and receiving the reply information sent by the server and sending the reply information to the session interface. The automatic replying program is associated with the keyboard of the session interface, when the keyboard is started, the automatic replying program takes effect, corresponding replying content is determined through the server and sent to the communication object, the message can be replied in time, the user experience is improved, the use of plug-in or code embedding/writing of communication software is not needed, and the number sealing risk is reduced.

Description

Automatic reply method, device, computer equipment and readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an automatic reply method, an automatic reply device, a computer device, and a readable storage medium.
Background
With the development of mobile internet, internet instant messaging has become a normal state gradually as a communication means. However, there may be other matters that the user needs to deal with when communicating, or when communicating with a plurality of communication objects at the same time, there is a problem that the user cannot reply to the message in time.
At present, in order to solve the problem, some instant messaging software is added with an automatic reply function, but the current automatic reply function is all preset with a session, for example, the user is busy and can not reply the corresponding information according to the message content later, so that the problem of poor user experience is caused. Aiming at most instant messaging software without an automatic reply function, the automatic reply function is often realized by using a plug-in or code embedding/writing-changing instant messaging software mode, but the automatic reply belongs to illegal behaviors and has the risk of sealing numbers.
Therefore, the instant messaging software has the problems of number sealing risk and poor user experience of an automatic reply function.
Disclosure of Invention
The embodiment of the invention provides an automatic replying method, which aims to solve the problems of number sealing risk and poor user experience in the prior art.
The embodiment of the invention is realized in such a way that an automatic replying method is provided, which comprises the following steps:
acquiring a keyboard starting request input by a user on a session interface;
intercepting the last message in the session interface according to the keyboard starting request to generate a first screenshot;
when the last message accords with a preset condition, the first screenshot is sent to a server, so that the server converts the first screenshot into text information and acquires reply information corresponding to the text information;
and receiving the reply information sent by the server and sending the reply information to the session interface.
Further, after intercepting the last message in the session interface according to the keyboard start request to generate the first screenshot, the method includes:
when the session interface changes, intercepting the last message in the current session interface to generate a second screenshot;
respectively acquiring a first pixel value of the first screenshot and a second pixel value of the second screenshot;
Comparing the first pixel value with the second pixel value to determine the similarity between the first screenshot and the second screenshot;
said sending said first screenshot to a server comprising
And when the similarity between the first screenshot and the second screenshot is lower than a preset similarity threshold, sending the second screenshot to the server.
Still further, the intercepting the last message in the session interface includes:
determining a starting position and an ending position of the last message;
and intercepting the last message according to the starting position and the ending position.
Further, determining the start position and the end position of the last message includes:
determining an ordinate ending value of the last message according to the conversation interface height, the keyboard height and the input box height;
determining an ordinate starting value of the last message according to the ordinate ending value and the height of the bubble message frame where the last message is located;
and intercepting the last message according to the starting position and the ending position, wherein the intercepting comprises the following steps:
and intercepting the last message in whole line according to the ordinate ending value and the ordinate starting value.
Further, when the last message meets a preset condition, the sending the first screenshot to the server includes:
determining a pixel color value of a color region of the first screenshot;
judging whether the pixel color value is a chat bubble color value of a conversation object;
and if the judgment result is yes, the first screenshot is sent to a server.
The embodiment of the invention also provides an automatic recovery device, which comprises:
the keyboard starting request acquisition unit is used for acquiring a keyboard starting request input by a user on a session interface;
the first screenshot generating unit is used for intercepting the last message received in the session interface according to the keyboard starting request so as to generate a first screenshot;
the first screenshot sending unit is used for sending the first screenshot to a server when the last message accords with a preset condition, so that the server converts the first screenshot into text information and acquires reply information corresponding to the text information;
and the reply information acquisition unit is used for receiving the reply information sent by the server and sending the reply information to the session interface.
Still further, the apparatus further comprises:
the second screenshot generating unit is used for intercepting the last message in the current session interface when the session interface changes so as to generate a second screenshot;
a pixel value obtaining unit, configured to obtain a first pixel value of the first screenshot and a second pixel value of the second screenshot respectively;
the comparison unit is used for comparing the first pixel value with the second pixel value to determine the similarity between the first screenshot and the second screenshot;
the first screenshot sending unit is further configured to:
and when the similarity between the first screenshot and the second screenshot is lower than a preset similarity threshold, sending the second screenshot to the server.
Still further, the first screenshot generating unit is further configured to:
determining a starting position and an ending position of the last message;
and intercepting the last message according to the starting position and the ending position.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and computer readable instructions stored in the memory and capable of running on the processor, wherein the steps of the automatic recovery method are realized when the processor executes the computer readable instructions.
The embodiment of the invention also provides a readable storage medium, which stores computer readable instructions that when executed by a processor implement the steps of the automatic reply method.
The invention provides an automatic reply method, a device, computer equipment and a readable storage medium, wherein the method comprises the following steps: acquiring a keyboard starting request input by a user on a session interface; intercepting the last message in the session interface according to the keyboard starting request to generate a first screenshot; the server converts the first screenshot into text information and acquires reply information corresponding to the text information; and receiving the reply information sent by the server and sending the reply information to the session interface. In the scheme, the automatic reply program is associated with the keyboard of the conversation interface, when the keyboard is started, the automatic reply program takes effect, and the effective automatic reply program can analyze the message content through the server to determine the corresponding reply content and send the reply content to the communication object, so that the communication object message can be replied in time, the user experience is improved, the use of external hanging or code embedding/writing of communication software is not needed, illegal operation is avoided, and the number sealing risk is reduced.
Drawings
FIG. 1 is a diagram of an embodiment of an automatic reply system according to the present invention;
FIG. 2 is a flowchart of an implementation of an automatic reply method according to a first embodiment of the present invention;
fig. 3 is a flowchart of an implementation of an automatic reply method according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of an automatic restoring device according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an automatic restoring device according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The automatic reply method provided in this embodiment may be applied in an application environment as shown in fig. 1, where a client communicates with a server. Clients include, but are not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server may be implemented by a stand-alone server or a server cluster formed by a plurality of servers.
Example 1
Fig. 2 shows an implementation flow of an automatic reply method according to an embodiment of the present invention, and is described in detail below by taking an application of the method to the client in fig. 1 as an example:
in step S110, a keyboard start request entered by a user at a session interface is obtained;
in the embodiment of the invention, the keyboard start request can be input by clicking the input box by the user, or can be input by other modes, for example, can be input by sliding the input box, etc., and the invention is not limited in particular.
Wherein the keyboard may be a soft keyboard.
In step S120, according to the keyboard start request, intercepting a last message received in the session interface to generate a first screenshot;
in the embodiment of the invention, when a user starts a keyboard on a session interface, a screen capture is carried out on the last message in the session interface, the screen capture can be put into a keyboard program, and when the keyboard is started, the screen capture is carried out on the last message in the session interface, and the last message can be a bubble message.
In an embodiment of the present invention, intercepting the last message in the session interface includes:
determining a starting position and an ending position of the last message;
And intercepting the last message according to the starting position and the ending position.
Specifically, according to the communication information in the session interface, determining the last message, establishing a coordinate system in the session interface, determining the starting position and the ending position of the last message according to the coordinate position of the starting character and the position of the ending character of the last message, and completely intercepting the last message according to the starting position and the ending position. For example, a coordinate system can be established for a message frame in which the last message is located, the height of the head portrait is 65dp, the width of the head portrait is 50dp, the head portrait is started at 60dp, the head portrait is crossed to start cutting from the message frame, the cutting range of the head portrait is 60dp-80dp, the cutting range of the head portrait is 0dp-50dp, the cutting range of the last message is needed to ensure that the content of the cut message is complete, and the cutting range can be flexibly configured according to the content size of the message.
In an embodiment of the present invention, determining the start position and the end position of the last received message includes:
determining an ordinate ending value of the last message according to the conversation interface height, the keyboard height and the input box height;
Determining a ordinate starting value of the last received message according to the ordinate ending value and the height of the bubble message frame where the last message is located;
and intercepting the last message according to the starting position and the ending position, wherein the intercepting comprises the following steps:
and intercepting the last message in whole line according to the ordinate ending value and the ordinate starting value.
In the embodiment of the invention, the height of the session interface is obtained, specifically, the height of the session interface can be determined by the terminal sending equipment, different terminal sending equipment and the heights of the session interfaces have partial differences, so that the model of the terminal can be determined firstly, the height of a terminal screen can be determined according to the model of the terminal, and the height of the current session interface of the terminal can be further determined.
Further, when the height of the session interface is obtained, whether the current session interface is displayed completely or not needs to be determined, for example, whether a split screen mode is started or not, whether a single-hand mode is started or not, and the like.
In the embodiment of the invention, the height of the keyboard is usually fixed, and the height of the keyboard can be customized.
In the embodiment of the invention, the height of the input frame is usually a fixed height, when the height of the input frame is determined, whether information to be transmitted exists in the input frame needs to be determined, because the information to be transmitted occupies the editing area of the input frame, the height of the input frame changes, whether the information to be transmitted exists or not needs to be determined, whether the information to be transmitted exceeds a preset line number, such as one line, or not, when the information to be transmitted does not exceed the preset line number, the fixed height is adopted, otherwise, the height of the information to be transmitted needs to be calculated, so that the height of the input frame is finally obtained.
In step S130, when the last message meets a preset condition, the first screenshot is sent to a server, so that the server converts the first screenshot into text information, and obtains reply information corresponding to the text information;
in the embodiment of the present invention, the preset condition may be whether the last message is the information sent by the message sending end, that is, whether the last message is the received message, if the last message is sent by the home terminal user, automatic reply is not needed, and only the received message needs to be replied.
In an embodiment of the present invention, the preset condition may further include whether a user input reply message is received within a preset time, and when the user input reply message is not received within the preset time, the first screenshot is sent to the server, and by judging whether the user inputs the reply message within the preset time, whether the user has time or whether the user has his own willingness to reply can be determined, so that automatic reply and user reply are avoided to occur at the same time, and the reply message is disordered.
The preset time may be a specific time, and may be, for example, 5 seconds or 10 seconds.
In the embodiment of the invention, when the last message accords with the preset condition, the first screenshot is sent to the server, and after the server acquires the first screenshot, characters in the first screenshot can be identified by character identification modes such as OCR (optical character recognition) and the like and converted into complete character information.
The server may be implemented as a stand-alone server or as a server cluster composed of a plurality of servers.
In an embodiment of the present invention, when the last message meets a preset condition, sending the first screenshot to a server includes:
Determining a pixel color value of a color region of the first screenshot;
judging whether the pixel color value is a chat bubble color value of a conversation object;
and if the judgment result is yes, the first screenshot is sent to the server.
In the embodiment of the invention, for the color area of the first screenshot, namely, the non-text area in the first screenshot, by extracting the pixel color value of the color area of the first screenshot and judging whether the pixel color value is the chat bubble message color value corresponding to the conversation, specifically, the specific color value can be determined through a hexadecimal color code comparison table, and whether the color value is the chat bubble message color value corresponding to the conversation is determined, if yes, the last message is sent by the message sending end, if yes, the reply is needed, and the first screenshot is sent to the server. For example, if the pixel color value is #ffeff, the background of the white bubble is determined through the hexadecimal color code comparison table, and if the chat bubble message color value corresponding to the session is white, the first screenshot is sent to the server.
In the embodiment of the invention, after the complete text information is obtained, the corresponding answer phone operation can be obtained by analyzing and matching the content of the obtained text information through a text matching model, such as a Bert (Bidirectional Encoder Representations from Transformers) model.
In an embodiment of the present invention, the keyword of the acquired text information may be extracted. For example, the content of the text information is "what is the date of production of the a product? The extracted keywords can be the product A and the production date, and the production date of the product A can be automatically matched and sent to the terminal.
In step S140, the reply message sent by the server is received, and the reply message is sent to the session interface.
In the embodiment of the invention, after receiving the reply information sent by the server, the reply information can be directly sent to the session interface so as to reply the session object in time, and for some scenes needing a large amount of communication, such as customer service, the reply efficiency can be greatly improved without waiting by a user, and the user experience is improved.
In an embodiment of the present invention, after receiving the reply message sent by the server, the accuracy of the content of the reply message may be further detected, for example, the reply message may be sent to the message input box, and sent after waiting for confirmation by the user, or the reply message content may be matched with the last message content to determine whether there is a correlation, for example, the last message content is "several o' clock face", but the reply message is found in the coffee shop, and indicates that two messages are not correlated, one is time and one is place, and at this time, the user needs to be prompted to avoid occurrence of understanding errors.
The invention provides an automatic reply method, which comprises the following steps: acquiring a keyboard starting request input by a user on a session interface; intercepting the last message in the session interface according to the keyboard starting request to generate a first screenshot; when the last message accords with a preset condition, the first screenshot is sent to a server, so that the server converts the first screenshot into text information and acquires reply information corresponding to the text information; and receiving the reply information sent by the server and sending the reply information to the session interface. In the scheme, the automatic reply program is associated with the keyboard of the conversation interface, when the keyboard is started, the automatic reply program takes effect, and the effective automatic reply program can analyze the message content through the server to determine the corresponding reply content and send the reply content to the communication object, so that the communication object message can be replied in time, the user experience is improved, the use of external hanging or code embedding/writing of communication software is not needed, illegal operation is avoided, and the number sealing risk is reduced.
Example two
Fig. 3 shows a flow of implementation of an automatic reply method according to an embodiment of the present invention, which is similar to the first embodiment, and is different in that after intercepting a last message in the session interface according to the keyboard start request to generate a first screenshot, the method includes:
In step S210, when the session interface changes, intercepting a last message in the current session interface to generate a second screenshot;
in the embodiment of the invention, after the first screenshot is intercepted, the first screenshot can be firstly cached, the screen is intercepted circularly within the preset time, the first screenshot and the previous intercepted pictures are compared in sequence, when the comparison result is inconsistent, the conversation interface is indicated to send change, and at the moment, the last message in the current conversation interface is intercepted again, so that the second screenshot is generated.
In step S220, a first pixel value of the first screenshot and a second pixel value of the second screenshot are respectively obtained;
in the embodiment of the invention, the first screenshot and the second screenshot can be respectively subjected to graying and binarizing processing to extract the corresponding pixel point information, wherein the pixel point information comprises a first pixel value corresponding to the first screenshot and a second pixel value corresponding to the second screenshot, and the first pixel value and the second pixel value can be RGBA pixel values.
In step S230, the first pixel value and the second pixel value are compared to determine a similarity between the first screenshot and the second screenshot;
in the embodiment of the invention, the first pixel value is compared with the second pixel value, namely, the first RGBA pixel value of the first pixel value is compared with the second RGBA pixel value of the second pixel value, so as to determine the similarity between the first screenshot and the second screenshot.
In an embodiment of the present invention, the average value of each row of pixels of the picture may be calculated in turn, each average value corresponds to a row of features, and the variance of all average values is calculated, where the variance represents the feature value of the image, and the similarity between the first screenshot and the second screenshot may be determined according to the proximity degree between the feature values.
In step S240, when the similarity between the first screenshot and the second screenshot is lower than a preset similarity threshold, the second screenshot is sent to the server, so that the server converts the first screenshot into text information, and obtains reply information corresponding to the text information.
In an embodiment of the present invention, when the similarity between the first screenshot and the second screenshot is lower than a preset similarity threshold, for example, 90%, it indicates that the first screenshot is dissimilar to the second screenshot, that is, the message intercepted by the first screenshot is not the last message, so that the message intercepted by the second screenshot is sent to the server as the last message.
In an embodiment of the present invention, when the similarity between the first screenshot and the second screenshot is lower than a preset similarity threshold, it is determined whether the message contents intercepted by the first screenshot and the second screenshot are both continuously sent by the message sender, if yes, both the first screenshot and the second screenshot are sent to the server to confirm the reply information, so that the situation that only the last problem is solved if the user continuously sends a plurality of problems can be avoided.
Further, the first screenshot and the second screenshot can be time-stamped, namely, the sequence of the messages is determined, and when the information is replied, the messages are sequentially replied according to the time-stamped, so that the problem that the replied information does not correspond to the received information is avoided.
In the embodiment of the invention, when the session interface is changed, the last message is captured again, so that the problem that the content of the reply is inconsistent with the received content due to the fact that the last message is not captured is avoided, the accuracy of the reply information is improved, the reply content which corresponds to the session and is unconsciously is avoided, and the user experience can be improved.
Example III
Fig. 4 shows a structure of an automatic reply device according to an embodiment of the present invention, where the automatic reply device corresponds to the automatic reply method in the above embodiment one by one. As shown in fig. 4, the automatic reply device includes a keyboard start request acquisition unit 10, a first screenshot generation unit 20, a first screenshot transmission unit 30, and a reply information acquisition unit 40. The components are described in detail as follows:
a keyboard start request acquiring unit 10, configured to acquire a keyboard start request entered by a user at a session interface;
in the embodiment of the invention, the keyboard start request can be input by clicking the input box by the user, or can be input by other modes, for example, can be input by sliding the input box, etc., and the invention is not limited in particular.
Wherein the keyboard may be a soft keyboard.
The first screenshot generating unit 20 is configured to intercept a last message received in the session interface according to the keyboard start request, so as to generate a first screenshot;
in the embodiment of the invention, when a user starts a keyboard on a session interface, a screen capture is carried out on the last message in the session interface, the screen capture can be put into a keyboard program, and when the keyboard is started, the screen capture is carried out on the last message in the session interface, and the last message can be a bubble message.
In an embodiment of the present invention, the first screenshot generating unit 20 is further configured to:
determining a starting position and an ending position of the last message;
and intercepting the last message according to the starting position and the ending position.
Specifically, according to the communication information in the session interface, determining the last message, establishing a coordinate system in the session interface, determining the starting position and the ending position of the last message according to the coordinate position of the starting character and the position of the ending character of the last message, and completely intercepting the last message according to the starting position and the ending position. For example, a coordinate system can be established for a message frame in which the last message is located, the height of the head portrait is 65dp, the width of the head portrait is 50dp, the head portrait is started at 60dp, the head portrait is crossed to start cutting from the message frame, the cutting range of the head portrait is 60dp-80dp, the cutting range of the head portrait is 0dp-50dp, the cutting range of the last message is needed to ensure that the content of the cut message is complete, and the cutting range can be flexibly configured according to the content size of the message.
In an embodiment of the present invention, the first screenshot generating unit 20 is further configured to:
determining an ordinate ending value of the last message according to the conversation interface height, the keyboard height and the input box height;
determining a ordinate starting value of the last received message according to the ordinate ending value and the height of the bubble message frame where the last message is located;
and intercepting the last message according to the starting position and the ending position, wherein the intercepting comprises the following steps:
and intercepting the last message in whole line according to the ordinate ending value and the ordinate starting value.
In the embodiment of the invention, the height of the session interface is obtained, specifically, the height of the session interface can be determined by the terminal sending equipment, different terminal sending equipment and the heights of the session interfaces have partial differences, so that the model of the terminal can be determined firstly, the height of a terminal screen can be determined according to the model of the terminal, and the height of the current session interface of the terminal can be further determined.
Further, when the height of the session interface is obtained, whether the current session interface is displayed completely or not needs to be determined, for example, whether a split screen mode is started or not, whether a single-hand mode is started or not, and the like.
In the embodiment of the invention, the height of the keyboard is usually fixed, and the height of the keyboard can be customized.
In the embodiment of the invention, the height of the input frame is usually a fixed height, when the height of the input frame is determined, whether information to be transmitted exists in the input frame needs to be determined, because the information to be transmitted occupies the editing area of the input frame, the height of the input frame changes, whether the information to be transmitted exists or not needs to be determined, whether the information to be transmitted exceeds a preset line number, such as one line, or not, when the information to be transmitted does not exceed the preset line number, the fixed height is adopted, otherwise, the height of the information to be transmitted needs to be calculated, so that the height of the input frame is finally obtained.
The first screenshot sending unit 30 is configured to send the first screenshot to a server when the last message meets a preset condition, so that the server converts the first screenshot into text information, and obtains reply information corresponding to the text information;
in the embodiment of the present invention, the preset condition may be whether the last message is the information sent by the message sending end, that is, whether the last message is the received message, if the last message is sent by the home terminal user, automatic reply is not needed, and only the received message needs to be replied.
In an embodiment of the present invention, the preset condition may further include whether a user input reply message is received within a preset time, and when the user input reply message is not received within the preset time, the first screenshot is sent to the server, and by judging whether the user inputs the reply message within the preset time, whether the user has time or whether the user has his own willingness to reply can be determined, so that automatic reply and user reply are avoided to occur at the same time, and the reply message is disordered.
The preset time may be a specific time, and may be, for example, 5 seconds or 10 seconds.
In the embodiment of the invention, when the last message accords with the preset condition, the first screenshot is sent to the server, and after the server acquires the first screenshot, characters in the first screenshot can be identified by character identification modes such as OCR (optical character recognition) and the like and converted into complete character information.
The server may be implemented as a stand-alone server or as a server cluster composed of a plurality of servers.
In an embodiment of the present invention, the first screenshot sending unit 30 is further configured to:
determining a pixel color value of a color region of the first screenshot;
Judging whether the pixel color value is a chat bubble color value of a conversation object;
and if the judgment result is yes, the first screenshot is sent to the server.
In the embodiment of the invention, for the color area of the first screenshot, namely, the non-text area in the first screenshot, by extracting the pixel color value of the color area of the first screenshot and judging whether the pixel color value is the chat bubble message color value corresponding to the conversation, specifically, the specific color value can be determined through a hexadecimal color code comparison table, and whether the color value is the chat bubble message color value corresponding to the conversation is determined, if yes, the last message is sent by the message sending end, if yes, the reply is needed, and the first screenshot is sent to the server. For example, if the pixel color value is #ffeff, the background of the white bubble is determined through the hexadecimal color code comparison table, and if the chat bubble message color value corresponding to the session is white, the first screenshot is sent to the server.
In the embodiment of the invention, after the complete text information is obtained, the corresponding answer phone operation can be obtained by analyzing and matching the content of the obtained text information through a text matching model, such as a Bert (Bidirectional Encoder Representations from Transformers) model.
In an embodiment of the present invention, the keyword of the acquired text information may be extracted. For example, the content of the text information is "what is the date of production of the a product? The extracted keywords can be the product A and the production date, and the production date of the product A can be automatically matched and sent to the terminal.
And a reply information obtaining unit 40, configured to receive the reply information sent by the server, and send the reply information to the session interface.
In the embodiment of the invention, after receiving the reply information sent by the server, the reply information can be directly sent to the session interface so as to reply the session object in time, and for some scenes needing a large amount of communication, such as customer service, the reply efficiency can be greatly improved without waiting by a user, and the user experience is improved.
In an embodiment of the present invention, after receiving the reply message sent by the server, the accuracy of the content of the reply message may be further detected, for example, the reply message may be sent to the message input box, and sent after waiting for confirmation by the user, or the reply message content may be matched with the last message content to determine whether there is a correlation, for example, the last message content is "several o' clock face", but the reply message is found in the coffee shop, and indicates that two messages are not correlated, one is time and one is place, and at this time, the user needs to be prompted to avoid occurrence of understanding errors.
The invention provides an automatic replying device, which is characterized in that an automatic replying program is mutually related to a keyboard of a conversation interface, when the keyboard is started, the automatic replying program takes effect, and the effective automatic replying program analyzes message contents through a server to determine corresponding replying contents and sends the corresponding replying contents to a communication object, so that the message of the communication object can be replied in time, the user experience is improved, and no external hanging or code embedding/modifying communication software is needed, thereby avoiding illegal operation and reducing the number sealing risk.
Example IV
Fig. 5 shows a structure of an automatic restoring apparatus according to an embodiment of the present invention, which is similar to the embodiment, and is different in that the apparatus further includes: the second screenshot generating unit 50, the pixel value acquiring unit 60, the comparing unit 70, and the second screenshot transmitting unit 80 are described in detail as follows:
the second screenshot generating unit 50 is configured to intercept a last message received in the current session interface to generate a second screenshot when the session interface changes;
in the embodiment of the invention, after the first screenshot is intercepted, the first screenshot can be firstly cached, the screen is intercepted circularly within the preset time, the first screenshot and the previous intercepted pictures are compared in sequence, when the comparison result is inconsistent, the conversation interface is indicated to send change, and at the moment, the last message in the current conversation interface is intercepted again, so that the second screenshot is generated.
A pixel value obtaining unit 60, configured to obtain a first pixel value of the first screenshot and a second pixel value of the second screenshot respectively;
in the embodiment of the invention, the first screenshot and the second screenshot can be respectively subjected to graying and binarizing processing to extract the corresponding pixel point information, wherein the pixel point information comprises a first pixel value corresponding to the first screenshot and a second pixel value corresponding to the second screenshot, and the first pixel value and the second pixel value can be RGBA pixel values.
A comparison unit 70, configured to compare the first pixel value with the second pixel value to determine a similarity between the first screenshot and the second screenshot;
in the embodiment of the invention, the first pixel value is compared with the second pixel value, namely, the first RGBA pixel value of the first pixel value is compared with the second RGBA pixel value of the second pixel value, so as to determine the similarity between the first screenshot and the second screenshot.
In an embodiment of the present invention, the average value of each row of pixels of the picture may be calculated in turn, each average value corresponds to a row of features, and the variance of all average values is calculated, where the variance represents the feature value of the image, and the similarity between the first screenshot and the second screenshot may be determined according to the proximity degree between the feature values.
And a second screenshot sending unit 80, configured to send the second screenshot to the server when the similarity between the first screenshot and the second screenshot is lower than a preset similarity threshold.
In an embodiment of the present invention, when the similarity between the first screenshot and the second screenshot is lower than a preset similarity threshold, for example, 90%, it indicates that the first screenshot is dissimilar to the second screenshot, that is, the message intercepted by the first screenshot is not the last message, so that the message intercepted by the second screenshot is sent to the server as the last message.
In an embodiment of the present invention, when the similarity between the first screenshot and the second screenshot is lower than a preset similarity threshold, it is determined whether the message contents intercepted by the first screenshot and the second screenshot are both continuously sent by the message sender, if yes, both the first screenshot and the second screenshot are sent to the server to confirm the reply information, so that the situation that only the last problem is solved if the user continuously sends a plurality of problems can be avoided.
Further, the first screenshot and the second screenshot can be time-stamped, namely, the sequence of the messages is determined, and when the information is replied, the messages are sequentially replied according to the time-stamped, so that the problem that the replied information does not correspond to the received information is avoided.
In the embodiment of the invention, when the session interface is changed, the last message is captured again, so that the problem that the content of the reply is inconsistent with the received content due to the fact that the last message is not captured is avoided, the accuracy of the reply information is improved, the reply content which corresponds to the session and is unconsciously is avoided, and the user experience can be improved.
In the invention, the automatic reply program is associated with the keyboard of the conversation interface, when the keyboard is started, the automatic reply program takes effect, and the effective automatic reply program analyzes the message content through the server to determine the corresponding reply content and sends the reply content to the communication object, so that the message of the communication object can be replied in time, the user experience is improved, and no external hanging or code embedding/writing-modifying communication software is needed, thereby avoiding illegal operation and reducing the number sealing risk.
In one embodiment, a computer device is provided, the internal structure of which may be as shown in FIG. 6. The control device comprises a processor and a memory which are connected through a system bus. Wherein the processor of the control device is adapted to provide computing and control capabilities. The memory of the control device includes a readable storage medium. The readable storage medium stores computer readable instructions. The network interface of the control device is used for communicating with an external server through a network connection. The computer readable instructions when executed by a processor implement an auto-reply method. The readable storage medium provided by the present embodiment includes a nonvolatile readable storage medium and a volatile readable storage medium.
There is provided a computer device comprising a memory, a processor and computer readable instructions stored in the memory and executable on the processor, the processor executing the steps of the auto-recovery method described above.
There is provided a readable storage medium storing computer readable instructions which, when executed by a processor, implement the steps of the auto-recovery method described above.
Those skilled in the art will appreciate that implementing all or part of the above described embodiment methods may be accomplished by instructing the associated hardware by computer readable instructions, which may be stored on a non-volatile readable storage medium or a volatile readable storage medium, which when executed may comprise the above described embodiment methods. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.

Claims (5)

1. An automatic reply method, applied to a mobile terminal, comprising:
acquiring a keyboard starting request input by a user on a session interface;
intercepting the last message in the session interface according to the keyboard starting request to generate a first screenshot;
when the last message accords with a preset condition, the first screenshot is sent to a server, so that the server converts the first screenshot into text information and acquires reply information corresponding to the text information;
Receiving the reply information sent by the server and sending the reply information to the session interface;
intercepting the last message in the session interface according to the keyboard starting request to generate a first screenshot, wherein the method comprises the following steps:
when the session interface changes, intercepting the last message received in the current session interface to generate a second screenshot;
respectively acquiring a first pixel value of the first screenshot and a second pixel value of the second screenshot;
comparing the first pixel value with the second pixel value to determine the similarity between the first screenshot and the second screenshot;
the sending the first screenshot to a server, so that the server converts the first screenshot into text information, and obtains reply information corresponding to the text information, including:
when the similarity between the first screenshot and the second screenshot is lower than a preset similarity threshold, determining whether the message contents intercepted by the first screenshot and the second screenshot are continuously transmitted by a message transmitting end, and if so, transmitting the first screenshot and the second screenshot to a server so that the server converts the first screenshot and the second screenshot into text information respectively and acquires reply information corresponding to the text information of the first screenshot and the second screenshot respectively;
Wherein the intercepting the last message in the session interface includes:
determining a starting position and an ending position of the last message;
intercepting the last message according to the starting position and the ending position;
wherein determining the starting position and the ending position of the last received message comprises:
determining an ordinate ending value of the last message according to the conversation interface height, the keyboard height and the input box height;
determining a ordinate starting value of the last received message according to the ordinate ending value and the height of the bubble message frame where the last message is located;
and intercepting the last message according to the starting position and the ending position, wherein the intercepting comprises the following steps:
and intercepting the last message in whole line according to the ordinate ending value and the ordinate starting value.
2. The automatic reply method according to claim 1, wherein the sending the first screenshot to the server when the last message meets a preset condition includes:
determining a pixel color value of a color region of the first screenshot;
judging whether the pixel color value is a chat bubble color value of a conversation object;
And if the judgment result is yes, the first screenshot is sent to the server.
3. An automatic return device, the device comprising:
the keyboard starting request acquisition unit is used for acquiring a keyboard starting request input by a user on a session interface;
the first screenshot generating unit is used for intercepting the last message received in the session interface according to the keyboard starting request so as to generate a first screenshot;
the first screenshot sending unit is used for sending the first screenshot to a server when the last message accords with a preset condition, so that the server converts the first screenshot into text information and acquires reply information corresponding to the text information;
the reply information acquisition unit is used for receiving the reply information sent by the server and sending the reply information to the session interface;
the apparatus further comprises:
the second screenshot generating unit is used for intercepting the last message received in the current session interface when the session interface is changed so as to generate a second screenshot;
a pixel value obtaining unit, configured to obtain a first pixel value of the first screenshot and a second pixel value of the second screenshot respectively;
The comparison unit is used for comparing the first pixel value with the second pixel value to determine the similarity between the first screenshot and the second screenshot;
the second screenshot sending unit is used for determining whether the message contents intercepted by the first screenshot and the second screenshot are continuously sent by a message sending end when the similarity between the first screenshot and the second screenshot is lower than a preset similarity threshold value, and if so, sending the first screenshot and the second screenshot to a server so that the server respectively converts the first screenshot and the second screenshot into text information and respectively acquires reply information corresponding to the text information of the first screenshot and the second screenshot;
wherein the intercepting the last message in the session interface includes:
determining a starting position and an ending position of the last message;
intercepting the last message according to the starting position and the ending position;
wherein determining the starting position and the ending position of the last received message comprises:
determining an ordinate ending value of the last message according to the conversation interface height, the keyboard height and the input box height;
Determining a ordinate starting value of the last received message according to the ordinate ending value and the height of the bubble message frame where the last message is located;
and intercepting the last message according to the starting position and the ending position, wherein the intercepting comprises the following steps:
and intercepting the last message in whole line according to the ordinate ending value and the ordinate starting value.
4. A computer device comprising a memory, a processor and computer readable instructions stored in the memory and executable on the processor, wherein the processor, when executing the computer readable instructions, implements the steps of the auto-recovery method according to any one of claims 1 to 2.
5. A readable storage medium storing computer readable instructions which, when executed by a processor, implement the steps of the auto-recovery method of any one of claims 1 to 2.
CN202111078834.0A 2021-09-15 2021-09-15 Automatic reply method, device, computer equipment and readable storage medium Active CN113905001B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111078834.0A CN113905001B (en) 2021-09-15 2021-09-15 Automatic reply method, device, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111078834.0A CN113905001B (en) 2021-09-15 2021-09-15 Automatic reply method, device, computer equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN113905001A CN113905001A (en) 2022-01-07
CN113905001B true CN113905001B (en) 2023-06-06

Family

ID=79028508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111078834.0A Active CN113905001B (en) 2021-09-15 2021-09-15 Automatic reply method, device, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113905001B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114373186A (en) * 2022-01-11 2022-04-19 北京新学堂网络科技有限公司 Social software information interaction method, device and medium
CN115022268B (en) * 2022-06-24 2023-05-12 深圳市六度人和科技有限公司 Session identification method and device, readable storage medium and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8521823B1 (en) * 2009-09-04 2013-08-27 Google Inc. System and method for targeting information based on message content in a reply
WO2017125051A1 (en) * 2016-01-21 2017-07-27 腾讯科技(深圳)有限公司 Message sending method and device, computer terminal and storage medium
CN111666940A (en) * 2020-06-05 2020-09-15 厦门美图之家科技有限公司 Chat screenshot content processing method and device, electronic equipment and readable storage medium
CN112737922A (en) * 2020-12-23 2021-04-30 江苏苏宁云计算有限公司 Communication method, communication device, computer equipment and storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090006557A1 (en) * 2007-06-27 2009-01-01 Florkey Cynthia K Remote programming of an automatic reply feature in an email account
US9448908B2 (en) * 2012-09-10 2016-09-20 Applitools Ltd. System and method for model based session management
TWI510915B (en) * 2014-05-28 2015-12-01 Univ Nat Central Computer automated test system and test methods, recording media and program products
CN109032726A (en) * 2018-06-29 2018-12-18 北京明朝万达科技股份有限公司 The acquisition methods and device of chat message
CN109831572A (en) * 2018-12-14 2019-05-31 深圳壹账通智能科技有限公司 Chat picture control method, device, computer equipment and storage medium
WO2020124453A1 (en) * 2018-12-19 2020-06-25 深圳市欢太科技有限公司 Automatic information reply method and related apparatus
CN110784393A (en) * 2019-10-25 2020-02-11 上海连尚网络科技有限公司 Automatic message reply method and device
CN111324713B (en) * 2020-02-18 2022-03-04 腾讯科技(深圳)有限公司 Automatic replying method and device for conversation, storage medium and computer equipment
CN113343769A (en) * 2021-05-11 2021-09-03 广州市申迪计算机系统有限公司 Method and device for automatically receiving text messages

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8521823B1 (en) * 2009-09-04 2013-08-27 Google Inc. System and method for targeting information based on message content in a reply
WO2017125051A1 (en) * 2016-01-21 2017-07-27 腾讯科技(深圳)有限公司 Message sending method and device, computer terminal and storage medium
CN111666940A (en) * 2020-06-05 2020-09-15 厦门美图之家科技有限公司 Chat screenshot content processing method and device, electronic equipment and readable storage medium
CN112737922A (en) * 2020-12-23 2021-04-30 江苏苏宁云计算有限公司 Communication method, communication device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
U. Pavithra ; Sneha M.R. ; Sagar Srivatsa S.R. ; Ravichandra T. ; V.M. Aparanji.OCR System for Automating Answer Script Marks using Auto Resonance Network.《2019 International Conference on Communication and Signal Processing (ICCSP)》.2019,全文. *
移动智能终端应用程序信息分析技术研究及实现;黄威;《WFCD》;全文 *

Also Published As

Publication number Publication date
CN113905001A (en) 2022-01-07

Similar Documents

Publication Publication Date Title
CN113905001B (en) Automatic reply method, device, computer equipment and readable storage medium
EP2814212B1 (en) Method and apparatus for adding friend, and storage medium
US10834031B2 (en) Information exchange method, client, and apparatus
US9317736B1 (en) Individual record verification based on features
WO2021012382A1 (en) Method and apparatus for configuring chat robot, computer device and storage medium
CN101427262A (en) Method and apparatus for providing user profiling based on facial recognition
CN109085950B (en) Multi-screen interaction method and device based on electronic whiteboard and electronic whiteboard
CN106982307B (en) Data transmission method and data transmission device
CN104021398A (en) Wearable intelligent device and method for assisting identity recognition
WO2019144756A1 (en) Method and system for processing verification short message
CN113688658A (en) Object identification method, device, equipment and medium
US9113002B2 (en) Method and system for automatically capturing an object using a mobile terminal
US11252135B2 (en) Method of processing data
CN112866577B (en) Image processing method and device, computer readable medium and electronic equipment
CN113449829A (en) Data transmission method based on optical character recognition technology and related device
JP2019128690A (en) Handwritten character recognition system
US20160315886A1 (en) Network information push method, apparatus and system based on instant messaging
CN106055693B (en) Information processing method and terminal
US20060257003A1 (en) Method for the automatic identification of entities in a digital image
CN110661693A (en) Methods, computing device-readable storage media, and computing devices facilitating media-based content sharing performed in a computing device
CN113961377A (en) Cross-application service method and device, electronic equipment and storage medium
CN112487164A (en) Artificial intelligence interaction method
CN112307527A (en) Data transmission method and structure
CN112597529A (en) Multimedia content processing method and device, storage medium and electronic equipment
US20240114343A1 (en) Method for sharing data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant