WO2023093641A1 - 用户关系链存储方法、装置、系统、电子设备及存储介质 - Google Patents

用户关系链存储方法、装置、系统、电子设备及存储介质 Download PDF

Info

Publication number
WO2023093641A1
WO2023093641A1 PCT/CN2022/132902 CN2022132902W WO2023093641A1 WO 2023093641 A1 WO2023093641 A1 WO 2023093641A1 CN 2022132902 W CN2022132902 W CN 2022132902W WO 2023093641 A1 WO2023093641 A1 WO 2023093641A1
Authority
WO
WIPO (PCT)
Prior art keywords
relationship chain
client
user
server
relationship
Prior art date
Application number
PCT/CN2022/132902
Other languages
English (en)
French (fr)
Inventor
林晋佳
Original Assignee
百果园技术(新加坡)有限公司
林晋佳
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 百果园技术(新加坡)有限公司, 林晋佳 filed Critical 百果园技术(新加坡)有限公司
Publication of WO2023093641A1 publication Critical patent/WO2023093641A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/288Entity relationship models

Definitions

  • the embodiments of the present application relate to the field of computer technology, and in particular to a storage method, device, system, electronic equipment, and storage medium for user relationship chains.
  • the existing way of storing user relationship chains mainly uses multi-point servers to store user relationship chains.
  • the embodiment of the present application provides a user relationship chain storage method, device, system, electronic equipment and storage medium, which can improve the consistency and stability of user relationship chain storage, and solve the technical problem of poor consistency in the existing user relationship chain storage .
  • the embodiment of the present application provides a user relationship chain storage method, including:
  • the embodiment of the present application provides a user relationship chain storage device, including:
  • a forwarding module configured to receive a relationship chain application from the first client to the second client, and forward the relationship chain application to the second client;
  • the locking module is used to receive the acceptance information of the second client to the relationship chain application, and lock the relationship chain operation of the first client;
  • the storage module is used to construct the user relationship chain of the first client and the second client, and store the user relationship chain to the first storage node in the area to which the first client belongs, so as to synchronize the user relationship chain to the rest of the system through the first storage node The second storage node in the management zone.
  • an embodiment of the present application provides a user relationship chain storage system, including: a front-end server, a relationship chain server, and a storage node, the front-end server includes a first front-end server corresponding to the first client, and a first front-end server corresponding to the first client The second front-end server of the second client; the relationship chain server includes a first relationship chain server corresponding to the area to which the first client belongs, and a second relationship chain server corresponding to the area to which the second client belongs; the storage node includes a server corresponding to the first client The first storage node in the area to which it belongs, and the second storage node corresponding to the remaining management areas of the system;
  • the first front-end server is used to receive the relationship chain application from the first client to the second client, select a first relationship chain server to send the relationship chain application, and forward the relationship chain application to the second client;
  • the first relationship chain server is used to update the relationship chain status data of the first client to the first storage node according to the received relationship chain application, so as to record the relationship chain operation status of the first client;
  • the second client is used to respond to the received relationship chain application, and forward the acceptance information of the relationship chain application to the first relationship chain server through the second front-end server, so as to instruct the first relationship chain server to lock the relationship chain operation of the first client; And select a second relationship chain server to forward the acceptance information through the second front-end server, to instruct the corresponding second relationship chain server to lock the relationship chain operation of the second client;
  • the first relationship chain server is also used to construct the user relationship chains of the first client and the second client, store the user relationship chains in the first storage node, and synchronize the user relationship chains to each second storage node through the first storage node.
  • the embodiment of the present application provides an electronic device, including:
  • the memory is used to store one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the user relationship chain storage method as described in the first aspect.
  • the embodiment of the present application provides a storage medium containing computer-executable instructions, the computer-executable instructions are used to execute the user relationship chain storage method as described in the first aspect when executed by a computer processor .
  • the embodiment of the present application provides a computer program product, the computer program product contains instructions, and when the instructions are run on the computer or processor, the computer or processor executes the computer program described in the first aspect.
  • User relationship chain storage method when the instructions are run on the computer or processor, the computer or processor executes the computer program described in the first aspect.
  • the relationship chain application by receiving the relationship chain application from the first client to the second client, the relationship chain application is forwarded to the second client; receiving the acceptance information of the relationship chain application from the second client, locking the relationship chain of the first client Operation: build the user relationship chain of the first client and the second client, store the user relationship chain to the first storage node in the area to which the first client belongs, and synchronize the user relationship chain to the rest of the management area of the system through the first storage node Second storage node.
  • FIG. 1 is a flow chart of a method for storing user relationship chains provided in an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of a user relationship chain storage system provided by an embodiment of the present application.
  • Fig. 3 is a flow chart of the relationship chain operation locking in the embodiment of the present application.
  • Fig. 4 is a flow chart of relationship chain construction in the embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a user relationship chain storage device provided in an embodiment of the present application.
  • Fig. 6 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
  • the user relationship chain storage method aims to lock the user’s relationship chain operation during the process of building and storing the user’s relationship chain, so as to avoid the occurrence of multiple relationship chain operation information in a short period of time for the user, resulting in confusion and inconsistency of the user relationship chain , to improve the consistency of user relationship chain storage.
  • it generally includes: 1.
  • Single-point processing, a single-point instance provides the function of user relationship service, and interacts with local database and cache. The operation and maintenance of the single-point service is convenient, and the user status and data are maintained by a single instance, without considering the synchronization of status and data.
  • Partition processing users choose to join a service area to interact with other users in the same service area. Partitioning facilitates the management of relational chain data, increasing the service area can reduce the original service pressure and expand the overall processing capacity of the service. However, users in different service areas cannot interact with each other, which is equivalent to isolating users in different service areas. Since the number of users among service areas may be uneven, service pressure is still relatively high for service areas with a large number of users. Based on this, a method for storing user relationship chains according to an embodiment of the present application is provided to ensure the consistency of user relationship chain storage while improving system fault tolerance and reducing system service pressure, and to solve the problem of existing user relationship chain storage consistency. Poor technical issues.
  • Figure 1 shows a flow chart of a method for storing user relationship chains provided in an embodiment of the present application.
  • the method for storing user relationship chains provided in this embodiment can be executed by a user relationship chain storage device, and the user relationship chain storage device can pass Realized by means of software and/or hardware, the user relationship chain storage device may be composed of two or more physical entities, or may be composed of one physical entity.
  • the user relationship chain storage device may be a processing device such as a server host.
  • the user relationship chain storage method specifically includes:
  • the user relationship chain storage device receives the relationship chain application sent by the user client, defines the user client as the first client, and corresponds to the second
  • the user client that a client applies for building a user relationship chain is the second client.
  • the application for the relationship chain is forwarded to the corresponding second client, and the second client accepts or rejects the application for the relationship chain, and then executes related operations of the relationship chain according to the acceptance or rejection information returned by the second client.
  • the user relationship chain can be the unique association relationship information between users in scenarios such as social networking, content sharing, and live broadcasting, and is used to identify the uniqueness of the association relationship information between two users. .
  • the construction of special relationships such as "group CP" between two users on social platforms.
  • the related user relationship chain service function can be further realized, such as couple space.
  • the relationship chain storage system includes a front-end server, a relationship chain server, and a storage node
  • the front-end server includes a corresponding first client 11.
  • the relationship chain server includes the first relationship chain server 15 corresponding to the area to which the first client 11 belongs, and the first relationship chain server 15 corresponding to the area to which the second client 12 belongs.
  • the second relationship chain server 16 of the area; the storage nodes include the first storage node 17 corresponding to the area to which the first client 11 belongs, and the second storage node 18 corresponding to the remaining management areas of the system, and the essence of the storage node is a database server or a cache;
  • the first front-end server 13 is used to receive the relationship chain application from the first client 11 to the second client 12, select a first relationship chain server 15 to send the relationship chain application, and forward the relationship chain application to the second client 12 ;
  • the first relationship chain server 15 is used to update the relationship chain status data of the first client 11 to the first storage node 17 according to the received relationship chain application, so as to record the relationship chain operation status of the first client;
  • the second client 12 is used to respond to the received relationship chain application, forward the acceptance information of the relationship chain application to the first relationship chain server 15 through the second front server 14, to instruct the first relationship chain server 15 to lock the first client 11; and select a second relationship chain server 16 to forward the acceptance information through the second front server 14, to indicate that the corresponding second relationship chain server 16 locks the relationship chain operation of the second client 12;
  • the first relationship chain server 15 is also used to construct the user relationship chain of the first client 11 and the second client 12, store the user relationship chain to the first storage node 17, and synchronize the user relationship chain to the first storage node 17 through the first storage node 17.
  • Each second storage node 18 Each second storage node 18 .
  • the front-end server as a processing relay for the relationship chain operation, realizes user relationship chain association operations by interacting with each user client and each relationship chain server respectively.
  • the essence of the front-end server is a proxy server, which is used to connect to the client and select a relationship chain server in the current area to execute the relationship. chain operation.
  • the client participates in the construction of the user relationship chain, it will select a front-end server as a proxy server nearby, so as to interact with the relationship chain server and the corresponding client through the proxy server.
  • the user selects a nearby client 11 through the first client 11.
  • a front-end server 13 sends a relationship link application, and the first front-end server 13 is the front-end server closest to the first client 11 at present. After the first front-end server receives the relationship chain application, it will send it to the corresponding relationship chain server according to the set forwarding logic.
  • the relationship chain application needs to include the identification information of the first client and the second client, and the identification information of the first client is defined as the first identification information, and the identification information of the second client is the second identification information.
  • the first front-end server first obtains the first identification information from the relationship chain application, and then inquires about the region to which the client of the first identification information belongs. It can be understood that, generally speaking, when a user applies for a system account, the user account will be assigned to the corresponding regional management. For example, if the first client 11 applies for an account in the Asia region, the identification information of the first client is bound to the Asia region. In order to facilitate subsequent determination of the area to which the first client belongs.
  • a relationship link server is randomly selected in the computer room of the Asia region as the first relationship link server to send the relationship link application to the first relationship link server.
  • the relationship chain storage system has several relationship chain servers corresponding to each large area to improve the disaster recovery capability of the system. When a relationship chain server fails, other relationship chain servers can be used to perform relationship chain related operations.
  • the first front-end server may adopt a polling method to sequentially select the relationship chain server to receive the relationship chain application, so as to ensure that the business processing of each relationship chain server in the large area is balanced , to avoid the overload of business processing of a single relationship chain server.
  • the relationship chain server with the best business processing state can also be selected as the first relationship chain server by round robin the business processing status (such as computing power and memory space) of each relationship chain server. It should be noted that the embodiment of the present application records every operation of the relationship chain corresponding to the user, and the serialized processing of the operation of the relationship chain ensures the processing order and the correct logic of the business data of the relationship chain.
  • the first relationship chain server After the first relationship chain server receives the relationship chain application, it will update the relationship chain state data of the first client to the first storage node, to record the relationship chain operation status of the first client; It is understandable that, in order to facilitate querying the application operation status of each user's relationship chain, the system needs to record the status data of each user's relationship chain in real time, so as to achieve a better relationship chain management effect.
  • the relationship chain state data after the relationship chain state data is stored in the first storage node by the first relationship chain server, it can be synchronized to the second storage node of the system through the first storage node. Then, when other clients initiate a relationship chain application to the first client, they can determine that there is a conflict in their own relationship chain application by querying the relationship chain status data of the first client stored in the second storage node in the area to which they belong, and then optimize The user's relationship chain operation experience.
  • the first front-end server further forwards the relationship chain application to the second client, and the second client responds based on the received relationship chain application.
  • the second client if the second client agrees to build the relationship chain, it will reply corresponding acceptance information. On the contrary, if the relationship chain application is not approved, the corresponding rejection message will be replied.
  • the second client does not respond to the application for the relationship chain within the set period of time, it means that the application for the relationship chain has expired. At this time, the system invalidates the application for the relationship chain and notifies the first client and the second client. And update the relationship chain state data.
  • the second client will select a second front-end server nearby to forward the acceptance or rejection information, and the second front-end server forwards the acceptance or rejection information to the first relationship chain server after receiving the acceptance or rejection information.
  • S120 Receive the second client's acceptance information of the relationship chain application, and lock the relationship chain operation of the first client.
  • the first relationship chain server After the first relationship chain server receives the acceptance information, it will further lock the operation of the relationship chain of the first client. It is understandable that in order to prevent both parties from initiating other user relationship chain operations after agreeing to build the user relationship chain, resulting in disordered user relationship chain construction, it is necessary to prohibit the relationship chain operations of the first client and the second client.
  • the locking process of the relationship chain operation includes:
  • the first relationship chain server After receiving the acceptance information, the first relationship chain server first locks the relationship chain operation of the first client based on the identification information of the first client. Subsequently, when receiving the relationship chain operations initiated again by the first client (such as relationship chain applications or receiving other relationship chain applications), these relationship chain operations will be processed based on the lock status of the relationship chain operations. For example, corresponding invalid operation information is fed back to the first client to prompt the lock status of the current relationship chain operation.
  • the second relationship chain server determines the second identification information of the second client, and locks the operation of the relationship chain of the second client based on the second identification information.
  • the second front-end server selects a second relationship chain server nearby to send the second client's acceptance information, so as to notify the second relationship chain server to perform the second client's relationship chain locking operation.
  • the second relationship chain server also determines the second identification information of the second client, and then locks the operation of the relationship chain of the second client based on the second identification information.
  • relationship chain operations of the first client and the second client By locking the relationship chain operations of the first client and the second client, other relationship chain operations of the user (such as applying for other relationship chains or receiving other relationship chain applications) can be prohibited during the process of building the relationship chain. In this way, the construction and storage of user relationship chains can be synchronized to maintain a high degree of consistency.
  • the first relationship link server updates the relationship link state data of the current relationship link application based on the rejection information.
  • the embodiment of the present application further constructs the user relationship chain between the first client and the second client.
  • a unique user relationship chain is generated based on the first identification information and the second identification information.
  • the first identification information is unique identification information of the first client
  • the second identification information is unique identification information of the second client.
  • the user relationship chain constructed in this way is unique, which can ensure that the relationship chain data between users will not cross, avoid user relationship chain storage confusion, and optimize the user relationship chain construction effect.
  • the user relationship chain that has been built is stored in the first storage node by the first relationship chain server, it can be synchronized to the second storage node of the system through the first storage node. Then, when other clients initiate a relationship chain application to the first client or the second client, they can determine the current user relationship chain of the first client and the second client by querying the user relationship chain stored in the second storage node of the area to which they belong. There is a conflict in the relationship chain application, thereby ensuring the stability of the relationship chain construction and storage.
  • one of the users when building a user relationship chain between two users, one of the users first sends an application for establishing a user relationship chain to the other user.
  • the application is processed by the front-end server near the user 1, and the front-end server determines the first relationship chain server in the region to which the user 1 belongs to process the relationship chain application according to the identification information u id1 of the user 1.
  • the first relationship chain server processes the business logic of the relationship chain application, and updates the relationship chain status data to the local database or cache. After the operation is successful, the first relationship chain server returns the result to the front-end server, and the front-end server notifies both users.
  • user 2 accepts user 1's application for establishing a user relationship chain, and the received information is processed by the front-end server near user 2, and the front-end server uses uid1 to hash the received information to the first relationship chain server in the region to which uid1 belongs for processing.
  • the first relationship chain server processes the business logic of receiving information and locks uid1. After the operation is successful, notify the corresponding front-end server.
  • the front-end server uses uid2 to hash the received information to the second relationship chain server in the region to which uid2 belongs.
  • the second relationship chain server processes the business logic of receiving information and locks uid2. After the operation is successful, notify the front-end server.
  • the front-end server requests the first relationship chain server to establish a special relationship chain.
  • the first relationship chain server finally processes the business logic and updates the user relationship chain to the local database, which indicates that the user relationship chain is established successfully.
  • the first relationship chain server then returns the result to the front-end server, and the front-end server notifies the user that both parties have successfully operated.
  • the function server 19 inquires about the user's relationship chain, if the current business does not have high requirements for the consistency of the relationship chain information (for example, for the business of the user who has not initiated a relationship chain application), it can access the storage in the same computer room nearby. Node query. If the current business has high requirements for the consistency of relationship chain information (such as the business of users who are building user relationship chains or have completed the construction of user relationship chains), they can be hashed to the corresponding computer room through the front-end server for query. For example, as shown in Figure 2, the functional server 19 in the Asian region needs to query the user relationship chain information of the second client 12. Since the current business has a high requirement for the consistency of the relationship chain information, it needs to pass through the first front-end server.
  • the functional server 19 in the Asian region needs to query the user relationship chain information of the second client 12. Since the current business has a high requirement for the consistency of the relationship chain information, it needs to pass through the first front-end server.
  • the above method for storing user relationship chains may be jointly executed by the first front-end server and the first relationship chain server of the user relationship chain storage system.
  • the front-end server and the relationship chain server of the user relationship chain storage system can also be combined into one entity to execute the above user relationship chain storage method.
  • the embodiment of the present application does not impose fixed restrictions on the specific structure of the user relationship chain storage system. I won't go into details here.
  • the relationship chain operations of the first client and the second client are unlocked.
  • the lock of the user relationship chain operation by the relationship chain server needs to set an appropriate expiration time to ensure that the user relationship chain operation can still be automatically restored when an abnormal situation occurs.
  • the same forwarding logic as the operation of locking the relationship chain should be used to unlock both users, so as to avoid affecting the user's re-acceptance of the relationship link operation.
  • the first storage node includes a cache server and a database server.
  • the database server and the cache server are regularly compared with the user relationship chain, and the user relationship chain stored in the cache server is updated based on the comparison result.
  • the user relationship chain can also be regularly updated by referring to the above method.
  • the first relationship chain server regularly pulls out the recently modified user relationship chain from the database server, and compares it with the local cache data of the first storage node (that is, the data of the cache server). Data shall prevail to update the cache. In this way, the consistency and synchronization of the relationship chain information storage can be guaranteed, and the delay in information update can be avoided to affect the system business execution.
  • the relationship chain application is forwarded to the second client; receiving the acceptance information of the relationship chain application from the second client, locking the relationship chain operation of the first client; Construct the user relationship chains of the first client and the second client, store the user relationship chains in the first storage node in the area to which the first client belongs, and synchronize the user relationship chains to the second storage nodes in the remaining management areas of the system through the first storage node. Storage nodes.
  • FIG. 5 is a schematic structural diagram of a user relationship chain storage device provided by the present application.
  • the user relationship chain storage device provided in this embodiment specifically includes: a forwarding module 21 , a locking module 22 and a storage module 23 .
  • the forwarding module 21 is used for receiving the relationship chain application from the first client to the second client, and forwarding the relationship chain application to the second client;
  • the locking module 22 is used to receive the acceptance information of the second client to the relationship chain application, and lock the relationship chain operation of the first client;
  • the storage module 23 is used to construct the user relationship chain of the first client and the second client, and store the user relationship chain to the first storage node in the area to which the first client belongs, so as to synchronize the user relationship chain to the rest of the system through the first storage node The second storage node in the management zone.
  • the locking module 22 is specifically configured to determine the first identification information of the first client; and lock the relationship chain operation of the first client based on the first identification information.
  • the storage module 23 is specifically configured to generate a unique user relationship chain based on the first identification information and the second identification information of the second client.
  • the storage module 23 is further configured to update the relationship chain state data of the first client to the first storage node, so as to record the operation state of the relationship chain of the first client.
  • the relationship chain application is forwarded to the second client; receiving the acceptance information of the relationship chain application from the second client, locking the relationship chain operation of the first client; Construct the user relationship chains of the first client and the second client, store the user relationship chains in the first storage node in the area to which the first client belongs, and synchronize the user relationship chains to the second storage nodes in the remaining management areas of the system through the first storage node. Storage nodes.
  • the device for storing user relationship chains provided in the embodiments of the present application can be used to execute the method for storing user relationship chains provided in the above embodiments, and has corresponding functions and beneficial effects.
  • the embodiment of the present application also provides an electronic device.
  • the memory 32 as a computer-readable storage medium, can be used to store software programs, computer-executable programs and modules, such as program instructions/modules corresponding to the user relationship chain storage method described in any embodiment of the present application (for example, user relationship chain forwarding module, locking module and storage module in the storage system).
  • the communication module 33 is used for data transmission.
  • the processor 31 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory, that is, realizes the above-mentioned user relationship chain storage method.
  • the input device 34 can be used for receiving inputted numerical or character information, and generating key signal input related to user setting and function control of the device.
  • the output device 35 may include a display device such as a display screen.
  • the electronic device provided above can be used to implement the user relationship chain storage method provided in the above embodiment, and has corresponding functions and beneficial effects.
  • the embodiments of the present application also provide a storage medium containing computer-executable instructions.
  • the medium may be any of various types of memory devices or storage devices.
  • the storage medium containing computer-executable instructions provided by the embodiments of the present application is not limited to the above-mentioned method for storing user relationship chains, and may also execute the user relationship chain provided by any embodiment of the present application. Related operations in the chain storage method.
  • the embodiments of the present application also provide a computer program product.
  • the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be implemented as a software product embodied in the form, the computer program product is stored in a storage medium, including several instructions to enable a computer device, mobile terminal or a processor therein to execute all or all of the user relationship chain storage methods described in various embodiments of the present application. partial steps.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请实施例公开了一种用户关系链存储方法、装置、系统、电子设备及存储介质。本申请实施例提供的技术方案,通过接收第一客户端对第二客户端的关系链申请,将关系链申请转发至第二客户端;接收第二客户端对关系链申请的接受信息,锁定第一客户端的关系链操作;构建第一客户端和第二客户端的用户关系链,将用户关系链存储至第一客户端所属区域的第一存储节点,以通过第一存储节点同步用户关系链至系统其余管理区域的第二存储节点。采用上述技术手段,可以避免用户短时内出现多条关系链操作信息,进而保障用户关系链存储的一致性和稳定性,优化用户关系链的相关功能服务效果,提升用户的使用体验。

Description

用户关系链存储方法、装置、系统、电子设备及存储介质
本申请要求在2021年11月26日提交中国专利局、申请号为202111422191.7的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及计算机技术领域,尤其涉及一种用户关系链存储方法、装置、系统、电子设备及存储介质。
背景技术
目前,在一些直播、内容分享、社交应用平台的应用场景中,需要对用户关注、加好友等操作产生的用户关系链信息进行存储,以实现基于用户关系链的相关功能服务。现有存储用户关系链的方式主要采用多点服务器存储用户关系链,通过增加服务器的部署可以提高系统并发处理能力,并且降低单个服务器的存储压力和容错能力。
但是,简单采用多点服务器存储用户关系链难以保障信息存储的一致性,在用户关系链一致性要求较高的场景中,如若用户短时内出现多条关系链操作信息,会导致关系链构建错乱,影响相关功能服务的效果,进而影响用户体验。
发明内容
本申请实施例提供一种用户关系链存储方法、装置、系统、电子设备及存储介质,能够提升用户关系链存储的一致性和稳定性,解决现有用户关系链存储一致性较差的技术问题。
在第一方面,本申请实施例提供了一种用户关系链存储方法,包括:
接收第一客户端对第二客户端的关系链申请,将关系链申请转发至第二客户端;
接收第二客户端对关系链申请的接受信息,锁定第一客户端的关系链操作;
构建第一客户端和第二客户端的用户关系链,将用户关系链存储至第一客户端所属区域的第一存储节点,以通过第一存储节点同步用户关系链至系统其余管理区域的第二存储节点。
在第二方面,本申请实施例提供了一种用户关系链存储装置,包括:
转发模块,用于接收第一客户端对第二客户端的关系链申请,将关系链申请转发至第二客户端;
锁定模块,用于接收第二客户端对关系链申请的接受信息,锁定第一客户 端的关系链操作;
存储模块,用于构建第一客户端和第二客户端的用户关系链,将用户关系链存储至第一客户端所属区域的第一存储节点,以通过第一存储节点同步用户关系链至系统其余管理区域的第二存储节点。
在第三方面,本申请实施例提供了一种用户关系链存储系统,包括:前置服务器、关系链服务器和存储节点,前置服务器包括对应第一客户端的第一前置服务器,以及对应第二客户端的第二前置服务器;关系链服务器包括对应第一客户端所属区域的第一关系链服务器,以及对应第二客户端所属区域的第二关系链服务器;存储节点包括对应第一客户端所属区域的第一存储节点,以及对应系统其余管理区域的第二存储节点;
第一前置服务器用于接收第一客户端对第二客户端的关系链申请,选择一个第一关系链服务器发送关系链申请,并将关系链申请转发至第二客户端;
第一关系链服务器用于根据接收到的关系链申请,更新第一客户端的关系链状态数据至第一存储节点,以记录第一客户端的关系链操作状态;
第二客户端用于响应接收到的关系链申请,通过第二前置服务器转发关系链申请的接受信息至第一关系链服务器,以指示第一关系链服务器锁定第一客户端的关系链操作;并通过第二前置服务器选择一个第二关系链服务器转发接受信息,以指示对应的第二关系链服务器锁定第二客户端的关系链操作;
第一关系链服务器还用于构建第一客户端和第二客户端的用户关系链,将用户关系链存储至第一存储节点,并通过第一存储节点同步用户关系链至各个第二存储节点。
在第四方面,本申请实施例提供了一种电子设备,包括:
存储器以及一个或多个处理器;
所述存储器,用于存储一个或多个程序;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如第一方面所述的用户关系链存储方法。
在第五方面,本申请实施例提供了一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如第一方面所述的用户关系链存储方法。
在第六方面,本申请实施例提供了一种计算机程序产品,所述计算机程序产品中包含有指令,当指令在计算机或处理器上运行时,使得计算机或处理器 执行如第一方面所述的用户关系链存储方法。
本申请实施例通过接收第一客户端对第二客户端的关系链申请,将关系链申请转发至第二客户端;接收第二客户端对关系链申请的接受信息,锁定第一客户端的关系链操作;构建第一客户端和第二客户端的用户关系链,将用户关系链存储至第一客户端所属区域的第一存储节点,以通过第一存储节点同步用户关系链至系统其余管理区域的第二存储节点。采用上述技术手段,通过在构建用户关系链之前,对用户客户端的关系链操作进行锁定,以此可以避免用户短时内出现多条关系链操作信息,进而保障用户关系链存储的一致性和稳定性,优化用户关系链的相关功能服务效果,提升用户的使用体验。
附图说明
图1是本申请实施例提供的一种用户关系链存储方法的流程图;
图2是本申请实施例提供的一种用户关系链存储系统的结构示意图;
图3是本申请实施例中的关系链操作锁定流程图;
图4是本申请实施例中的关系链构建流程图;
图5是本申请实施例中提供的一种用户关系链存储装置的结构示意图;
图6是本申请实施例中提供的一种电子设备的结构示意图。
具体实施方式
为了使本申请的目的、技术方案和优点更加清楚,下面结合附图对本申请具体实施例作进一步的详细描述。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部内容。在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各项操作(或步骤)描述成顺序的处理,但是其中的许多操作可以被并行地、并发地或者同时实施。此外,各项操作的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。
本申请提供的用户关系链存储方法,旨在构建存储用户关系链过程中,通过锁定用户的关系链操作,以避免用户短时内出现多条关系链操作信息,导致用户关系链错乱不一致的情况,提升用户关系链存储的一致性。相对于传统的,用户关系链存储方式,其一般包括:1、单点处理,由一个单点实例提供用户关 系服务的功能,并且和本地数据库、缓存交互。单点服务的方式运维方便,用户状态和数据都由单一实例维护,不用考虑状态和数据的同步问题。同时也没有多点实例因为状态和数据不一致造成的关系链逻辑错误。但是在单点实例发生故障时,后台不能提供服务。在进行全球用户的关系链信息处理时,所有服务操作都必须回源到该实例,跨区的请求必然带来延迟的增加和请求失败率的提升。2、多点处理,由各个区域多个实例提供用户关系服务的功能,每个实例都和本地数据库、缓存交互。通过多点实例处理提高了服务的可用性和扩展性。通过增加服务器的部署可以提高系统并发处理能力并且降低单个实例的服务器压力。但是由于用户数据分散不方便管理。如果使用异步的数据库和缓存,数据的一致性和时效性难以保证。如果使用强一致性的数据库和缓存,则降低了服务的处理能力并增加了请求处理的延时。3、分区处理,由用户选择加入一个服务区与同服务区的其他用户互动。分区方便关系链数据的管理,增加服务区可以减少原服务压力,扩展服务整体的处理能力。但是不同服务区之间的用户无法互相互动产生,相当于隔离了不同服务区的用户。由于服务区之间的用户数量可能不均匀,对于用户量较大的服务区,其服务压力依然较大。基于此,提供本申请实施例的一种用户关系链存储方法,以在提升系统容错能力,降低系统服务压力的同时,保障用户关系链存储的一致性,解决现有用户关系链存储一致性较差的技术问题。
实施例:
图1给出了本申请实施例提供的一种用户关系链存储方法的流程图,本实施例中提供的用户关系链存储方法可以由用户关系链存储设备执行,该用户关系链存储设备可以通过软件和/或硬件的方式实现,该用户关系链存储设备可以是两个或多个物理实体构成,也可以是一个物理实体构成。一般而言,该用户关系链存储设备可以是服务器主机等处理设备。
下述以该用户关系链存储设备为执行用户关系链存储方法的主体为例,进行描述。参照图1,该用户关系链存储方法具体包括:
S110、接收第一客户端对第二客户端的关系链申请,将关系链申请转发至第二客户端。
本申请实施例在进行两个客户端的用户关系链构建及存储的过程中,通过用户关系链存储设备接收用户客户端发送的关系链申请,定义该用户客户端为 第一客户端,对应该第一客户端申请构建用户关系链的用户客户端为第二客户端。关系链申请会转发至对应的第二客户端,由第二客户端接受或拒绝该关系链申请,进而根据第二客户端返回的接受信息或拒绝信息,执行关系链的相关操作。
需要说明是,本申请实施例中,用户关系链可以是网络社交、内容分享、直播等场景中用户与用户之间唯一的关联关系信息,用以标识两个用户之间关联关系信息的唯一性。例如,社交平台上两个用户之间“组CP”等特殊关系的构建。通过这一关联关系信息的构建,可以进一步实现相关用户关系链服务功能,如情侣空间等。
参照图2,提供本申请实施例的一种关系链存储系统的结构示意图,其中,该关系链存储系统包括前置服务器、关系链服务器和存储节点,前置服务器包括对应第一客户端11的第一前置服务器13,以及对应第二客户端12的第二前置服务器14;关系链服务器包括对应第一客户端11所属区域的第一关系链服务器15,以及对应第二客户端12所属区域的第二关系链服务器16;存储节点包括对应第一客户端11所属区域的第一存储节点17,以及对应系统其余管理区域的第二存储节点18,存储节点的实质为数据库服务器或者缓存;
第一前置服务器13用于接收第一客户端11对第二客户端12的关系链申请,选择一个第一关系链服务器15发送关系链申请,并将关系链申请转发至第二客户端12;
第一关系链服务器15用于根据接收到的关系链申请,更新第一客户端11的关系链状态数据至第一存储节点17,以记录第一客户端的关系链操作状态;
第二客户端12用于响应接收到的关系链申请,通过第二前置服务器14转发关系链申请的接受信息至第一关系链服务器15,以指示第一关系链服务器15锁定第一客户端11的关系链操作;并通过第二前置服务器14选择一个第二关系链服务器16转发接受信息,以指示对应的第二关系链服务器16锁定第二客户端12的关系链操作;
第一关系链服务器15还用于构建第一客户端11和第二客户端12的用户关系链,将用户关系链存储至第一存储节点17,并通过第一存储节点17同步用户关系链至各个第二存储节点18。
具体地,前置服务器作为关系链操作的处理中继,通过分别与各个用户客户端及各个关系链服务器交互,实现用户关系链关联操作。关系链存储系统在 构建时,对应一个大区设置若干个前置服务器和关系链服务器,前置服务器的实质为代理服务器,用于对接客户端,并选择当前大区的一个关系链服务器执行关系链操作。一般而言,客户端在参与用户关系链构建时,会就近选择一个前置服务器作为代理服务器,以通过该代理服务器与关系链服务器以及对应客户端交互。通过采用全球多大区多机房多实例的部署方式,可以确保任意节点故障不会影响后端服务,提高系统容灾能力。
示例性的,如图2所示,当位于亚洲大区的第一客户端11想要与位于欧洲大区的第二客户端构建用户关系链时,用户通过第一客户端11就近选择一个第一前置服务器13发送关系链申请,第一前置服务器13为当前与第一客户端11距离最近的前置服务器。第一前置服务器接收到关系链申请后,会按照设定的转发逻辑发送到对应的关系链服务器上。
其中,关系链申请需要包含该第一客户端和第二客户端的标识信息,定义第一客户端的标识信息为第一标识信息,第二客户端的标识信息为第二标识信息。第一前置服务器首先从关系链申请中获取第一标识信息,进而查询该第一标识信息的客户端的所属区域。可以理解的是,一般而言,用户在申请系统账户时,会将用户账户分配至对应的大区管理。例如,第一客户端11在亚洲大区申请账户,则将第一客户端的标识信息绑定亚洲大区。以便于后续确定第一客户端的所属区域。
进一步地,通过查询第一客户端所属区域为亚洲大区后,在亚洲大区机房中随机选择一个关系链服务器作为第一关系链服务器,以发送该关系链申请至第一关系链服务器。关系链存储系统对应每个大区设置了若干个关系链服务器,以提升系统的容灾能力,当一个关系链服务器故障时,可以通过其他关系链服务器执行关系链相关操作。
可选的,在选择第一关系链服务器时,第一前置服务器可以采用轮询的方式,依序选择关系链服务器接收该关系链申请,以确保大区内各个关系链服务器的业务处理均衡,避免单一关系链服务器业务处理超载的情况。此外,根据实际需要,还可以通过轮循各个关系链服务器的业务处理状态(如算力及内存空间),选择业务处理状态最优的关系链服务器作为第一关系链服务器。需要说明的是,本申请实施例对应用户的每一次关系链操作都进行记录,通过关系链操作串行化的处理,保证了处理顺序,确保关系链业务数据的逻辑正确。
第一关系链服务器接收到该关系链申请后,会更新第一客户端的关系链状 态数据至第一存储节点,以记录第一客户端的关系链操作状态;。可以理解的是,可以理解的是,为了便于查询各个用户的关系链申请操作状态,系统需要实时记录用户的各个关系链状态数据,实现较好的关系链管理效果。
可选的,关系链状态数据通过第一关系链服务器存储至第一存储节点后,可以通过第一存储节点同步至系统的第二存储节点。则其他客户端在向第一客户端发起关系链申请时,通过查询所属区域第二存储节点存储的有关第一客户端的关系链状态数据,即可确定当前自身的关系链申请存在冲突,进而优化用户的关系链操作体验。
另一方面,第一前置服务器在接收到关系链申请后,还进一步将关系链申请转发至第二客户端,由第二客户端基于接收到的关系链申请进行响应。第二客户端根据接收到的关系链申请,若同意构建关系链,则回复相应的接受信息。反之,若不同意关系链申请,则回复相应的拒绝信息。此外,若第二客户端在设定时段内没有对该关系链申请进行回复,则表示该关系链申请过期,此时系统将该关系链申请作废,通知第一客户端和第二客户端,并更新关系链状态数据。
第二客户端会就近选择一个第二前置服务器进行接受信息或者拒绝信息的转发,第二前置服务器在接收到接受信息或者拒绝信息后,将其转发第一关系链服务器。
S120、接收第二客户端对关系链申请的接受信息,锁定第一客户端的关系链操作。
进一步地,第一关系链服务器在接收到接受信息之后,会进一步锁定第一客户端的关系链操作。可以理解的是,为了防止双方在同意构建用户关系链后又发起其余用户关系链操作,导致用户关系链构建错乱,则需要禁止第一客户端和第二客户端的关系链操作。
参照图3,关系链操作的锁定流程包括:
S1201、确定第一客户端的第一标识信息;
S1202、基于第一标识信息锁定第一客户端的关系链操作;
第一关系链服务器在接收到该接受信息后,首先基于第一客户端的标识信息,锁定该第一客户端的关系链操作。后续在接收到第一客户端再次发起的关系链操作时(如关系链申请或者接收其他关系链申请),会基于关系链操作的锁定状态处理这些关系链操作。例如,反馈相应的操作无效信息至第一客户端, 以提示当前关系链操作的锁定状态。
进一步地,本申请实施例还通过第二关系链服务器确定第二客户端的第二标识信息,基于第二标识信息锁定第二客户端的关系链操作。对应第二客户端关系链操作的锁定,通过第二前置服务器就近选择一个第二关系链服务器发送第二客户端的接受信息,以通知第二关系链服务器进行第二客户端的关系链锁定操作。第二关系链服务器同样通过确定第二客户端的第二标识信息,进而基于第二标识信息锁定第二客户端的关系链操作。通过锁定第一客户端和第二客户端的关系链操作,可以使关系链构建过程中,用户其他的关系链操作(如其他关系链申请或者接收其他关系链申请)被禁止。以此可以确保用户关系链的构建和存储同步,保持高度的一致性。
另一方面,若第二客户端返回的是拒绝信息,则第一关系链服务器基于该拒绝信息更新当次关系链申请的关系链状态数据。
S130、构建第一客户端和第二客户端的用户关系链,将用户关系链存储至第一客户端所属区域的第一存储节点,以通过第一存储节点同步用户关系链至系统其余管理区域的第二存储节点。
完成关系链操作锁定之后,本申请实施例进一步构建第一客户端和第二客户端的用户关系链。可选的,基于第一标识信息和第二标识信息生成唯一的用户关系链。可以理解的是,第一标识信息为第一客户端的唯一标识信息,第二标识信息为第二客户端的唯一标识信息。以此构建的用户关系链具备唯一性,可以确保用户间的关系链数据不会出现交叉,避免用户关系链存储错乱,优化用户关系链构建效果。
同样的,对应已构建的用户关系链,通过第一关系链服务器存储至第一存储节点后,可以通过第一存储节点同步至系统的第二存储节点。则其他客户端在向第一客户端或者第二客户端发起关系链申请时,通过查询所属区域第二存储节点存储的有关第一客户端和第二客户端的用户关系链,即可确定当前自身的关系链申请存在冲突,进而保障关系链构建存储的稳定性。
示例性的,参照图4,本申请实施例在构建两个用户之间的用户关系链时,先由其中一个用户向另一个用户发送建立用户关系链的申请。该申请由用户1就近的前置服务器处理,前置服务器根据用户1的标识信息u id1,确定用户1所属大区的第一关系链服务器处理关系链申请。第一关系链服务器处理关系链申请的业务逻辑,并更新关系链状态数据到本地数据库或缓存。操作成功后第 一关系链服务器返回结果给前置服务器,由前置服务器通知用户双方。
进一步的,用户2接受用户1建立用户关系链的申请,接受信息由用户2就近的前置服务器处理,前置服务器使用uid1将接受信息哈希到uid1所属大区的第一关系链服务器处理。第一关系链服务器处理接受信息业务逻辑并给uid1上锁。操作成功再通知对应前置服务器。同时前置服务器使用uid2将接受信息哈希到uid2所属大区的第二关系链服务器处理。第二关系链服务器处理接受信息业务逻辑并给uid2上锁。操作成功再通知前置服务器,双方都上锁成功后,前置服务器再请求第一关系链服务器建立特殊关系链。第一关系链服务器最后处理业务逻辑并且更新用户关系链到本地数据库,标志着用户关系链建立成功。第一关系链服务器再把结果返回给前置服务器,由前置服务器通知用户双方操作成功。
在此之后,如图2所示,当用户关系链的功能服务器19需要使用用户关系链信息时,则通过对应调用前置服务器和关系链服务器查询存储节点,以基于查询到的用户关系链信息执行相应的用户关系链功能服务。
可选的,功能服务器19在查询用户关系链时,若当前业务对关系链信息的一致性要求不高(如对于未发起关系链申请的用户的业务),则可以就近接入同机房的存储节点查询。若当前业务对关系链信息的一致性要求较高(如正在构建用户关系链或者已完成用户关系链构建的用户的业务),则可以通过前置服务器哈希到对应机房查询。例如,如图2所示,亚洲大区的功能服务器19需要查询第二客户端12的用户关系链信息,由于当前业务对关系链信息的一致性要求较高,则需要通过第一前置服务器13哈希到第二关系链服务器16,调用第二关系链服务器16查询第二客户端12所属区域的第二存储节点18,确定第二客户端12的用户关系链信息。以此可以提升关系链业务服务的执行效率和稳定性,优化服务效果。
需要说明的是,上述用户关系链存储方法可以由用户关系链存储系统的第一前置服务器和第一关系链服务器共同执行。根据实际需要,也可以将用户关系链存储系统的前置服务器和关系链服务器合并为一个实体执行上述用户关系链存储方法,本申请实施例对用户关系链存储系统的具体结构不做固定限制,在此不多赘述。
可选的,在用户关系链构建超时或失败时,解锁第一客户端和第二客户端的关系链操作。其中,关系链服务器对用户关系链操作的锁定需要设置一个适 当的过期时间,保证出现异常情况时用户关系链操作仍可以自动恢复。而在关系链操作过程中,如果出现操作失败的情况,则应当使用和锁定关系链操作同样的转发逻辑给双方用户解锁,避免影响用户重新进行关系链接受操作。通过解锁第一客户端和第二客户端的关系链操作,可以确保第一客户端和第二客户端能够接受其他关系链申请,保障系统业务逻辑的正常运行。
在一个实施例中,第一存储节点包括缓存服务器和数据库服务器。本申请实施例还定时将数据库服务器述缓存服务器进行用户关系链比对,基于比对结果更新缓存服务器存储的用户关系链。同理,对于第二存储节点,同样包括缓存服务器和数据库服务器,也可以参照上述方式定时更新用户关系链。例如,第一关系链服务器定时从数据库服务器中捞出最近修改过的用户关系链,并且和第一存储节点本地的缓存数据(即缓存服务器的数据)进行对比,如不一致则会以数据库服务器的数据为准更新缓存。以此可以保障关系链信息存储的一致性和同步性,避免信息更新滞后影响系统业务执行。
上述,通过接收第一客户端对第二客户端的关系链申请,将关系链申请转发至第二客户端;接收第二客户端对关系链申请的接受信息,锁定第一客户端的关系链操作;构建第一客户端和第二客户端的用户关系链,将用户关系链存储至第一客户端所属区域的第一存储节点,以通过第一存储节点同步用户关系链至系统其余管理区域的第二存储节点。采用上述技术手段,通过在构建用户关系链之前,对用户客户端的关系链操作进行锁定,以此可以避免用户短时内出现多条关系链操作信息,进而保障用户关系链存储的一致性和稳定性,优化用户关系链的相关功能服务效果,提升用户的使用体验。
在上述实施例的基础上,图5为本申请提供的一种用户关系链存储装置的结构示意图。参考图5,本实施例提供的用户关系链存储装置具体包括:转发模块21、锁定模块22和存储模块23。
其中,转发模块21用于接收第一客户端对第二客户端的关系链申请,将关系链申请转发至第二客户端;
锁定模块22用于接收第二客户端对关系链申请的接受信息,锁定第一客户端的关系链操作;
存储模块23用于构建第一客户端和第二客户端的用户关系链,将用户关系链存储至第一客户端所属区域的第一存储节点,以通过第一存储节点同步用户关系链至系统其余管理区域的第二存储节点。
具体地,锁定模块22具体用于确定第一客户端的第一标识信息;基于第一标识信息锁定第一客户端的关系链操作。
存储模块23具体用于基于第一标识信息和第二客户端的第二标识信息生成唯一的用户关系链。
存储模块23还用于更新第一客户端的关系链状态数据至第一存储节点,以记录所述第一客户端的关系链操作状态。
在用户关系链构建超时或失败时,解锁第一客户端的关系链操作。
定时将数据库服务器与缓存服务器进行用户关系链比对,基于比对结果更新缓存服务器存储的用户关系链。
上述,通过接收第一客户端对第二客户端的关系链申请,将关系链申请转发至第二客户端;接收第二客户端对关系链申请的接受信息,锁定第一客户端的关系链操作;构建第一客户端和第二客户端的用户关系链,将用户关系链存储至第一客户端所属区域的第一存储节点,以通过第一存储节点同步用户关系链至系统其余管理区域的第二存储节点。采用上述技术手段,通过在构建用户关系链之前,对用户客户端的关系链操作进行锁定,以此可以避免用户短时内出现多条关系链操作信息,进而保障用户关系链存储的一致性和稳定性,优化用户关系链的相关功能服务效果,提升用户的使用体验。
本申请实施例提供的用户关系链存储装置可以用于执行上述实施例提供的用户关系链存储方法,具备相应的功能和有益效果。
在上述实际上例的基础上,本申请实施例还提供了一种电子设备,参照图6,该电子设备包括:处理器31、存储器32、通信模块33、输入装置34及输出装置35。存储器32作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本申请任意实施例所述的用户关系链存储方法对应的程序指令/模块(例如,用户关系链存储系统中的转发模块、锁定模块和存储模块)。通信模块33用于进行数据传输。处理器31通过运行存储在存储器中的软件程序、指令以及模块,从而执行设备的各种功能应用以及数据处理,即实现上述的用户关系链存储方法。输入装置34可用于接收输入的数字或字符信息,以及产生与设备的用户设置以及功能控制有关的键信号输入。输出装置35可包括显示屏等显示设备。上述提供的电子设备可用于执行上述实施例提供的用户关系链存储方法,具备相应的功能和有益效果。
在上述实施例的基础上,本申请实施例还提供一种包含计算机可执行指令 的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种用户关系链存储方法,存储介质可以是任何的各种类型的存储器设备或存储设备。当然,本申请实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的用户关系链存储方法,还可以执行本申请任意实施例所提供的用户关系链存储方法中的相关操作。
在上述实施例的基础上,本申请实施例还提供一种计算机程序产品,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机程序产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备、移动终端或其中的处理器执行本申请各个实施例所述用户关系链存储方法的全部或部分步骤。
上述仅为本申请的较佳实施例及所运用的技术原理。本申请不限于这里所述的特定实施例,对本领域技术人员来说能够进行的各种明显变化、重新调整及替代均不会脱离本申请的保护范围。因此,虽然通过以上实施例对本申请进行了较为详细的说明,但是本申请不仅仅限于以上实施例,在不脱离本申请构思的情况下,还可以包括更多其他等效实施例,而本申请的范围由权利要求的范围决定。

Claims (10)

  1. 一种用户关系链存储方法,其特征在于,包括:
    接收第一客户端对第二客户端的关系链申请,将所述关系链申请转发至所述第二客户端;
    接收所述第二客户端对所述关系链申请的接受信息,锁定所述第一客户端的关系链操作;
    构建所述第一客户端和所述第二客户端的用户关系链,将所述用户关系链存储至所述第一客户端所属区域的第一存储节点,以通过所述第一存储节点同步所述用户关系链至系统其余管理区域的第二存储节点。
  2. 根据权利要求1所述的用户关系链存储方法,其特征在于,所述锁定所述第一客户端的关系链操作,包括:
    确定所述第一客户端的第一标识信息;
    基于所述第一标识信息锁定所述第一客户端的关系链操作。
  3. 根据权利要求1所述的用户关系链存储方法,其特征在于,所述构建所述第一客户端和所述第二客户端的用户关系链,包括:
    基于所述第一标识信息和所述第二客户端的第二标识信息生成唯一的用户关系链。
  4. 根据权利要求1所述的用户关系链存储方法,其特征在于,在接收第一客户端对第二客户端的关系链申请之后,还包括:
    更新所述第一客户端的关系链状态数据至所述第一存储节点,以记录所述第一客户端的关系链操作状态。
  5. 根据权利要求1所述的用户关系链存储方法,其特征在于,所述第一存储节点包括缓存服务器和数据库服务器;
    所述用户关系链存储方法还包括:
    定时将所述数据库服务器与所述缓存服务器进行所述用户关系链比对,基于比对结果更新所述缓存服务器存储的所述用户关系链。
  6. 根据权利要求1所述的用户关系链存储方法,其特征在于,在锁定所述第一客户端的关系链操作之后,还包括:
    在所述用户关系链构建超时或失败时,解锁所述第一客户端的关系链操作。
  7. 一种用户关系链存储装置,其特征在于,包括:
    转发模块,用于接收第一客户端对第二客户端的关系链申请,将所述关系链申请转发至所述第二客户端;
    锁定模块,用于接收所述第二客户端对所述关系链申请的接受信息,锁定所述第一客户端的关系链操作;
    存储模块,用于构建所述第一客户端和所述第二客户端的用户关系链,将所述用户关系链存储至所述第一客户端所属区域的第一存储节点,以通过所述第一存储节点同步所述用户关系链至系统其余管理区域的第二存储节点。
  8. 一种用户关系链存储系统,其特征在于,包括:前置服务器、关系链服务器和存储节点,所述前置服务器包括对应第一客户端的第一前置服务器,以及对应第二客户端的第二前置服务器;所述关系链服务器包括对应所述第一客户端所属区域的第一关系链服务器,以及对应所述第二客户端所属区域的第二关系链服务器;所述存储节点包括对应所述第一客户端所属区域的第一存储节点,以及对应系统其余管理区域的第二存储节点;
    所述第一前置服务器用于接收第一客户端对第二客户端的关系链申请,选择一个所述第一关系链服务器发送所述关系链申请,并将所述关系链申请转发至所述第二客户端;
    所述第一关系链服务器用于根据接收到的所述关系链申请,更新所述第一客户端的关系链状态数据至所述第一存储节点,以记录所述第一客户端的关系链操作状态;
    所述第二客户端用于响应接收到的所述关系链申请,通过所述第二前置服务器转发所述关系链申请的接受信息至所述第一关系链服务器,以指示所述第一关系链服务器锁定所述第一客户端的关系链操作;并通过所述第二前置服务器选择一个所述第二关系链服务器转发所述接受信息,以指示对应的所述第二关系链服务器锁定所述第二客户端的关系链操作;
    所述第一关系链服务器还用于构建所述第一客户端和所述第二客户端的用户关系链,将所述用户关系链存储至所述第一存储节点,并通过所述第一存储节点同步所述用户关系链至各个所述第二存储节点。
  9. 一种电子设备,其特征在于,包括:
    存储器以及一个或多个处理器;
    所述存储器,用于存储一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-6任一所述的用户关系链存储方法。
  10. 一种包含计算机可执行指令的存储介质,其特征在于,所述计算机可执 行指令在由计算机处理器执行时用于执行如权利要求1-6任一所述的用户关系链存储方法。
PCT/CN2022/132902 2021-11-26 2022-11-18 用户关系链存储方法、装置、系统、电子设备及存储介质 WO2023093641A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111422191.7A CN114153927A (zh) 2021-11-26 2021-11-26 用户关系链存储方法、装置、系统、电子设备及存储介质
CN202111422191.7 2021-11-26

Publications (1)

Publication Number Publication Date
WO2023093641A1 true WO2023093641A1 (zh) 2023-06-01

Family

ID=80458345

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/132902 WO2023093641A1 (zh) 2021-11-26 2022-11-18 用户关系链存储方法、装置、系统、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN114153927A (zh)
WO (1) WO2023093641A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114153927A (zh) * 2021-11-26 2022-03-08 百果园技术(新加坡)有限公司 用户关系链存储方法、装置、系统、电子设备及存储介质
CN114844951B (zh) * 2022-04-22 2024-03-19 百果园技术(新加坡)有限公司 请求处理方法、系统、设备、存储介质及产品

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180343120A1 (en) * 2016-10-26 2018-11-29 Black Gold Coin, Inc. Systems and methods for providing a universal decentralized solution for verification of users with cross-verification features
CN110597840A (zh) * 2019-09-26 2019-12-20 腾讯科技(深圳)有限公司 基于区块链的伴侣关系建立方法、装置、设备及存储介质
WO2020065242A1 (en) * 2018-09-27 2020-04-02 C S Solutions Technology Limited Method and system for transaction processing in decentralized network by network nodes in collaborative decision-making
CN113158081A (zh) * 2021-05-10 2021-07-23 微民保险代理有限公司 用户关系构建方法、装置、电子设备及存储介质
CN114153927A (zh) * 2021-11-26 2022-03-08 百果园技术(新加坡)有限公司 用户关系链存储方法、装置、系统、电子设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180343120A1 (en) * 2016-10-26 2018-11-29 Black Gold Coin, Inc. Systems and methods for providing a universal decentralized solution for verification of users with cross-verification features
WO2020065242A1 (en) * 2018-09-27 2020-04-02 C S Solutions Technology Limited Method and system for transaction processing in decentralized network by network nodes in collaborative decision-making
CN110597840A (zh) * 2019-09-26 2019-12-20 腾讯科技(深圳)有限公司 基于区块链的伴侣关系建立方法、装置、设备及存储介质
CN113158081A (zh) * 2021-05-10 2021-07-23 微民保险代理有限公司 用户关系构建方法、装置、电子设备及存储介质
CN114153927A (zh) * 2021-11-26 2022-03-08 百果园技术(新加坡)有限公司 用户关系链存储方法、装置、系统、电子设备及存储介质

Also Published As

Publication number Publication date
CN114153927A (zh) 2022-03-08

Similar Documents

Publication Publication Date Title
WO2023093641A1 (zh) 用户关系链存储方法、装置、系统、电子设备及存储介质
KR102510195B1 (ko) 트랜잭션 처리 방법, 장치 및 기기, 그리고 컴퓨터 저장 매체
US11172023B2 (en) Data synchronization method and system
CN109753364A (zh) 一种基于网络的分布式锁的实现方法、设备及介质
US7900085B2 (en) Backup coordinator for distributed transactions
CN113535656B (zh) 数据访问方法、装置、设备及存储介质
US9027030B2 (en) Commit-one-phase distributed transactions with multiple starting participants
CN105512266A (zh) 一种实现分布式数据库操作一致性的方法及装置
US8639786B2 (en) Consistency domains for replication in distributed computing
US9201919B2 (en) Bandwidth optimized two-phase commit protocol for distributed transactions
CN109547512A (zh) 一种基于NoSQL的分布式Session管理的方法及装置
US9110940B2 (en) Supporting transactions in distributed environments using a local copy of remote transaction data and optimistic locking
US20130226891A1 (en) Managing versions of transaction data used for multiple transactions in distributed environments
US20220269670A1 (en) Data processing method and apparatus, computer device, and storage medium
WO2023165429A1 (zh) 一种会话状态管理方法、系统、装置、设备及存储介质
US20210165810A1 (en) Transaction processing method, apparatus, and device and computer storage medium
US8200811B2 (en) Automatic server administration of serial numbers in a replicated certificate authority topology
CN101778131A (zh) 数据同步系统
CN112910796B (zh) 流量管理方法、装置、设备、存储介质以及程序产品
CN112000444B (zh) 数据库事务处理方法、装置、存储介质和电子设备
CN101789963A (zh) 数据同步系统
US20230353394A1 (en) Cross-blockchain transaction processing method and apparatus, computer device, computer storage medium, and computer program product
US10255339B2 (en) Data change controller
EP4293513A1 (en) Distributed transaction processing method and system, and related device
CN113448976B (zh) 数据处理方法、装置、计算机设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22897724

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE