Method, device and equipment for establishing social relationship chain and storage medium
By acquiring and integrating primary and secondary relationship chains, the problem of slow and excessive establishment of social relationship chains in existing technologies has been solved, achieving efficient and accurate establishment of social relationship chains and improving the accuracy of Internet services.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2020-10-16
- Publication Date
- 2026-04-17
AI Technical Summary
In existing technologies, establishing social relationship chains by manually adding friends is slow, while directly establishing relationship chains leads to an overabundance of social relationship chains, resulting in inaccurate targeting of internet services.
By obtaining the object identifier of the first object and the object identifiers of multiple second objects, a primary relationship chain and a secondary relationship chain are established and integrated into a social relationship chain. Interactive operation data is then used to mine the relationships between users.
It enables the efficient and accurate establishment of social relationship chains, improves the speed of relationship chain establishment and ensures its effectiveness, and enhances the targeting accuracy of Internet services.
Smart Images

Figure CN112149002B_ABST
Abstract
Description
Technical Field
[0001] This application relates to big data computing using the Internet and cloud technologies, and more particularly to a method, apparatus, electronic device, and computer-readable storage medium for establishing social relationship chains. Background Technology
[0002] With the popularization of the Internet and the development and advancement of terminal hardware technology, users can conduct social interactions such as instant communication and content sharing through personal computers or mobile phones.
[0003] Big data computing in cloud technology plays a crucial role in the social relationship chains of the computing internet. By computing massive amounts of user data, it is possible to uncover the relationships between users and thus build social relationship chains. These relationship chains are the foundation for providing users with accurate online services (such as friend recommendations and information recommendations). Each user can be considered a node in a social network, and the connection between two nodes forms a relationship chain.
[0004] However, building relationship chains through manual friend adding is slow, while building relationships directly between users and their friends' friends can lead to an overabundance of social relationship chains, resulting in inaccurate targeting of internet services based on social relationship chains.
[0005] In summary, the relevant technologies lack effective solutions for establishing efficient and accurate social relationship chains. Summary of the Invention
[0006] This application provides a method, apparatus, electronic device, and computer-readable storage medium for establishing social relationship chains, which can efficiently and accurately establish social relationship chains.
[0007] The technical solution of this application embodiment is implemented as follows:
[0008] This application provides a method for establishing a social relationship chain, including:
[0009] For the information sent by the first object, obtain the object identifier of the first object, and obtain the object identifiers of multiple second objects that perform interactive operations on the information;
[0010] Based on the object identifier of the first object and the object identifiers of the plurality of second objects, a first-level relationship chain is established between the first object and the plurality of second objects;
[0011] Based on the object identifiers of multiple second objects that have all performed interactive operations on the information, a secondary relationship chain is established between the multiple second objects that have performed interactive operations on the same information;
[0012] The first-level relationship chain and the second-level relationship chain are integrated to obtain the social relationship chain.
[0013] This application provides an apparatus for establishing a social relationship chain, comprising:
[0014] The acquisition module is used to acquire the object identifier of the first object in response to the information sent by the first object, and to acquire the object identifiers of a plurality of second objects that perform interactive operations on the information;
[0015] A primary relationship chain establishment module is used to establish a primary relationship chain between the first object and the plurality of second objects based on the object identifier of the first object and the object identifiers of the plurality of second objects.
[0016] The secondary relationship chain establishment module is used to establish a secondary relationship chain between multiple second objects that have performed interactive operations on the same information, based on the object identifiers of multiple second objects that have all performed interactive operations on the information.
[0017] An integration module is used to integrate the primary relationship chain and the secondary relationship chain to obtain a social relationship chain.
[0018] In the above scheme, the acquisition module is further configured to receive the identifier of the first object sent by the terminal of the second object; wherein the identifier of the first object is sent by the terminal of the second object, and is sent when an interactive operation is performed on the information corresponding to the information identifier is received; wherein the identifier of the first object is extracted by the terminal of the second object from the information.
[0019] In the above scheme, the acquisition module is further configured to receive the object identifier and information identifier of the second object sent by the terminal of the second object; wherein the object identifier and the information identifier of the second object are sent by the terminal of the second object, and are sent when an interactive operation is performed on the information corresponding to the information identifier is received; wherein the information identifier is extracted by the terminal of the second object from the information; different information is identified according to the information identifier to determine the identifier of the second object that performs the interactive operation on each piece of information.
[0020] In the above scheme, the first-level relationship chain establishment module is further configured to perform the following operations for each piece of information identified according to the information identifier: construct a first mapping relationship, wherein the first mapping relationship includes the object identifier of the first object and the object identifier of the second object that performs the interaction operation on the information; write the first mapping relationship into the relationship chain table of the database and mark it as a first-level relationship chain.
[0021] In the above scheme, the secondary relationship chain establishment module is further configured to perform the following operations for each piece of information identified according to the information identifier: construct a second mapping relationship, wherein the second mapping relationship includes object identifiers of any two second objects that perform interactive operations on the information; write the second mapping relationship into the relationship chain table of the database and mark it as a secondary relationship chain.
[0022] In the above scheme, the social relationship chain establishment device further includes: a storage module, used to store the object identifier of the received second object into the object list corresponding to the information identifier in the first cache space; the secondary relationship chain establishment module is further used to obtain the object list corresponding to the information identifier from the first cache space; and to construct a corresponding second mapping relationship based on the object identifiers of any two second objects in the object list.
[0023] In the above scheme, the storage module is further configured to set the cache time of the object identifier of the second object; and to clear the object identifier of the second object whose cache time has expired in the object list of the first cache space.
[0024] In the above scheme, the secondary relationship chain establishment module is also used to query the relationship chain table of the database; when the second mapping relationship does not exist in the relationship chain table, the second mapping relationship is stored in the relationship chain queue in the second cache space; the second mapping relationship in the relationship chain queue is periodically retrieved from the second cache space, the retrieved second mapping relationship is written into the relationship chain table of the database, and marked as a secondary relationship chain.
[0025] In the above scheme, the social relationship chain establishment device further includes: a forwarding module, which is used to replace the information identifier in the forwarded information with a new information identifier when the information sent by the terminal of the first object is forwarded by the terminal of the second object.
[0026] In the above scheme, the forwarding module is further configured to replace the object identifier of the first object in the forwarded information with the object identifier of the second object when the information sent by the terminal of the first object is forwarded by the terminal of the second object.
[0027] In the above scheme, the integration module is further used to connect the multiple first-level relationship chains and the multiple second-level relationship chains based on a common object to obtain the social relationship chain; wherein, when both first-level and second-level relationship chains exist between the objects, only the first-level relationship chains between the objects are retained.
[0028] In the above scheme, the interactive operation includes at least one of the following: viewing the information, forwarding the information, and saving the information.
[0029] This application provides an electronic device, including:
[0030] Memory, used to store executable instructions;
[0031] The processor, when executing executable instructions stored in the memory, implements the method for establishing a social relationship chain provided in the embodiments of this application.
[0032] This application provides a computer-readable storage medium storing executable instructions, which, when executed by a processor, implement the method for establishing a social relationship chain provided in this application.
[0033] The embodiments of this application have the following beneficial effects:
[0034] Based on the different information-based interactions between objects, it is possible to collect relationship chains that reflect different interactions, and to obtain social relationship chains by integrating these relationship chains. This not only improves the speed of establishing social relationship chains but also ensures their effectiveness. Attached Figure Description
[0035] Figure 1 This is a schematic diagram of the social relationship chain establishment system architecture 100 provided in the embodiments of this application;
[0036] Figure 2 This is a schematic diagram of the structure of the social relationship chain establishment device 200 provided in the embodiments of this application;
[0037] Figure 3 This is a flowchart illustrating the method for establishing a social relationship chain provided in an embodiment of this application;
[0038] Figure 4 This is a flowchart illustrating the method for establishing a social relationship chain provided in an embodiment of this application;
[0039] Figure 5 This is a schematic diagram of the social relationship chain provided in the embodiments of this application;
[0040] Figure 6 This is a flowchart illustrating the method for establishing a social relationship chain provided in an embodiment of this application;
[0041] Figure 7 This is a flowchart illustrating the method for establishing a social relationship chain provided in an embodiment of this application;
[0042] Figure 8A This is a schematic diagram illustrating a scenario for establishing a social relationship chain, as provided in an embodiment of this application.
[0043] Figure 8B This is a schematic diagram of the relationship chain established by the method for establishing a social relationship chain provided in the embodiments of this application;
[0044] Figure 8C This is a schematic diagram of the relationship chain established by the method for establishing a social relationship chain provided in the embodiments of this application;
[0045] Figure 9A This is a schematic diagram illustrating the process of establishing a first-level relationship chain according to an embodiment of this application;
[0046] Figure 9B This is a schematic diagram illustrating the process of establishing a secondary relationship chain provided in an embodiment of this application;
[0047] Figure 9C This is a schematic diagram of the timed task processing for the establishment of a secondary relationship chain provided in an embodiment of this application;
[0048] Figure 10 This application provides a schematic diagram of a social relationship chain in its embodiments;
[0049] Figure 11A-11C This is a schematic diagram of a social relationship chain application provided in an embodiment of this application;
[0050] Figure 12A-12B This is a schematic diagram of a social relationship chain application provided in an embodiment of this application;
[0051] Figures 13A-13B This is a schematic diagram of a social relationship chain application provided in an embodiment of this application;
[0052] Figures 14A-14B This is a schematic diagram of a social relationship chain application provided in an embodiment of this application. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0054] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0055] If the application documents contain similar descriptions such as "first" or "second", the following explanation shall be added: In the following description, the terms "first", "second", and "third" are used only to distinguish similar objects and do not represent a specific order of objects. It is understood that "first", "second", and "third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described as examples can be implemented in an order other than that shown in the example illustrations or descriptions.
[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0057] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.
[0058] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0059] 1) Social relationship chain: refers to the point-to-point relationship between objects (also known as users, such as users of Internet services). Each object can be a node in a social network, and the line connecting two points becomes the edge of the relationship chain. Multiple points and their connections constitute a social relationship chain.
[0060] 2) Object identifier: A unique identifier that can identify an object, such as the object's account or identity information.
[0061] 3) First-level relationship chain: A relationship chain established between objects that form a direct interactive relationship based on information. For example, if user A and user B interact on the same information, then the two constitute a first-level relationship chain.
[0062] 4) Secondary Relationship Chain: A relationship chain established between objects that form an indirect interactive relationship based on information. For example, if user A and user B interact on the same information, and user B and user C interact on the same information (while user A and user C do not interact on the same information), then the relationship chain between user A and user C is a secondary relationship chain.
[0063] This application provides a method, apparatus, electronic device, and computer-readable storage medium for establishing social relationship chains, which can quickly establish effective social relationship chains, solving the problems of slow relationship chain accumulation and excessively broad relationship chains, thereby enabling services for the Internet.
[0064] The following describes exemplary applications of electronic devices that implement the social relationship chain establishment method provided in the embodiments of this application. These electronic devices can be implemented as various types of user terminals such as laptops, tablets, desktop computers, set-top boxes, and mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), or as servers or server clusters. They can also be implemented in a collaborative manner between user terminals and servers. The following describes exemplary applications when the electronic device is implemented as a server.
[0065] See Figure 1 , Figure 1 This is a schematic diagram of the architecture of the social relationship chain establishment system 100 provided in the embodiments of this application. Figure 1 In this process, the terminal (terminal 400-1 and terminal 400-2 are shown as examples) connects to the server 200 through the network 300, which can be a wide area network, a local area network, or a combination of both. The server 200 transmits data with the database 500.
[0066] As an example, a first object (e.g., a user holding an account on a login client) can share information (e.g., social updates, short videos) with a second object, client 410-2, on terminal 400-2 via client 410-1 in terminal 400-1 (e.g., a social networking client, short video client). Client 410-2 in terminal 400-2 can then send interactive data to server 200 for processing. Server 200 can obtain the object identifier of the first object (e.g., a user's account on a social network, which can be used as a credential for logging into various clients) based on the information sent by the first object, and obtain the object identifiers of multiple second objects that perform interactive operations on the information. It then establishes a primary relationship chain between the first object and the multiple second objects, and a secondary relationship chain between the multiple second objects that perform interactive operations on the same information. The primary and secondary relationship chains are then integrated to obtain a social relationship chain. Server 200 can store the received data and the established relationship chains in database 500, which can be retrieved when needed. Server 200 can implement various internet applications based on the established social relationship chains, such as information recommendation and potential friend recommendation.
[0067] In some embodiments, server 200 may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Terminal 400 may be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smartwatch, etc., but is not limited thereto. Terminals and servers can be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment.
[0068] For example, the method for establishing social relationship chains provided in this application can be provided as a cloud service. The backend server of any application (e.g., a social networking application) can submit big data on user interactions in the application to the cloud service provider, and the cloud service can then mine the social relationship chain. The client's backend server can also request the social relationship chain from the cloud service and provide more accurate Internet services based on the social relationship chain, such as friend recommendations and information recommendations.
[0069] See Figure 2 , Figure 2 This is a schematic diagram of the structure of server 200 provided in an embodiment of this application, taking server 200 as an example of a device for establishing social relationship chains. Figure 2 The server 200 shown includes at least one processor 210, memory 230, and at least one network interface 220. The various components of server 200 are coupled together via a bus system 240. It is understood that the bus system 240 is used to implement communication between these components. In addition to a data bus, the bus system 240 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2 The general labeled all buses as Bus System 240.
[0070] Processor 210 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0071] Memory 230 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. Memory 250 may optionally include one or more storage devices physically located away from processor 210.
[0072] The memory 230 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 230 described in this application embodiment is intended to include any suitable type of memory.
[0073] In some embodiments, memory 230 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.
[0074] Operating system 231 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;
[0075] The network communication module 232 is used to reach other computing devices via one or more (wired or wireless) network interfaces 220, such as Bluetooth, WiFi, and Universal Serial Bus (USB).
[0076] In some embodiments, the social relationship chain establishment apparatus provided in this application can be implemented in software. Figure 2 A social relationship chain establishment device 233 stored in memory 230 is shown. This device can be software in the form of programs and plug-ins, and includes the following software modules: an acquisition module 2331, a first-level relationship chain module 2332, a second-level relationship chain module 2333, and an integration module 2334. These modules are logically connected and can therefore be arbitrarily combined or further divided according to their implemented functions. The functions of each module will be described below.
[0077] The exemplary application and implementation of the server provided in the embodiments of this application will be used as an example to illustrate the method for establishing a social relationship chain provided in the embodiments of this application. Therefore, the execution subject of each step will not be repeated below.
[0078] See Figure 3 , Figure 3 This is a flowchart illustrating a method for establishing a social relationship chain provided in an embodiment of this application, which will be combined with... Figure 3 The steps shown are explained.
[0079] In step 101, for the information sent by the first object, the object identifier of the first object is obtained, and the object identifiers of multiple second objects that perform interactive operations on the information are also obtained.
[0080] In some embodiments, the terminal of the second object may receive the identifier of the first object sent by the terminal of the second object; wherein the identifier of the first object is sent by the terminal of the second object and is sent when an interactive operation is performed on the information corresponding to the information identifier is received; wherein the identifier of the first object is extracted by the terminal of the second object from the information.
[0081] As an example, a first object can send a message to a second object individually, such as through a one-to-one chat window or in a group of objects (e.g., a group chat window). The message sent by the first object can include both its own object identifier and a message identifier. When the second object performs an interactive operation on the message received from the first object, the second object's terminal (e.g., ...) Figure 1 The client 410-1 in terminal 400-1 and the client 410-2 in terminal 400-2 shown extract the information identifier and the object identifier of the first object from the information and send them to the backend server (e.g., ...). Figure 1 (See server 200 shown). Thus, during the information interaction process, data related to the interaction can be collected as the basic data for establishing social relationship chains.
[0082] In some embodiments, see Figure 4 , Figure 4 The diagram illustrates a flowchart of a method for establishing a social relationship chain according to an embodiment of this application. Step 101 can be implemented through steps 1011-1012, which will be described in detail below.
[0083] In step 1011, the terminal receiving the second object sends the object identifier and information identifier of the second object.
[0084] In step 1012, different information is identified based on the information identifier to determine the identifier of the second object for which an interactive operation is performed for each piece of information.
[0085] As an example, after receiving information sent by the first object, the terminal of the second object can interact with the information. The terminal of the second object can obtain the object identifier of the second object. The information may include content, object identifier, and information identifier. When the second object performs an interactive operation on the information received from the first object, the terminal of the second object extracts the information identifier and the object identifier of the second object from the information and sends them to the backend server (e.g., [example server]). Figure 1 (See server 200 shown). After receiving the object identifier and information identifier of the second object, the backend server can identify different information based on the information identifier to determine the identifier of the second object for which an interactive operation will be performed for each piece of information.
[0086] As an example, interactive actions performed on information may include at least one of the following: viewing information, forwarding information, or saving information.
[0087] For example, the first object can send an activity link to a group of friends. The activity link can carry the first object's object identifier and information identifier. The object identifier can be a unique user identifier such as an object ID, the object's account, or identity information. The activity link can be a plaintext access path, such as a Uniform Resource Locator (URL), or it can be a link to a backend server (such as...). Figure 1 The identifiers in the active link content of the server 200 shown are one-to-one correspondences. Subsequently, the second object can log in to the page associated with the active link. At this time, the active link of the second object is displayed in the foreground, such as an application client or a web page (e.g., Figure 1 The client 410-1 in terminal 400-1 and the client 410-2 in terminal 400-2 shown can obtain the object identifier of the second object, and obtain the information identifier and the object identifier of the first object from the activity link. They then send the object identifier of the second object, the object identifier of the first object, and the information identifier to the backend server. After receiving the object identifier of the second object and the information identifier, the backend server can identify different information based on the information identifier and determine the object identifier of the object for which the interactive operation is performed for each piece of information.
[0088] It is evident that the mechanism of carrying object identifiers in information can effectively identify the source of information. Regardless of the forwarding of information across platforms or how it flows between users, the flow path can be effectively tracked through object identifiers, providing accurate and sufficient big data for the mining of social relationship chains.
[0089] In step 102, a first-level relationship chain is established between the first object and the multiple second objects based on the object identifier of the first object and the object identifiers of the multiple second objects.
[0090] In some embodiments, see Figure 4 Step 102 can be achieved through steps 1021-1022, which will be explained in detail below.
[0091] Perform the following operations for each piece of information identified based on the information identifier:
[0092] In step 1021, the first mapping relationship is constructed.
[0093] The first mapping relationship includes the object identifier of a first object and the object identifier of a second object that performs an interactive operation on the information. As an example, the first mapping relationship can be an ordered binary array of object identifiers or an unordered set of object identifiers.
[0094] It should be noted that the second object represents the target of the information sent by the first object; it is a type of object, not a specific one or several objects.
[0095] In step 1022, the first mapping relationship is written into the relation chain table of the database and marked as a first-level relation chain.
[0096] For example, when the second object clicks on the activity link sent by the first object, a direct connection is actually established between the first and second objects, and the backend server (such as...) Figure 1 The server 200 shown can establish a first mapping relationship between the object identifiers of the first object and the object identifiers of the second object based on the received object identifiers of the first object and the second object. This first mapping relationship is used to represent the relationship chain between the first object and the second object. The first mapping relationship is written into the relationship chain table in the database for storage and marked as a first-level relationship chain.
[0097] See Figure 5 , Figure 5 The diagram illustrates a social relationship chain provided in an embodiment of this application. As an example, the primary relationship chain between user A and user B can be stored in the database relationship chain table in the following format: Figure 5 As shown, the record includes at least the following fields: User A's object identifier A, User B's object identifier B, and the relationship chain category marked as a first-level relationship chain.
[0098] As an example, the database can be a relational database, such as building a two-dimensional table to store each relationship chain record, with the object identifier and relationship chain category as the fields of the record, or it can be a non-relational database, such as storing it in a key-value pair manner, with the object identifier as the key and the relationship chain type as the value.
[0099] It is evident that by establishing and storing the mapping between the object identifier of the first object and the object identifier of the second object, the relationship chain between the first object and the directly related second object can be quickly and easily constructed, thus improving the speed of establishing the relationship chain.
[0100] In step 103, a secondary relationship chain is established between multiple second objects that perform interactive operations on the same information, based on the object identifiers of multiple second objects that all perform interactive operations on the information.
[0101] In some embodiments, see Figure 4 , Figure 4The diagram illustrates a flowchart of a method for establishing a social relationship chain according to an embodiment of this application. Step 103 can be implemented through steps 1031-1032, which will be described in detail below.
[0102] For each piece of information identified based on the information identifier, the operations described in steps 1031 and 1032 are performed, which are explained below.
[0103] In step 1031, a second mapping relationship is constructed, wherein the second mapping relationship includes the object identifiers of any two second objects that perform interactive operations on the information.
[0104] As an example, you can iterate through the object identifiers of a second object that has performed interactive operations on the same information, and establish a second mapping relationship between each pair of object identifiers of the second object during the traversal.
[0105] In step 1032, the second mapping relationship is written into the relation chain table of the database and marked as a second-level relation chain.
[0106] For example, the backend server of an activity can identify multiple users who perform interactive operations on the same activity link information based on information identifiers and object identifiers, and establish a second mapping relationship between the object identifiers of multiple users to represent the relationship chain between users. This second mapping relationship is then stored in a relational chain table in the database and marked as a secondary relationship chain. As an example, the secondary relationship chain between user B and user C can be stored in the database relational chain table in the following format: Figure 5 As shown, the record includes at least the following fields: User B's object identifier B, User C's object identifier C, and the relationship chain category marked as a second-level relationship chain.
[0107] Through the above step 103, the correlation between objects that access the same information is fully explored. Based on the establishment of the primary relationship chain, a relationship chain between such objects is established as a secondary relationship chain. This secondary relationship chain can further improve the relationship chain between objects based on the primary relationship chain. Moreover, the secondary relationship chain represents the substantial object association and ensures the effectiveness of the relationship chain.
[0108] In some embodiments, see Figure 6 ,based on Figure 4 , Figure 6 The diagram shows a flowchart of a method for establishing a social relationship chain provided in an embodiment of this application. After receiving the object identifier and information identifier of the second object sent by the terminal of the second object in step 1011, step 1013 can be performed to store the received object identifier of the second object into the object list corresponding to the information identifier in the first cache space.
[0109] As an example, the object identifier of the received second object is stored in the object list corresponding to the information identifier in the first cache space, where the first cache space can be... Figure 1 The cache space of server 200 shown can also be a cache server deployed independently of server 200 or a cache space in a cache server cluster, serving as a transit point for data such as object identifiers before they are stored in the database.
[0110] As an example, a database that stores relational linked lists could be... Figure 1 The database running on server 200 shown can also be a database server or cluster deployed independently of server 200.
[0111] In some embodiments, see Figure 6 Step 1031 can be achieved through steps 1031a-1031b, which will be explained in detail below.
[0112] In step 1031a, a list of objects corresponding to the information identifier is obtained from the first cache space.
[0113] As an example, the information identifier can be used as an index to retrieve a list of objects corresponding to the information identifier from the first cache space.
[0114] In step 1031b, a corresponding second mapping relationship is constructed based on the object identifiers of any two second objects in the object list.
[0115] Through the above steps 1031a-1031b, based on the received object identifier and information identifier, the object identifiers of the objects that have performed interactive operations on the information are stored in the object list corresponding to the information identifier. For each piece of information, a list of object identifiers of the objects that have performed interactive operations on the information is maintained. When needed, the object identifier can be quickly retrieved from the object list, saving processing time and improving the response rate.
[0116] In some embodiments, after storing the received object identifier of the second object into the object list corresponding to the information identifier in the first cache space, the cache time of the object identifier of the second object can be set, and the object identifier of the second object whose cache time has expired can be cleared from the object list in the first cache space.
[0117] As an example, the cache time can be set to a fixed value or it can be set to change dynamically based on the remaining available space in the cache. For example, the cache time and the remaining available space in the cache can be set to a positive correlation, such as a linear positive correlation. When the remaining available space decreases, the cache time decreases accordingly, and when the remaining available space increases, the cache time increases accordingly.
[0118] As an example, the caching time can be set according to the timeliness requirements of different network services supported by the relationship chain. For instance, the caching time set for friend recommendation services is longer than that set for news recommendation services. Timeliness requirements can be characterized by a timeliness parameter. A larger timeliness parameter indicates worse timeliness, meaning the two are negatively correlated. For example, consider the push cycle of a network service. A longer push cycle indicates a weaker timeliness requirement, allowing for a longer caching time, indicating a positive correlation between the push cycle and caching. Conversely, a shorter push cycle indicates a stronger timeliness requirement, allowing for a shorter caching time, meaning a negative correlation between the timeliness parameter and caching time.
[0119] In other embodiments, when the available space of the first cache space is lower than the available space threshold, the object identifiers in the object list can be sorted from smallest to largest according to the remaining cache time, and the top-ranked object identifiers (e.g., a predetermined proportion or a predetermined number) can be cleared. As an example, the top 20% of the object identifiers can be cleared.
[0120] By clearing object identifiers through step 103 above, cache space can be effectively saved, zombie users can be avoided, the timeliness of object identifiers in the object list can be guaranteed, and the effectiveness of building relationship chains using object identifiers in the object list can be improved.
[0121] In some embodiments, see Figure 7 , Figure 7 The diagram shows a flowchart of a method for establishing a social relationship chain provided in an embodiment of this application. Figure 4 Step 1032 can be achieved through steps 201-203, which will be explained in detail below.
[0122] In step 201, the relational linked list in the database is queried.
[0123] In step 202, when the second mapping relationship does not exist in the relation chain list, the second mapping relationship is stored in the relation chain queue in the second cache space. When the second mapping relationship exists in the relation chain list, the storage operation does not need to be repeated.
[0124] The second cache space can be Figure 1 The cache space in server 200 shown can also be a cache server deployed independently of server 200 or a cache space in a server cluster, serving as a transit point for data such as object identifiers before they are stored in the database.
[0125] In step 203, mapping relationships in the relationship chain queue are periodically retrieved from the second cache space, written into the relationship chain table of the database, and marked as secondary relationship chains. Alternatively, when the mapping value stored in the relationship chain queue is greater than or equal to the processing threshold, the mapping relationship in the relationship chain queue is retrieved, written into the relationship chain table of the database, and marked as a secondary relationship chain.
[0126] As an example, since the association between objects represented by secondary relationship chains is weaker than that of primary relationship chains, and the demand for secondary relationship chains may not be real-time, in order to reduce the processing pressure on the database, when writing the mapping relationship into the relationship chain table of the database, it can be cached first and then processed later, instead of writing the mapping relationship into the database in real time, thus reducing the processing pressure on the database.
[0127] In some embodiments, when information containing the same content is forwarded multiple times by the same second object, or when it is forwarded separately by different second objects, the information identifier in the information is always updated to a completely new information identifier (i.e., different from all existing information identifiers). For example, when information sent by the terminal of the first object is forwarded by the terminal of the second object, the terminal of the second object can replace the information identifier in the forwarded information with a new information identifier.
[0128] For example, when the second object forwards the active link sent by the first object, the second object's terminal (such as...) Figure 1 The client 410-1 in terminal 400-1 and the client 410-2 in terminal 400-2 shown can regenerate different information identifiers and replace the original information identifiers in the active link, so that the information identifiers in the forwarded active link are different from the information identifiers in the original active link.
[0129] By using the above-mentioned identifier replacement scheme, information with the same content can be forwarded with different identifiers. If the identifier remains unchanged, the social relationship chain established by the server may become too large, resulting in a large number of invalid relationship chains. Therefore, having different identifiers for information with the same content when forwarded can avoid accumulating redundant relationship chains, ensure the accuracy of social relationship chains, and also ensure the targeting accuracy of Internet services based on social relationship chains.
[0130] In some embodiments, when information containing the same content is sent multiple times by a first object, the information identifier in the information always remains unchanged, thereby ensuring that information with the same content always includes the same information identifier.
[0131] For example, information with the same content sent by a first object in different scenarios (e.g., different objects or different groups) has the same information identifier. For instance, when the first object sends information containing the same content to second object 1, second object 2, group 1, and group 2, the information identifiers received by second object 1, second object 2, group 1, and group 2 are the same. This ensures that when second objects in different scenarios interact with the information, the information identifiers sent to the server are the same. Therefore, for second objects that have all performed interactive operations based on information with the same content, the server establishes a second mapping relationship between the object identifiers of any two second objects, and establishes a secondary relationship chain between the second objects based on this second mapping relationship.
[0132] For example, see Figure 8A , Figure 8A This illustration shows a scenario illustrating the establishment of a social relationship chain according to an embodiment of this application. User X sends the same message to both group A and group B. Since it is the same message, users A1 and A2 in group A, and users B1 and B2 in group B, receive the same message identifier. When users A1, A2, B1, and B2 interact with this message, the backend server stores the object identifiers of users A1, A2, B1, and B2 in the object list corresponding to the message identifier, and constructs a second mapping relationship between each pair of object identifiers of users A1, A2, B1, and B2. This represents the secondary relationship chain established between users A1, A2, B1, and B2. The constructed relationship chain is as follows: Figure 8B As shown in relation chain 1, user X has established first-level relation chains with users A1, A2, B1, and B2, and second-level relation chains have been established between each pair of users A1, A2, B1, and B2.
[0133] By setting the same information identifier for information with the same content, the server can establish a secondary relationship chain between second objects that interact with the same information, which can speed up the establishment of relationship chains and rapidly expand the scale of social relationship chains.
[0134] In some embodiments, each time the same content information is sent, the information identifier carried therein is updated to a completely new information identifier (i.e., different from the existing information identifiers).
[0135] For example, each time the first object sends information with the same content, it has a different information identifier. That is, even if the information sent has the same content, the information identifiers in the information are different. For instance, when the first object sends information with the same content to second object 1, second object 2, group 1, and group 2 respectively, the information identifiers in the information are different. When the second object forwards the information sent by the first object, the second object's terminal will regenerate a different information identifier and replace the original information identifier in the information. For instance, when the second object forwards the information sent by the first object to a third object, it updates the information identifier in the information, so that the information identifier in the information forwarded to the third object is different from the information identifier in the information received by the second object.
[0136] It should be noted that the third object is the target of the information sent by the second object; it is a type of object, not a specific one or more objects.
[0137] For example, see Figure 8A User X sends messages with identical content to groups A and B. Since each message has a different identifier, users A1 and A2 in group A receive messages with the same identifier, and users B1 and B2 in group B receive messages with the same identifier. However, the identifiers received by users in group A and group B are different. When users A1, A2, B1, and B2 interact with this message, the backend server stores the object identifiers of users A1 and A2, and users B1 and B2, into different object lists corresponding to the different identifiers. Then, it constructs relationship chains based on these different object lists, as shown in the diagram. Figure 8C As shown in relation chain 2, user X has established first-level relation chains with users A1, A2, B1, and B2. However, only second-level relation chains have been built between users A1 and A2, who belong to the same group, and between users B1 and B2. Second-level relation chains between users in different groups (such as between users A1 and B1) have not been built.
[0138] Unlike assigning the same identifier to information with identical content, this method assigns different identifiers to each transmission of the same content, allowing the server to recognize them as distinct pieces of information and construct separate relationship chains. This filters out a large number of invalid secondary relationship chains. For example, [the method could be used to...] Figure 8C Relationship chain 2 and Figure 8B By comparing relation chain 1 in the middle, we can find that Figure 8C The relationship chain 2 established in the middle simplifies the number of secondary relationship chains, improves the accuracy of social relationship chains, and also reduces the processing load on the server.
[0139] In some embodiments, when information with the same content is sent multiple times, such as when it is sent multiple times by a first object, or when it is forwarded multiple times by the same second object, or when it is forwarded by multiple different second objects respectively, if the sending behavior meets the update condition of the information identifier, the information identifier in the information will be updated to a new information identifier, thereby enabling the server to recognize it as new information.
[0140] The update conditions include at least one of the following: the degree of overlap in user profile data between the first object sending the information and the second object receiving the information, the degree of tag matching between the groups receiving the information, and the number of times information with the same content is sent.
[0141] As an example, when the first object sends information with the same content multiple times, if the overlap between the user profile data of the second object and the first object sending the information is greater than or equal to the matching threshold, the terminal of the first object sets the same information identifier in the information; if the overlap between the user profile data of the second object receiving the information and the first object sending the information is less than the matching threshold, the terminal of the first object updates the information identifier in the information so that the information identifier in the sent information is different.
[0142] When a first object sends multiple messages with the same content, if the overlap in user profile data between the first object sending the message and the second object receiving the message is greater than or equal to a matching threshold, it indicates that the first object sending the message and the second object receiving the message have similar personalities and are likely to have a relationship. Therefore, without changing the message's identifier, when the second object receiving the message performs an interaction with the message, the backend server can build a secondary relationship chain between multiple second objects based on the same identifier. This achieves the effect of mining potential social relationships and expanding the relationship chain using similar objects, which can both accelerate the construction speed of social relationship chains and ensure the accuracy of social relationship chains.
[0143] As an example, when a first object sends information with the same content multiple times, if the tag matching degree between the receiving groups is greater than or equal to the group matching threshold (e.g., when the first object sends information with the same content to group 1 and group 2), if the tag matching degree between group 1 and group 2 is greater than the group matching threshold, then the information identifiers of the information received in group 1 and group 2 are the same. The first object's terminal sets the same information identifier in the information; when the tag matching degree of the receiving group is less than the group matching threshold, the first object's terminal updates the information identifier in the information to make the information identifiers in the sent information different.
[0144] The group's tags include at least one of the following: group topic, group members' occupation, group members' gender, and group members' age.
[0145] For example, when a first object sends the same message to both Group 1 and Group 2, if the tag matching degree between Group 1 and Group 2 is greater than the group matching threshold, the information identifier received in Group 1 and Group 2 will be the same. Therefore, after a second object in Group 1 and Group 2 interacts with the message, a secondary relationship chain can be established between the second objects across groups. By making the information identifier of the same message received by different groups with similar tags the same, the effect of mining potential relationship chains and accelerating the construction of social relationship chains can be achieved.
[0146] As an example, when the first object sends information with the same content, if the number of times it sends the information is greater than or equal to the update number threshold, the terminal of the first object updates the information identifier in the information so that the information identifier in the sent information is different; if the number of times it sends the information is less than the update number threshold, the terminal of the first object sets the same information identifier in the information.
[0147] When the first object sends information with the same content multiple times, if the number of times it sends the information is less than the update number threshold, the terminal of the first object sets the same information identifier for the sent information. This allows the server to establish a secondary relationship chain between the second objects that interact with the information with the same content, thereby uncovering potential social relationships and accelerating the establishment of the relationship chain.
[0148] In some embodiments, when information sent by the first object is forwarded by the second object to one or more third objects, the terminal of the second object replaces the object identifier of the first object in the forwarded information with the object identifier of the second object.
[0149] For example, when the second object forwards the information received from the first object to the third object 1 and the third object 2, the terminal of the second object replaces the identifier of the first object in the information with the identifier of the second object. That is, the object identifiers in the information received by the third object 1 and the third object 2 are both the object identifiers of the second object.
[0150] By ensuring that the object identifier in the information sent by each object points only to the object that sent the information, and establishing a primary relationship chain between the second and third objects that are the information sending objects, the source of the information and the associated objects of the primary relationship chain are clarified, thus ensuring the accuracy of the primary relationship chain.
[0151] In step 104, the primary relationship chain and the secondary relationship chain are integrated to obtain the social relationship chain.
[0152] In some embodiments, overlapping objects in the primary and secondary relationship chains are identified, and the primary and secondary relationship chains are connected based on the overlapping objects.
[0153] By connecting primary and secondary relationship chains based on overlapping objects, social relationship chains can be quickly established, reducing device processing load and increasing the speed of establishing social relationship chains.
[0154] When both first-level and second-level relationship chains exist between objects, only the first-level relationship chain between objects is retained.
[0155] In some embodiments, a relationship chain established by a third-party platform can be obtained; the relationship chain established by the third-party platform and the social relationship chain can be integrated to obtain an integrated social relationship chain.
[0156] For example, by acquiring the proprietary relationship chains of backend servers for various types of internet services and integrating these proprietary relationship chains with established social relationship chains, internet services can be provided based on the integrated social relationship chains, thereby expanding the types of internet services that can be provided and improving the accuracy of internet services.
[0157] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.
[0158] See Figure 9A ,exist Figure 9A The diagram illustrates the process of establishing a first-level relationship chain, such as... Figure 9A As shown, in step 801, user A opens the operation activity page on a client or platform (such as WeChat, QQ, etc.) on the terminal. In step 802, the front end of the operation activity page is, for example, an application client, a web page (such as... Figure 1 The client 410-1 in terminal 400-1 and the client 410-2 in terminal 400-2 shown can call the platform's login capabilities to obtain user information (e.g., log in using WeChat and QQ interfaces), and thus obtain userA's user ID (object identifier) userAid. Afterwards, userA can share the content of the operational activity page with friends (or groups, Moments, and other social scenarios). In step 803, the URL of the shared operational activity page content link can automatically carry userA's user ID (object identifier) userAid to identify the source user userA. Then, step 804 is executed to share the link with friends, groups, or Moments.
[0159] If another user, such as user B, logs in and clicks on the link shared by user A, step 805 is executed to determine if user A's userAid exists in the URL. If not, the process ends; if it does, step 806 is executed, where the campaign page retrieves user A's object identifier userAid from the link, then retrieves user B's user ID (object identifier) userBid from the platform, and then sends userAid and userBid to the campaign page's backend server.
[0160] After receiving userAid and userBid, the backend server of the operation activity page executes step 807 to check whether userA and userB's information is stored in the backend server. If they do not exist, the process ends; if they exist, proceed to step 808 to write the relationship chain information of userA and userB into the backend database of the operation activity page, marking it as a first-level relationship chain.
[0161] Specifically, when userB shares the link shared by userA to friends, groups, and Moments, userB's client will replace userAid with userBid in the link. For example, http: / / xxx?userid=[userBid] means that the link shared by userB contains userBid.
[0162] See Figure 9B ,exist Figure 9B The diagram illustrates the process of establishing a two-level relational chain, such as... Figure 9B As shown, in step 901, user enters the linked operation activity page. In step 902, the front end of user's operation activity page obtains user's user ID (object identifier) userid from the platform. In step 903, a new unique UUID is generated. In step 904, the information identifier linkid is obtained from the link. Then, step 907 is executed to send linkid and userid to the back end server of the operation activity page.
[0163] When a link to an operational activity page is sent, the link URL will carry the information identifier linkid.
[0164] In step 908, when the backend server of the operation activity page receives the linkid and userid, it first checks whether there is a user list (object list) userids information corresponding to the linkid in the link cache. The user list userids includes all user IDs (object identifiers) that have clicked the linkid. If it exists, it retrieves the user list userids and then executes step 909, iterates through userids, establishes a mapping between userid and userids[i] (userids[i] represents the user IDs stored in the user list userids, where i is an integer greater than or equal to zero and less than or equal to the total number of user IDs stored in userids), and writes the mapping into the relationship queue cache; if it does not exist, it creates the user list userids corresponding to the linkid and then executes step 910, adds the userid to the user list userids in the link cache of the linkid, and sets the cache time to x days (x is an integer greater than or equal to 0).
[0165] When associating a user with a given user ID with all users under a given link ID, the processing efficiency becomes very low under high concurrency. For example, if a user shares a link to a 500-person group and 100 people click on it, the database writes will be under great pressure, and it will also affect normal page access. Since this relationship chain information does not need to be reflected on the page immediately, as an example, we first cache the information about establishing relationship chains between the user ID and all users under the given link ID. We establish a mapping between user ID and userids[i] (where userids[i] represents the user IDs stored in the user list userids, where i is an integer greater than or equal to zero and less than or equal to the total number of user IDs stored in userids), and write the mapping to a relationship chain queue cache, such as using Redis for caching, and then process it periodically to solve the database pressure problem. In addition, we write the user ID to the user list userids corresponding to the link ID, set a cache timeout, and clear user IDs whose cache timeout has expired.
[0166] See Figure 9C ,based on Figure 9B ,exist Figure 9C The diagram shows the timed task processing during the establishment of a secondary relationship chain, such as... Figure 9CAs shown, in step 911, at predetermined intervals, the relational chain queue cache is read, and m (where m is an integer greater than or equal to zero and less than or equal to the number of mappings in the relational chain queue cache) mapping information entries are retrieved. Taking one of these entries (userA and userB) as an example, step 912 is executed to determine whether userA and userB exist in the user table of the database. If they do not exist, the process ends. If they do exist, step 913 is executed to determine whether the relational chain between userA and userB already exists in the relational chain table stored in the database. If it does exist, the process ends. If the relational chain between userA and userB does not exist in the database, step 914 is executed to write the relational chain information between userA and userB into the relational chain table of the database and mark it as a second-level relational chain.
[0167] Additionally, when a user shares the link with friends, groups, and Moments, step 905 is executed, replacing the original linkid in the user's shared URL with a new unique UUID newid generated in step 903. Then, step 906 is executed to share the link with friends, groups, and Moments.
[0168] For example, user A shares an event link in user group 1. The event link contains user A's userAid and the linkid of the shared link. When user B and user C click the link, the front end sends userAid and userBid, as well as userAid and userCid, to the back end server respectively. The back end server builds a first-level relationship chain between user A and user B, and between user A and user C in real time based on the user ID.
[0169] At the same time, the front end will send the linkid and userBid, as well as the linkid and userCid, to the back end server. The back end server will add the userBid and userCid to the link cache of the linkid, and then perform association processing periodically to build a secondary relationship chain between user B and user C.
[0170] Additionally, the linkid can be specific to each share. For example, if user A shares a link to the same activity to user group 1 and user group 2, the linkid in the link URL will be different. This is to avoid using the same linkid in user group 1 and user group 2, which would cause users in user group 1 and user group 2 to form secondary relationship chains through interactions with the link URL, forcing unrelated users to build relationship chains.
[0171] Finally, the primary and secondary relationship chains are integrated to obtain the social relationship chain, see [link to relevant documentation]. Figure 10 , Figure 10 This is a diagram illustrating social relationship chains, such as... Figure 10As shown, each person can be considered a node in a social relationship chain, and the line connecting two nodes forms a relationship chain, collectively constituting the social relationship chain. For example... Figure 10 There is a first-level relationship chain between User 1 and User 2, and between User 1 and User 3. There are second-level relationship chains between User 2 and User 4, and between User 3 and User 4. By finding overlapping users 3 and 4, the first-level relationship chain and the second-level relationship chain are connected based on the overlapping users 3 and 4, and together they form a social relationship chain.
[0172] See Figure 11A-11C , Figure 11A-11C The diagram shown is an illustration of a social relationship chain application, such as... Figure 11A-11C As shown, after entering the page, user 110 can retrieve users with whom they have a relationship connection, guiding the user to participate, such as... Figure 11A As shown, based on the established social relationship chain information, the game information (such as game score) of user 111, who has a relationship chain with user 110, is obtained and displayed on the game start screen, making the user feel more immersed. During the activity, information about relevant friends can appear based on the user's social relationship chain and current status, for example... Figure 11B As shown, when user 110's game score surpasses that of their friend user 112 (who has a relationship with them), user 112's avatar information is displayed in the game interface, along with a message indicating that user 110 has surpassed user 112. This can also be accompanied by praise effects, such as... Figure 11B The "GOOD X3" indicator is shown to incentivize users to continue playing. When user 110 finishes the game, their social network can be retrieved, displaying and ranking the game scores of users connected to user 110. Figure 11C Users 113 and 114 are shown in the image.
[0173] Below, we will illustrate the application of social relationship chains in the scenario of displaying friend information in games, using specific examples of social relationship chain establishment. Let's assume the scenario for establishing a user's social relationship chain is as follows: Figure 8A User X sends a message to group A and group B. Group A includes users A1 and A2, and group B includes users B1 and B2. When users A1, A2, B1, and B2 interact with this message, the social relationship chain established by user A1 can be in the following ways:
[0174] Scenario 1, see Figure 12A-12B , Figure 12A-12B The diagram shown is a schematic of a social relationship chain application. Figure 12A-12B In this context, existing technology is used to establish social relationship chains, meaning that a social relationship chain is only established when one user interacts with a message sent by another user. Figure 8AIn this scenario, user X sends a message to groups A and B. Users A1, A2, B1, and B2 all click on the message sent by user X. At this point, user A1's social relationship chain is as follows: Figure 12A As shown, user A1 has only established a first-level relationship chain with user X; that is, user A1's social relationship chain only includes first-level relationships with user X. Therefore, when user A1 finishes the game, the friend achievement list displayed is as follows: Figure 12B As shown, in Figure 12B In this example, since user A1's social network only includes user X, only user X's game information is presented. Figure 12B (as shown in Figure 122) and user A1's game information ( Figure 12B (As shown in Figure 121).
[0175] It is evident that a social relationship chain is only established when a user interacts with information sent by another user. For example, during the process of forwarding an article, readers contribute points to the forwarder, thereby establishing a relationship chain between the two. However, readers do not establish a relationship chain with each other. In the example above, user A1 only established a social relationship chain with user X, but did not establish a social relationship chain with users A2, B1, and B2 who read the same information. This results in a slow establishment of social relationship chains and makes it impossible to explore potential social relationships between users.
[0176] Scenario 2, see Figures 13A-13B , Figures 13A-13B The diagram shown is a schematic of a social relationship chain application. Figures 13A-13B In this application, a social relationship chain is established using the social relationship chain establishment method provided in the embodiments of this application, and information with the same content sent by user X has the same information identifier. Therefore, the established social relationship chain is as follows: Figure 8B As shown, user A1's social relationship chain is as follows: Figure 13A As shown, user A1 has established a primary relationship chain with user X, and secondary relationship chains with users A2, B1, and B2. Therefore, when user A1 finishes the game, the list of friends' achievements will appear as follows. Figure 13B As shown, in Figure 13B In the example, since user A1's social network includes user X, user A2, user B1, and user B2, user X's game information is presented. Figure 13B As shown in Figure 131), user A1's game information ( Figure 13B As shown in Figure 132), user A2's game information ( Figure 13B As shown in Figure 133), user B1's game information ( Figure 13B As shown in Figure 134), user B2's game information ( Figure 13B (As shown in Figure 135).
[0177] By assigning the same information identifier to information with the same content, a secondary relationship chain is established between users who interact with information containing the same content. This can accelerate the establishment of relationship chains, rapidly expand the scale of social relationship chains, and also uncover potential social relationships among users.
[0178] Scenario 3, see Figures 14A-14B , Figures 14A-14B The diagram shown is a schematic of a social relationship chain application. Figures 14A-14B In this application, a social relationship chain is established using the social relationship chain establishment method provided in the embodiments of this application, and information with the same content sent by user X has the same information identifier. Therefore, the established social relationship chain is as follows: Figure 8B As shown, user A1's social relationship chain is as follows: Figure 14A As shown, user A1 has established a primary relationship with user X, and a secondary relationship with user A2. Therefore, when user A1 finishes the game, the list of friends' achievements will appear as follows. Figure 14B As shown, in Figure 14B In this context, because user A1's social network includes users X and A2, user X's game information is presented. Figure 13B As shown in Figure 131), user A1's game information ( Figure 13B As shown in Figure 132), user A2's game information ( Figure 13B (As shown in Figure 133).
[0179] By assigning different information identifiers to each message with the same content, messages with different identifiers are identified as different messages, and relationship chains are built accordingly. This filters out a large number of invalid secondary relationship chains, improving the accuracy of social relationship chains and reducing the processing load on the device.
[0180] Social relationship chains can also be applied to social scenarios such as friend recommendations. For example, when recommending friends to user A, a query can be performed in the relationship chain of the database based on user A's object identifier. Specifically, it can first query users with a first-level relationship chain with user A. If the number and attributes of users with a first-level relationship chain with user A meet the recommendation requirements, the users are sorted according to the time they were stored in the database or by attribute conditions, and then recommended to user A in turn. If the number and attributes of users with a first-level relationship chain with user A do not meet the recommendation requirements, the database relationship chain table is queried again to obtain users with a second-level relationship chain with user A. The users with a first-level relationship chain and the users with a second-level relationship chain with user A are then sorted according to the time they were stored in the database or by attribute conditions, and then recommended to user A in turn.
[0181] The following description continues to illustrate the exemplary structure of the social relationship chain establishment device 233 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the software module stored in the social relationship chain establishment device 233 of the memory 230 may include:
[0182] The acquisition module 2331 is used to acquire the object identifier of the first object and the object identifiers of multiple second objects that perform interactive operations on the information sent by the first object; the first-level relationship chain establishment module 2332 is used to establish a first-level relationship chain between the first object and the multiple second objects based on the object identifier of the first object and the object identifiers of the multiple second objects; the second-level relationship chain establishment module 2333 is used to establish a second-level relationship chain between multiple second objects that perform interactive operations on the same information based on the object identifiers of the multiple second objects that all perform interactive operations on the information; and the integration module 2334 is used to integrate the first-level relationship chain and the second-level relationship chain to obtain a social relationship chain.
[0183] In some embodiments, the acquisition module 2331 is further configured to receive the identifier of the first object sent by the terminal of the second object; wherein the identifier of the first object is sent by the terminal of the second object and is sent when an interactive operation is performed on the information corresponding to the information identifier is received; wherein the identifier of the first object is extracted by the terminal of the second object from the information.
[0184] In some embodiments, the acquisition module 2331 is further configured to receive an object identifier and an information identifier of the second object sent by the terminal of the second object; wherein the object identifier and the information identifier of the second object are sent by the terminal of the second object, and are sent when an interactive operation is performed on the information corresponding to the information identifier is received; wherein the information identifier is extracted by the terminal of the second object from the information; different information is identified according to the information identifier to determine the identifier of the second object that performs the interactive operation on each piece of information.
[0185] In some embodiments, the first-level relationship chain establishment module 2332 is further configured to perform the following operations for each piece of information identified according to the information identifier: constructing a first mapping relationship, wherein the first mapping relationship includes the object identifier of the first object and the object identifier of the second object that performs the interaction operation on the information; writing the first mapping relationship into the relationship chain table of the database and marking it as a first-level relationship chain.
[0186] In some embodiments, the secondary relationship chain establishment module 2333 is further configured to perform the following operations for each piece of information identified according to the information identifier: constructing a second mapping relationship, wherein the second mapping relationship includes object identifiers of any two second objects that perform interactive operations on the information; writing the second mapping relationship into the relationship chain table of the database and marking it as a secondary relationship chain.
[0187] In some embodiments, the social relationship chain establishment device further includes: a storage module, configured to store the object identifier of the received second object into an object list corresponding to the information identifier in a first cache space; the secondary relationship chain establishment module is further configured to obtain the object list corresponding to the information identifier from the first cache space; and construct a corresponding second mapping relationship based on the object identifiers of any two second objects in the object list.
[0188] In some embodiments, the storage module is further configured to set the cache time of the object identifier of the second object; and to clear the object identifier of the second object whose cache time has expired in the object list of the first cache space.
[0189] In some embodiments, the secondary relationship chain establishment module 2333 is further configured to query the relationship chain table of the database; when the second mapping relationship does not exist in the relationship chain table, the second mapping relationship is stored in the relationship chain queue in the second cache space; the second mapping relationship in the relationship chain queue is periodically retrieved from the second cache space, the retrieved second mapping relationship is written into the relationship chain table of the database, and marked as a secondary relationship chain.
[0190] In some embodiments, the social relationship chain establishment device further includes: a forwarding module, configured to replace the information identifier in the forwarded information with a new information identifier when the information sent by the terminal of the first object is forwarded by the terminal of the second object.
[0191] In some embodiments, the forwarding module is further configured to, when the information sent by the terminal of the first object is forwarded by the terminal of the second object, replace the object identifier of the first object in the forwarded information with the object identifier of the second object.
[0192] In some embodiments, the integration module 2334 is further configured to connect the plurality of primary relationship chains and the plurality of secondary relationship chains based on a common object to obtain the social relationship chain; wherein, when both primary and secondary relationship chains exist between the objects, only the primary relationship chains between the objects are retained.
[0193] In some embodiments, the interactive operation includes at least one of the following: viewing the information, forwarding the information, or saving the information.
[0194] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the social relationship chain establishment method described above in this application.
[0195] This application provides a computer-readable storage medium storing executable instructions, wherein the executable instructions are executed by a processor, causing the processor to execute the social relationship chain establishment method provided in this application.
[0196] In summary, a primary relationship chain is established between a first object and multiple second objects that perform interactive operations on the information sent to the first object, and a secondary relationship chain is established between multiple second objects that perform interactive operations on the same information. By integrating the primary and secondary relationship chains, a social relationship chain is obtained, which improves the speed of establishing the social relationship chain while ensuring its effectiveness.
[0197] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A method for establishing a social relationship chain, characterized by, include: For information sent by a first object, the object identifier of the first object is obtained, and the object identifiers of multiple second objects that perform interactive operations on the information are also obtained. When information sent by the terminal of the first object is forwarded by the terminal of the second object, the terminal of the second object replaces the information identifier in the forwarded information with a new information identifier. Based on the object identifier of the first object and the object identifiers of the plurality of second objects, a first mapping relationship including the object identifier of the first object and the object identifier of the second object that performs interactive operations on the information is written into the relational chain table of the database, and marked as a first-level relational chain; Based on the object identifiers of multiple second objects that have all performed interactive operations on the information, a second mapping relationship between the multiple second objects that have all performed interactive operations on the information is written into the relational chain table of the database and marked as a secondary relational chain; wherein, when the second mapping relationship does not exist in the relational chain table, the second mapping relationship is stored in the relational chain queue in the second cache space; the second mapping relationship in the relational chain queue is periodically retrieved from the second cache space, and the retrieved second mapping relationship is written into the relational chain table of the database and marked as the secondary relational chain; The multiple primary relationship chains and the multiple secondary relationship chains are connected based on a common object to obtain a social relationship chain; When both primary and secondary relationship chains exist between the objects, only the primary relationship chain between the objects is retained.
2. The method of claim 1, wherein, Obtaining the object identifier of the first object includes: The terminal receiving the second object sends the identifier of the first object; The identifier of the first object is sent by the terminal of the second object, and is sent when an interactive operation is performed on the information corresponding to the information identifier is received; The identifier of the first object is extracted from the information by the terminal of the second object.
3. The method according to claim 1, characterized in that, The step of obtaining the object identifiers of multiple second objects that perform interactive operations on the information includes: The terminal receiving the second object sends the object identifier and information identifier of the second object; The object identifier and the information identifier of the second object are sent by the terminal of the second object, and are sent when an interactive operation is performed on the information corresponding to the information identifier is received; The information identifier is extracted by the terminal of the second object from the information; Different information is identified based on the information identifier to determine the identifier of the second object for which an interactive operation is performed for each piece of information.
4. The method according to claim 3, characterized in that, The first mapping relationship, which includes the object identifier of the first object and the object identifier of the second object that performs the interaction operation on the information, is written into the relational chain table of the database and marked as a first-level relational chain, includes: Perform the following operations for each piece of information identified based on the information identifier: Construct a first mapping relationship, wherein the first mapping relationship includes the object identifier of the first object and the object identifier of the second object that performs the interaction operation on the information; Write the first mapping relationship into the relational chain table of the database and mark it as a first-level relational chain.
5. The method according to claim 3, characterized in that, Based on the object identifiers of multiple second objects that have all performed interactive operations on the information, a second mapping relationship between the multiple second objects that have all performed interactive operations on the information is written into the relational chain table of the database and marked as a secondary relational chain, including: Perform the following operations for each piece of information identified based on the information identifier: Construct a second mapping relationship, wherein the second mapping relationship includes object identifiers of any two second objects that perform interactive operations on the information; Write the second mapping relationship into the relational chain table of the database and mark it as a second-level relational chain.
6. The method according to claim 5, characterized in that, After the terminal receiving the object identifier and information identifier of the second object sends the second object, the method further includes: The object identifier of the received second object is stored in the object list corresponding to the information identifier in the first cache space; The construction of the second mapping relationship includes: Obtain the list of objects corresponding to the information identifier from the first cache space; Based on the object identifiers of any two second objects in the object list, construct the corresponding second mapping relationship.
7. The method according to claim 6, characterized in that, After storing the object identifier of the received second object into the object list corresponding to the information identifier in the first cache space, the method further includes: Set the cache duration for the object identifier of the second object; In the object list of the first cache space, clear the object identifier of the second object whose cache time has expired.
8. The method according to claim 1, characterized in that, The method further includes: When the information sent by the terminal of the first object is forwarded by the terminal of the second object, the terminal of the second object replaces the object identifier of the first object in the forwarded information with the object identifier of the second object.
9. The method according to any one of claims 1 to 8, characterized in that, The interactive operation includes at least one of the following: viewing the information, forwarding the information, or saving the information.
10. A device for establishing social relationship chains, characterized in that, include: The acquisition module is used to acquire the object identifier of the first object in response to the information sent by the first object, and to acquire the object identifiers of a plurality of second objects that perform interactive operations on the information; The forwarding module is used to replace the information identifier in the forwarded information with a new information identifier when the information sent by the terminal of the first object is forwarded by the terminal of the second object. The first-level relationship chain establishment module is used to write a first mapping relationship, including the object identifier of the first object and the object identifier of the second object, into the relationship chain table of the database based on the object identifier of the first object and the object identifier of the second object that performs interactive operation on the information, and mark it as a first-level relationship chain; The secondary relationship chain establishment module is used to write a second mapping relationship between multiple second objects that have all performed interactive operations on the information into the relationship chain table of the database based on the object identifiers of multiple second objects that have all performed interactive operations on the information, and mark it as a secondary relationship chain; The secondary relationship chain establishment module is used to store the second mapping relationship in the relationship chain queue in the second cache space when the second mapping relationship does not exist in the relationship chain table; periodically retrieve the second mapping relationship from the relationship chain queue in the second cache space, write the retrieved second mapping relationship into the relationship chain table of the database, and mark it as the secondary relationship chain; An integration module is used to connect the multiple primary relationship chains and the multiple secondary relationship chains based on a common object to obtain a social relationship chain; wherein, when both primary and secondary relationship chains exist between the objects, only the primary relationship chains between the objects are retained.
11. The apparatus according to claim 10, characterized in that, The acquisition module is also used for: The terminal receiving the second object sends the identifier of the first object; The identifier of the first object is sent by the terminal of the second object, and is sent when an interactive operation is performed on the information corresponding to the information identifier is received; The identifier of the first object is extracted from the information by the terminal of the second object.
12. The apparatus according to claim 10, characterized in that, The acquisition module is also used for: The terminal receiving the second object sends the object identifier and information identifier of the second object; The object identifier and the information identifier of the second object are sent by the terminal of the second object, and are sent when an interactive operation is performed on the information corresponding to the information identifier is received; The information identifier is extracted by the terminal of the second object from the information; Different information is identified based on the information identifier to determine the identifier of the second object for which an interactive operation is performed for each piece of information.
13. An electronic device, characterized in that, include: Memory is used to store executable instructions for a computer; A processor, when executing computer-executable instructions stored in the memory, implements the method for establishing a social relationship chain as described in any one of claims 1 to 9.
14. A computer-readable storage medium, characterized in that, The device stores computer-executable instructions, which, when executed, are used to implement the method for establishing a social relationship chain as described in any one of claims 1 to 9.
15. A computer program product, characterized in that, The computer program product includes computer instructions for implementing the method for establishing a social relationship chain as described in any one of claims 1 to 9 when executed by a processor.
Citation Information
Patent Citations
Account recommendation method and device, server, terminal and storage medium
CN109544396A
Content pushing method and device, electronic equipment and computer readable storage medium
CN111654518A