Method, device, computer equipment and storage medium for establishing two-way friend relationship
By receiving friend addition requests and using the verification-free function to directly or asynchronously establish friend relationships, the problem of complex and inefficient two-way friend relationship establishment processes is solved, and efficient friend relationship establishment is achieved.
Patent Information
- Application Number
- CN202111261051.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-28
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2041-10-28
AI Technical Summary
The process of establishing a two-way friend relationship in the prior art is complex and inefficient, especially when the target object fails to verify the friend addition request in time, the establishment of the two-way friend relationship cannot be completed.
Provides a method to establish a two-way friend relationship by receiving a friend addition request from a social application. If the target application has activated the verification-free function, directly establish a two-way friend relationship or establish a one-way friend relationship locally and asynchronously request the social server to establish the corresponding relationship. Avoid verification steps.
The efficiency of establishing a two-way friend relationship is improved, so that the target object can establish a two-way friend relationship without activating the verification-free function in the target application in advance.
Smart Images

Figure CN116055441B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a two-way friend establishment method, apparatus, computer equipment and storage medium. Background Art
[0002] With the development of computer technology, more and more users use the Internet to engage in social activities, such as chatting or sharing resources through social applications. The premise of chatting or sharing resources is that the two parties are in a two-way friendship. At present, the way to establish a two-way friendship is that the friend adding party sends a friend adding request to the target object, and the target object verifies the received friend adding request. Only after the verification is passed, can a two-way friendship relationship between the friend adding party and the target object be established.
[0003] However, the process of establishing the two-way friendship relationship is complicated, and when the target receiving object fails to verify the friend adding request in time, the establishment of the two-way friendship relationship cannot be completed, resulting in low efficiency in establishing the two-way friendship relationship. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for establishing a two-way friendship relationship, which can improve the efficiency of establishing a two-way friendship relationship, in order to solve the above technical problems.
[0005] A method for establishing a two-way friendship, the method comprising:
[0006] Receiving a friend adding request from the first social application; the friend adding request is a request for adding a target object in the second social application as a friend;
[0007] When the first social application and the second social application are applications of the same type, and a two-way friend verification-free function has been enabled in the second social application, establishing, according to the friend adding request, a two-way friend relationship indicating that the target object and the friend adding party are two-way friends;
[0008] When the first social application and the second social application are different types of applications, and a two-way friend verification-free function has been enabled in the second social application, a first one-way friend relationship is established locally, and an asynchronous add request is initiated to a social server corresponding to the first social application, so that the social server establishes a second one-way friend relationship;
[0009] The first one-way friend relationship is used to indicate that the target object is a friend of the friend adding party; the second one-way friend relationship is used to indicate that the friend adding party is a friend of the target object.
[0010] A two-way friendship establishment device, the device comprising:
[0011] A request receiving module, used to receive a friend adding request from the first social application; the friend adding request is a request for adding a target object in the second social application as a friend;
[0012] A first two-way friend relationship establishment module, configured to establish, according to the friend adding request, a two-way friend relationship indicating that the target object and the friend adding party are two-way friends, when the first social application and the second social application are applications of the same type and a two-way friend verification-free function has been activated in the second social application;
[0013] A second two-way friend relationship establishment module is used to establish a first one-way friend relationship locally when the first social application and the second social application are different types of applications and a two-way friend verification-free function has been activated in the second social application, and initiate an asynchronous add request to a social server corresponding to the first social application, so that the social server establishes a second one-way friend relationship;
[0014] The first one-way friend relationship is used to indicate that the target object is a friend of the friend adding party; the second one-way friend relationship is used to indicate that the friend adding party is a friend of the target object.
[0015] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0016] Receiving a friend adding request from the first social application; the friend adding request is a request for adding a target object in the second social application as a friend;
[0017] When the first social application and the second social application are applications of the same type, and a two-way friend verification-free function has been enabled in the second social application, establishing, according to the friend adding request, a two-way friend relationship indicating that the target object and the friend adding party are two-way friends;
[0018] When the first social application and the second social application are different types of applications, and a two-way friend verification-free function has been enabled in the second social application, a first one-way friend relationship is established locally, and an asynchronous add request is initiated to a social server corresponding to the first social application, so that the social server establishes a second one-way friend relationship;
[0019] The first one-way friend relationship is used to indicate that the target object is a friend of the friend adding party; the second one-way friend relationship is used to indicate that the friend adding party is a friend of the target object.
[0020] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0021] Receiving a friend adding request from the first social application; the friend adding request is a request for adding a target object in the second social application as a friend;
[0022] When the first social application and the second social application are applications of the same type, and a two-way friend verification-free function has been enabled in the second social application, establishing, according to the friend adding request, a two-way friend relationship indicating that the target object and the friend adding party are two-way friends;
[0023] When the first social application and the second social application are different types of applications, and a two-way friend verification-free function has been enabled in the second social application, a first one-way friend relationship is established locally, and an asynchronous add request is initiated to a social server corresponding to the first social application, so that the social server establishes a second one-way friend relationship;
[0024] The first one-way friend relationship is used to indicate that the target object is a friend of the friend adding party; the second one-way friend relationship is used to indicate that the friend adding party is a friend of the target object.
[0025] A computer program, the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium, the processor of a computer device reading the computer instructions from the computer-readable storage medium, the processor executing the computer instructions, causing the computer device to perform the following steps:
[0026] Receiving a friend adding request from the first social application; the friend adding request is a request for adding a target object in the second social application as a friend;
[0027] When the first social application and the second social application are applications of the same type, and a two-way friend verification-free function has been enabled in the second social application, establishing, according to the friend adding request, a two-way friend relationship indicating that the target object and the friend adding party are two-way friends;
[0028] When the first social application and the second social application are different types of applications, and a two-way friend verification-free function has been enabled in the second social application, a first one-way friend relationship is established locally, and an asynchronous add request is initiated to a social server corresponding to the first social application, so that the social server establishes a second one-way friend relationship;
[0029] The first one-way friend relationship is used to indicate that the target object is a friend of the friend adding party; the second one-way friend relationship is used to indicate that the friend adding party is a friend of the target object.
[0030] The above-mentioned two-way friend relationship establishment method, device, computer device and storage medium receive a friend adding request from a first social application, wherein the friend adding request is a request for adding a target object in a second social application as a friend. When the first social application and the second social application are applications of the same type and the two-way friend verification-free function has been activated in the second social application, a two-way friend relationship for indicating that the target object and the friend adding party are two-way friends is directly established according to the friend adding request; when the first social application and the second social application are applications of different types and the two-way friend verification-free function has been activated in the second social application, a first one-way friend relationship is established locally, and an asynchronous adding request is initiated to a social server corresponding to the first social application, so that the social server establishes a second one-way friend relationship, wherein the first one-way friend relationship is used to indicate that the target object is a friend of the friend adding party; and the second one-way friend relationship is used to indicate that the friend adding party is a friend of the target object, so that the target object only needs to pre-activate the two-way friend verification-free function in the second social application in advance, and when receiving the friend adding request, the two-way friend relationship can be established without verifying the friend adding request, thereby improving the efficiency of establishing the two-way friend relationship. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A diagram of an application environment of a method for establishing a two-way friendship relationship in one embodiment;
[0032] Figure 2 A schematic diagram of a flow chart of a method for establishing a two-way friend relationship in one embodiment;
[0033] Figure 3 A schematic diagram of a friend information page in an embodiment;
[0034] Figure 4 A schematic diagram of a friend adding page in one embodiment;
[0035] Figure 5 A schematic diagram of a two-way friend authentication function adjustment page in one embodiment;
[0036] Figure 6 A schematic diagram of adjusting a page for a two-way friend authentication function in another embodiment;
[0037] Figure 7 A schematic diagram of a flow chart of a method for establishing a two-way friendship relationship in another embodiment;
[0038] Figure 8A schematic diagram of a flow chart of a method for establishing a two-way friendship relationship in another embodiment;
[0039] Fig. 9 A schematic diagram of a flow chart of a method for establishing a two-way friendship relationship in another embodiment;
[0040] Fig.10 A structural block diagram of a device for establishing a two-way friend relationship in one embodiment;
[0041] Fig.11 It is a structural block diagram of a device for establishing a two-way friend relationship in another embodiment;
[0042] Fig.12 is an internal structure diagram of a computer device in one embodiment;
[0043] Fig.13 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0045] The two-way friendship establishment method provided in this application can be applied to Figure 1 In the application environment shown, the first terminal 102 communicates with the first social server 104 through the network, and the second terminal 108 communicates with the second social server 106 through the network. The first terminal 102 runs a first social application, and the second terminal 108 runs a second social application. When the first social application and the second social application are applications of the same type, the first social server 104 and the second social server 106 can be the same social server. When the first social application and the second social application are applications of different types, the first social server 104 and the second social server 106 are different social servers, and the first social server 104 and the second social server 106 communicate through the network.
[0046] It can be understood that when the first social application and the second social application are the same type of applications, the above-mentioned method for establishing a two-way friend relationship can be executed on the first social server 104 or the second social server 106; when the first social application and the second social application are different types of applications, the above-mentioned method for establishing a two-way friend relationship can be executed on the second social server 106. Taking the above-mentioned two-way friend relationship establishment method executed on the second social server 106 as an example, the second social server 106 receives a friend adding request from the first social application; the friend adding request is a request for adding a target object in the second social application as a friend; when the first social application and the second social application are applications of the same type and the two-way friend verification-free function has been activated in the second social application, a two-way friend relationship is established according to the friend adding request to indicate that the target object and the friend adding party are two-way friends; when the first social application and the second social application are applications of different types and the two-way friend verification-free function has been activated in the second social application, a first unidirectional friend relationship is established locally, and an asynchronous adding request is initiated to the first social server corresponding to the first social application, so that the first social server establishes a second unidirectional friend relationship; wherein the first unidirectional friend relationship is used to indicate that the target object is a friend of the friend adding party; and the second unidirectional friend relationship is used to indicate that the friend adding party is a friend of the target object.
[0047] Among them, the terminal 102 and the terminal 108 can be but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, car terminals, etc. The first social server 104 and the second social server 106 can be independent physical servers, or they can be server clusters composed of multiple service nodes in the blockchain system. Each service node forms a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on the Transmission Control Protocol (TCP) protocol.
[0048] In addition, the first social server 104 and the second social server 106 may also be a server cluster composed of multiple physical servers, and may be cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0049] In one embodiment, Figure 2 As shown, a two-way friend relationship establishment method is provided, and the method is applied to Figure 1 Taking the second social server 106 in the example as an example, the method includes the following steps:
[0050] S202, receiving a friend adding request from the first social application; the friend adding request is a request for adding a target object in the second social application as a friend.
[0051] Among them, social applications refer to applications that conduct social activities through the Internet, including instant messaging applications that focus on chatting, content sharing applications that focus on sharing, dating applications that focus on making friends with strangers, etc. It is understandable that there are many types of instant messaging applications, many types of content sharing applications, and many types of stranger dating applications.
[0052] The first social application and the second social application can be applications of the same type or different types. For example, the first social application and the second social application are both WeChat, that is, the first social application and the second social application are applications of the same type; if the first social application is WeChat and the second social application is WeChat for Enterprises, then the first social application and the second social application are applications of different types.
[0053] The target object is the object that the friend adding party of the friend adding request wants to add as a friend. For example, user A is a user of a first social application, user B is a user of a second social application, and user A wants to add user B as a friend, that is, user A is the friend adding party, and user B is the target object. User A sends a friend adding request to the second social server corresponding to the second social application through the first social application. The friend adding request is a request for adding user B of the second social application as a friend.
[0054] In one embodiment, the first social application and the second social application are applications of the same type, the first social application is running on the first terminal, a friend adding party is logged in to the first social application, the first terminal generates a friend adding request in response to a friend adding operation on a friend adding page of the first social application, and sends the generated friend adding request to a social server corresponding to the first social application and the second social application, and the social server receives the friend adding request from the first social application.
[0055] The friend adding request carries a user ID of the friend adding party belonging to the first social application and a user ID of the target object belonging to the second social application.
[0056] Specifically, the first terminal responds to the friend adding operation on the friend adding page of the first social application, obtains the user identifier of the friend adding party belonging to the first social application and the user identifier of the target object corresponding to the friend adding page, generates a friend adding request based on the user identifier of the friend adding party and the user identifier of the target object, and sends the generated friend adding request to the social servers corresponding to the first social application and the second social application.
[0057] like Figure 3 In one embodiment, the friend information page of the first social application displays the target object's avatar, user name and the first friend adding control 302. The first terminal responds to the triggering operation of the friend adding control and enters Figure 4 The friend adding page shown has a second friend adding control 402 displayed therein. The first terminal obtains the user identifier of the friend adding party and the user identifier of the target object in response to the triggering operation of the second friend adding control, generates a friend adding request based on the user identifier of the friend adding party and the user identifier of the target object, and sends the generated friend adding request to the social servers corresponding to the first social application and the second social application.
[0058] In one embodiment, the first social application and the second social application are different types of applications. The first social application is running on the first terminal. A friend adding party is logged in to the first social application. The first terminal generates a friend adding instruction in response to a friend adding operation on a friend adding page of the first social application, and sends the generated friend adding instruction to a first social server corresponding to the first social application. After receiving the friend adding instruction, the first social server generates a friend adding request based on the friend adding instruction, and sends the generated friend adding request to a second social server corresponding to the second social application. The second social server receives the friend adding request from the first social application.
[0059] Specifically, the first terminal generates a friend adding instruction in response to a friend adding operation on a friend adding page of a first social application, and sends the generated friend adding instruction to a first social server corresponding to the first social application. The first social server obtains a user identifier of a friend adding party logged into the first social application and a user identifier of a target object corresponding to the friend adding page, and generates a friend adding request based on the user identifier of the friend adding party and the user identifier of the target object, and sends the generated friend adding request to a second social server corresponding to the second social application. The second social server receives the friend adding request from the first social application.
[0060] S204: When the first social application and the second social application are applications of the same type and a two-way friend verification-free function has been enabled in the second social application, a two-way friend relationship is established according to the friend adding request to indicate that the target object and the friend adding party are two-way friends.
[0061] Among them, the two-way friend verification-free function refers to a function that directly determines that the friend adding request received is verified without user verification.
[0062] It is understandable that when the two-way friend verification-free function is in an activated state, after receiving a friend adding request, the second social server does not need to display a friend adding confirmation page through the second social application of the second terminal for the user to verify the friend adding request, but directly determines that the friend adding request is verified. When the two-way friend verification-free function is not activated, the second server needs to display a friend adding confirmation page after receiving a friend adding request, and the second social server displays the friend adding confirmation page of the second social application through the second terminal for the target object to verify the friend adding request.
[0063] In one embodiment, after receiving the friend adding request, the second social server determines whether the first social application and the second social application are the same type of applications based on the received friend adding request, and determines whether the second social application corresponding to the target object has activated the two-way friend verification-free function based on the received friend adding request. If the first social application and the second social application are the same type of applications and the two-way friend verification-free function has been activated in the second social application, a two-way friend relationship is established according to the friend adding request to identify the target object and the friend adding party as two-way friends.
[0064] Specifically, the second social server may obtain the user ID of the friend adding party and the user ID of the target object according to the friend adding request, and establish a two-way friend relationship indicating that the target object and the friend adding party are two-way friends based on the user ID of the friend adding party and the user ID of the target object.
[0065] S206, when the first social application and the second social application are different types of applications and the two-way friend verification-free function has been activated in the second social application, a first one-way friend relationship is established locally, and an asynchronous add request is initiated to the social server corresponding to the first social application, so that the social server establishes a second one-way friend relationship.
[0066] Among them, the first one-way friend relationship is used to indicate that the target object is a friend of the friend adding party; the second one-way friend relationship is used to indicate that the friend adding party is a friend of the target object. For example, if the friend adding party is user A and the target object is user B, then the first one-way friend relationship indicates that user B is a friend of user A and user B is a friend of user A, which means that user A can actively initiate a chat with user B, but user B cannot actively initiate a chat with user A; the second one-way friend relationship indicates that user A is a friend of user B and user A is a friend of user B, which means that user B can actively initiate a chat with user A, but user A cannot actively initiate a chat with user B. It is understandable that when the first one-way friend relationship and the second one-way friend relationship exist between user A and user B at the same time, it means that user A and user B have a two-way friend relationship, that is, user A and user B are friends with each other, that is, user A can actively initiate a chat with user B and user B can also actively initiate a chat with user A.
[0067] The two-way friend verification-free function refers to a function that directly determines that the friend adding request has been verified without user verification for the received friend adding request. It is understandable that when the two-way friend verification-free function is in an activated state, after receiving the friend adding request, the second social server does not need to display the friend adding confirmation page of the second social application through the second terminal for the user to verify the friend adding request, but directly determines that the friend adding request has been verified; when the two-way friend verification-free function is not activated, after receiving the friend adding request, the second social server needs to display the friend adding confirmation page, and the second social server displays the friend adding confirmation page of the second social application through the second terminal for the target object to verify the friend adding request.
[0068] In one embodiment, after receiving the friend adding request, the second social server determines whether the first social application and the second social application are the same type of applications based on the received friend adding request, and determines whether the second social application corresponding to the target object has activated the two-way friend verification-free function based on the received friend adding request. If the first social application and the second social application are different types of applications and the two-way friend verification-free function has been activated in the second social application, a first unidirectional friend relationship is established locally, and an asynchronous adding request is initiated to the first social server corresponding to the first social application, so that the first social server establishes a second unidirectional friend relationship.
[0069] Specifically, the second social server can obtain the user identifier of the friend adding party and the user identifier of the target object according to the friend adding request, and establish a first unidirectional friend relationship locally based on the user identifier of the friend adding party and the user identifier of the target object, generate an asynchronous adding request according to the user identifier of the friend adding party and the user identifier of the target object, and initiate the asynchronous adding request to the first social server corresponding to the first social application, so that the first social server establishes a second unidirectional friend relationship.
[0070] In the above embodiment, the second social server receives a friend adding request from the first social application, wherein the friend adding request is a request for adding a target object in the second social application as a friend. When the first social application and the second social application are applications of the same type and the two-way friend verification-free function has been activated in the second social application, a two-way friend relationship indicating that the target object and the friend adding party are two-way friends is directly established according to the friend adding request; when the first social application and the second social application are applications of different types and the two-way friend verification-free function has been activated in the second social application, a first one-way friend relationship is established locally, and an asynchronous adding request is initiated to the social server corresponding to the first social application, so that the social server establishes a second one-way friend relationship, wherein the first one-way friend relationship is used to indicate that the target object is a friend of the friend adding party; and the second one-way friend relationship is used to indicate that the friend adding party is a friend of the target object, so that the target object only needs to pre-activate the two-way friend verification-free function in the second social application in advance, and when receiving the friend adding request, the two-way friend relationship can be established without verifying the friend adding request, thereby improving the efficiency of establishing the two-way friend relationship.
[0071] In one embodiment, the above-mentioned two-way friend relationship establishment method also includes a process of determining whether the first social application and the second social application are the same type of applications, which specifically includes the following steps: determining the type of the first social application based on the friend adding request; determining the type of the second social application based on the account information of the target object; comparing the type of the first social application with the type of the second social application to determine whether the first social application and the second social application are the same type of applications.
[0072] The friend adding request also carries a type identifier of the first social application corresponding to the friend adding party.
[0073] Specifically, after receiving the friend adding request, the second social server extracts the type identifier of the first social application and the user identifier of the target object from the friend adding request, and determines the type of the first social application based on the type identifier of the first social application, and determines whether the user identifier of the target object belongs to the second social application. If so, the account information of the target object is obtained based on the user identifier of the target object, wherein the account information includes the avatar, user name, type identifier of the second social application, etc. of the target object. The second social server determines the type of the second social application based on the type identifier of the second social application, and then compares the type of the first social application with the type of the second social application to determine whether the first social application and the second social application are the same type of applications.
[0074] For example, the type identifier of the first social application carried in the friend adding request is "01", and the user identifier of the target object carried is "10235". After receiving the friend adding request, the second social application extracts the type identifier "01" of the first social application and the user identifier "10235" of the target object from the friend adding request, and determines that the social application corresponding to the type identifier "01" is social application A, and obtains the account information corresponding to the user identifier "10235". If the type identifier "01" corresponding to the second social application is extracted from the account information, and it is determined that the social application corresponding to the type identifier "01" is social application A, then it is determined that the first social application and the second social application are social applications of the same type; if the type identifier "02" corresponding to the second social application is extracted from the account information, and it is determined that the social application corresponding to the type identifier "02" is social application B, then it is determined that the first social application and the second social application are social applications of different types.
[0075] In the above embodiment, the second social server determines the type of the first social application and the type of the second social application, and compares the type of the first social application and the type of the second social application, so as to subsequently determine the corresponding two-way friend relationship establishment method according to different comparison results to achieve the establishment of the two-way friend relationship, thereby improving the efficiency of establishing the two-way friend relationship.
[0076] In one embodiment, the above-mentioned two-way friend relationship establishment method also includes a process of determining whether the two-way friend verification-free function has been activated in the second social application, specifically including the following steps: obtaining a verification status identifier corresponding to the target object in the second social application; when the verification status identifier is a target verification status identifier, determining that the two-way friend verification-free function has been activated in the second social application.
[0077] The verification status identifier is used to identify whether the two-way friend verification-free function has been activated, and the target verification status identifier is used to identify whether the two-way friend verification-free function has been activated.
[0078] Specifically, after receiving the friend adding request, the second social server extracts the user ID of the target object from the friend adding request, searches for the verification status ID corresponding to the target object based on the user ID of the target object, and determines whether the two-way friend verification-free function has been activated in the second social application based on the verification status ID. When the verification status ID is the target verification status ID, it is determined that the two-way friend verification-free function has been activated in the second social application; when the verification status ID is the non-target verification status ID, it is determined that the two-way friend verification-free function has not been activated in the second social application.
[0079] For example, if the user ID of the target object carried in the friend adding request is "10235", then after receiving the friend adding request, the second social application extracts the user ID "10235" of the target object from the friend adding request, and finds the verification status ID corresponding to the user ID "10235". If the obtained verification status ID is the target verification status ID "on", it is determined that the two-way friend verification-free function has been activated in the second social application; if the obtained verification status ID is the non-target verification status ID "off", it is determined that the two-way friend verification-free function has not been activated in the second social application.
[0080] In one embodiment, the two-way friend relationship includes a two-way relationship chain, and the process of the second social server establishing a two-way friend relationship indicating that the target object and the friend adding party are two-way friends according to the friend adding request includes the following steps: extracting the user ID of the target object and the user ID of the friend adding party from the friend adding request; the friend adding party is the requesting party that sends the friend adding request to request to add the target object as a friend; and establishing a two-way relationship chain for the user ID of the target object and the user ID of the friend adding party. Among them, the two-way relationship chain is a relationship chain indicating that the target object and the friend adding party are two-way friends.
[0081] In one embodiment, the two-way relationship chain includes the friend relationship chain of the target object corresponding to the second social application and the friend relationship chain of the friend adding party. The friend relationship chain can specifically be a unidirectional chain or a bidirectional chain. It can be understood that the friend relationship recorded in the unidirectional chain is a unidirectional friend relationship, and the friend relationship stored in the bidirectional chain is a bidirectional friend relationship.
[0082] As shown in Table 1 below, it is the friend relationship chain of user A in one embodiment, and Table 2 is the friend relationship chain of user B. The friend relationship chains shown in Tables 1 and 2 are both one-way chains. It can be seen from Table 1 that user 1, user 2, user 3, user 4 and user 5 are all friends of user A. It can be seen from Table 2 that user 4, user 5, user 6 and user 7 are all friends of user B. User A is not a friend of user B, and user B is not a friend of user A.
[0083] Table 1
[0084]
[0085] Table 2
[0086]
[0087] As shown in Table 3 below, it is the friend relationship chain of user A in another embodiment, and Table 4 is the friend relationship chain of user B. The friend relationship chains shown in Tables 3 and 4 are both bidirectional chains. It can be seen from Table 3 that user A is bidirectional friends with user 1, user 2, user 3, user 4 and user 5 respectively, and it can be seen from Table 4 that user B is bidirectional friends with user 4, user 5, user 6 and user 7 respectively.
[0088] Table 3
[0089]
[0090] Table 4
[0091]
[0092] It can be understood that when the first social application and the second social application are the same type of applications, the above-mentioned user A, user B, user 1, user 2, user 3, user 4, user 5, user 6 and user 7 are all users in the first social application or the second social application.
[0093] In one embodiment, the bidirectional relationship chain includes the friend relationship chain of the target object and the friend relationship chain of the friend adding party. After obtaining the user identifier of the target object and the user identifier of the friend adding party, the second social server searches for the friend relationship chain of the friend adding party based on the user identifier of the friend adding party, searches for the friend relationship chain of the target object based on the user identifier of the target object, adds the user identifier of the target object to the friend relationship chain of the friend adding party, and adds the user identifier of the friend adding party to the friend relationship chain of the target object, thereby obtaining a bidirectional relationship chain between the user identifier of the target object and the user identifier of the friend adding party.
[0094] The following Table 5 shows the friend relationship chain of user A obtained by adding the user ID of user B to the friend relationship chain of user A shown in Table 1; the following Table 6 shows the friend relationship chain of user B obtained by adding the user ID of user A to the friend relationship chain of user B shown in Table 2.
[0095] Table 5
[0096]
[0097] Table 6
[0098]
[0099] In one embodiment, the two-way relationship chain includes a two-way friend relationship chain of each user in the second social application. It can be understood that the two-way friend relationship chain stores all the two-way friend relationships in the second social application.
[0100] Table 7 below shows a portion of a two-way friend relationship chain of a second social application in an embodiment. It can be seen from Table 7 that user A is two-way friends with user 1, user 2, user 3, user 4 and user 5 respectively, user B is two-way friends with user 4, user 5, user 6 and user 7 respectively, user C is two-way friends with user 1, user 5 and user 6 respectively, and user A, user B and user C are not two-way friends with each other.
[0101] Table 7
[0102] Serial number Two-way friends Serial number Two-way friends Serial number Two-way friends 1 User A, User 1 6 User B, User 4 11 User C, User 5 2 User A, User 2 7 User B, User 5 12 User C, User 6 3 User A, User 3 8 User B, User 6 4 User A, User 4 9 User B, User 7 5 User A, User 5 10 User C, User 1
[0103] In one embodiment, the two-way relationship chain includes a two-way friend relationship chain of each user in the second social application. After obtaining the user identifier of the target object and the user identifier of the friend adding party, the second social server obtains the pre-stored two-way friend relationship chain of the second social application, and adds the user identifier of the friend adding party and the user identifier of the target object to the two-way friend relationship chain accordingly, thereby obtaining a two-way relationship chain between the user identifier of the target object and the user identifier of the friend adding party.
[0104] The following Table 8 shows the bidirectional friend relationship chain obtained after adding the user identifier of user A and the user identifier of user B to the bidirectional friend relationship chain of the second social application shown in Table 7.
[0105] Table 8
[0106] Serial number Two-way friends Serial number Two-way friends Serial number Two-way friends 1 User A, User 1 6 User B, User 4 11 User C, User 5 2 User A, User 2 7 User B, User 5 12 User C, User 6 3 User A, User 3 8 User B, User 6 13 User A, User B 4 User A, User 4 9 User B, User 7 5 User A, User 5 10 User C, User 1
[0107] In the above embodiment, when the first social application and the second social application are applications of the same type and the two-way friend verification-free function has been activated in the second social application, the second social server extracts the user ID of the target object and the user ID of the friend adding party from the friend adding request, and establishes a two-way relationship chain for the user ID of the target object and the user ID of the friend adding party, so that the two-way friend relationship can be established without verifying the friend adding request, thereby improving the efficiency of establishing the two-way friend relationship.
[0108] In one embodiment, after establishing a bidirectional relationship chain between the user identifier of the target object and the user identifier of the friend adding party, the second social server may further store the bidirectional relationship chain between the target object and the friend adding party; send a notification to the first social application and the second social application that the target object has been added as a bidirectional friend; the sent notification is used to instruct the first social application and the second social application to update their respective friend lists.
[0109] Specifically, after establishing a two-way relationship chain for the user identifier of the target object and the user identifier of the friend adding party, the second social server stores the established two-way relationship chain, and sends a friend adding notification to the first social application where the friend adding party is located, indicating that the target object has been added as a two-way friend, and sends a friend adding notification to the second social application where the target object is located, indicating that the friend adding party has been added as a two-way friend. After receiving the friend adding notification, the first social application obtains the stored two-way relationship chain from the second social server based on the friend adding notification, and updates the friend list of the first social application according to the obtained two-way relationship chain. After receiving the friend adding notification, the second social application obtains the stored two-way relationship chain from the second social server based on the friend adding notification, and updates the friend list of the second social application according to the obtained two-way relationship chain.
[0110] In the above embodiment, the second social server stores the bidirectional relationship chain between the target object and the friend adding party; and sends a notification to the first social application and the second social application that the target object has been added as a bidirectional friend, so that the first social application and the second social application can update their respective friend lists based on the received notification, thereby improving the efficiency of updating the bidirectional friend relationship in the friend list.
[0111] In one embodiment, the above-mentioned two-way friend relationship establishment method also includes a process of determining whether the two-way friend verification-free function has been activated in the second social application, and the process specifically includes the following steps: extracting the user identifier of the target object in the friend adding request; based on the user identifier of the target object, obtaining the control status of the two-way friend verification function in the second social application; and determining whether the second social application has activated the two-way friend verification function according to the control status.
[0112] Specifically, after receiving the friend adding request, the second social server extracts the user identifier of the target object from the friend adding request, and searches for the control status of the two-way friend verification function in the corresponding second social application according to the user identifier of the target object. If the control status is on, it is determined that the second social application has started the two-way friend verification function; if the control status is off, it is determined that the second social application has not started the two-way friend verification function.
[0113] It is understandable that before the server of the second social application receives the friend adding request, the second social application corresponding to the target object can adjust the control state on the two-way friend verification function adjustment page, and specifically can adjust the control state to an on state or a off state.
[0114] like Figure 5 The figure shows a two-way friend verification function adjustment page in an embodiment, in which a control 502 of the two-way friend verification function is displayed. The second terminal can adjust the control state of the two-way friend verification function in response to the triggering operation of the control in the two-way friend verification function adjustment page. For example, Figure 6 The control state is closed. When the control is triggered, the control enters Figure 6 The state shown in the figure is the corresponding control state.
[0115] In the above embodiment, the second social server extracts the user identifier of the target object from the friend adding request; obtains the control state of the two-way friend verification function in the second social application based on the user identifier of the target object; determines whether the two-way friend verification function is enabled in the second social application according to the control state, so that when the two-way friend verification function has been enabled in the second social application, there is no need to verify the received friend adding request, and the two-way friend relationship can be established, thereby improving the efficiency of establishing the two-way friend relationship.
[0116] In one embodiment, the above-mentioned two-way friend relationship establishment method also includes a process of verifying the legitimacy of the friend adding request, which specifically includes the following steps: verifying the friend adding party and the target object, and when the verification passes, executing the step of determining whether the second social application starts the two-way friend verification function according to the control state.
[0117] Among them, the verification of the friend adding party and the target object is specifically to conduct legality verification. If the verification passes, it means that the friend adding party and the target object are legal, and both parties are allowed to add friends. Verification specifically includes identity verification and relationship verification. Identity verification refers to the verification of the identity of the friend adding party and the target object, and relationship verification refers to the verification of the relationship between the friend adding party and the target object.
[0118] In the above embodiment, the second social server ensures the legitimacy of the friend adding party and the target object by verifying the legitimacy of the friend adding party and the target object, and ensures that a two-way friend relationship is established between the friend adding party and the target object only when the legitimacy of the friend adding party is met.
[0119] In one embodiment, the process of the second social server verifying the friend adding party and the target object specifically includes the following steps: authenticating the friend adding party based on the user identifier of the friend adding party in the friend adding request; authenticating the target object based on the user identifier of the target object in the friend adding request; and verifying the relationship between the friend adding party and the target object based on the user identifier of the friend adding party and the user identifier of the target object.
[0120] Among them, identity authentication includes at least one of identity information verification and identity authority verification. Identity information verification can specifically be at least one of verification of whether the friend adding party and / or the target object has undergone real-name authentication, verification of whether the group or enterprise to which the friend adding party and / or the target object belongs is authenticated, and verification of whether the friend adding party and / or the target object is marked on the blacklist; identity authority verification can specifically be at least one of verification of whether the friend adding party and / or the target object has the authority to add external contacts, and verification of whether the number of friends of the friend adding party and / or the target object has reached the upper limit. The relationship verification between the friend adding party and the target object refers to the verification of whether the friend adding party and the target object are already two-way friends.
[0121] Specifically, after receiving the friend adding request, the second social server extracts the user identifier of the friend adding party and the user identifier of the target object from the friend adding request, searches for the identity information and identity authority information of the friend adding party based on the user identifier of the friend adding party, verifies the identity information of the friend adding party according to the identity information of the friend adding party, verifies the identity authority of the friend adding party according to the identity authority information of the friend adding party, searches for the identity information and identity authority information of the target object based on the user identifier of the target object, verifies the identity information of the target object according to the identity information of the target object, and verifies the identity authority of the target object according to the identity authority information of the target object; and determines whether a two-way relationship chain already exists between the friend adding party and the target object based on the user identifier of the friend adding party and the user identifier of the target object. If a two-way relationship chain exists, it means that the friend adding party and the target object are already two-way friends, and the verification fails. If no two-way relationship chain exists, it means that the friend adding party and the target object are not two-way friends, and the verification passes.
[0122] In the above embodiment, the second social server ensures the legitimacy of the friend adding party and the target object by verifying the legitimacy of the friend adding party and the target object, and ensures that a two-way friend relationship is established between the friend adding party and the target object only when the legitimacy of the friend adding party is met.
[0123] In one embodiment, the first unidirectional friend relationship includes a first unidirectional relationship chain, and the process of the second social server establishing the first unidirectional friend relationship locally includes the following steps: extracting the user identifier of the target object and the user identifier of the friend adding party from the friend adding request; and establishing the first unidirectional relationship chain for the user identifier of the target object and the user identifier of the friend adding party.
[0124] The first unidirectional relationship chain refers to a relationship chain in which a user in the second social application is a unidirectional friend of a user in the first social application. It is understandable that the first unidirectional relationship chain is stored in both the social server of the first social application and the second social server.
[0125] The following Table 9 shows a first unidirectional relationship chain in an embodiment. User A and User C are users in the first application, and User 1, User 2, User 3, User 4, and User 5 are users in the second social application. It can be seen from the first unidirectional relationship chain that User 1, User 2, User 3, User 4, and User 5 are unidirectional friends of User A, and User 4 and User 5 are unidirectional friends of User C.
[0126] Table 9
[0127]
[0128]
[0129] Table 10 below shows the first friend relationship chain obtained after adding the user identifier of user A and the user identifier of user B to the first friend relationship chain of the second social application shown in Table 9.
[0130] Table 10
[0131] Serial number One-way friends Serial number One-way friends 1 User A, User 1 6 User C, User 4 2 User A, User 2 7 User C, User 5 3 User A, User 3 8 User A, User B 4 User A, User 4 9 5 User A, User 5 10
[0132] In the above embodiment, when the first social application and the second social application are different types of applications and the two-way friend verification-free function has been activated in the second social application, the second social server does not need to extract the user identifier of the target object and the user identifier of the friend adding party from the friend adding request; a first unidirectional relationship chain is established for the user identifier of the target object and the user identifier of the friend adding party, and then a second unidirectional relationship chain can be obtained based on the first unidirectional relationship chain, so that the establishment of a two-way friend relationship can be achieved without verifying the friend adding request, thereby improving the efficiency of establishing the two-way friend relationship.
[0133] In one embodiment, after the second social server establishes the first unidirectional friend relationship locally, it can also send the first unidirectional relationship chain to the social server corresponding to the first social application, so that the social server stores the first unidirectional relationship chain; wherein the first unidirectional relationship chain sent to the social server is used to instruct the social server to send a notification to the first social application that the target object has been added as a friend.
[0134] Specifically, after establishing the first unidirectional relationship chain for the user identifier of the target object and the user identifier of the party adding the friend, the second social server may also return a notification of successful friend addition to the social server of the first social application, and at the same time send the first unidirectional relationship chain to the social server corresponding to the first social application. The social server of the first social application stores the first unidirectional relationship chain based on the received notification of successful friend addition, so that the social server of the first social application and the second social server both save the first unidirectional relationship chain of the user identifier of the target object and the user identifier of the party adding the friend, and send a notification to the first social application that the target object has been added as a friend.
[0135] In the above embodiment, the second social server sends the first unidirectional relationship chain to the social server corresponding to the first social application, so that the first social server stores the first unidirectional relationship chain, and sends a notification to the first social application that the target object has been added as a friend, so that the first social application updates the friend list based on the received notification, thereby improving the efficiency of updating the friend relationship in the friend list.
[0136] In one embodiment, the second unidirectional friend relationship includes a second unidirectional relationship chain, and the social service of the second social application initiates an asynchronous add request to the social server corresponding to the first social application so that the social server establishes the second unidirectional friend relationship. The process includes the following steps: generating an asynchronous add request for requesting to add the friend adding party as a friend; sending the asynchronous add request to the social server corresponding to the first social application so that the social server establishes the second unidirectional relationship chain; the second unidirectional relationship chain is used to trigger the social server to send a notification to the first social application that the target object has added the friend adding party as a friend, so that the first social application updates the friend list of the friend adding party.
[0137] The second unidirectional relationship chain refers to a relationship chain in which a user in the first social application is a unidirectional friend of a user in the second social application. It is understandable that the social server of the first social application and the second social server both store the second unidirectional relationship chain.
[0138] Table 11 below shows a second unidirectional relationship chain in an embodiment. User A, User C and User D are users in the first application, and User 1, User 2, User 3, User 4, User 5, User 6 and User 7 are users in the second social application. It can be seen from the second unidirectional relationship chain that User A is a unidirectional friend of User 1, User 3 and User 4, User C is a unidirectional friend of User 4 and User 5, and User D is a unidirectional friend of User 6 and User 7.
[0139] Table 11
[0140]
[0141]
[0142] Table 12 below shows the second friend relationship chain obtained after adding the user identifier of user A and the user identifier of user B to the second friend relationship chain of the first social application shown in Table 11.
[0143] Table 12
[0144] Serial number One-way friends Serial number One-way friends 1 User 1, User A 6 User 6, User D 2 User 3, User A 7 User 7, User D 3 User 4, User A 8 User B, User A 4 User 4, User C 9 5 User 5, User C 10
[0145] Specifically, after the social server of the first social application establishes a second unidirectional relationship chain for the user identifier of the target object and the user identifier of the friend adding party, the social server of the first social application may also send a notification to the first social application that the target object has added the friend adding party as a friend. Based on the received notification, the first social application obtains the second unidirectional relationship chain from the social server of the first social application, and updates the friend list of the friend adding party based on the obtained second unidirectional relationship chain.
[0146] In the above embodiment, the second social server generates an asynchronous add request for requesting to add the friend adding party as a friend; and sends the asynchronous add request to the social server corresponding to the first social application, so that the social server establishes a second unidirectional relationship chain, thereby realizing the establishment of a two-way friend relationship without verifying the friend adding request, thereby improving the efficiency of establishing the two-way friend relationship.
[0147] In one embodiment, after the social server of the first social application establishes a second unidirectional relationship chain for the user identifier of the target object and the user identifier of the friend adding party, the social server of the first social application may also send the second unidirectional relationship chain to the social server corresponding to the second social application, so that the second social server stores the second unidirectional relationship chain; wherein the second unidirectional relationship chain sent to the second social server is used to instruct the second social server to send a notification to the second social application that the target object has been added as a friend.
[0148] Specifically, after the social server of the first social application establishes a second unidirectional relationship chain for the user identifier of the target object and the user identifier of the party adding the friend, the social server of the first social application returns a prompt message of successful friend addition to the second social server, and at the same time sends the second unidirectional relationship chain to the social server corresponding to the second social application. The second social server stores the second unidirectional relationship chain based on the received notification of successful friend addition, so that the social server of the first social application and the second social server both save the second unidirectional relationship chain of the user identifier of the target object and the user identifier of the party adding the friend, and sends a notification that the target object has been added as a friend to the second social application through the second social server, so that the second social application updates the friend list of the target object based on the friend list update notification.
[0149] In the above embodiment, the second social server sends the second unidirectional relationship chain to the social server corresponding to the second social application, so that the second social server stores the second unidirectional relationship chain, and sends a notification to the second social application that the target object has been added as a friend, so that the second social application updates the friend list based on the received notification, thereby improving the efficiency of updating the friend relationship in the friend list.
[0150] In one embodiment, the above-mentioned two-way friend relationship establishment method is applied to an enterprise social server, and the second unidirectional relationship chain is also used to trigger the social server of the first social application to send a prompt message of successful friend addition to the enterprise social server. The two-way friend relationship establishment method also includes: after receiving the prompt message sent by the social server, sending a friend list update notification to the second social application, so that the second social application updates the friend list of the target object based on the friend list update notification.
[0151] Specifically, after the social server of the first social application establishes a second unidirectional relationship chain for the user identifier of the target object and the user identifier of the party adding the friend, it returns a prompt message of successful friend addition to the enterprise social server, and at the same time sends the second unidirectional relationship chain to the social server corresponding to the second social application. The enterprise social server stores the second unidirectional relationship chain based on the received notification of successful friend addition, so that the social server of the first social application and the enterprise social server both save the second unidirectional relationship chain of the user identifier of the target object and the user identifier of the party adding the friend, and sends a notification to the second social application through the enterprise social server that the target object has been added as a friend, so that the second social application updates the friend list of the target object based on the friend list update notification.
[0152] In the above embodiment, after receiving the prompt message sent by the social server, the enterprise social server sends a friend list update notification to the second social application, so that the second social application updates the friend list of the target object based on the friend list update notification, thereby improving the efficiency of updating the two-way friend relationship in the friend list of the target object.
[0153] In one embodiment, the above-mentioned method for establishing a two-way friend relationship also includes the following steps: obtaining an identity category identifier of the target object; determining the identity category of the target object based on the identity category identifier of the target object; if the identity category of the target object is the target identity category, then when the first social application and the second social application are applications of the same type, establishing a two-way friend relationship for indicating that the target object and the friend adding party are two-way friends according to the friend adding request; when the first social application and the second social application are applications of different types, establishing a first unidirectional friend relationship locally, and initiating an asynchronous adding request to the social server corresponding to the first social application, so that the social server establishes a second unidirectional friend relationship.
[0154] Among them, the identity category identifier is used to identify the identity category of the target object. The identity category refers to the category of the role to which the target user belongs. For example, the identity category includes the ordinary user category, the customer service user category, and the intelligent robot user category. The customer service user category and the intelligent robot category are the target identity categories, and the ordinary user category is the non-target identity category.
[0155] Specifically, after receiving the friend adding request, the second server extracts the user identifier of the target object from the friend adding request, searches for the identity category identifier corresponding to the target object based on the user identifier of the target object, determines the identity category of the target object based on the identity category identifier, and determines whether the first social application and the second social application are the same type of application, wherein:
[0156] If the identity category of the target object is a preset target identity category, and the first social application and the second social application are applications of the same type, then according to the friend adding request, a two-way friend relationship is established to indicate that the target object and the friend adding party are two-way friends. For details, please refer to the process of establishing the two-way friend relationship corresponding to S204; if the identity category of the target object is the preset target identity category, but the first social application and the second social application are applications of different types, then a first unidirectional friend relationship is established locally, and an asynchronous adding request is initiated to the social server corresponding to the first social application, so that the social server establishes a second unidirectional friend relationship, wherein the first unidirectional friend relationship is used to indicate that the target object is a friend of the friend adding party, and the second unidirectional friend relationship is used to indicate that the friend adding party is a friend of the target object. For details, please refer to the process of establishing the first unidirectional friend relationship and the second unidirectional friend relationship corresponding to S206.
[0157] If the identity category of the target object is not a preset target identity category, it is further determined whether the two-way friend verification-free function has been activated in the second social application, and when the first social application and the second social application are applications of the same type and the two-way friend verification-free function has been activated in the second social application, a two-way friend relationship is established according to the friend adding request to indicate that the target object and the friend adding party are two-way friends; when the first social application and the second social application are applications of different types and the two-way friend verification-free function has been activated in the second social application, a first unidirectional friend relationship is established locally, and an asynchronous adding request is initiated to the social server corresponding to the first social application, so that the social server establishes a second unidirectional friend relationship.
[0158] For example, the identity categories include ordinary user categories, customer service user categories, and intelligent robot user categories. The identity category identifier corresponding to the ordinary user category is P001, the identity category identifier corresponding to the customer service user category is K001, and the identity category identifier corresponding to the intelligent robot user category is K002. The preset target identity categories are the customer service user category and the intelligent robot category. If the user identifier of the target object carried in the friend adding request is "10235", then after receiving the friend adding request, the second social application extracts the user identifier "10235" of the target object from the friend adding request, and searches for the identity category identifier corresponding to the user identifier "10235". If the identity category identifier is K001, it is determined that the identity category of the target user is the customer service user category, that is, the identity category of the target object is the target identity category. When the first social application and the second social application are applications of the same type, a two-way friend relationship is established according to the friend adding request to indicate that the target object and the friend adding party are two-way friends; when the first social application and the second social application are applications of different types, a first unidirectional friend relationship is established locally, and an asynchronous adding request is initiated to the social server corresponding to the first social application, so that the social server establishes a second unidirectional friend relationship. If the identity category identifier is P001, it is determined that the identity category of the target user is a common user category, and then it is further determined whether the two-way friend verification-free function has been activated in the second social application. If the two-way friend verification-free function has been activated in the second social application, step S204 or step S206 is executed.
[0159] In the above embodiment, for a target object whose identity category belongs to the target identity category, there is no need to pre-start the two-way friend verification-free function in the second social application. When the second social server receives a friend adding request for this type of target object, it does not need to verify the friend adding request, and can establish a two-way friend relationship, thereby further improving the efficiency of establishing the two-way friend relationship.
[0160] In one embodiment, Figure 7As shown, a two-way friend relationship establishment method is provided, and the method is applied to Figure 1 Taking the second social server 106 in the example as an example, the method includes the following steps:
[0161] S702: Receive a friend adding request from a first social application.
[0162] The friend adding request is a request for adding a target object in the second social application as a friend.
[0163] S704: Determine the type of the first social application based on the friend adding request.
[0164] S706: Determine the type of the second social application according to the account information of the target object.
[0165] S708: Compare the type of the first social application with the type of the second social application to determine whether the first social application and the second social application are applications of the same type.
[0166] S710, verify the legitimacy of the friend adding party and the target object.
[0167] S712: Extract the user ID of the target object from the friend adding request.
[0168] S714: Based on the user identifier of the target object, obtain a control state of a two-way friend authentication function in the second social application.
[0169] S716: Determine whether the second social application has enabled a two-way friend verification function according to the control state.
[0170] S718: When the first social application and the second social application are applications of the same type and a two-way friend verification-free function has been enabled in the second social application, extract the user ID of the target object and the user ID of the friend adding party from the friend adding request.
[0171] The friend adding party is a requesting party that sends a friend adding request to request to add a target object as a friend.
[0172] S720: Establish a bidirectional relationship chain between the user ID of the target object and the user ID of the friend adding party.
[0173] Among them, the bidirectional relationship chain is a relationship chain indicating that the target object and the friend adding party are bidirectional friends.
[0174] S722, storing the bidirectional relationship chain between the target object and the friend adding party.
[0175] S724: Send a notification to the first social application and the second social application that the target object has been added as a two-way friend.
[0176] The sent notification is used to instruct the first social application and the second social application to update their respective friend lists.
[0177] S726, when the first social application and the second social application are different types of applications, and the two-way friend verification-free function has been activated in the second social application, a first one-way friend relationship is established locally, and the first one-way relationship chain is sent to a social server corresponding to the first social application, so that the social server stores the first one-way relationship chain.
[0178] The first unidirectional relationship chain sent to the social server is used to instruct the social server to send a notification to the first social application that the target object has been added as a friend.
[0179] S728, generating an asynchronous adding request for requesting to add the friend adding party as a friend.
[0180] S730: Send an asynchronous add request to a social server corresponding to the first social application, so that the social server establishes a second unidirectional relationship chain. The second unidirectional relationship chain is used to trigger the social server to send a notification to the first social application that the target object has added the friend adding party as a friend, so that the first social application updates the friend list of the friend adding party.
[0181] The second unidirectional relationship chain is also used to trigger the social server to send a prompt message indicating that a friend has been successfully added to the enterprise social server.
[0182] S732: After receiving the prompt message sent by the social server, send a friend list update notification to the second social application, so that the second social application updates the friend list of the target object based on the friend list update notification.
[0183] The present application also provides an application scenario, in which the first social application and the second social application are applications of the same type, and the above-mentioned two-way friend relationship establishment method is applied to the application scenario. Assuming that the first social application and the second social application are both enterprise social applications, refer to Figure 8 The application of the two-way friendship establishment method in this application scenario specifically includes the following steps:
[0184] Step 1: Enterprise social application user A initiates a friend adding request of enterprise social application user B to the enterprise social application backend.
[0185] Step 2: The enterprise social application backend confirms the legitimacy of the friend adding request and whether user B has enabled the two-way friend verification-free function.
[0186] Step 3: If the legitimacy verification is passed and user B has enabled the two-way friend verification-free function, the enterprise social application background writes the friend storage data of both parties into the background storage.
[0187] Step 4: After writing the friend storage data of both parties into the background storage, the enterprise social application background notifies the client of the enterprise social application user A and the enterprise social application user B to update the friend list.
[0188] The present application also provides an application scenario in which the first social application and the second social application are different types of applications, and the above-mentioned two-way friend relationship establishment method is applied to the application scenario. Assuming that the first social application is a personal social application and the second application is an enterprise social application, refer to Fig. 9 The application of the two-way friendship establishment method in this application scenario is as follows:
[0189] Step 1: Personal social application user A initiates a friend adding instruction to add enterprise social application user B to the personal social application background. Based on the friend adding instruction, the personal social application background initiates a friend adding request to add enterprise social application user B to the enterprise social application background.
[0190] Step 2: The enterprise social application backend confirms the legitimacy of the friend adding request and whether user B has enabled the two-way friend verification-free function.
[0191] Step 3: If the legitimacy verification is passed and user B has enabled the two-way friend verification-free function, the enterprise social application backend returns a notification of successful addition to the personal social application backend, so that the personal social application backend writes the one-way friend data and returns a notification of successful addition to the client of the personal social application.
[0192] Step 4: If the legitimacy verification is passed and user B has enabled the two-way friend verification-free function, the enterprise social application background writes the one-way friend storage data into the background storage; and asynchronously initiates an asynchronous add request to add personal social application user A as a friend.
[0193] Step 5: After receiving the successful adding notification returned by the personal social application background, the enterprise social application background updates the one-way friend storage data to obtain the two-way friend storage data.
[0194] Step 6: After the enterprise social application backend and the personal social application backend have written the friend storage data of both parties respectively, the personal social application backend notifies the personal social application user A to update the friend list on the client, and the enterprise social application backend notifies the client where the enterprise social application user B is located to update the friend list.
[0195] The present application also provides an application scenario, in which after user A and user B establish a two-way friendship through the above two-way friendship establishment method, user A and user B can share itineraries, send messages, videos, audio and other information, etc. Taking the itinerary sharing scenario as an example, user A runs a first social application on a vehicle terminal. When the car corresponding to user A is traveling according to a preset itinerary, user A can share the preset itinerary with user B through the vehicle terminal installed on the car, and user B can understand the itinerary status of user A in real time based on the received itinerary.
[0196] It should be understood that although Figure 2 , 7 The steps in the flowchart of -9 are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 , 7 -At least part of the steps in 9 may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0197] In one embodiment, Fig.10 As shown, a two-way friendship establishment device is provided. The device can adopt a software module or a hardware module, or a combination of the two to become a part of a computer device. The device specifically includes: a request receiving module 1002, a first two-way friendship establishment module 1004 and a second two-way friendship establishment module 1006, wherein:
[0198] The request receiving module 1002 is used to receive a friend adding request from the first social application; the friend adding request is a request for adding a target object in the second social application as a friend;
[0199] A first two-way friend relationship establishment module 1004 is used to establish a two-way friend relationship indicating that the target object and the friend adding party are two-way friends according to a friend adding request when the first social application and the second social application are applications of the same type and a two-way friend verification-free function has been activated in the second social application;
[0200] The second two-way friend relationship establishment module 1006 is used to establish a first one-way friend relationship locally when the first social application and the second social application are different types of applications and the two-way friend verification-free function has been activated in the second social application, and initiate an asynchronous add request to the social server corresponding to the first social application, so that the social server establishes a second one-way friend relationship;
[0201] The first one-way friend relationship is used to indicate that the target object is a friend of the friend adding party; the second one-way friend relationship is used to indicate that the friend adding party is a friend of the target object.
[0202] In the above embodiment, by receiving a friend adding request from a first social application, wherein the friend adding request is a request for adding a target object in a second social application as a friend, when the first social application and the second social application are applications of the same type and the two-way friend verification-free function has been activated in the second social application, a two-way friend relationship is directly established according to the friend adding request to indicate that the target object and the friend adding party are two-way friends; when the first social application and the second social application are applications of different types and the two-way friend verification-free function has been activated in the second social application, a first one-way friend relationship is established locally, and an asynchronous adding request is initiated to a social server corresponding to the first social application, so that the social server establishes a second one-way friend relationship, wherein the first one-way friend relationship is used to indicate that the target object is a friend of the friend adding party; and the second one-way friend relationship is used to indicate that the friend adding party is a friend of the target object, so that the target object only needs to pre-activate the two-way friend verification-free function in the second social application in advance, and when receiving the friend adding request, the two-way friend relationship can be established without verifying the friend adding request, thereby improving the efficiency of establishing the two-way friend relationship.
[0203] In one embodiment, Fig.11 As shown, the device also includes an application type determination module 1008, which is used to: determine the type of the first social application based on the friend adding request; determine the type of the second social application according to the account information of the target object; compare the type of the first social application with the type of the second social application to determine whether the first social application and the second social application are the same type of application.
[0204] In one embodiment, Fig.11As shown, the device also includes a verification module 1010, which is used to: obtain a verification status identifier corresponding to the target object in the second social application; when the verification status identifier is the target verification status identifier, determine that the two-way friend verification-free function has been started in the second social application; the two-way friend relationship includes a two-way relationship chain; the first two-way friend relationship establishment module 1004 is also used to: extract the user identifier of the target object and the user identifier of the friend adding party from the friend adding request; the friend adding party is the requesting party that sends the friend adding request to request to add the target object as a friend; establish a two-way relationship chain for the user identifier of the target object and the user identifier of the friend adding party; the two-way relationship chain is a relationship chain indicating that the target object and the friend adding party are two-way friends.
[0205] In one embodiment, the first two-way friend relationship establishment module 1004 is further used to: store the two-way relationship chain between the target object and the friend adding party; send a notification to the first social application and the second social application that the target object has been added as a two-way friend; the sent notification is used to instruct the first social application and the second social application to update their respective friend lists.
[0206] In one embodiment, Fig.11 As shown, the device also includes a verification module 1010, which is used to: extract the user identifier of the target object in the friend adding request; based on the user identifier of the target object, obtain the control state of the two-way friend verification function in the second social application; and determine whether the second social application starts the two-way friend verification function according to the control state.
[0207] In one embodiment, the verification module 1010 is further used to: verify the friend adding party and the target object; when the verification is passed, execute the step of determining whether the second social application starts the two-way friend verification function according to the control state.
[0208] In one embodiment, the verification module 1010 is also used to: authenticate the identity of the party adding friends based on the user identifier of the party adding friends in the friend adding request; authenticate the identity of the target object based on the user identifier of the target object in the friend adding request; and verify the relationship between the party adding friends and the target object based on the user identifier of the party adding friends and the user identifier of the target object.
[0209] In one embodiment, the first unidirectional friend relationship includes a first unidirectional relationship chain; the second bidirectional friend relationship establishment module 1006 is further used to: send the first unidirectional relationship chain to a social server corresponding to the first social application, so that the social server stores the first unidirectional relationship chain; wherein the first unidirectional relationship chain sent to the social server is used to instruct the social server to send a notification to the first social application that the target object has been added as a friend.
[0210] In one embodiment, the second unidirectional friend relationship includes a second unidirectional relationship chain; the second bidirectional friend relationship establishment module 1006 is also used to: generate an asynchronous add request for requesting to add the friend adding party as a friend; send the asynchronous add request to the social server corresponding to the first social application, so that the social server establishes a second unidirectional relationship chain; the second unidirectional relationship chain is used to trigger the social server to send a notification to the first social application that the target object has added the friend adding party as a friend, so that the first social application updates the friend list of the friend adding party.
[0211] In one embodiment, the method is applied to an enterprise social server; the second unidirectional relationship chain is also used to trigger the social server to send a prompt message to the enterprise social server indicating that a friend has been successfully added; the second bidirectional friend relationship establishment module 1006 is also used to: after receiving the prompt message sent by the social server, send a friend list update notification to the second social application, so that the second social application updates the friend list of the target object based on the friend list update notification.
[0212] In one embodiment, the device also includes a verification module 1010, which is used to: obtain an identity category identifier of the target object; determine the identity category of the target object based on the identity category identifier of the target object; and when the identity category of the target object is the target identity category, when the first social application and the second social application are the same type of applications, according to the friend adding request, execute the step of establishing a two-way friend relationship for indicating that the target object and the friend adding party are two-way friends through the first two-way friend relationship establishment module 1004; when the first social application and the second social application are different types of applications, execute the step of establishing a first unidirectional friend relationship locally through the first two-way friend relationship establishment module 1006, and initiate an asynchronous adding request to the social server corresponding to the first social application, so that the social server establishes a second unidirectional friend relationship.
[0213] For the specific definition of the two-way friendship establishment device, please refer to the definition of the two-way friendship establishment method above, which will not be repeated here. Each module in the above-mentioned two-way friendship establishment device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0214] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.12As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store friend data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a two-way friend relationship establishment method is implemented.
[0215] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.13 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for establishing a two-way friend relationship is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0216] Those skilled in the art will understand that Fig.12 or Fig.13 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0217] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0218] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0219] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-mentioned method embodiments.
[0220] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0221] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0222] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for establishing a two-way friendship, characterized in that: The method comprises: Receiving a friend adding request from the first social application; the friend adding request is a request for adding a target object in the second social application as a friend; When the first social application and the second social application are applications of the same type, and a two-way friend verification-free function has been enabled in the second social application, establishing, according to the friend adding request, a two-way friend relationship indicating that the target object and the friend adding party are two-way friends; When the first social application and the second social application are different types of applications, and a two-way friend verification-free function has been enabled in the second social application, a first one-way friend relationship is established locally, and an asynchronous adding request for adding the friend adding party as a friend is initiated to a social server corresponding to the first social application, so that the social server establishes a second one-way friend relationship; the asynchronous adding request carries a user identifier of the friend adding party and a user identifier of the target object; The first one-way friend relationship is used to indicate that the target object is a friend of the friend adding party; the second one-way friend relationship is used to indicate that the friend adding party is a friend of the target object.
2. The method according to claim 1, characterized in that The method further comprises: Determining the type of the first social application based on the friend adding request; Determining the type of the second social application according to the account information of the target object; The type of the first social application is compared with the type of the second social application to determine whether the first social application and the second social application are applications of the same type.
3. The method according to claim 1, characterized in that: The method further comprises: Obtaining a verification status identifier corresponding to the target object in the second social application; When the verification status identifier is a target verification status identifier, determining that a two-way friend verification-free function has been started in the second social application; The two-way friend relationship includes a two-way relationship chain; the establishing, according to the friend adding request, a two-way friend relationship for indicating that the target object and the friend adding party are two-way friends includes: Extracting the user ID of the target object and the user ID of the friend adding party from the friend adding request; the friend adding party is the requesting party that sends the friend adding request to request adding the target object as a friend; A bidirectional relationship chain is established between the user ID of the target object and the user ID of the friend adding party; the bidirectional relationship chain is a relationship chain indicating that the target object and the friend adding party are bidirectional friends.
4. The method according to claim 3, characterized in that After establishing a bidirectional relationship chain between the user ID of the target object and the user ID of the friend adding party, the method further includes: Storing a bidirectional relationship chain between the target object and the friend adding party; A notification is sent to the first social application and the second social application that the target object has been added as a two-way friend; the sent notification is used to instruct the first social application and the second social application to update their respective friend lists.
5. The method according to claim 1, characterized in that The method further comprises: Extracting the user ID of the target object from the friend adding request; Based on the user identifier of the target object, obtaining a control state of a two-way friend authentication function in the second social application; According to the control state, it is determined whether the second social application starts the two-way friend verification function.
6. The method according to claim 5, characterized in that The method further comprises: Verifying the friend adding party and the target object; When the verification is passed, the step of determining whether the second social application starts the two-way friend verification function according to the control state is performed.
7. The method according to claim 6, characterized in that The verifying the friend adding party and the target object includes: authenticating the friend adding party based on a user identifier of the friend adding party in the friend adding request; authenticating the target object based on a user identifier of the target object in the friend adding request; Based on the user identification of the friend adding party and the user identification of the target object, the relationship between the friend adding party and the target object is verified.
8. The method according to claim 1, characterized in that The first unidirectional friend relationship includes a first unidirectional relationship chain; After the first one-way friend relationship is established locally, the method further includes: Sending the first unidirectional relationship chain to a social server corresponding to the first social application, so that the social server stores the first unidirectional relationship chain; The first unidirectional relationship chain sent to the social server is used to instruct the social server to send a notification to the first social application that the target object has been added as a friend.
9. The method according to claim 1, characterized in that: The second unidirectional friend relationship includes a second unidirectional relationship chain; the second unidirectional relationship chain is used to trigger the social server to send a notification to the first social application that the target object has added the friend adding party as a friend, so that the first social application updates the friend list of the friend adding party.
10. The method according to claim 9, characterized in that The method is applied to an enterprise social server; the second unidirectional relationship chain is also used to trigger the social server to send a prompt message indicating that a friend has been successfully added to the enterprise social server; The method further comprises: After receiving the prompt message sent by the social server, a friend list update notification is sent to the second social application, so that the second social application updates the friend list of the target object based on the friend list update notification.
11. The method according to any one of claims 1 to 10, characterized in that The method further comprises: Obtaining the identity category identifier of the target object; Determining the identity category of the target object based on the identity category identifier of the target object; If the identity category of the target object is the target identity category, then when the first social application and the second social application are the same type of applications, a two-way friend relationship is established according to the friend adding request to indicate that the target object and the friend adding party are two-way friends; when the first social application and the second social application are different types of applications, a first unidirectional friend relationship is established locally, and an asynchronous adding request is initiated to the social server corresponding to the first social application, so that the social server establishes a second unidirectional friend relationship.
12. A two-way friendship establishment device, characterized in that: The device comprises: A request receiving module, used to receive a friend adding request from the first social application; the friend adding request is a request for adding a target object in the second social application as a friend; A first two-way friend relationship establishment module, configured to establish, according to the friend adding request, a two-way friend relationship indicating that the target object and the friend adding party are two-way friends, when the first social application and the second social application are applications of the same type and a two-way friend verification-free function has been activated in the second social application; A second two-way friend relationship establishment module is used to establish a first one-way friend relationship locally when the first social application and the second social application are different types of applications and a two-way friend verification-free function has been activated in the second social application, and initiate an asynchronous adding request for adding the friend adding party as a friend to a social server corresponding to the first social application, so that the social server establishes a second one-way friend relationship; the asynchronous adding request carries a user identifier of the friend adding party and a user identifier of the target object; The first one-way friend relationship is used to indicate that the target object is a friend of the friend adding party; the second one-way friend relationship is used to indicate that the friend adding party is a friend of the target object.
13. The device according to claim 12, characterized in that The device also includes an application type determination module, which is used to: Determining the type of the first social application based on the friend adding request; Determining the type of the second social application according to the account information of the target object; The type of the first social application is compared with the type of the second social application to determine whether the first social application and the second social application are applications of the same type.
14. The device according to claim 12, characterized in that The device also includes a verification module, which is used to: Obtaining a verification status identifier corresponding to the target object in the second social application; When the verification status identifier is a target verification status identifier, determining that a two-way friend verification-free function has been started in the second social application; The two-way friendship relationship includes a two-way relationship chain; the first two-way friendship relationship establishment module is further used to: Extracting the user ID of the target object and the user ID of the friend adding party from the friend adding request; the friend adding party is the requesting party that sends the friend adding request to request adding the target object as a friend; A bidirectional relationship chain is established between the user ID of the target object and the user ID of the friend adding party; the bidirectional relationship chain is a relationship chain indicating that the target object and the friend adding party are bidirectional friends.
15. The device according to claim 14, characterized in that The first two-way friend relationship establishment module is further used for: Storing a bidirectional relationship chain between the target object and the friend adding party; A notification is sent to the first social application and the second social application that the target object has been added as a two-way friend; the sent notification is used to instruct the first social application and the second social application to update their respective friend lists.
16. The device according to claim 12, characterized in that The device also includes a verification module, which is used to: Extracting the user ID of the target object from the friend adding request; Based on the user identifier of the target object, obtaining a control state of a two-way friend authentication function in the second social application; According to the control state, it is determined whether the second social application starts the two-way friend verification function.
17. The device according to claim 16, characterized in that The verification module is also used for: Verifying the friend adding party and the target object; When the verification is passed, the step of determining whether the second social application starts the two-way friend verification function according to the control state is performed.
18. The device according to claim 17, characterized in that The verification module is also used for: authenticating the friend adding party based on a user identifier of the friend adding party in the friend adding request; authenticating the target object based on a user identifier of the target object in the friend adding request; Based on the user identification of the friend adding party and the user identification of the target object, the relationship between the friend adding party and the target object is verified.
19. The device according to claim 12, characterized in that The first unidirectional friend relationship includes a first unidirectional relationship chain; the second bidirectional friend relationship establishment module is further used for: Sending the first unidirectional relationship chain to a social server corresponding to the first social application, so that the social server stores the first unidirectional relationship chain; The first unidirectional relationship chain sent to the social server is used to instruct the social server to send a notification to the first social application that the target object has been added as a friend.
20. The device according to claim 12, characterized in that The second unidirectional friend relationship includes a second unidirectional relationship chain; the second unidirectional relationship chain is used to trigger the social server to send a notification to the first social application that the target object has added the friend adding party as a friend, so that the first social application updates the friend list of the friend adding party.
21. The device according to claim 12, characterized in that The second unidirectional relationship chain is further used to trigger the social server to send a prompt message of successful friend addition to the enterprise social server; the second bidirectional friend relationship establishment module is also used to: After receiving the prompt message sent by the social server, a friend list update notification is sent to the second social application, so that the second social application updates the friend list of the target object based on the friend list update notification.
22. The device according to any one of claims 12 to 21, characterized in that The device also includes a verification module, which is used to: Obtaining the identity category identifier of the target object; Determining the identity category of the target object based on the identity category identifier of the target object; If the identity category of the target object is the target identity category, then when the first social application and the second social application are the same type of applications, the first two-way friend relationship establishment module is executed to establish a two-way friend relationship for indicating that the target object and the friend adding party are two-way friends according to the friend adding request; when the first social application and the second social application are different types of applications, the first two-way friend relationship establishment module is executed to establish a first unidirectional friend relationship locally, and initiate an asynchronous adding request to the social server corresponding to the first social application, so that the social server establishes a second unidirectional friend relationship.
23. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.
24. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
25. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Method and system for adding friends in entertainment platform
CN101079790A
Method and device for establishing social relationship and readable medium
CN108540524A
An information input method and a mobile terminal
CN109033898A
