Relational data operation method, system and device, storage medium and electronic equipment

By pre-storing data configuration information sets and uniformly processing object relationship data requests for different business scenarios, the inefficiency problem in existing technologies is solved and more efficient data operations are achieved.

CN120705223APending Publication Date: 2025-09-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410358805.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-26
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In the existing technology, the service provision platform is inefficient in processing different types of relational data, and it is necessary to develop and manage various types of relational services separately, resulting in low efficiency.

Method used

By pre-storing data configuration information sets that match various business scenarios, the configuration information set corresponding to the target business scenario is determined, and the same data processing logic is used to uniformly process object relationship data requests in multiple different business scenarios to avoid repeated development.

Benefits of technology

The operational efficiency of performing corresponding data operations on object relationship data in multiple different business scenarios is improved, solving the problem of low efficiency in the existing technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705223A_ABST
    Figure CN120705223A_ABST
Patent Text Reader

Abstract

The invention provides a relational data operation method, system and device, a storage medium and electronic equipment. The method comprises the steps that a relational data request is received, the relational data request is used for obtaining an operation result of executing data operation on target relational data, and the target relational data is used for indicating the incidence relation between at least two objects in a target business scene; determining a target configuration information set corresponding to the target service scene from a plurality of data configuration information sets corresponding to the plurality of service scenes; according to the target configuration information set, determining at least one target operation step matched with the request type of the relational data request and a target database used for storing target relational data; and returning an operation result of the at least one target operation step executed on the target relational data in the target database. The technical problem of low operation efficiency of relational data in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a method and system for operating relational data, a device, a storage medium, and an electronic device. Background Art

[0002] For service provider platforms, they can usually provide users with various types of object relationship services in different business scenarios. For example, in social applications, they can provide users with friend account relationship services, including adding friends and displaying friend lists; in information applications, they can provide users with type information attention services, including following specific types of information and displaying a list of the types of information they follow.

[0003] In providing these object-relationship services to users, the service provider platform needs to develop, maintain, and manage different types of relationship services separately for various scenarios. Furthermore, when receiving relationship data processing requests from users based on object-relationship operations, different relationship service management systems must be used to process these different types of relationship data separately. Clearly, existing methods for operating relationship data suffer from low efficiency.

[0004] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0005] Embodiments of the present invention provide a method and system, a device, a storage medium, and an electronic device for operating relational data, so as to at least solve the technical problem of low efficiency of relational data operating methods in related fields.

[0006] According to one aspect of an embodiment of the present invention, a method for operating relational data is provided, comprising: receiving a relational data request, wherein the relational data request is used to obtain an operation result of performing a data operation on target relational data, and the target relational data is used to indicate an association relationship between at least two objects in a target business scenario; determining a target configuration information set corresponding to the target business scenario from a plurality of data configuration information sets corresponding to the plurality of business scenarios, wherein the plurality of data configuration information sets respectively include database identification information and operation set information pre-configured for the plurality of business scenarios, the database identification information indicates a database for storing object relational data associated with the business scenario, and the operation set information indicates at least one operation step for performing the data operation on the object relational data; determining at least one target operation step that matches the request type of the relational data request and a target database for storing the target relational data according to the target configuration information set; and returning an operation result of at least one target operation step performed on the target relational data in the target database.

[0007] According to another aspect of an embodiment of the present invention, an operating system for relational data is provided, comprising: a request receiving layer, configured to provide a relational operation interface to multiple business systems, receive relational data requests respectively sent by the multiple business systems based on the relational operation interface, and return an operation result of performing data operations on object-relational data, wherein the object-relational data is used to indicate an association relationship between at least two objects in a business scenario corresponding to the business system; a request processing layer, configured to determine a current configuration information set corresponding to a current business scenario from multiple data configuration information sets corresponding to the multiple business scenarios, wherein the multiple data configuration information sets respectively include database identification information and operation set information pre-configured for the multiple business scenarios, the database identification information indicates a database for storing object-relational data associated with the business scenario, and the operation set information indicates at least one operation step for performing the data operation on the object-relational data; determining at least one operation step matching the request type of the relational data request and a target database for storing the relational data based on the current configuration information set; and a data operation layer, configured to perform at least one operation step on the relational data in the target database.

[0008] According to another aspect of an embodiment of the present invention, a relational data operation device is further provided, including: a receiving unit, configured to receive a relational data request, wherein the relational data request is used to obtain an operation result of performing a data operation on target relational data, and the target relational data is used to indicate an association relationship between at least two objects in a target business scenario; a first determining unit, configured to determine a target configuration information set corresponding to the target business scenario from a plurality of data configuration information sets corresponding to the plurality of business scenarios, wherein the plurality of data configuration information sets respectively include database identification information and operation set information pre-configured for the plurality of business scenarios, the database identification information indicates a database for storing object relational data associated with the business scenario, and the operation set information indicates at least one operation step for performing the data operation on the object relational data; a second determining unit, configured to determine, based on the target configuration information set, at least one target operation step that matches the request type of the relational data request, and a target database for storing the target relational data; and a returning unit, configured to return an operation result of at least one target operation step performed on the target relational data in the target database.

[0009] Optionally, the above-mentioned return unit includes: a first operation module, which is used to determine the data synchronization type corresponding to the above-mentioned operation set information according to the above-mentioned target configuration information set when the above-mentioned relational data request is a data write request, wherein the above-mentioned data synchronization type includes a synchronous write type and an asynchronous write type; at a response time node matching the above-mentioned data synchronization type, return the data write result of writing the above-mentioned target relational data in the above-mentioned target database; a second operation module, which is used to read the above-mentioned target relational data from the above-mentioned target database when the above-mentioned relational data request is a data read request, and return the data read result when reading the above-mentioned target relational data is successful.

[0010] Optionally, the above-mentioned first operation module is used to: when the above-mentioned operation set information corresponds to the above-mentioned synchronous write type, write the above-mentioned target relational data matching the above-mentioned relational data request into the first database, and when the above-mentioned target relational data is written successfully, return the above-mentioned execution result, wherein the above-mentioned target database includes a first database, and the above-mentioned first database is used to persistently store the above-mentioned target relational data generated in the above-mentioned target business scenario; when the above-mentioned operation set information corresponds to the above-mentioned asynchronous write type, add the target write task corresponding to the above-mentioned target relational data to the asynchronous task queue, and return the above-mentioned execution result, wherein the above-mentioned asynchronous task queue is used to store multiple data writing tasks; when the above-mentioned target write task is taken out from the above-mentioned asynchronous task queue, write the above-mentioned target relational data matching the above-mentioned relational data request into the above-mentioned first database.

[0011] Optionally, the above-mentioned first operation module is also used to: when the above-mentioned target configuration information set includes cache data information for indicating cache relationship data, determine a second database for storing the above-mentioned cache relationship data, wherein the above-mentioned cache relationship data is the above-mentioned object relationship data that is synchronously updated with the above-mentioned target relationship data when the above-mentioned target relationship data is updated; when the above-mentioned target relationship data matching the above-mentioned relationship data request is successfully written into the first database, update the above-mentioned cache relationship data in the above-mentioned second database, wherein the above-mentioned target database includes the above-mentioned first database and the above-mentioned second database, the above-mentioned first database is used to persistently store the above-mentioned target relationship data generated in the above-mentioned target business scenario, and the above-mentioned second database is used to store the above-mentioned cache relationship data within the target cycle.

[0012] Optionally, the first operation module is used for at least one of the following: when the cache data information includes sorting cache information, determining a second database for storing sorting cache data, wherein the sorting cache data is used to indicate a second object list associated with the first object, the second object list includes at least one second object sorted in a target order, and the second object has an association relationship with the first object; when the cache data information includes identification cache information, determining a second database for storing identification cache data, wherein the identification cache data is used to indicate a second object identifier set associated with the first object, and the second object identifier set includes object identifiers of multiple second objects that have an association relationship with the first object; when the cache data information includes description cache information, determining a second database for storing description cache data, wherein the description cache data is used to indicate a second object information set associated with the first object, and the object description information of multiple second objects that have an association relationship with the first object in the second object information set; when the cache data information includes counting cache information, determining a second database for storing counting cache data, wherein the counting cache data is used to indicate the object number of second objects that have an association relationship with the first object.

[0013] Optionally, the above-mentioned first operation module is also used to: when a read request for the above-mentioned cache relationship data is received, search the above-mentioned cache relationship data from the above-mentioned second database; when the search for the above-mentioned cache relationship data is successful, return the above-mentioned cache relationship data; when the search for the above-mentioned cache relationship data fails, determine at least one reference operation step according to the above-mentioned target configuration information set, and return the above-mentioned execution result of at least one of the above-mentioned reference operation steps.

[0014] Optionally, the above-mentioned first operation module is also used to: obtain target search parameters from the above-mentioned target configuration information set, wherein the above-mentioned target search parameters are used to indicate the ratio between the first frequency of determining the above-mentioned cache relationship data according to the above-mentioned first database and the second frequency of failing to find the above-mentioned cache relationship data; when the relationship between the above-mentioned target search parameters and the historical failure frequency meets the search conditions, determine the above-mentioned cache relationship data according to the above-mentioned target relationship data stored in the above-mentioned first database; when the relationship between the above-mentioned target search parameters and the historical failure frequency does not meet the search conditions, add a target update task to the asynchronous update queue, wherein the above-mentioned target update task is used to update the above-mentioned cache relationship data in the above-mentioned second database according to the above-mentioned target relationship data stored in the above-mentioned first database; when the above-mentioned target update task is obtained from the above-mentioned asynchronous update queue, obtain the update result of the above-mentioned cache relationship data.

[0015] Optionally, the above-mentioned first determination unit is used for at least one of the following: obtaining the product identification carried in the above-mentioned relationship data request, and determining the target configuration information set corresponding to the above-mentioned target business scenario based on the matching relationship between the above-mentioned product identification and the product identification information carried in the above-mentioned data configuration information set, wherein the above-mentioned product identification is used to provide the business products of the above-mentioned target business scenario; obtaining the function identification carried in the above-mentioned relationship data request, and determining the target configuration information set corresponding to the above-mentioned target business scenario based on the matching relationship between the above-mentioned function identification and the function identification information carried in the above-mentioned data configuration information set, wherein the above-mentioned function identification is used to provide the business functions of the above-mentioned target business scenario.

[0016] Optionally, the operating device for the above-mentioned relational data also includes: a configuration unit, used to obtain a target configuration information set corresponding to the above-mentioned target business scenario; based on the database identification information carried in the above-mentioned target configuration information set, determining the first database assigned to the above-mentioned target relational data, wherein the above-mentioned first database is used to persistently store the above-mentioned target relational data generated in the above-mentioned target business scenario; in the case that the above-mentioned target configuration information set includes cache data information, determining the second database assigned to the cache relational data, wherein the above-mentioned second database is used to store the above-mentioned cache relational data within the target period, and the above-mentioned cache relational data is the above-mentioned object relational data that is updated synchronously with the above-mentioned target relational data when the above-mentioned target relational data is updated.

[0017] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the above-mentioned method for operating relational data when running.

[0018] According to another aspect of the embodiments of the present application, a computer program product or computer program is provided, the computer program product or computer program including 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 above-described method for operating relational data.

[0019] According to another aspect of an embodiment of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-mentioned method for operating relational data through the computer program.

[0020] In the above-mentioned relational data operation method, a relational data request is first received, wherein the relational data request is used to obtain an operation result of performing a data operation on target relational data, and the target relational data is used to indicate the association relationship between at least two objects in a target business scenario; then, a target configuration information set corresponding to the target business scenario is determined from multiple data configuration information sets corresponding to multiple business scenarios respectively; then, at least one target operation step matching the request type of the relational data request and a target database for storing the target relational data are determined based on the target configuration information set; finally, the operation result of at least one target operation step performed on the target relational data in the target database is returned, thereby realizing that when a relational data request related to the target business scenario is received, corresponding data operation parameters are determined based on the data configuration information set corresponding to the target business scenario, thereby realizing the processing of the relational data operation request in the target business scenario.

[0021] In the above embodiment, since a data configuration information set matching each different business scenario is pre-stored to indicate the corresponding data operation method steps for each different business scenario, as well as a database for storing object relationship data generated in different business scenarios, the commonalities of the object relationship data in different business scenarios are utilized, and the same data processing logic is reused to uniformly process operation requests for object relationship data in multiple different business scenarios, thereby avoiding repeated development of processing systems for object relationship data requests in different business scenarios, improving the operational efficiency of performing corresponding data operations on object relationship data in multiple different business scenarios, and solving the technical problem of low operational efficiency of existing relational data. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0023] Figure 1 is a schematic diagram of a hardware environment of an optional method for operating relational data according to an embodiment of the present invention;

[0024] Figure 2 is a flow chart of an optional method for operating relational data according to an embodiment of the present invention;

[0025] Figure 3 is a schematic diagram of optional relationship data according to an embodiment of the present invention;

[0026] Figure 4 is a schematic diagram of an optional relational data configuration file according to an embodiment of the present invention;

[0027] Figure 5 is a schematic diagram of another optional relational data according to an embodiment of the present invention;

[0028] Figure 6 is a flowchart of another optional method for operating relational data according to an embodiment of the present invention;

[0029] Figure 7 is a schematic diagram of another optional relational data configuration file according to an embodiment of the present invention;

[0030] Figure 8 is a flowchart of another optional method for operating relational data according to an embodiment of the present invention;

[0031] Figure 9 is a schematic diagram of an operating system for relational data according to an embodiment of the present invention;

[0032] Figure 10 is a schematic diagram of another optional relational data according to an embodiment of the present invention;

[0033] Figure 11 is a schematic diagram of another optional relational data according to an embodiment of the present invention;

[0034] Figure 12 A schematic structural diagram of an optional apparatus for operating relational data according to an embodiment of the present invention;

[0035] Figure 13 FIG. 4 is a schematic structural diagram of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0037] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0038] It should be noted that in the relevant implementation methods of this application, the acquisition and processing of relevant data information of the client are all pre-acquired through methods that comply with the provisions of relevant normative legal documents, and before obtaining the above-mentioned relevant information and data, it is necessary to obtain the authorization permission of the corresponding account subject.

[0039] The following is an explanation of the technical terms involved in the embodiments of this application:

[0040] Main memory: Short for primary storage, or persistent storage. Generally, data is considered successfully written only after it has been successfully written to main memory. The counterpart to main memory is cache. Databases are often also referred to as main memory, a typical example being the MySQL storage system.

[0041] Cache: Usually refers to storage with a certain expiration time, mainly for improving access performance. A typical example is the Redis storage system.

[0042] Business side: Short for business side system, often refers to the system that carries out specific business logic and interacts with users. This corresponds to basic services, which lack specific business logic and typically support multiple different business side systems.

[0043] According to one aspect of an embodiment of the present invention, a method for operating relational data is provided. As an optional implementation, the method for operating relational data can be applied to, but is not limited to, Figure 1 In the operating system of the relational data composed of the terminal device 102, the server 104 and the network 110 shown in FIG. Figure 1As shown, the terminal device 102 is connected to and communicates with the server 104 via the network 110. The network may include, but is not limited to, a wired network and a wireless network. The wired network includes a local area network, a metropolitan area network, and a wide area network. The wireless network includes Bluetooth, WIFI, and other networks that implement wireless communication. The terminal device may include, but is not limited to, at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop computer, a tablet computer, a PDA, an MID (Mobile Internet Device), a PAD, a desktop computer, a smart TV, an in-vehicle device, etc. The terminal device 102 may be installed with a client for providing target business services. The client may include, but is not limited to, an instant messaging client, an information push client, etc.

[0044] The terminal device 102 is also provided with a display, a processor and a memory. The display can be used to display the program interface of the client, and the processor can process and convert the operation information of the object relationship data generated by the object operation based on the client; the memory is used to store the operation information generated by the object account in historical operations.

[0045] The server 104 may be a single server, a server cluster consisting of multiple servers, or a cloud server. The server includes a database and a processing engine. Furthermore, the database may include multiple storage spaces for storing object-relational data generated in different business scenarios. The processing engine may include an asynchronous processing engine and a synchronous processing engine. The asynchronous processing engine may be used to asynchronously respond to relational data requests, while the synchronous processing engine may provide immediate responses to relational data requests.

[0046] According to one aspect of an embodiment of the present invention, the above-mentioned relational data operating system may further perform the following steps: first, executing step S102 by a terminal device 102 running a target client to generate a relational data request in response to an object relational operation; then executing step S104 to send the relational data request to the server 104 via the network 110; wherein the above-mentioned target client is used to provide an object interaction operation in a target business scenario, so as to generate a relational data request based on a change or update state of an object relation in the above-mentioned target business scenario;

[0047] Next, in server 104, steps S106 to S112 are executed to receive a relationship data request, wherein the relationship data request is used to obtain an operation result of performing a data operation on target relationship data, and the target relationship data is used to indicate an association relationship between at least two objects in a target business scenario; a target configuration information set corresponding to the target business scenario is determined from a plurality of data configuration information sets corresponding to the plurality of business scenarios, wherein the plurality of data configuration information sets respectively include database identification information and operation set information pre-configured for the plurality of business scenarios, the database identification information indicating a database for storing object relationship data associated with the business scenario, and the operation set information indicating at least one operation step for performing a data operation on the object relationship data; at least one target operation step matching the request type of the relationship data request and a target database for storing the target relationship data are determined based on the target configuration information set; and an operation result of the at least one target operation step performed on the target relationship data in the target database is returned;

[0048] Next, the server 104 executes step S114 to send the operation result to the terminal device 102 via the network 110. Finally, the terminal device 102 executes step S116 to update the displayed application page according to the operation result.

[0049] In the above-mentioned relational data operation method, a relational data request is first received, wherein the relational data request is used to obtain an operation result of performing a data operation on target relational data, and the target relational data is used to indicate the association relationship between at least two objects in a target business scenario; then, a target configuration information set corresponding to the target business scenario is determined from multiple data configuration information sets corresponding to multiple business scenarios respectively; then, at least one target operation step matching the request type of the relational data request and a target database for storing the target relational data are determined based on the target configuration information set; finally, the operation result of at least one target operation step performed on the target relational data in the target database is returned, thereby realizing that when a relational data request related to the target business scenario is received, corresponding data operation parameters are determined based on the data configuration information set corresponding to the target business scenario, thereby realizing the processing of the relational data operation request in the target business scenario.

[0050] In the above embodiment, since a data configuration information set matching each different business scenario is pre-stored to indicate the corresponding data operation method steps for each different business scenario, as well as a database for storing object relationship data generated in different business scenarios, the commonalities of the object relationship data in different business scenarios are utilized, and the same data processing logic is reused to uniformly process operation requests for object relationship data in multiple different business scenarios, thereby avoiding repeated development of processing systems for object relationship data requests in different business scenarios, improving the operational efficiency of performing corresponding data operations on object relationship data in multiple different business scenarios, and solving the technical problem of low operational efficiency of existing relational data.

[0051] The above is only an example and is not limited in this embodiment.

[0052] As an optional implementation, Figure 2 As shown, the above-mentioned method for operating relational data can be applied to a server that provides data processing services for multiple different business scenarios, and specifically may include the following steps:

[0053] S202, receiving a relationship data request, wherein the relationship data request is used to obtain an operation result of performing a data operation on target relationship data, and the target relationship data is used to indicate an association relationship between at least two objects in a target business scenario;

[0054] S204: Determine a target configuration information set corresponding to a target business scenario from a plurality of data configuration information sets corresponding to the plurality of business scenarios, wherein the plurality of data configuration information sets respectively include database identification information and operation set information pre-configured for the plurality of business scenarios, the database identification information indicating a database for storing object-relationship data associated with the business scenario, and the operation set information indicating at least one operation step for performing a data operation on the object-relationship data;

[0055] S206, determining, according to the target configuration information set, at least one target operation step that matches the request type of the relational data request, and a target database for storing the target relational data;

[0056] S208: Return the operation result of at least one target operation step performed on the target relational data in the target database.

[0057] First, the business scenario in steps S202 to S208 is described. In an optional manner, the business scenario can be used to indicate a virtual interactive environment provided by an application, in which different objects can interact with each other, thereby generating corresponding object relationship data.

[0058] The above objects may include but are not limited to one or more of account objects (corresponding to users), topic objects, and media resource objects.

[0059] For example, in the case where the business scenario is a virtual social scenario, the object may be specifically an account object, and object relationship data may be generated based on the interactive operations between different account objects in the virtual social scenario. For example, when a friend account relationship is established between a first account and a second account, the object relationship data may be used to indicate the friend account relationship between the first account and the second account; for another example, when a first account follows a second account, a follow account relationship may be established between the first account and the second account, and the object relationship data may be used to indicate the follow account relationship (such as a "fan" relationship or a "listener" relationship) between the first account and the second account.

[0060] For another example, when the business scenario is an information push scenario, the objects may be specifically account objects and media resource objects, and object relationship data may be generated based on the operations between the account objects and media resource objects in the information push scenario. For example, when a first account performs a collection operation on a first information message, the object relationship data may be used to indicate the object collection relationship between the first account and the first information message; for another example, when a first account follows a first information topic, a topic follow relationship may be established between the first account and the first information topic, and the object relationship data may be used to indicate the topic follow relationship between the first account and the first information topic;

[0061] For another example, when the business scenario is an event information scenario, the objects may be specifically event resource objects and associated information objects, and object relationship data may be generated based on the matching operation between the event objects and associated information objects in the event information scenario. For example, when the target object account in the event information scenario creates a target event object, and when the reference object account adds associated information objects (e.g., event progress information, participant information, etc.) to the target event object in the event information scenario, an object relationship may be established between the target event object and the associated information objects, and the object relationship may be described through corresponding object relationship data.

[0062] The scenario types of the above business scenarios and the association relationships described by the object association data generated in the above business scenarios are only exemplary and do not limit the specific content and form of the object relationship data and business scenarios in the embodiments of this application.

[0063] The following combination Figure 3The above examples are summarized as shown below. Figure 3 As shown, from the perspective of actual business scenarios, whether it is a user scenario or a content scenario, relational data maintains a 1-to-N relationship between two objects. In some scenarios, some explanatory information needs to be stored together with the relationship.

[0064] Specifically, if Figure 3 As shown, in a user scenario (i.e., a specific type of virtual social scenario described above), a user object can establish a follow relationship, a like relationship, etc. with other user objects; a user object can also establish a favorite relationship, a follow relationship, etc. with a tag object (for receiving content push); and a user object can also establish a favorite relationship, a like relationship, etc. with an event object (e.g., text-based information, video-based information). Relationship data that can be further associated with the above user scenarios can also include count data for the above relationship data, including the number of followers and fans of the user object.

[0065] like Figure 3 As shown, in the content scenario, event objects, tag objects, event objects, team objects and other objects can further establish association relationships with each other. For example, a certain event object can be associated with multiple team objects, and a certain event object can be associated with multiple schedule time information, etc.

[0066] It is understandable that in this embodiment, in the above-mentioned various business scenarios, the operation of the object account can trigger the update of various types of relationship data. For example, in the user scenario, the target object account initiates a follow operation to the reference object account, thereby triggering the establishment of an association relationship between the target object account and the reference object account. The above-mentioned object account can then initiate a relationship data request to the server through the above-mentioned follow operation to add the account information of the above-mentioned reference object account to the database used to describe the follow relationship of the target object account, so as to record the follow relationship between the target object account and the reference object account; at the same time, the follow data of the target object account needs to be updated in the database, that is, the original N follow counts displayed on the account homepage of the target object account are updated to N+1 follow counts.

[0067] In the above embodiment, step S202 can be used to receive relational data requests from different business scenarios, abstractly describe the relational data in these different business scenarios, and process and operate on the relational data requests from these different business scenarios through steps S202 to S208. This avoids the need, in conventional data processing methods, to develop corresponding data processing systems for data in different business scenarios, as well as the need to develop corresponding operational processes and server systems for different types of relational data. However, due to the high similarity in the logic code for relational data in each of the above scenarios, such as follow, favorite, and like, there are problems such as duplicate coding and inconvenient maintenance, resulting in low development and data processing efficiency. Furthermore, if a new business scenario, such as subscription, needs to be developed, then in conventional methods, a similar data logic layer code must be rewritten in the same manner. This reduces maintainability and wastes R&D manpower. Finally, when data logic needs to be optimized or storage needs to be switched (e.g., from Redis to MemCache), the service systems corresponding to each business scenario need to be upgraded separately, and the required work is highly similar, resulting in low processing efficiency.

[0068] In the above embodiment, since a data configuration information set matching each different business scenario is pre-stored to indicate the corresponding data operation method steps for each different business scenario, as well as a database for storing object relationship data generated in different business scenarios, the commonalities of the object relationship data in different business scenarios are utilized, and the same data processing logic is reused to uniformly process operation requests for object relationship data in multiple different business scenarios, thereby avoiding repeated development of processing systems for object relationship data requests in different business scenarios, improving the operational efficiency of performing corresponding data operations on object relationship data in multiple different business scenarios, and solving the technical problem of low operational efficiency of existing relational data.

[0069] Furthermore, in the above step S204, when a relational data request associated with a target business scenario is received, a target configuration information set corresponding to the target business scenario can be determined from a plurality of pre-stored data configuration information sets corresponding to a plurality of business scenarios, and based on the target configuration information set, the target operation steps for responding to the above relational data request can be determined, and then the corresponding data operation can be performed based on the above target operation steps to obtain an operation result for responding to the above relational data request.

[0070] In an optional embodiment, the data configuration information sets corresponding to the respective business scenarios may be a plurality of data configuration files pre-stored in the data processing server, wherein each configuration file may correspond to a business scenario, and the configuration files may include at least database identification information, the database identification indicating a database for storing object-relationship data corresponding to the current business scenario, and operation steps corresponding to the current business scenario;

[0071] In another optional embodiment, different data configuration files may be used to indicate different data information in different business scenarios. For example, a first data table may store database identifiers corresponding to each business scenario, and a second data table may store data operation steps corresponding to each business scenario.

[0072] Next, when the target data configuration information set corresponding to the target business scenario is determined based on the above-mentioned relational data request, the target operation steps for responding to the above-mentioned relational data request and the corresponding target database can be determined according to the above-mentioned target data configuration information set through the above-mentioned step S206, and then data operations are performed in the above-mentioned target database based on the above-mentioned target operation steps to obtain operation results.

[0073] In an optional embodiment, the operation set information included in the target data configuration information set may be a set of operation interfaces for multiple database operations to indicate multiple operation steps corresponding to a relational data request; in another optional embodiment, the multiple operation steps corresponding to a relational data request may be indicated by a data operation engine identifier. It is understood that the data operation engine may be used to perform different types of data operation tasks in response to different types of relational data requests.

[0074] It is understandable that before executing the above step S204, the above data configuration information set configured for each business scenario may be received first, including:

[0075] S1, obtaining a target configuration information set corresponding to a target business scenario;

[0076] S2, determining a first database to be allocated to the target relational data based on the database identification information carried in the target configuration information set, wherein the first database is used to persistently store the target relational data generated in the target business scenario;

[0077] S3. When the target configuration information set includes cache data information, determine a second database allocated for cache relational data, wherein the second database is used to store cache relational data within the target cycle, and the cache relational data is object relational data that is updated synchronously with the target relational data when the target relational data is updated.

[0078] It can be understood that in this embodiment, before receiving the above-mentioned relational data processing request, it is possible to first obtain the data configuration information set configured for each scenario, so as to pre-acquire the storage location, data processing method and cache data corresponding to each object relational data of each business scenario according to each data configuration information set.

[0079] It should be noted that in specific business scenarios, since the request volume of data query requests and data write requests may be quite different, for QPS query scenarios, the relevant data attribute information of the cached data corresponding to the object relationship data can be configured through the above-mentioned data configuration information set to process data query operations and data write operations separately.

[0080] The following combination Figure 4 A specific data configuration information set is described.

[0081] like Figure 4 As shown, the scene name information 402 can be configured through the user_sub field, corresponding to the scene name of the business scene; in addition, the relevant description information of the current scene can be noted through the remark field;

[0082] also, Figure 4 The application identification information 404 in the data configuration information set shown can be configured through the field app_id, and the scene identification information 406 can be configured through the field scene_id. It can be understood that by configuring the information of the above two fields, different business scenarios in different applications can be identified and uniformly allocated by the relational data service. Among them, multiple scene_id can be configured, so that multiple scenes can be saved in one data table;

[0083] It should be noted that the above-mentioned scenario identification information 406 can be specifically used to describe a business function in an application that needs to call a relationship data service. For example, in application A, it can include multiple business functions such as "fan relationship", "follow relationship", and "favorite relationship", and then corresponding scenario identification information 406 can be configured for each of the above business functions;

[0084] Furthermore, the data configuration information set may be used to indicate the data processing engine configured for the corresponding application or business scenario through processing engine information 408. The processing engine information 408 may be a specific type of the operation set information.

[0085] It should be noted that different engines represent different processing flows, such as sync (synchronous engine): all data must be written successfully before the processing result is returned; async (asynchronous engine): as long as the relational data service has successfully received the relational message, it returns success, and then asynchronously writes the data to the MySQL storage. Two different engines correspond to two different processing time efficiencies and application scenarios. Sync is suitable for scenarios where the write volume is not high but needs to be effective in real time; async is suitable for scenarios where the write volume is huge but does not require real-time effectiveness. In this embodiment, each business scenario can configure the corresponding data processing engine according to the needs of the scenario function to respond to relational data requests with different time requirements.

[0086] Furthermore, in the above-mentioned data configuration information set, different types of relationship data in the same business scenario can be configured through active relationship data information 410 and passive relationship data information 418. For example, in the "follow relationship", the first object account initiates a follow operation to the second object account, then the relationship data between the first object account and the second object account can be an active relationship data (active follow), while the relationship data between the second object account and the first object account can be a passive relationship data. That is to say, in the same business scenario (or relationship data function), based on the same object relationship, two different relationship data can be generated according to the pointing relationship of the relationship. In this embodiment, different object relationship data can be configured separately through different configuration information, so that different processing methods can be used for storage and processing during the processing process.

[0087] In addition, corresponding to the above-mentioned active relationship data information 410 and passive relationship data information 418, it can further include active relationship counting information 420 and passive relationship counting information 422, which are used to update the quantity data of the active relationship corresponding to the update of the active relationship data, and to update the quantity data of the passive relationship corresponding to the update of the passive relationship data.

[0088] For example, when the number of object accounts currently followed by the first object account is 100, and the first object account triggers a follow operation on the second object account, in addition to adding the follow relationship data of the first object account to the second object account in the data table of the active relationship data (active relationship data object), the number of followers of the first object account also needs to be updated from 100 to 101 (active relationship count information object).

[0089] It can be understood that in this embodiment, when the configuration information of the same business scenario includes the above-mentioned active relationship data information 410, passive relationship data information 418, active relationship data information 420 and passive relationship data information 422 at the same time, the configuration method of the above four types of data can be the same, that is, the relevant corresponding database information, cache data information and cache data storage information and other configuration items can be included at the same time.

[0090] Furthermore, the following describes the configuration of relationship data in detail, taking the configuration information of active relationship data information 410 as an example. The configuration information of active relationship data information 410 may further include configuration items such as database information 412, cache data information 414, and cache data storage information 416.

[0091] Among them, the database information 412 can be configured through the db field to configure the main memory of the relational data. It mainly includes the type field configuration, which is used to indicate the resource type; it should be noted that the type of the main memory can be configured according to actual business needs through the database information 412, for example, it can be configured as a Mysql type or a redis type. The specific configuration method of the above main memory is not limited in the implementation of this application; in addition, the wr_name configuration and the rd_name configuration can be used to respectively configure the write and read resource addresses of the active relational data. In this implementation, separate configuration can be used to achieve read and write separation and improve data reading and writing efficiency; further, the resource table name can be configured through the table field to determine the specific storage location (storage table) of the data in the database;

[0092] In addition, the configuration information of active relationship data can also include a max_num field, which is used to indicate the maximum number of saved object relationship data generated for a single object account. For example, it can be configured in the target APP that a single object account can only follow a maximum of 1,000 topics, so that abnormal behaviors such as "brushing traffic" of some abnormal accounts can be managed. Correspondingly, the processing strategy for exceeding the maximum number of items can be configured through the max_num_policy field. In the case that the business scenario exceeds the maximum number of items and cannot continue to write, max_num_policy can be configured with noeviction; when the business needs to retain the latest max_num items (that is, clean up the earliest generated attention data), max_num_policy can select the volatile-fi configuration item.

[0093] Furthermore, the cache data associated with the active relation data can be configured through the cache data information 414, ie, the cache field. In this embodiment, four types of cache data can be included, specifically topN, index, detail, and num.

[0094] The following combination Figure 5 The above four types of cache data are described in detail. Figure 5 As shown, due to the different high QPS queries in different scenarios, they can be summarized into four cache types: Among them, the topN type of cache data is used to cache the TopN data in the relationship list in reverse order, and is written to the cache after compression; the index type of cache data can be implemented using Redis zset, which is mainly used in scenarios with high QPS page turning and only object IDs are required; the detail type of cache data can be combined with the index cache, which is mainly used in scenarios with high QPS page turning and relationship details are required. The Num type of cache data is used to directly store numbers and is only used in action_counter and reaction_counter scenarios. It should be noted that the types of the above cache data can also be configured according to actual needs.

[0095] The correspondence between business scenarios and cache types can be as follows: Figure 5 As shown, specifically, topN, index, and detail types of cache data are applicable to action (active relationship data) and reaction (passive relationship data), that is, in the configuration information of the above two types of relationship data, corresponding topN, index, and detail types of cache data can be further configured; num type of cache data is applicable to action_counter (active relationship count data) and reaction_counter (passive relationship count data), that is, in the configuration information of action_counter (active relationship count data) and reaction_counter (passive relationship count data), cache data of num type of cache data can be added. New cache types can be added later according to actual needs.

[0096] In the cache data configuration item, such as Figure 4As shown, cache data storage information 416 may be further included to indicate the storage location and validity period of the cached data. In addition, the cache update failure processing policy can be configured through the update_failed_policy field, and the cache query failure processing policy can be configured through the query_failed_policy field. This is mainly to further control the processing policy when the cache is abnormal. For example, in scenarios that are sensitive to data consistency, update_failed_policy can be configured with the must_success policy, and scenarios that are not sensitive to data consistency can be configured with the expired or ignore policy; similarly, query_failed_policy is used to control the processing behavior when cache resources are abnormal.

[0097] like Figure 4 The configuration items of the cache data shown may also include overwrite update configuration information, which can be specifically described by the field update_type. The overwrite update configuration information describes the cache update strategy for cache data during the object-relational data writing process. The default configuration can be overwrite, that is, if the cache exists, it is updated, otherwise it is written; when the overwrite update configuration information is configured as the on_exist option, it indicates that the cache is updated only if it exists. It should be noted that in scenarios where full data refresh is often required, if a large amount of cached data (cold data) that will not be requested is input into the cache, it is easy to cause a surge in cache capacity. By configuring the overwrite update configuration information as the on_exist option, the above situation can be avoided and the cache update efficiency can be improved.

[0098] For active relationship data, three optional relationship data types are available: passive relationship data information 412 (reaction field), active relationship data information 420 (action_counter field), and passive relationship data information 422 (reaction_counter field). These data types can be configured based on actual needs. For example, in a follow scenario, if a follow list, fan list, number of followers, and score are required, then action, reaction, action_counter, and reaction_counter can all be configured. In a favorite scenario, if only a favorite list is required, then only action can be configured.

[0099] In an optional embodiment, determining the target configuration information set corresponding to the target business scenario from the multiple data configuration information sets corresponding to the multiple business scenarios includes at least one of the following:

[0100] S1, obtaining a product identifier carried in the relationship data request, and determining a target configuration information set corresponding to a target business scenario based on a matching relationship between the product identifier and the product identifier information carried in the data configuration information set, wherein the product identifier is used to provide a business product for the target business scenario;

[0101] S2, obtain the function identifier carried in the relational data request, and determine the target configuration information set corresponding to the target business scenario based on the matching relationship between the function identifier and the function identifier information carried in the data configuration information set, wherein the function identifier is used to provide the business function of the target business scenario.

[0102] It is understandable that in this embodiment, when receiving data configuration information sets configured for different business scenarios, the product identifiers (eg Figure 4 app_id in ), or a functional identifier (e.g. Figure 4 scene_id in) obtains the target configuration information set from multiple data configuration information sets, and then accurately determines the corresponding data configuration information set using at least one of the above identification information to achieve corresponding processing of different types of object relationship data in different business scenarios.

[0103] Through the above-mentioned implementation mode of the present application, relational data requests sent from different business scenarios can be received through the above-mentioned data processing server, that is, data processing requests related to object relational data can be connected to a unified relational data service, avoiding the separate implementation of a set of similar logic for each scenario, improving overall maintainability, and at the same time meeting the differentiated processing requirements of each scenario through configuration.

[0104] In an optional embodiment, the above-mentioned returning the execution result of at least one target operation step performed on the target relational data in the target database includes:

[0105] S1: When the relational data request is a data write request, determine the data synchronization type corresponding to the operation set information based on the target configuration information set, where the data synchronization type includes synchronous write type and asynchronous write type; at the response time node that matches the data synchronization type, return the data write result of writing the target relational data in the target database;

[0106] S2: When the relational data request is a data read request, target relational data is read from the target database. When the target relational data is read successfully, a data read result is returned.

[0107] It is understandable that in this embodiment, different operation steps can be triggered for different request types. For example, in the case where the relational data request is a write request, the following steps can be used first: Figure 4 The processing engine information 408 in the configuration information shown determines the corresponding data synchronization type and returns the data writing result according to the response node matching the data synchronization type.

[0108] In the case where the relational data request is a data read request, the requested data can be read through the database identifier indicated in the target configuration information set. Figure 4 The configuration information corresponding to the rd_name field in the database information 412 shown is used to read data.

[0109] In an optional embodiment, returning the data writing result of writing the target relation data into the target database at the response time node matching the data synchronization type includes:

[0110] S1, when the operation set information corresponds to a synchronous write type, write target relational data matching the relational data request into a first database, and return an execution result if the target relational data is written successfully, wherein the target database includes the first database, and the first database is used to persistently store the target relational data generated in the target business scenario;

[0111] S2. When the operation set information corresponds to an asynchronous write type, the target write task corresponding to the target relational data is added to the asynchronous task queue, and the execution result is returned, wherein the asynchronous task queue is used to store multiple data write tasks; when the target write task is taken out from the asynchronous task queue, the target relational data that matches the relational data request is written to the first database.

[0112] Specifically, different engines represent different processing flows, such as sync (synchronous engine): all data must be written successfully before the processing result is returned; async (asynchronous engine): as long as the relational data service has successfully received the relational message, it returns success, and then asynchronously writes the data to the MySQL storage. Two different engines correspond to two different processing time efficiencies and application scenarios. Sync is suitable for scenarios where the write volume is not high but real-time effectiveness is required; async is suitable for scenarios where the write volume is huge but real-time effectiveness is not required. In this embodiment, each business scenario can configure the corresponding data processing engine according to the needs of the scenario function to respond to relational data requests with different time requirements.

[0113] For example, when a first object account triggers a follow operation on a second object account, the corresponding configuration information set can be obtained through the business scenario corresponding to the first object account. Figure 4 As shown, it can be based on Figure 4 The synchronization type indicated by the processing engine information 408 shown in the figure determines the corresponding processing engine, that is, creates a data writing task based on the specific synchronization type. In addition, based on the configuration information indicated by the active relationship data 410, the following data table corresponding to the first object account (corresponding to the action type relationship data) is determined, and the account identifier of the second object account is added to the following data table to determine the establishment of a following relationship between the first object account and the second object account;

[0114] In addition, you can also Figure 4 The configuration information included in the passive relationship data information 418 is used to determine the concerned data table corresponding to the second object account (corresponding to the reaction type relationship data), and the account identifier of the above-mentioned first object account is added to the above-mentioned concerned data table to determine the establishment of a follow-up relationship between the first object account and the second object account.

[0115] In an optional embodiment, after the target configuration information set determines at least one target operation step that matches the request type of the relational data request and the target database for storing the target relational data, it further includes:

[0116] S1, when the target configuration information set includes cache data information indicating cache relation data, determining a second database for storing the cache relation data, wherein the cache relation data is object relation data that is updated synchronously with the target relation data when the target relation data is updated;

[0117] S2. When the target relational data matching the relational data request is successfully written into the first database, the cached relational data is updated in the second database, wherein the target database includes a first database and a second database, the first database is used to persistently store the target relational data generated in the target business scenario, and the second database is used to store the cached relational data within the target period.

[0118] The following combination Figure 4 The first database and the second database are described. Figure 4The configuration information shown may include active relationship data information 410, wherein database information 412 indicates a first database for storing target relationship data. Furthermore, cache data storage information 416 included in cache data information 414 indicates a second database for caching relationship data. Furthermore, if the target configuration information set is found, the configuration information included therein may be used to further determine the first and second databases.

[0119] It should be noted that the specific types of the first database and the second database can be Figure 4 For example, the first database and the second database can be configured as Mysql type or redis type as needed. In this embodiment, the specific configuration type of the above databases is not limited.

[0120] The following combination Figure 6 The data writing process is described below. The data writing process can mainly solve the problems of data writing efficiency and data consistency. Figure 6 The figure shows an optional data writing and updating process corresponding to the synchronization engine.

[0121] S602, start;

[0122] S604, checking whether an update is required;

[0123] That is, detecting whether a data write request is received, and if a data write request is received, determining that data update is required, executing step S606, otherwise executing step S618;

[0124] S606, updating relationship data;

[0125] S608, updating relationship count data;

[0126] The above steps S606 and S608 represent the processing flow of writing data to storage. In this embodiment, the above first database can be a MySQL type database. Specifically, a distributed transaction can be used to ensure that multiple copies of data are either all successful or all failed. The above relationship count data can be as follows: Figure 6 The active relationship count data or the passive relationship count data indicated in the active relationship count information 420 or the passive relationship count information 422 field shown in FIG.

[0127] After writing the relational data, the cache data can be written synchronously through steps S610 to S616, and the asynchronous cache processing flow can be used. In order to improve the writing efficiency as much as possible, the cache update is set to asynchronous update mode by default. The latest data needs to be obtained from the master node of MySQL and flushed into the cache. In this embodiment, the cached relational data may include the following: Figure 5 One or more of the cache data types shown, such as topN, index, detail, and num.

[0128] S610, gets the latest data from MySQL master;

[0129] S612: Whether to overwrite and update;

[0130] If an overwrite update is required, execute S614-1 to overwrite and update, and set the ttl (data validity period);

[0131] If no overwriting update is required, execute S614-2, update the cache only if it exists, and do not update the TTL (data validity period);

[0132] It should be noted that the above step S612 can be performed after obtaining the following information: Figure 4 In the case of the target configuration information set shown, the update_type option included in the cache data information 416 is queried to determine whether the current cached relation data needs to be overwritten and updated. If the configuration is overwrite, S614-1 is executed; if the configuration is on_exist, S614-2 is executed.

[0133] S616, cache update failure processing;

[0134] S618, end.

[0135] It should be noted that when the data writing engine indicated in the data configuration information set is the asynchronous engine async, the above steps S606 and S608 can be implemented through asynchronous tasks; correspondingly, in the case of asynchronous updates to object relationship data, the cached data can be written or updated using synchronous updates.

[0136] In an optional embodiment, when the target configuration information set includes cache data information, determining the second database for storing cache relationship data indicated by the cache data information includes at least one of the following:

[0137] Case 1: When the cache data information includes sorted cache information, determining a second database for storing the sorted cache data, wherein the sorted cache data is used to indicate a second object list associated with the first object, the second object list includes at least one second object sorted according to the target order, and the second object has an association relationship with the first object;

[0138] Case 2: When the cache data information includes identification cache information, determining a second database for storing the identification cache data, wherein the identification cache data is used to indicate a set of second object identifiers associated with the first object, and the second object identifier set includes object identifiers of a plurality of second objects having an association relationship with the first object;

[0139] Case 3: When the cache data information includes description cache information, determining a second database for storing the description cache data, wherein the description cache data is used to indicate a second object information set associated with the first object, and object description information of a plurality of second objects in the second object information set that have an association relationship with the first object;

[0140] Case 4: When the cache data information includes counting cache information, a second database for storing the counting cache data is determined, wherein the counting cache data is used to count the number of second objects associated with the first object.

[0141] In this embodiment, at least one of four types of cache data can be obtained according to the configuration information in the target configuration information set, specifically including sorting cache information topN, identification cache information index, description cache information detail, and counting cache information num.

[0142] The following combination Figure 5 The above four types of cache data are described in detail. Figure 5 As shown in the figure, due to the different high-QPS queries in different scenarios, four cache types can be specifically summarized: topN cache data is used to cache the topN data in the relationship list in reverse order, compressed and written to the cache; index cache data can be implemented using Redis zsets and is mainly used in scenarios with high QPS page turning and only object IDs are required; detail cache data can be combined with index cache and is mainly used in scenarios with high QPS page turning and relationship details are required. Num cache data is used to directly store numbers and is only used in action_counter and reaction_counter scenarios.

[0143] In an optional embodiment, when the target relational data matching the relational data request is successfully written into the first database, after the cached relational data is updated in the second database, the method further includes:

[0144] S1, when receiving a read request for cached relation data, searching for cached relation data from a second database;

[0145] S2-1, if the cached relation data is successfully found, the cached relation data is returned;

[0146] S2-2: When the cache relationship data search fails, at least one reference operation step is determined according to the target configuration information set, and an execution result of the at least one reference operation step is returned.

[0147] It is understood that in this embodiment, when a read request for cached relation data is received, the following Figure 4 The configuration information in the configuration information set shown determines the corresponding second database for the configuration information that matches the cache relationship data, and performs a query in the corresponding second database.

[0148] In addition, whether to execute the subsequent reference operation steps can be determined based on the query results. It can be understood that the above reference operation steps can be used to ensure the stability of data query.

[0149] In an optional embodiment, Figure 4 The configuration file shown may include cache query strategies corresponding to specific business scenarios (i.e., the above-mentioned reference operation steps). In another optional implementation, a cache configuration file may be pre-stored to indicate cache query strategies corresponding to various business scenarios.

[0150] The following combination Figure 7 The configuration method of the above cache query strategy is described. In this embodiment, a global cache query strategy and query strategies corresponding to each business scenario can be saved in a separate configuration file. In this embodiment, the data configuration information included in the above target configuration information set may include: Figure 4 The configuration information in the configuration file shown, and Figure 7 The scene configuration information 704 corresponding to the specific scene is shown.

[0151] In the scene configuration information 704, the field used to indicate a specific scene can be described by concatenating app_id and scene_id. Specifically, the field "20008_104" in the scene configuration information 704 is used to indicate the scene function indicated by identifier 104 in the application indicated by identifier 20008.

[0152] It's understandable that the control switch configuration for a single data scenario takes precedence over the global configuration. The flow_to_db_per field is used to configure the ratio of requests that fail to penetrate MySQL (the primary database) after the query cache fails. The compensation_miss field is used to configure whether to asynchronously flush data to the cache (the secondary database) for requests that fail to penetrate MySQL or request that timeout the query. It's understandable that this configuration is typically only enabled when MySQL is abnormal. By adding asynchronous flushing to the cache, requests no longer penetrate MySQL, allowing MySQL to recover more time and ensuring the stability of data queries.

[0153] The priority of global configuration information 702 is lower than that of scene configuration information 704. For data scenes not configured in scene configuration information 704, the cache strategy will be configured according to the information of global configuration information 702. The specific configuration items are the same as those of scene configuration information 704, including the fields flow_to_db_per and compensation_miss.

[0154] In an optional embodiment, before returning the execution result of at least one reference operation step, the method further includes:

[0155] S1, obtaining a target search parameter from a target configuration information set, wherein the target search parameter is used to indicate a ratio between a first frequency of determining cache relationship data according to a first database and a second frequency of failing to search for cache relationship data;

[0156] S2, when the relationship between the target search parameter and the historical failure frequency satisfies the search condition, determining the cache relationship data according to the target relationship data stored in the first database;

[0157] S3. When the relationship between the target search parameter and the historical failure frequency does not meet the search condition, a target update task is added to the asynchronous update queue, wherein the target update task is used to update the cache relationship data in the second database according to the target relationship data stored in the first database; when the target update task is obtained from the asynchronous update queue, the update result of the cache relationship data is obtained.

[0158] It is understandable that the above target query parameters can be specifically Figure 7 The flow_to_db_per field in the query is used to indicate the ratio of queries to the MySQL database (first database) when a query fails.

[0159] The following combination Figure 8 The above cache query process is described in detail.

[0160] S802, start;

[0161] When a read request for cached relation data is received, S804 is executed to read data from the cache; when the cached relation data requested by the read request is hit, S812 is directly executed to end and return the cached read result.

[0162] In the case where the cached relation data requested by the read request is not hit, S806 is executed to check whether it is necessary to trace back to the DB (first database MySQL);

[0163] Specifically, according to Figure 7 The configuration file and the historical read failure frequency data shown are used to determine whether the current request needs to be traced back to the first database. If it is determined that the request needs to be traced back to the DB, S808 is executed to read data from MySQL. If the data reading from MySQL times out, S806-2 to S806-8 are executed. This is generally due to a temporary DB exception, which will also enter the asynchronous cache loading process. Then, S810 is executed to asynchronously write to the cache (setnx) and set the TTL (cache validity period).

[0164] If tracing back to the database is determined unnecessary, steps S806-2 through S806-8 check whether asynchronous cache flushing is required; obtain a distributed lock; read data from MySQL; asynchronously write to the cache (setnx) and set a time-to-live (TTL). In the above implementation, adding a distributed lock avoids doubling traffic. This addition gradually reduces pressure on the database if a brief DB failure occurs, giving it time to recover. This also sacrifices some requests to ensure the majority remain operational. Finally, step S812 concludes, returning the read result.

[0165] It is understandable that Figure 8 Steps S806 and S806-2 to S806-8 in the process are to coordinate with the global control switch (ie Figure 7 The new process of adding the configuration information shown in the figure).

[0166] In an optional embodiment, the present application further provides a relational data operating system for implementing the above-mentioned relational data operating method, including:

[0167] A request receiving layer, configured to provide a relational operation interface to multiple business systems, receive relational data requests sent by each of the multiple business systems based on the relational operation interface, and return the results of data operations performed on object relational data, wherein the object relational data is used to indicate an association relationship between at least two objects in a business scenario corresponding to the business system;

[0168] a request processing layer, configured to determine, from a plurality of data configuration information sets corresponding to a plurality of business scenarios, a current configuration information set corresponding to a current business scenario, wherein the plurality of data configuration information sets respectively include database identification information and operation set information pre-configured for the plurality of business scenarios, the database identification information indicating a database for storing object-relational data associated with the business scenario, and the operation set information indicating at least one operation step for performing a data operation on the object-relational data; and determining, based on the current configuration information set, at least one operation step matching a request type of a relational data request, and a target database for storing the relational data;

[0169] The data operation layer is used to perform at least one operation step on the relational data in the target database.

[0170] The following combination Figure 9 Describe a specific relational data operating system. Figure 9 As shown, the relational data operating system 904 in this embodiment can be a layered architecture. From top to bottom:

[0171] Service capability layer 906: used to shield the differences between different engine implementations and provide a unified interface for the business system 902 to call. It is understandable that the service capability layer 906 can be a specific request receiving layer;

[0172] Engine capability layer 908: used to define data processing processes to meet different processing timelines and different data formats;

[0173] Data logic layer 910: Encapsulates the underlying data atomic capabilities and provides the engine layer with data logic dimension implementation to shield differences between different storage types.

[0174] It is understandable that the request processing layer can be specifically implemented through the service capability layer 906 and the engine capability layer 908 .

[0175] (Data) Atomic Capability Layer 910: Provides the most basic data addition, deletion, modification, and query capabilities;

[0176] Storage layer 912: actual storage, such as MySQL, Redis, etc.

[0177] The dotted line in the diagram represents a larger logical entity. From the perspective of the business system, the data operating system provided in this embodiment is a holistic whole. Without having to understand the specific implementation details, upon first access, simply specify the corresponding data engine, storage type, and other processing parameters to complete relational data read and write operations just like calling local methods. This improves development efficiency for a variety of different business types and the efficiency of method calls during data operations.

[0178] It is understandable that based on Figure 9 The relational data operating system shown can abstract relational data in various scenarios in the business system 902, such as the follow scenario (one account follows multiple accounts), the collection scenario (one account collects multiple media resource files), the question and answer scenario (one account answers different questions on the platform), and the content microservice scenario (pushing different media resource content to accounts that follow different topics).

[0179] The abstraction method of the object relationship data in the above multiple scenarios can be as follows: Figure 10 As shown in the figure, the abstracted relational data includes the following categories:

[0180] Action type relationship data: active relationships, such as follow, favorite, like, etc.

[0181] Reaction type relationship data: passive relationships, such as fans, favorites, likes, etc.

[0182] ActionCounter type relationship data: counts of active relationships, such as the number of followers and likes;

[0183] ReactionCounter type relationship data: counts of passive relationships, such as the number of followers, number of likes, etc.

[0184] Based on the above abstract relational model, business requirements, and scalability considerations, the data model can be further refined and enriched as follows Figure 11 The data model is shown.

[0185] Specifically, when modeling relational data in a new business scenario, you can include two fields: app_id and scene_id. These two fields are used to distinguish different business scenarios. This can be achieved by sharding databases and tables.

[0186] In addition, a score field can be included to indicate the sorting weight field. The business side needs to write the normalized value to the score, and the relational data engine will sort based on the score value to meet the needs of a single sorting scenario.

[0187] It can also further include a ctx field, which is a JSON type field that mainly describes the relationship metadata and records sparse features. Field verification is usually required.

[0188] In addition, information such as a creation time field and an update time field may be further recorded in the above object-relational data model to implement data updating and caching.

[0189] It should be noted that Figure 11 The data model shown is only an example. The object-relational data can be stored in the database in the following ways: Figure 11 The style shown can also be used to record relevant information in the form of a data table or a sub-table.

[0190] Through the above-mentioned embodiments of the present application, Figure 9 The relational data storage and management system shown can integrate relational data from different scenarios into one service, meeting the differentiated requirements of various business scenarios. This avoids the problem of relational data being scattered across various services in existing solutions, resulting in code duplication, low maintainability, and an inability to understand the overall picture of relational data from a holistic perspective.

[0191] In addition, if Figure 9 The relational data operating system shown in the figure uses a hierarchical architectural organization method, which is no longer a traditional chimney-style architecture, thereby avoiding the duplication of basic capabilities. At the same time, the continuous polishing and upgrading of basic services can automatically feed back to upper-level business services.

[0192] In addition, this application also provides a solution for configuring access relationship data, which can be achieved through Figure 4 The configuration file shown above abstracts data types, cache types, maximum number of data entries, and failure handling policies into configurations, significantly reducing both the cost of integrating new services and the user experience. Businesses only need to focus on using the new services, improving new service development efficiency.

[0193] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the present invention is not limited by the order of the actions described, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0194] According to another aspect of the embodiment of the present invention, a device for operating relational data for implementing the above-mentioned method for operating relational data is also provided. Figure 12 As shown, the device includes:

[0195] The receiving unit 1202 is configured to receive a relationship data request, wherein the relationship data request is used to obtain an operation result of performing a data operation on target relationship data, and the target relationship data is used to indicate an association relationship between at least two objects in a target business scenario;

[0196] A first determining unit 1204 is configured to determine a target configuration information set corresponding to the target business scenario from a plurality of data configuration information sets corresponding to a plurality of business scenarios, wherein the plurality of data configuration information sets respectively include database identification information and operation set information pre-configured for the plurality of business scenarios, the database identification information indicating a database for storing object-relationship data associated with the business scenario, and the operation set information indicating at least one operation step for performing the data operation on the object-relationship data;

[0197] A second determining unit 1206 is configured to determine, based on the target configuration information set, at least one target operation step that matches the request type of the relationship data request, and a target database for storing the target relationship data;

[0198] The returning unit 1208 is configured to return an operation result of at least one of the target operation steps performed on the target relational data in the target database.

[0199] Optionally, the above-mentioned return unit 1208 includes: a first operation module, which is used to determine the data synchronization type corresponding to the above-mentioned operation set information according to the above-mentioned target configuration information set when the above-mentioned relational data request is a data write request, wherein the above-mentioned data synchronization type includes a synchronous write type and an asynchronous write type; at a response time node matching the above-mentioned data synchronization type, return the data write result of writing the above-mentioned target relational data in the above-mentioned target database; a second operation module, which is used to read the above-mentioned target relational data from the above-mentioned target database when the above-mentioned relational data request is a data read request, and return the data reading result when the reading of the above-mentioned target relational data is successful.

[0200] Optionally, the above-mentioned first operation module is used to: when the above-mentioned operation set information corresponds to the above-mentioned synchronous write type, write the above-mentioned target relational data matching the above-mentioned relational data request into the first database, and when the above-mentioned target relational data is written successfully, return the above-mentioned execution result, wherein the above-mentioned target database includes a first database, and the above-mentioned first database is used to persistently store the above-mentioned target relational data generated in the above-mentioned target business scenario; when the above-mentioned operation set information corresponds to the above-mentioned asynchronous write type, add the target write task corresponding to the above-mentioned target relational data to the asynchronous task queue, and return the above-mentioned execution result, wherein the above-mentioned asynchronous task queue is used to store multiple data writing tasks; when the above-mentioned target write task is taken out from the above-mentioned asynchronous task queue, write the above-mentioned target relational data matching the above-mentioned relational data request into the above-mentioned first database.

[0201] Optionally, the above-mentioned first operation module is also used to: when the above-mentioned target configuration information set includes cache data information for indicating cache relationship data, determine a second database for storing the above-mentioned cache relationship data, wherein the above-mentioned cache relationship data is the above-mentioned object relationship data that is synchronously updated with the above-mentioned target relationship data when the above-mentioned target relationship data is updated; when the above-mentioned target relationship data matching the above-mentioned relationship data request is successfully written into the first database, update the above-mentioned cache relationship data in the above-mentioned second database, wherein the above-mentioned target database includes the above-mentioned first database and the above-mentioned second database, the above-mentioned first database is used to persistently store the above-mentioned target relationship data generated in the above-mentioned target business scenario, and the above-mentioned second database is used to store the above-mentioned cache relationship data within the target cycle.

[0202] Optionally, the first operation module is used for at least one of the following: when the cache data information includes sorting cache information, determining a second database for storing sorting cache data, wherein the sorting cache data is used to indicate a second object list associated with the first object, the second object list includes at least one second object sorted in a target order, and the second object has an association relationship with the first object; when the cache data information includes identification cache information, determining a second database for storing identification cache data, wherein the identification cache data is used to indicate a second object identifier set associated with the first object, and the second object identifier set includes object identifiers of multiple second objects that have an association relationship with the first object; when the cache data information includes description cache information, determining a second database for storing description cache data, wherein the description cache data is used to indicate a second object information set associated with the first object, and the object description information of multiple second objects that have an association relationship with the first object in the second object information set; when the cache data information includes counting cache information, determining a second database for storing counting cache data, wherein the counting cache data is used to indicate the object number of second objects that have an association relationship with the first object.

[0203] Optionally, the above-mentioned first operation module is also used to: when a read request for the above-mentioned cache relationship data is received, search the above-mentioned cache relationship data from the above-mentioned second database; when the search for the above-mentioned cache relationship data is successful, return the above-mentioned cache relationship data; when the search for the above-mentioned cache relationship data fails, determine at least one reference operation step according to the above-mentioned target configuration information set, and return the above-mentioned execution result of at least one of the above-mentioned reference operation steps.

[0204] Optionally, the above-mentioned first operation module is also used to: obtain target search parameters from the above-mentioned target configuration information set, wherein the above-mentioned target search parameters are used to indicate the ratio between the first frequency of determining the above-mentioned cache relationship data according to the above-mentioned first database and the second frequency of failing to find the above-mentioned cache relationship data; when the relationship between the above-mentioned target search parameters and the historical failure frequency meets the search conditions, determine the above-mentioned cache relationship data according to the above-mentioned target relationship data stored in the above-mentioned first database; when the relationship between the above-mentioned target search parameters and the historical failure frequency does not meet the search conditions, add a target update task to the asynchronous update queue, wherein the above-mentioned target update task is used to update the above-mentioned cache relationship data in the above-mentioned second database according to the above-mentioned target relationship data stored in the above-mentioned first database; when the above-mentioned target update task is obtained from the above-mentioned asynchronous update queue, obtain the update result of the above-mentioned cache relationship data.

[0205] Optionally, the first determination unit 1204 is used for at least one of the following: obtaining the product identification carried in the relationship data request, and determining the target configuration information set corresponding to the target business scenario based on the matching relationship between the product identification and the product identification information carried in the data configuration information set, wherein the product identification is used to provide the business products of the target business scenario; obtaining the function identification carried in the relationship data request, and determining the target configuration information set corresponding to the target business scenario based on the matching relationship between the function identification and the function identification information carried in the data configuration information set, wherein the function identification is used to provide the business functions of the target business scenario.

[0206] Optionally, the operating device for the above-mentioned relational data also includes: a configuration unit, used to obtain a target configuration information set corresponding to the above-mentioned target business scenario; based on the database identification information carried in the above-mentioned target configuration information set, determining the first database assigned to the above-mentioned target relational data, wherein the above-mentioned first database is used to persistently store the above-mentioned target relational data generated in the above-mentioned target business scenario; in the case that the above-mentioned target configuration information set includes cache data information, determining the second database assigned to the cache relational data, wherein the above-mentioned second database is used to store the above-mentioned cache relational data within the target period, and the above-mentioned cache relational data is the above-mentioned object relational data that is updated synchronously with the above-mentioned target relational data when the above-mentioned target relational data is updated.

[0207] Optionally, in this embodiment, the embodiments to be implemented by the above-mentioned various unit modules can refer to the above-mentioned various method embodiments, which will not be repeated here.

[0208] According to another aspect of the embodiment of the present invention, an electronic device for implementing the above-mentioned method for operating relationship data is provided. The electronic device may be Figure 13 The terminal device or server shown in FIG. This embodiment is described by taking the electronic device as a terminal device as an example. Figure 13 As shown, the electronic device includes a memory 1302 and a processor 1304. The memory 1302 stores a computer program, and the processor 1304 is configured to execute the steps in any of the above method embodiments through the computer program.

[0209] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.

[0210] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0211] S1, receiving a relationship data request, wherein the relationship data request is used to obtain an operation result of performing a data operation on target relationship data, and the target relationship data is used to indicate an association relationship between at least two objects in a target business scenario;

[0212] S2. Determining a target configuration information set corresponding to the target business scenario from a plurality of data configuration information sets corresponding to the plurality of business scenarios, wherein the plurality of data configuration information sets respectively include database identification information and operation set information pre-configured for the plurality of business scenarios, the database identification information indicating a database for storing object-relationship data associated with the business scenario, and the operation set information indicating at least one operation step for performing the data operation on the object-relationship data;

[0213] S3, determining, based on the target configuration information set, at least one target operation step that matches the request type of the relationship data request, and a target database for storing the target relationship data;

[0214] S4, returning the operation result of at least one of the target operation steps executed on the target relational data in the target database and receiving the object operation request sent by the target client.

[0215] Alternatively, those skilled in the art will appreciate that Figure 13 The structure shown is for illustration only, and the electronic device may also be a vehicle-mounted terminal, a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, or other terminal devices. Figure 13It does not limit the structure of the above electronic device. For example, the electronic device may also include Figure 13 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 13 Different configurations shown.

[0216] Among them, the memory 1302 can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for operating relational data in the embodiment of the present invention. The processor 1304 executes various functional applications and data processing by running the software programs and modules stored in the memory 1302, that is, realizes the above-mentioned method for operating relational data. The memory 1302 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1302 may further include a memory remotely located relative to the processor 1304, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include but are not limited to the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1302 can be used specifically, but not limited to, to store file information such as target logical files. As an example, Figure 13 As shown, the memory 1302 may include, but is not limited to, the receiving unit 1202, the first determining unit 1204, the second determining unit 1206, and the returning unit 1208 in the operating device for the relationship data. Furthermore, the memory 1302 may also include, but is not limited to, other module units in the operating device for the relationship data, which will not be described in detail in this example.

[0217] Optionally, the transmission device 1306 is configured to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one embodiment, the transmission device 1306 includes a network interface controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In one embodiment, the transmission device 1306 is a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly.

[0218] In addition, the electronic device further includes: a display 1308 and a connection bus 1310 for connecting various module components in the electronic device.

[0219] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting multiple nodes through network communication. The nodes may form a peer-to-peer network, and any computing device, such as a server, terminal, or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.

[0220] According to one aspect of the present application, a computer program product is provided, comprising a computer program / instructions containing program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication component and / or installed from a removable medium. When the computer program is executed by a central processing unit, the various functions provided in the embodiments of the present application are performed.

[0221] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0222] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned method for operating relational data.

[0223] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0224] S1, receiving a relationship data request, wherein the relationship data request is used to obtain an operation result of performing a data operation on target relationship data, and the target relationship data is used to indicate an association relationship between at least two objects in a target business scenario;

[0225] S2. Determining a target configuration information set corresponding to the target business scenario from a plurality of data configuration information sets corresponding to the plurality of business scenarios, wherein the plurality of data configuration information sets respectively include database identification information and operation set information pre-configured for the plurality of business scenarios, the database identification information indicating a database for storing object-relationship data associated with the business scenario, and the operation set information indicating at least one operation step for performing the data operation on the object-relationship data;

[0226] S3, determining, based on the target configuration information set, at least one target operation step that matches the request type of the relationship data request, and a target database for storing the target relationship data;

[0227] S4, returning the operation result of at least one of the target operation steps executed on the target relational data in the target database and receiving the object operation request sent by the target client.

[0228] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing the hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0229] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above-mentioned computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes a number of instructions for causing one or more computer devices (such as personal computers, servers, or network devices) to execute all or part of the steps of the above-mentioned methods in various embodiments of the present invention.

[0230] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0231] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0232] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0233] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0234] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A method for operating relational data, characterized in that: include: Receiving a relationship data request, wherein the relationship data request is used to obtain an operation result of performing a data operation on target relationship data, wherein the target relationship data is used to indicate an association relationship between at least two objects in a target business scenario; Determining a target configuration information set corresponding to the target business scenario from a plurality of data configuration information sets corresponding to a plurality of business scenarios, wherein the plurality of data configuration information sets respectively include database identification information and operation set information pre-configured for the plurality of business scenarios, the database identification information indicating a database for storing object-relationship data associated with the business scenario, and the operation set information indicating at least one operation step for performing the data operation on the object-relationship data; determining, according to the target configuration information set, at least one target operation step that matches the request type of the relationship data request, and a target database for storing the target relationship data; An operation result of at least one target operation step performed on the target relational data in the target database is returned.

2. The method according to claim 1, characterized in that The returning the execution result of at least one target operation step performed on the target relational data in the target database includes: In a case where the relational data request is a data write request, determining a data synchronization type corresponding to the operation set information according to the target configuration information set, wherein the data synchronization type includes a synchronous write type and an asynchronous write type; and returning a data write result of writing the target relational data into the target database at a response time node matching the data synchronization type. In the case that the relational data request is a data read request, the target relational data is read from the target database, and in the case that the target relational data is read successfully, a data read result is returned.

3. The method according to claim 2, characterized in that The returning, at a response time node matching the data synchronization type, a data writing result of writing the target relational data into the target database, includes: When the operation set information corresponds to the synchronous write type, writing the target relational data matching the relational data request into the first database, and returning the execution result when the target relational data is written successfully, wherein the target database includes the first database, and the first database is used to persistently store the target relational data generated in the target business scenario; When the operation set information corresponds to the asynchronous write type, the target write task corresponding to the target relational data is added to the asynchronous task queue, and the execution result is returned, wherein the asynchronous task queue is used to store multiple data write tasks; when the target write task is taken out from the asynchronous task queue, the target relational data matching the relational data request is written to the first database.

4. The method according to claim 2, characterized in that After determining at least one target operation step matching the request type of the relationship data request according to the target configuration information set, and a target database for storing the target relationship data, the method further includes: In a case where the target configuration information set includes cache data information for indicating cache relation data, determining a second database for storing the cache relation data, wherein the cache relation data is the object relation data that is updated synchronously with the target relation data when the target relation data is updated; When the target relational data matching the relational data request is successfully written into the first database, the cached relational data is updated in the second database, wherein the target database includes the first database and the second database, the first database is used to persistently store the target relational data generated in the target business scenario, and the second database is used to store the cached relational data within a target period.

5. The method according to claim 4, characterized in that When the target configuration information set includes cache data information, determining a second database for storing cache relationship data indicated by the cache data information includes at least one of the following: In a case where the cache data information includes sorted cache information, determining a second database for storing sorted cache data, wherein the sorted cache data is used to indicate a second object list associated with the first object, the second object list including at least one second object sorted according to a target order, and the second object has an association relationship with the first object; In a case where the cache data information includes identification cache information, determining a second database for storing identification cache data, wherein the identification cache data is used to indicate a second object identifier set associated with the first object, and the second object identifier set includes object identifiers of a plurality of second objects having an association relationship with the first object; In a case where the cache data information includes description cache information, determining a second database for storing the description cache data, wherein the description cache data is used to indicate a second object information set associated with the first object, and object description information of a plurality of second objects in the second object information set that have an association relationship with the first object; In a case where the cache data information includes count cache information, a second database for storing count cache data is determined, wherein the count cache data is used for the number of second objects associated with the first object.

6. The method according to claim 4, characterized in that In the case where the target relational data matching the relational data request is successfully written into the first database, after updating the cached relational data in the second database, the method further includes: In case of receiving a read request for the cache relation data, searching the cache relation data from the second database; If the cached relation data is successfully found, the cached relation data is returned; In the case that searching for the cache relationship data fails, at least one reference operation step is determined according to the target configuration information set, and the execution result of the at least one reference operation step is returned.

7. The method according to claim 6, characterized in that Before returning the execution result of at least one of the reference operation steps, the method further includes: Acquire a target search parameter from the target configuration information set, wherein the target search parameter is used to indicate a ratio between a first frequency of determining the cache relationship data according to the first database and a second frequency of failing to search for the cache relationship data; In a case where the relationship between the target search parameter and the historical failure frequency satisfies a search condition, determining the cache relationship data according to the target relationship data stored in the first database; When the relationship between the target search parameter and the historical failure frequency does not meet the search conditions, a target update task is added to the asynchronous update queue, wherein the target update task is used to update the cache relationship data in the second database according to the target relationship data stored in the first database; when the target update task is obtained from the asynchronous update queue, the update result of the cache relationship data is obtained.

8. The method according to claim 1, characterized in that The determining of the target configuration information set corresponding to the target business scenario from the plurality of data configuration information sets corresponding to the plurality of business scenarios includes at least one of the following: Obtaining a product identifier carried in the relationship data request, and determining a target configuration information set corresponding to the target business scenario based on a matching relationship between the product identifier and product identification information carried in the data configuration information set, wherein the product identifier is used to provide a business product for the target business scenario; Obtain the function identifier carried in the relationship data request, and determine the target configuration information set corresponding to the target business scenario based on the matching relationship between the function identifier and the function identifier information carried in the data configuration information set, wherein the function identifier is used to provide the business function of the target business scenario.

9. The method according to claim 1, characterized in that Before receiving the relationship data request, the method further includes: Obtaining a target configuration information set corresponding to the target business scenario; Determining, based on the database identification information carried in the target configuration information set, a first database allocated to the target relational data, wherein the first database is used to persistently store the target relational data generated in the target business scenario; When the target configuration information set includes cache data information, a second database allocated for cache relational data is determined, wherein the second database is used to store the cache relational data within a target cycle, and the cache relational data is the object relational data that is updated synchronously with the target relational data when the target relational data is updated.

10. An operating system for relational data, characterized in that: include: a request receiving layer, configured to provide a relational operation interface to multiple business systems, receive relational data requests sent by each of the business systems based on the relational operation interface, and return operation results of performing data operations on object relational data, wherein the object relational data is used to indicate an association relationship between at least two objects in a business scenario corresponding to the business system; a request processing layer, configured to determine, from a plurality of data configuration information sets corresponding to a plurality of business scenarios, a current configuration information set corresponding to a current business scenario, wherein the plurality of data configuration information sets respectively include database identification information and operation set information pre-configured for the plurality of business scenarios, the database identification information indicating a database for storing object-relationship data associated with the business scenario, and the operation set information indicating at least one operation step for performing the data operation on the object-relationship data; and determining, based on the current configuration information set, at least one operation step matching a request type of the relational data request, and a target database for storing the relational data; A data operation layer is used to perform at least one operation step on the relational data in the target database.

11. A device for operating relational data, characterized in that: include: a receiving unit, configured to receive a relationship data request, wherein the relationship data request is used to obtain an operation result of performing a data operation on target relationship data, wherein the target relationship data is used to indicate an association relationship between at least two objects in a target business scenario; a first determining unit, configured to determine a target configuration information set corresponding to the target business scenario from a plurality of data configuration information sets corresponding to a plurality of business scenarios, wherein the plurality of data configuration information sets respectively include database identification information and operation set information pre-configured for the plurality of business scenarios, the database identification information indicating a database for storing object-relationship data associated with the business scenario, and the operation set information indicating at least one operation step for performing the data operation on the object-relationship data; a second determining unit, configured to determine, according to the target configuration information set, at least one target operation step matching the request type of the relationship data request, and a target database for storing the target relationship data; The returning unit is configured to return an operation result of at least one target operation step performed on the target relational data in the target database.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the method according to any one of claims 1 to 9 is executed when the program is executed.

13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

14. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 9 through the computer program.