Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 illustrates an exemplary system architecture 100 to which the method for adding buddies of the present application may be applied.
As shown in fig. 1, system architecture 100 may include devices 101, 102 and network 103. Network 103 is the medium used to provide communication links between devices 101 and 102. Network 103 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The devices 101, 102 may be hardware devices or software that support network connectivity to provide various network services. When the device is hardware, it can be a variety of electronic devices including, but not limited to, smart phones, tablets, laptop portable computers, desktop computers, servers, and the like. In this case, the hardware device may be implemented as a distributed device group including a plurality of devices, or may be implemented as a single device. When the device is software, the software can be installed in the electronic devices listed above. At this time, as software, it may be implemented as a plurality of software or software modules for providing a distributed service, for example, or as a single software or software module. And is not particularly limited herein.
In practice, a device may provide a respective network service by installing a respective client application or server application. After the device has installed the client application, it may be embodied as a client in network communications. Accordingly, after the server application is installed, it may be embodied as a server in network communications.
As an example, in fig. 1, device 101 is embodied as a client and device 102 is embodied as a server. For example, device 101 may be a client installed with a social application and device 102 may be a server of the social application.
It should be noted that the method for adding a friend, which is applied to the terminal device and is provided by the embodiment of the present application, may be executed by the device 101, and the method for adding a friend, which is applied to the server device and is provided by the device 102.
It should be understood that the number of networks and devices in fig. 1 is merely illustrative. There may be any number of networks and devices, as desired for implementation.
With continuing reference to fig. 2, a flow 200 of one embodiment of a method for adding buddies as applied to a terminal device in accordance with the present application is shown. The method for adding friends comprises the following steps:
step 201, receiving a friend application message pushed by a server device.
In this embodiment, an executing entity (for example, the device 101 shown in fig. 1) of the method for adding a friend may receive a friend application message pushed by a server device, where the friend application message includes user data of a second account, and the first account and the second account are accounts of the same social application.
Here, the friend application message may be generated by the server device in response to receiving a message for applying for adding the first account as a friend, which is sent by the terminal logged in the second account, or may be automatically generated by the server device according to a condition for generating the friend application message, which is established in advance. The user data may include a user avatar, a user name, a user introduction, and the content of the user's call, etc.
In some embodiments, the method further comprises: and sending the address book of the user of the first account to the server side equipment, so that the server side equipment sends a friend application message comprising user data of the first account to a third account associated with the mobile phone number contained in the address book. In addition, when the first account includes a newly registered account, the friend application message may be generated by the server device in response to determining that the mobile phone address book of the second account includes the mobile phone number associated with the first account. Therefore, the server side automatically generates and sends the friend application without the operation of the user terminal, and the efficiency of adding friends is further improved.
Step 202, displaying friend application information including user data of the second account on a chat session list interface of the social application.
In this embodiment, the executive agent may present, in a chat session list interface of the social application, friend application information including user data of the second account, and the chat session list interface further presents a session list of at least one chat session in which the first account participates. In some embodiments, the chat session list interface is typically the default interface for when the user opens the social application, and the user will typically return to the chat session list interface from a particular conversation page after completing a chat with other users. In the prior art, a chat session list page usually shows at least one chat session column. For example, the chat session list page may be presented with a first chat session column, a second chat session column, and a third chat session column. The local user is a user A, the first chat session bar is a one-to-one session between the user A and the user B, and after the first chat session bar is clicked, a one-to-one session chat interface between the user A and the user B can be accessed; the second chat session bar is a group chat session between the user A and the users C and D, and after the second chat session bar is clicked, a chat interface between the user A and the group chat sessions between the user C and the user D can be accessed; and the third chat session column is a one-to-one session between the user A and the user E, and after the third chat session column is clicked, a one-to-one session chat interface between the user A and the user E can be accessed. In some embodiments, the chat session bar may be displayed side by side in a list format. Those skilled in the art will appreciate that the above example is one of the existing chat session list pages, and is not intended to be limiting.
In some embodiments, the received friend application information may be presented at the top of the interface, i.e., on all chat session bars; in some embodiments, the received buddy application information may overlay a portion of the at least one chat session bar when presented. Those skilled in the art will appreciate that the display of the buddy application message may be configured as desired.
In some embodiments, presenting the buddy application information including the user data of the second account in the chat session list interface may include displaying a floating window in the chat session list interface, displaying the buddy application information including the user data of the second account in the floating window. Wherein the floating window may be configured to disappear after a display period is exceeded, and/or the transparency gradually increases over time.
In some embodiments, presenting, in the chat session list interface, the friend application information including the user data of the second account includes: and in response to determining that the second account meets the preset conditions, displaying friend application information including user data of the second account on a chat session list interface, wherein the preset conditions comprise: the address book of the second account comprises the address number associated with the first account; and/or the address book of the first account comprises the address number associated with the second account. The preset conditions may also include other conditions indicating that the first account has a greater possibility of agreeing with the friend application of the second account, for example, the number of common friends of the first account and the second account or the number of participating same groups is greater than a preset threshold, and the degree of heat of the user of the first account or the second account communicating through the communication tool other than the social application is greater than the preset threshold. After the second account meets the preset condition, the friend application information including the user data of the second account is displayed on the chat session list interface, so that the number of the friend application information displayed on the chat session list interface can be reduced, and the quality of the friend application information displayed on the chat session list interface is improved.
In some embodiments, the friend application message includes an identifier indicating that the friend application information is displayed on the chat session list interface, where the identifier includes an identifier added by the server device after determining that the second account satisfies the preset condition. Compared with the terminal device, the server device stores richer user data, and the quality of the friend application information displayed on the chat session list interface can be further improved through the identification added by the server.
In some embodiments, after the chat session list interface presents the buddy application information including the user data of the second account, the method further comprises: and in response to the detection of a first preset operation in the area showing the friend application information, sending information representing that the first account agrees to establish a friend relationship with the second account to the server-side equipment so that the server-side equipment can establish the friend relationship between the first account and the second account. The first preset operation may be set according to actual needs, for example, the first preset operation may be clicking, re-pressing, or pressing a virtual key indicating that the friend agrees to apply.
In some embodiments, the method further comprises: and displaying a chat conversation interface with the second account in response to receiving notification information which is returned by the server side equipment and successfully establishes a friend relationship with the second account. Therefore, the user does not need to go to the address book of the social application to search for the second account, so that a conversation interface with the user is opened, and the communication efficiency is further improved.
In some embodiments, after the chat session list interface presents the buddy application information including the user data of the second account, the method further comprises: and stopping showing the friend application information in response to detecting a second preset operation in the area showing the friend application information. The second preset operation may be set according to actual needs, for example, the second preset operation may be sliding or pressing a virtual key indicating to ignore the friend application.
In some embodiments, after the chat session list interface presents the buddy application information including the user data of the second account, the method further comprises: in response to detecting a third preset operation in the area for displaying the friend application information, displaying a conversation interface with the second account, wherein the conversation interface comprises an operation area configured to determine whether to accept the friend application of the second account; and determining whether to send information representing that the first account agrees to establish a friend relationship with the second account to the server-side equipment or not according to the operation detected in the operation area. The first preset operation may be set according to actual needs, for example, the first preset operation may be clicking, re-pressing, or pressing a virtual key indicating to view a friend application.
According to the method and the device for adding the friends, the friend application information including the user data of the second account is displayed on the chat session list interface of the social application by receiving the friend application information pushed by the server device, time consumption for adding the friends is shortened, and the probability of adding the friends is improved.
With further reference to fig. 3, a flow 300 of yet another embodiment of a method for adding buddies according to the application applied to a terminal device is shown. The method for adding friends comprises the following steps:
step 301, at least two friend application messages pushed by a server device are received.
In this embodiment, an executing entity (for example, the device 101 shown in fig. 1) of the method for adding a buddy receives at least two buddy application messages pushed by a server device, where each buddy application message includes user data of a second account.
Step 302, displaying friend application information including user data of the second account on a chat session list interface of the social application.
In this embodiment, the executive agent may present, in a chat session list interface of the social application, friend application information including user data of at least two second accounts.
In some embodiments, presenting, in the chat session list interface, the friend application information including the user data of the second account includes: at least two display modules respectively corresponding to at least two friend application messages are displayed in a chat session list interface in an overlapping mode, wherein an overlapping area formed by overlapping display does not include an area for displaying key information included in the at least two friend application messages, and the key information includes at least one of the following items: user name, user head portrait and friend application content. Therefore, the display space can be saved, and the influence on the use of the chat session list interface is reduced. Here, the display module may be presented through a floating window or in a form of referring to a chat session.
In some embodiments, the chat session list interface further includes a first virtual key, and in response to the first virtual key being pressed, the terminal device sends, to the server device, information representing that the first account agrees to establish a buddy relationship with a sending account of the at least two buddy application messages. In addition, the chat session list interface may further include a second virtual key, and in response to the second virtual key being pressed, the terminal device stops displaying the display modules corresponding to the at least two friend application messages. The operation efficiency of the user can be further improved through the setting of the virtual keys.
In some embodiments, presenting, in the chat session list interface, the friend application information including the user data of the second account may also include: displaying summary information of user data of at least one second account in a display module of the chat session list interface; and in response to detecting a fourth preset operation in the area of the display module, presenting detailed information of the user data of the at least one second account. As an example, the summary information of the user data may include a user name and a user avatar, and the fourth preset operation may include clicking, sliding, re-pressing, and the like. The detailed information of the user data may include user introduction, a manner of sending a friend application, introduction information in the friend application, and the like.
In some embodiments, presenting, in the chat session list interface, the friend application information including the user data of the second account may further include: one or more friend application messages are selected from the at least two friend application messages, and the selected friend application information is displayed on a chat session list interface. The number of the selected friend application messages can be set according to actual needs, so that the influence of displaying excessive friend application messages on the normal use of a chat session list interface is avoided.
In practice, the execution main body may select one or more recently received friend application messages from the at least two friend application messages according to the time when the friend application messages are received, may further obtain a plurality of degrees of popularity that the user corresponding to the first account communicates with the at least two users corresponding to the at least two second accounts of the at least two friend application messages through communication tools other than social applications, and selects one or more friend application messages from the at least two friend application messages according to the plurality of degrees of popularity. The heat can be determined according to the communication time length and/or the communication frequency, and the communication time length and/or the communication frequency can be obtained from a system or other social software.
Selecting one or more friend application messages from the at least two friend application messages, and the method further comprises the following steps: and randomly selecting or selecting the friend application messages with high priority or with the top N in sequence according to the priority/sequence indicated by the server equipment. The server device may determine the priority or rank according to the popularity of communication between users or the intimacy between users and other users. The intimacy degree can be determined according to the number of participating same groups, the number of shared friends and the like.
In addition, the execution main body can also select one or more friend application messages which are not shown from at least two friend application messages in response to the displayed friend application messages being browsed or closed, and display the friend application messages on a chat session list interface. The execution subject may make the selection randomly, based on the time of receiving the friend application message, the communication heat between users, or the indication of the server device, as described above.
In this embodiment, some specific operations of step 301 and step 302 have been described in detail in step 201 and step 202 in the embodiment shown in fig. 2, and are not described herein again.
The method and the device for adding the friends provided by the embodiment of the application provide a scheme for displaying the friend application information including the user data of the second account on a chat session list interface of the social application when receiving at least two friend application messages pushed by the server device, so that the method for adding the friends is further enriched, and the efficiency for adding the friends is improved.
With continuing reference to fig. 4, a flow 400 of one embodiment of a method for adding buddies as applied to a server device in accordance with the present application is illustrated. The method for adding friends comprises the following steps:
step 401, a friend application message for a first account is generated.
In this embodiment, an executing entity (for example, the device 102 shown in fig. 1) of the method for adding a friend may generate a friend application message for a first account, where the friend application message includes user data of a second account, and the first account and the second account are accounts of the same social application. The friend application message may be generated in response to receiving a message for applying for adding the first account as a friend, which is sent by the terminal logged in the second account, or may be automatically generated according to a condition for generating the friend application message, which is established in advance.
In some embodiments, the buddy application message includes an identification indicating that the buddy application information is presented in the chat session list interface; and generating a friend application message aiming at the first account, wherein the friend application message comprises: and in response to determining that the second account meets a preset condition, adding an identifier in the friend application message, wherein the preset condition comprises: the address book of the second account comprises the address number associated with the first account; and/or the address book of the first account comprises the address number associated with the second account. The quality of the friend application information displayed on the chat session list interface can be further improved by adding the identifier.
Step 402, pushing a friend application message to a terminal device logged in with a first account, so that the terminal device presents friend application information including user data of a second account on a chat session list interface of a social application.
In this embodiment, the executing agent may push a friend application message to the terminal device logged in with the first account, so that the terminal device presents friend application information including user data of the second account in a chat session list interface of the social application, and the chat session list interface further presents a session list of at least one chat session in which the first account participates.
In some embodiments, the first account comprises a newly registered account; and generating a friend application message aiming at the first account, wherein the friend application message comprises: acquiring a communication number associated with a first account; determining a second account corresponding to the address book comprising the communication number associated with the first account; and generating a friend application message according to the user data of the second account. Therefore, the automatic generation of the friend application message is realized, and the friend application efficiency is further improved.
Optionally, if at least two second accounts are determined, generating a friend application message for the first account may include: selecting one or more second accounts from the at least two second accounts; and generating one or more friend application messages respectively corresponding to the one or more second accounts. The server device may select the second account at random according to the selection of the terminal device for the friend application message in step 302, and based on the time of receiving the friend application message, the popularity or intimacy of communication between users.
For example, the server device may obtain a plurality of degrees of popularity of the user corresponding to the first account communicating with at least two users corresponding to the at least two second accounts through communication tools other than the social application, respectively, and select one or more second accounts from the at least two second accounts according to the plurality of degrees of popularity. The method for determining the heat degree may refer to step 302.
In addition, the server device may further select, in response to receiving a notification message sent by the terminal device and used to indicate that one or more messages have been browsed or closed, one or more second accounts that have not generated a friend application message for the first account from among the at least two second accounts, generate corresponding one or more friend application messages, and send the corresponding one or more friend application messages to the terminal device. Browsed or closed may include the case of being added as a friend, being clicked to browse but not being added as a friend or clicking to ignore the friend application message, etc.
According to the method and the device for adding the friend, the friend application message aiming at the first account is generated, and then the friend application message is pushed to the terminal device logged with the first account, so that the terminal device can display the friend application message comprising the user data of the second account on a chat session list interface of the social application, time consumption for adding the friend is shortened, and the probability for adding the friend is improved.
Referring now to FIG. 5, a block diagram of a computer system 500 suitable for use in implementing a computing device (e.g., devices 101, 102 shown in FIG. 1) of an embodiment of the present application is shown. The computer device shown in fig. 5 is only an example, and should not bring any limitation to the function and the scope of use of the embodiments of the present application.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
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 method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the method of the present application when executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium described herein 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 application, 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 this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, 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: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like 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 electronic device. 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 application. 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 units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a receiving unit and a presentation unit. The names of these units do not form a limitation to the unit itself in this case, for example, the receiving unit may also be described as a "unit receiving a friend application message pushed by the server device".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the computer device described in the above embodiments; or may exist separately and not be incorporated into the computer device. The computer readable medium carries one or more programs which, when executed by the computing device, cause the computing device to: receiving a friend application message pushed by server equipment, wherein the friend application message comprises user data of a second account, and the first account and the second account are accounts of the same social application; and presenting friend application information comprising user data of the second account on a chat session list interface of the social application, and presenting a session list of at least one chat session in which the first account participates.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.