Disclosure of Invention
The invention mainly aims to provide a group chat method, a group chat device, intelligent equipment and a storage medium based on distinguishing group owners from group members, and aims to solve the technical problem that the group chat method in the prior art is difficult to meet user requirements in a specific scene.
Based on the above object, the present invention provides a group chat method based on distinguishing group owner and group member, comprising:
establishing a group chat window of a group chat private group according to the input information of the designated user, wherein the group chat private group comprises a group owner and more than one group member;
acquiring a group message sent by the group owner in the group chat window;
judging whether the group message is a message which is received by a designated group member in a single direction;
and if not, acquiring the identity accounts of all group members in the group chat private group, and respectively and independently sending the group messages to the second terminals of the group members according to the identity accounts of the group members so as to display the group messages on the private chat windows of the second terminals, wherein the private chat windows are the private chat windows of the group members and the group owner.
Further, the step of determining whether the group message is a message individually directed to a designated group member for reception includes:
judging whether the group message contains preset format information or not;
if yes, judging whether the preset format information contains the identity account information of the designated group member;
and if so, judging that the group message is a message received by the individual designated group member.
Further, after the step of determining whether the group message is a message individually directed to a designated group member, the method includes:
and if the group message is judged to be the message which is received by singly pointing to the designated group member, acquiring the identity account number of the designated group member, and sending the group message to the second terminal of the designated group member according to the identity account number of the designated group member, so that the group message is displayed in the private chat window of the second terminal of the designated group member.
Further, the step of separately sending the group message to the second terminal of each group member according to the identity account of each group member, so that the group message is displayed in a private chat window of the second terminal includes:
and when a reply message replied by the group member for the group message is received, displaying the reply message in the group chat window.
Further, when a reply message that the group member replies to the group message is received, the step of displaying the reply message in the group chat window comprises:
marking the group message to enable the group message to carry first information;
and when the group message is received through the second terminal, identifying the group message so as to mark the reply message after receiving the reply of the group member to the group message, so that the reply message carries second information corresponding to the first information.
Further, the step of separately sending the group message to the second terminal of each group member according to the identity account of each group member, so that the group message is displayed in a private chat window of the second terminal includes:
receiving an authorization request submitted by the group owner;
and calling a corresponding authorization strategy according to the authorization request, and performing corresponding group chat processing on the group members according to the strategy.
The invention also provides a group chat device based on distinguishing group owner and group member, comprising:
a window establishing unit, configured to establish a group chat window of a group chat private group according to the specified user input information, where constituent members of the group chat private group include a group owner and one or more group members;
an obtaining message unit, configured to obtain a group message sent by the group owner in the group chat window;
a message judging unit, configured to judge whether the group message is a message that is received by a designated group member;
and a message display unit, configured to, when the group message is not a message received by separately pointing to a designated group member, acquire identity accounts of all group members in the group chat private group, and separately send the group message to a second terminal of each group member according to the identity accounts of each group member, so that the group message is displayed in a private chat window of the second terminal, where the private chat window is a private chat window of the group member and the group owner.
Further, the message judging unit includes:
a format judging subunit, configured to judge whether the group message includes preset format information;
the identity judging subunit is used for judging whether the group message contains preset format information or not, and judging whether the preset format information contains the identity account information of the designated group member or not;
and the judging message subunit is used for judging that the group message is a message received by the individual designated group member when the preset format information contains the identity account information of the designated group member.
The invention also provides an intelligent device, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps of the group chat method based on distinguishing the group owner from the group members when executing the computer program.
The present invention also provides a computer readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the above-mentioned steps of the method for group chat based on distinguishing group owners from group members.
The invention has the beneficial effects that: the group owner sends the group message in the group chat window, when each group member receives the group message, the group owner displays the group message in the private chat window, the group members can not be seen or communicated with each other, and the user requirements of the group owner on a chat window and the group members for receiving the specific group chat scene independently are met.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, the group chat method based on distinguishing a group owner from group members in the present embodiment includes:
step S1: establishing a group chat window of a group chat private group according to the input information of the designated user, wherein the group chat private group comprises a group owner and more than one group member;
step S2: acquiring a group message sent by the group owner in the group chat window;
step S3: judging whether the group message is a message which is received by a designated group member in a single direction;
step S4: and if not, acquiring the identity accounts of all group members in the group chat private group, and respectively and independently sending the group messages to the second terminals of the group members according to the identity accounts of the group members so as to display the group messages on the private chat windows of the second terminals, wherein the private chat windows are the private chat windows of the group members and the group owner.
As described in step S1, the group chat method based on distinguishing the group owner from the group members may be applied to a real-time communication system (Instant Messaging, IM for short), in this embodiment, the terminal used by the designated user is named as the first terminal, the input information may be setting information, for example, the designated user clicks a button in the first terminal for setting the group chat private group, and then checks the group members to establish the group chat private group, and records the identity accounts of all the group members, where the account is a unique id for proving the identity of the group member, that is, a group chat window of the group chat private group is established in an application program corresponding to the first terminal, where the group chat private group includes the group owner and one or more group members, and the designated user is the group owner.
As described in the above steps S2-S3, the group message sent by the group owner in the group chat window of the first terminal is obtained, and then it is determined whether the group message is a message that is received by the group owner individually pointing to a designated group member, that is, whether the group message is sent only to the designated member, where the designated member may include a plurality of members, for example, the group member includes member a, member b, member c, and member d, and the designated member may be only member a or member a and member b.
As described in step S4, if it is determined that the group message is not a message received individually by referring to a designated group member, indicating that the message is a message receivable by all group members in the group chat private group, the identity accounts of all group members may be acquired, and then the group message is individually sent to the terminal of the corresponding group member according to the identity account of each group member.
For example, when a bidder sends a notification or a bidding announcement, all bidders want to receive a message, and when a question is answered, the bidders do not want to repeatedly answer the same question one by one, but do not want to make the bidders intercommunicate and know each other, at this time, the bidder can establish a private group of group chat, the group members include a designated user group owner and a plurality of group member bidders, a chat interface of a first terminal of the group owner is a group chat window, when the group owner sends the bidding announcement in the group chat window, a unique id of each bidder is acquired, and then the bidding announcement is sent to a second terminal of the bidder individually according to the unique id, and the second terminal displays the bidding announcement in the private chat window of the bidder and the bidder, so that even if the group owner sends a group message in the group chat window, the group message received by each group member is displayed in the private chat window, the group members are neither visible nor communicable with each other, thereby satisfying the user's needs in a particular group chat scenario.
In one embodiment, the step S3 includes:
step S31: judging whether the group message contains preset format information or not;
step S32: if yes, judging whether the preset format information contains the identity account information of the designated group member;
step S33: and if so, judging that the group message is a message received by the individual designated group member.
In this embodiment, it is determined whether the group message is a message that is received by being directed to a designated group member individually, and the determination may be performed through the group message, specifically, it is first determined whether the group message includes a message in a preset format, for example, a format including @ a certain group member, and when it is determined that the group message includes a message in the preset format, it may be determined whether the information in the preset format includes id information of the designated group member, and if so, it may be determined that the group message is a message that is sent to the designated group member individually, for example, a member a in the @ group member while sending a group message, and at this time, it may be determined that the group message only needs to be sent to the member a individually If only the preset format message is contained and no designated group member obtains the identity account information, the group message can be directly sent to all the group members, or prompt information without a designated sender is popped up so as to facilitate the group owner to resend the message.
In one embodiment, after the step S3, the method further includes:
step S30: and if the group message is judged to be the message which is received by singly pointing to the designated group member, acquiring the identity account number of the designated group member, and sending the group message to the second terminal of the designated group member according to the identity account number of the designated group member, so that the group message is displayed in the private chat window of the second terminal of the designated group member.
In this embodiment, when it is determined that the group message is a message that is received by a single group member, which is capable of acquiring an identity account of the designated group member, that is, the unique id, and then sending the group message to the second terminal of the designated group member according to the unique id, the group message is displayed in a private chat window between the designated group member and the group owner in the second terminal.
In one embodiment, after the step S4, the method further includes:
step S5: and when a reply message replied by the group member for the group message is received, displaying the reply message in the group chat window.
In this embodiment, when a reply message that the group member replies to the group message is received, the reply message is displayed in the group chat window, so that the group owner can chat with all the group members through one group chat window without disturbing the group members; for the information which can be sent in a group, the group owner can directly send the information in the group chat window, the convenience and the trouble are saved, for the pointed information, the independent chat with the group owner can be realized by @ the corresponding group member in the group chat window, and meanwhile, all the group members think that the group owner has private chat with the group owner instead of the group chat.
In one embodiment, before the step S5, the method includes:
step S41: marking the group message to enable the group message to carry first information;
step S42: and when the group message is received through the second terminal, identifying the group message so as to mark the reply message after receiving the reply of the group member to the group message, so that the reply message carries second information corresponding to the first information.
In this embodiment, when acquiring a group message sent by a group owner in a group chat window, marking the group message to enable the group message to carry first information, where the first information includes information of the group owner and a group chat private group, such as an identity account of the group owner and group marking information of the group chat private group; when the second terminal receives the group message, the group message is identified, so that whether the group message carries first information or not is judged, the first information is carried, a corresponding private chat window is established, the group message is displayed in the private chat window, if a group member replies in the private chat window, a reply message is acquired from the private chat window, the reply message is marked according to the first tag message, the reply message carries second information corresponding to the first tag message, the second information can comprise the first information and identity account information of a designated group member, and when the first terminal receives the reply message, the reply message is judged according to the second information to be used for replying the group message, so that the reply message is displayed in the group chat window.
In one embodiment, after the step S4, the method further includes:
step S43: receiving an authorization request submitted by the group owner;
step S45: and calling a corresponding authorization strategy according to the authorization request, and performing corresponding group chat processing on the group members according to the strategy.
In this embodiment, in some other specific scenarios, it may be necessary for an individual group member and a group owner to chat together in a group chat window, for example, in the above example, when a tenderer establishes a group chat private group, considering that the problem of the tenderer is more and an assistant is needed to solve the problem, the group member forming members may include a designated user group owner, a group member assistant, and a plurality of group member tenderers, and at this time, the authorized group member assistant is required to enter the group chat window. For example, authorized member A may see all group messages and messages for each group member, or authorized member A may see messages for the group owner and messages for member B, or the group owner, member A, and member B may all see all messages and may communicate with each other while other group members may still only see and receive messages for the group owner, etc.
For example, when the authorized member a can see all group messages and messages of each group member, the identity account of the member a is recorded, and when the group messages and the messages returned by the group members are obtained, the messages and the correspondingly carried member identity information are sent to the second terminal of the member a, so that the second terminal displays the group messages and the group member messages in the private chat window of the second terminal, and certainly, in another example, the chat window established in the corresponding program of the second terminal can also be a group chat window, and if the second terminal of the member a establishes the private chat window, the messages sent by the member a are only displayed in the group chat window of the group owner, that is, only the group owner can see; if the second terminal of the member A establishes the group chat window, the authority of the member A is consistent with the group owner, and the messages of the other group members can be seen and replied. Further, the group owner may authorize a plurality of group members to see the group message and the message of each group member, and the specific implementation manner refers to the above example, which will not be described herein.
Referring to fig. 2, in this embodiment, a group chat apparatus based on distinguishing a group owner from group members is provided, where the apparatus corresponds to the group chat method based on distinguishing a group owner from a group member, and the apparatus includes:
awindow establishing unit 1, configured to establish a group chat window of a group chat private group according to the specified user input information, where constituent members of the group chat private group include a group owner and one or more group members;
an obtainingmessage unit 2, configured to obtain a group message sent by the group owner in the group chat window;
amessage judging unit 3, configured to judge whether the group message is a message that is received by a designated group member;
and amessage display unit 4, configured to, when the group message is not a message received by separately pointing to a designated group member, acquire identity accounts of all group members in the group chat private group, and separately send the group message to a second terminal of each group member according to the identity accounts of each group member, so that the group message is displayed in a private chat window of the second terminal, where the private chat window is a private chat window of the group member and the group owner.
As described in thewindow establishing unit 1, the group chat method based on distinguishing the group owner from the group members may be applied to a real-time communication system (Instant Messaging, IM for short), in this embodiment, a terminal used by a designated user is named as a first terminal, the input information may be setting information, for example, the designated user clicks a button in the first terminal for setting the group chat private group, and then checks the group members to establish the group chat private group, and simultaneously records identity accounts of all the group members, the account is a unique id for proving the identity of the group member, that is, a group chat window of the group chat private group is established in an application program corresponding to the first terminal, the group chat private group comprises the group owner and one or more group members, and the designated user is the group owner.
As described in the foregoingmessage obtaining unit 2 andmessage judging unit 3, the group message sent by the group owner in the group chat window of the first terminal is obtained, and then it is judged whether the group message is a message that is individually directed to a designated group member for receiving, that is, whether the group message is only sent to the designated member, where the designated member may include a plurality of members, for example, the group member includes a member a, a member b, a member c, and a member d, and the designated member may be only the member a or the member a and the member b.
As described in themessage displaying unit 4, if it is determined that the group message is not a message received by pointing to a specific group member alone, which indicates that the message is a message receivable by all group members in the group chat private group, the identity accounts of all group members may be acquired at this time, and then the group message is sent to the terminal of the corresponding group member individually according to the identity account of each group member.
For example, when a bidder sends a notification or a bidding announcement, all bidders want to receive a message, and when a question is answered, the bidders do not want to repeatedly answer the same question one by one, but do not want to make the bidders intercommunicate and know each other, at this time, the bidder can establish a private group of group chat, the group members include a designated user group owner and a plurality of group member bidders, a chat interface of a first terminal of the group owner is a group chat window, when the group owner sends the bidding announcement in the group chat window, a unique id of each bidder is acquired, and then the bidding announcement is sent to a second terminal of the bidder individually according to the unique id, and the second terminal displays the bidding announcement in the private chat window of the bidder and the bidder, so that even if the group owner sends a group message in the group chat window, the group message received by each group member is displayed in the private chat window, the group members are neither visible nor communicable with each other, thereby satisfying the user's needs in a particular group chat scenario.
In one embodiment, the above-mentionedjudgment message unit 3 includes:
a format judging subunit, configured to judge whether the group message includes preset format information;
the identity judging subunit is used for judging whether the group message contains preset format information or not, and judging whether the preset format information contains the identity account information of the designated group member or not;
and the judging message subunit is used for judging that the group message is a message received by the individual designated group member when the preset format information contains the identity account information of the designated group member.
In this embodiment, it is determined whether the group message is a message that is received by being directed to a designated group member individually, and the determination may be performed through the group message, specifically, it is first determined whether the group message includes a message in a preset format, for example, a format including @ a certain group member, and when it is determined that the group message includes a message in the preset format, it may be determined whether the information in the preset format includes id information of the designated group member, and if so, it may be determined that the group message is a message that is sent to the designated group member individually, for example, a member a in the @ group member while sending a group message, and at this time, it may be determined that the group message only needs to be sent to the member a individually If only the preset format message is contained and no designated group member obtains the identity account information, the group message can be directly sent to all the group members, or prompt information without a designated sender is popped up so as to facilitate the group owner to resend the message.
In one embodiment, the above apparatus further comprises:
and the display designation unit is used for acquiring the identity account of the designated group member when the group message is judged to be the message which is received by independently pointing to the designated group member, and sending the group message to the second terminal of the designated group member according to the identity account of the designated group member, so that the group message is displayed in a private chat window of the second terminal of the designated group member.
In this embodiment, when it is determined that the group message is a message that is received by a single group member, which is capable of acquiring an identity account of the designated group member, that is, the unique id, and then sending the group message to the second terminal of the designated group member according to the unique id, the group message is displayed in a private chat window between the designated group member and the group owner in the second terminal.
In one embodiment, the above apparatus includes:
and the display reply unit is used for displaying the reply message in the group chat window when the reply message replied by the group member aiming at the group message is received.
In this embodiment, when a reply message that the group member replies to the group message is received, the reply message is displayed in the group chat window, so that the group owner can chat with all the group members through one group chat window without disturbing the group members; for the information which can be sent in a group, the group owner can directly send the information in the group chat window, the convenience and the trouble are saved, for the pointed information, the independent chat with the group owner can be realized by @ the corresponding group member in the group chat window, and meanwhile, all the group members think that the group owner has private chat with the group owner instead of the group chat.
In one embodiment, the above apparatus includes:
a marking message unit, configured to mark the group message, so that the group message carries first information;
and the identification message unit is used for identifying the group message when the group message is received by the second terminal so as to mark the reply message after receiving the reply of the group member to the group message, so that the reply message carries second information corresponding to the first information.
In this embodiment, when acquiring a group message sent by a group owner in a group chat window, marking the group message to enable the group message to carry first information, where the first information includes information of the group owner and a group chat private group, such as an identity account of the group owner and group marking information of the group chat private group; when the second terminal receives the group message, the group message is identified, so that whether the group message carries first information or not is judged, the first information is carried, a corresponding private chat window is established, the group message is displayed in the private chat window, if a group member replies in the private chat window, a reply message is acquired from the private chat window, the reply message is marked according to the first tag message, the reply message carries second information corresponding to the first tag message, the second information can comprise the first information and identity account information of a designated group member, and when the first terminal receives the reply message, the reply message is judged according to the second information to be used for replying the group message, so that the reply message is displayed in the group chat window.
In one embodiment, the above apparatus includes:
a receiving request unit, configured to receive an authorization request submitted by the group owner;
and the calling strategy unit is used for calling a corresponding authorization strategy according to the authorization request and carrying out corresponding group chat processing on the group members according to the strategy.
In this embodiment, in some other specific scenarios, it may be necessary for an individual group member and a group owner to chat together in a group chat window, for example, in the above example, when a tenderer establishes a group chat private group, considering that the problem of the tenderer is more and an assistant is needed to solve the problem, the group member forming members may include a designated user group owner, a group member assistant, and a plurality of group member tenderers, and at this time, the authorized group member assistant is required to enter the group chat window. For example, authorized member A may see all group messages and messages for each group member, or authorized member A may see messages for the group owner and messages for member B, or the group owner, member A, and member B may all see all messages and may communicate with each other while other group members may still only see and receive messages for the group owner, etc.
For example, when the authorized member a can see all group messages and messages of each group member, the identity account of the member a is recorded, and when the group messages and the messages returned by the group members are obtained, the messages and the correspondingly carried member identity information are sent to the second terminal of the member a, so that the second terminal displays the group messages and the group member messages in the private chat window of the second terminal, and certainly, in another example, the chat window established in the corresponding program of the second terminal can also be a group chat window, and if the second terminal of the member a establishes the private chat window, the messages sent by the member a are only displayed in the group chat window of the group owner, that is, only the group owner can see; if the second terminal of the member A establishes the group chat window, the authority of the member A is consistent with the group owner, and the messages of the other group members can be seen and replied. Further, the group owner may authorize a plurality of group members to see the group message and the message of each group member, and the specific implementation manner refers to the above example, which will not be described herein.
With reference to fig. 3, the present application further provides a computer-readable storage medium 10, in which acomputer program 20 is stored, which when run on a computer causes the computer to perform the group chat method based on distinguishing group owners from group members as described in the above embodiments.
Referring to fig. 4, the present application further provides asmart device 40 comprising instructions, the smart device comprises amemory 30 and aprocessor 50, thememory 30 stores acomputer program 20, and theprocessor 30 executes thecomputer program 20 to implement the group chat method based on distinguishing group owners and group members as described in the above embodiments. Theintelligent device 40 may be a first terminal, a second terminal, specifically, a mobile phone, a computer, etc. in the foregoing embodiments, and may be implemented wholly or partially by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.