Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention. On the contrary, the embodiments of the invention include all changes, modifications and equivalents coming within the spirit and terms of the claims appended hereto.
Fig. 1 is a flowchart illustrating an instant messaging interaction method according to an embodiment of the present invention.
The instant messaging interaction method is exemplified in the embodiment as being configured in an instant messaging interaction device.
The instant messaging interaction method in this embodiment may be configured in an instant messaging interaction device, and the instant messaging interaction device may be disposed in a server, or may also be disposed in an electronic device, which is not limited in this disclosure.
The instant messaging interaction method is configured in the electronic device as an example in the embodiment.
It should be noted that the execution subject of the embodiment of the present disclosure may be, for example, a Central Processing Unit (CPU) in a server or an electronic device in terms of hardware, and may be, for example, a related background service in the server or the electronic device in terms of software, which is not limited to this.
Referring to fig. 1, the method includes:
the execution main body of the embodiment of the invention can be electronic equipment with a communication function.
S101: when content entered by a first session member is received in the talk group, the attributes of the first session member are determined.
In the specific execution process of the embodiment of the invention, the content can be input by the user at the terminal side, the terminal is in communication connection with the electronic equipment with the communication function in advance, the terminal of the user sends the content to the electronic equipment with the communication function for displaying, and when the electronic equipment with the communication function receives the content, the account information of the first session member is read, the account information is analyzed and processed, and the attribute of the first session member is determined.
The attribute may be used to identify the identity of the first session member, such as, but not limited to, a consumer user, an administrator user.
In the specific implementation process of the embodiment of the present invention, in order to further improve the interaction efficiency, it may be further identified whether the input content is selected by a preset mark (e.g., a @ mark), and it may be understood that, if the input content is selected by the preset mark, it can be shown that the first session member currently at the terminal side has a stronger intention to obtain the response, and therefore, the attribute of the first session member can be directly analyzed, if the content is not marked, the willingness to acquire the response is weaker than that marked, and at the moment, whether the input content is the directed message or not can be triggered and judged, if yes, the attribute of the first session member is directly analyzed, and if not, it is determined whether the session group in which the first session member is located is an exclusive session group (the exclusive session group may be obtained by, for example, grouping the first session member in advance for an electronic device with a communication function).
In the embodiment of the present invention, if an exclusive session group is established for a first session member, the importance of the first session member may be indicated), if the first session member is in the exclusive session group, the attribute of the first session member is directly analyzed, and if the first session member is not in the exclusive session group, the input content is ignored, so that the interaction efficiency is ensured, and simultaneously, the hardware resources consumed by the interaction are effectively reduced.
S102: and when the attribute of the first conversation member is the first attribute, judging whether a target reply can be matched from the preset module according to the content, wherein the first attribute indicates that the first conversation member is the user.
In the embodiment of the invention, in order to effectively improve the interaction effect between the user and the attendant and reduce the waiting time of the user as much as possible, when the attribute of the first conversation member is the first attribute, that is, when the first conversation member is indicated as the user, whether a target response can be matched from the preset module according to the content is immediately judged, wherein the response matched with the content can be called the target response.
The preset module is preset and stores possible answers corresponding to various contents.
S103: if not, sending the directional message to the second conversation member.
The second session member may be, for example, a person on duty.
Optionally, in some embodiments, referring to fig. 2, sending the directed message to the second session member includes:
s201: and judging whether the message input by the second conversation member is received within a first time threshold before the time node of the current input content.
S202: if not, sending the directional message to the second conversation member.
S203: and if the message input by the second session member is received within a first time threshold before the time node of the current input content, starting a timer to time to obtain the timing time.
S204: and when the timing time reaches a second time threshold, sending the directional message to the second conversation member.
The first time threshold and the second time threshold may be preset, and may be set by a user according to an actual use requirement, or may be set by a factory program of the electronic device, which is not limited to this.
The first time threshold and the second time threshold may be, for example, 2 minutes.
In the embodiment of the invention, whether the directed message is necessary to be sent to the second conversation member immediately at present is determined by judging whether the message input by the second conversation member is received within a first time threshold before the time node of the current input content.
It can be understood that if the message input by the second session member is received within the first time threshold before the time node of the current input content, this indicates that the second session member may be in an online state, so a timer may be started to time to obtain the time to be timed, when the time reaches the second time threshold, the directional message is sent to the second session member, and if the message is not received, the directional message is triggered to be directly sent to the second session member.
In the embodiment of the invention, in order to ensure the integrity of the execution of the method and improve the automation of the instant messaging interactive processing, whether the second conversation member is in the exclusive conversation group can be judged; and if the account number is not in the exclusive conversation group, adding the account number of the second conversation member into the exclusive conversation group, and after the account number is added, sending a directional message to the second conversation member.
In the specific execution process, in order to effectively improve the automation of the instant messaging interactive processing, improve the interactive processing efficiency and improve the working efficiency of customer service personnel, when the analysis attribute is a second attribute, whether the content is the same as the preset instruction is judged, the second attribute indicates that the first conversation member is an administrator, and if the content is the same as the preset instruction, the operation corresponding to the preset instruction is directly executed.
The preset instruction can be, for example, a work order cutting.
In the embodiment of the invention, aiming at the various expressions, if the target response cannot be matched from the preset module according to the content, the user can directly reply that 'I does not know and asks people on duty to answer your question', a more humanized response can be given to the first conversation member, and the user experience degree is improved.
As an example, every time the electronic device receives a piece of content, if the content comes from an administrator, a value is set to chat _ id in redis, and value is the key-value pair of the current time. If the content comes from the user, using the delay task function of the celery, executing a task a (chat _ id) after two minutes, wherein the task a is executed according to the following flow: if key value pairs (chat _ id, time) with keys of chat _ id can be taken out from the redis, judging whether the time node minus 120 seconds of the current input content is greater than the time after the key value pairs (chat _ id, time) are taken out, and if so, indicating that the second session member does not reply to the user for more than two minutes, and needing to take out the second session member from the group; if the answer is less than the first answer, the second conversation member replies the content and does not need to process the content.
In this embodiment, when receiving the content input by the first session member in the session group, the attribute of the first session member is determined, and when the attribute of the first session member is the first attribute, it is determined whether a target reply can be matched from the preset module according to the content, where the first attribute indicates that the first session member is a user, and if not, a directional message is sent to the second session member, so that an interaction effect of instant messaging can be effectively improved.
Fig. 3 is a schematic structural diagram of an instant messaging interaction device according to an embodiment of the present invention.
Referring to fig. 3, the apparatus 300 includes:
a first determining module 301, configured to determine an attribute of a first session member when receiving content input by the first session member in a session group;
a second judging module 302, configured to, when the attribute of the first session member is a first attribute, judge whether a target response can be matched from the preset module according to the content, where the first attribute indicates that the first session member is a user;
a sending module 303, configured to send the directed message to the second session member.
Optionally, in some embodiments, the first determining module 301 is specifically configured to:
judging whether the input content is a directional message;
if yes, analyzing the attribute of the first session member;
if not, judging whether the session group where the first session member is located is an exclusive session group;
if the session group is the exclusive session group, analyzing the attribute of the first session member;
if the conversation group is not exclusive, the input content is ignored.
Optionally, in some embodiments, the sending module 303 is specifically configured to:
judging whether a message input by a second conversation member is received within a first time threshold before a time node of the current input content;
if not, sending the directional message to the second conversation member.
Optionally, in some embodiments, the sending module 303 is specifically configured to:
if the message input by the second conversation member is received within a first time threshold before the time node of the current input content, starting a timer to time to obtain the timing time;
and when the timing time reaches a second time threshold, sending the directional message to the second conversation member.
Optionally, in some embodiments, the sending module 303 is specifically configured to:
judging whether the second session member is in the exclusive session group;
and if the account number is not in the exclusive conversation group, adding the account number of the second conversation member into the exclusive conversation group, and after the account number is added, sending a directional message to the second conversation member.
Alternatively, in some embodiments, see fig. 4, wherein,
the second determining module 302 is further configured to determine whether the content is the same as the preset instruction when the attribute is a second attribute, where the second attribute indicates that the first session member is an administrator;
the execution module 304 is configured to directly execute an operation corresponding to the preset instruction when the content is the same as the preset instruction.
It should be noted that the explanation of the embodiment of the instant messaging interaction method in the foregoing fig. 1-fig. 2 is also applicable to the instant messaging interaction apparatus 300 of the embodiment, and the implementation principle is similar, and is not repeated here.
In this embodiment, when receiving the content input by the first session member in the session group, the attribute of the first session member is determined, and when the attribute of the first session member is the first attribute, it is determined whether a target reply can be matched from the preset module according to the content, where the first attribute indicates that the first session member is a user, and if not, a directional message is sent to the second session member, so that an interaction effect of instant messaging can be effectively improved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. There is shown a schematic block diagram of an electronic device 500 suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like.
The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, electronic device 500 may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the instant messaging interaction method illustrated in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. When executed by the processing device 501, the computer program performs the above-mentioned functions defined in the instant messaging interaction method of the embodiment of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: when receiving the content input by the first conversation member in the conversation group, judging the attribute of the first conversation member; when the attribute of the first conversation member is the first attribute, judging whether a target reply can be matched from the preset module according to the content, wherein the first attribute indicates that the first conversation member is a user; if not, sending the directional message to the second conversation member.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the name of the module does not in some cases constitute a definition of the module itself, for example, the first judging module may also be described as "a module for judging the attribute of the first talk member when receiving the content input by the first talk member in the talk group".
It should be noted that the terms "first," "second," and the like in the description of the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.