Relationship updating method, relationship query method, device, equipment and medium
By updating the association relationship in the data management system, the objects and attributes of the target matching association relationship are replaced and updated with the association relationship to be added, forming a single-layer relationship, solving the problem of low efficiency of multi-layer relationship query and achieving the effect of fast query of indirect relationship.
Patent Information
- Application Number
- CN202510819815.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-06-19
AI Technical Summary
In the prior art, multi-layer relationship query efficiency is low and requires recursive query layer by layer, resulting in low query efficiency.
By obtaining the association relationship to be added, determining the target matching association relationship with the same object, and using the object in the association relationship to be added to replace and update the relationship attributes, a new association relationship of a single layer relationship is formed and stored to reflect the indirect relationship.
It improves the efficiency of data query and allows users to quickly query the indirect relationship of the target object directly through a single-layer relationship, avoiding recursive query layer by layer and improving the query speed.
Smart Images

Figure CN120353806B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data management, and in particular to a relationship updating method, a relationship query method, an apparatus, a device and a medium. Background Art
[0002] In the digital age, the explosive growth of data is driving the search for efficient data query methods. Existing technologies, which build specific connections based on direct relationships between data to enable data query, play a key role in scenarios such as family and social relationship analysis and commercial supply chain management.
[0003] For example, based on the parent-child relationship between Person A and Person B, the data management system can construct a directed edge from the node representing Person A to the node representing Person B, with the edge attribute explicitly labeled as parent-child, to produce a relationship graph. When querying who Person A's son is, the data management system can find an edge in the resulting relationship graph that connects Person A and has the parent-child attribute, thereby determining that Person A's son is Person B.
[0004] However, existing techniques require recursive queries for multi-level relationships (i.e., relationships involving more than two objects, such as A is the father of B, and B is the father of C. In a multi-level relationship between A, B, and C, there are three objects: A, B, and C). This results in low query efficiency. For example, in a multi-level relationship between A, B, and C, a data management system needs to query A's grandson layer by layer to identify B, then query B's son to identify C, before confirming that A's grandson is C.
[0005] It can be seen that how to improve data query efficiency is an urgent problem to be solved. Summary of the Invention
[0006] The purpose of the embodiments of the present invention is to provide a relationship update method, relationship query method, apparatus, device, and medium to improve data query efficiency. The specific technical solution is as follows:
[0007] In a first aspect, an embodiment of the present invention provides a relationship updating method, the method comprising:
[0008] Obtaining the association relationship to be added; wherein any association relationship includes: an associating object, an associated object, and the relationship attributes between the associating object and the associated object;
[0009] Determine, from the currently stored association relationships for relationship query, an association relationship having the same object as the association relationship to be added as a target matching association relationship;
[0010] Using the object in the association relationship to be added, the object in the determined target matching association relationship is replaced to obtain a first replaced association relationship;
[0011] For each first replaced association relationship, using the relationship attribute in the association relationship used to obtain the first replaced association relationship, the current relationship attribute in the first replaced association relationship is updated to obtain a first newly added association relationship;
[0012] The obtained newly added association relationship and the association relationship to be added are stored to update the stored association relationship used for relationship query.
[0013] Optionally, before determining, from the currently stored association relationships for relationship query, an association relationship having the same object as the association relationship to be added, the method further comprises: obtaining a direction identifier indicating a query basis in the association relationship to be added;
[0014] The determining, from the currently stored association relationships for relationship query, an association relationship having the same object as the association relationship to be added as a target matching association relationship includes: when the direction identifier indicates that the associating object and the associated object in the association relationship to be added are used as the query basis, performing a first process to obtain a first association relationship, and performing a second process to obtain a second association relationship; combining the obtained first association relationship and the second association relationship to obtain the target matching association relationship; wherein the first process includes: determining, from the currently stored association relationships for relationship query, a first association relationship with the associating object in the association relationship to be added as the associated object; the second process includes determining, from the currently stored association relationships for relationship query, a second association relationship with the associated object in the association relationship to be added as the associated object; when the direction identifier indicates that the associating object in the association relationship to be added is used as the query basis, performing the first process to obtain the first association relationship as the target matching association relationship; when the direction identifier indicates that the associated object in the association relationship to be added is used as the query basis, performing the second process to obtain the second association relationship as the target matching association relationship.
[0015] Optionally, the object in the determined target matching association relationship is replaced by the object in the association relationship to be added, including: for each target matching association relationship, if the associated object in the target matching association relationship is the associated object in the association relationship to be added, then the associated object in the target matching association relationship is replaced with the associated object in the association relationship to be added; if the associated object in the target matching association relationship is the associated object in the association relationship to be added, then the associated object in the target matching association relationship is replaced with the associated object in the association relationship to be added.
[0016] Optionally, after the first newly added association relationship is obtained by updating the current relationship attributes in the first replaced association relationship using the relationship attributes in the association relationship used to obtain the first replaced association relationship for each first replaced association relationship, the method further includes: when the direction identifier indicates that the associating object and the associated object in the association relationship to be added are used as the query basis, if each first newly added association relationship is obtained by updating the current relationship attributes in the second replaced association relationship, then the associated object in each first association relationship is replaced by the associated object in the first newly added association relationship to obtain the second replaced association relationship; and for each second replaced association relationship, the current relationship attributes of the second replaced association relationship are updated using the relationship attributes of the association relationship used to obtain the second replaced association relationship to obtain the second newly added association relationship.
[0017] Optionally, each currently stored association relationship further includes the number of relationship layers between the associating object and the associated object; any association relationship further includes the weight of the associating object and the weight of the associated object;
[0018] Determining, from the currently stored association relationships for relationship query, a first association relationship in which the associated object in the association relationship to be added is used as the associated object, includes: determining, from the currently stored association relationships for relationship query, an association relationship in which the associated object in the association relationship to be added is used as the associated object, as the first association relationship to be utilized; and obtaining the first association relationship based on the number of relationship levels and / or weights in the first association relationship to be utilized;
[0019] And / or, determining, from the currently stored association relationships for relationship query, a second association relationship in which the associated object in the association relationship to be added is used as the associated object, includes: determining, from the currently stored association relationships for relationship query, an association relationship in which the associated object in the association relationship to be added is used as the associated object, as the second association relationship to be utilized; and obtaining the second association relationship based on the number of relationship layers and / or weights in the second association relationship to be utilized.
[0020] Optionally, the using the relationship attributes in the association relationship used to obtain the first replaced association relationship to update the current relationship attributes in the first replaced association relationship to obtain the first newly added association relationship includes: using the relationship attributes in the association relationship used to obtain the first replaced association relationship to update the current relationship attributes in the first replaced association relationship, and adding one to the current relationship level number in the first replaced association relationship to obtain the first newly added association relationship;
[0021] The obtaining of the second newly added association relationship by using the relationship attributes of the association relationship used by the second replaced association relationship to update the current relationship attributes of the second replaced association relationship includes: obtaining the relationship attributes of the association relationship used by the second replaced association relationship to update the current relationship attributes of the second replaced association relationship, and increasing the number of relationship levels in the first newly added association relationship by the number of relationship levels in the current number of relationship levels in the second replaced association relationship to obtain the second newly added association relationship.
[0022] Optionally, the storing of the obtained newly added association relationship and the association relationship to be added includes: storing the obtained newly added association relationship and the association relationship to be added in a database; generating a relationship identifier representing the position of the obtained newly added association relationship and the association relationship to be added in the database; and storing the generated relationship identifier in a linked list.
[0023] In a second aspect, an embodiment of the present invention provides a relationship query method, the method comprising:
[0024] Get query instructions for the target object;
[0025] The stored association relationships are searched for association relationships including the target object, and a query result for responding to the query instruction is obtained; wherein the stored association relationships are obtained based on the aforementioned relationship update method.
[0026] In a third aspect, an embodiment of the present invention provides a relationship updating device, which includes: a first acquisition module, used to obtain a relationship to be added; wherein any relationship includes: an associating object, an associated object, and a relationship attribute between the associating object and the associated object; a first determination module, used to determine, from the currently stored relationships used for relationship query, a relationship that has the same object as the relationship to be added, as a target matching relationship; a first replacement module, used to replace the object in the determined target matching relationship with the object in the relationship to be added, to obtain a first replaced relationship; a first update module, used to update the current relationship attribute in each first replaced relationship with the relationship attribute in the relationship used to obtain the first replaced relationship, to obtain a first newly added relationship; a storage module, used to store the obtained newly added relationship and the relationship to be added, so as to update the stored relationship for relationship query.
[0027] In a fourth aspect, an embodiment of the present invention provides a relationship query device, the device comprising:
[0028] The second acquisition module is used to obtain a query instruction for the target object; the query module is used to query the stored association relationships that include the target object and obtain a query result for responding to the query instruction; wherein the stored association relationships are obtained based on the aforementioned relationship update method.
[0029] An embodiment of the present invention further provides an electronic device, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0030] Memory for storing computer programs;
[0031] The processor is used to implement the above-mentioned key update method and relationship query method when executing the program stored in the memory.
[0032] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the key update method and the relationship query method are implemented.
[0033] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the above-mentioned key update method and relationship query method when executed by a processor.
[0034] Beneficial effects of the embodiments of the present invention: In the embodiments of the present invention, any association relationship includes: an associating object, an associated object, and the relationship attributes between the associating object and the associated object, that is, any association relationship represents a single-layer relationship; the obtained association relationship to be added and the stored association relationship both represent single-layer relationships. From the currently stored association relationships, determine the association relationship that has the same object as the association relationship to be added as the target matching association relationship, that is, determine the existing association relationship associated with the single-layer relationship to be added. Then, use the object in the association relationship to be added to replace the object in the determined target matching association relationship to obtain a first replaced association relationship; for each first replaced association relationship, use the relationship attributes in the association relationship used to obtain the first replaced association relationship to update the current relationship attributes in the first replaced association relationship to obtain a first newly added association relationship. The newly added association relationship thus obtained can reflect the indirect relationship between the non-replaced object and the replaced object in the form of a single-layer relationship. In an embodiment of the present invention, the newly added association relationships and the association relationships to be added are stored to update the stored association relationships used for relationship queries, so that the stored association relationships can reflect the implicit indirect relationships in the form of single-layer relationships. Therefore, when querying data, there is no need to recursively query each single-layer relationship in the multi-layer relationship layer by layer, but all indirect relationships of the target object can be quickly queried directly through the stored single-layer relationships, thereby improving the efficiency of data query.
[0035] Of course, it is not necessary to achieve all of the advantages described above simultaneously in order to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0037] Figure 1 A schematic diagram of a flow chart of a relationship updating method provided in an embodiment of the present invention;
[0038] Figure 2 A schematic diagram of a process for updating a second newly added association relationship in a relationship updating method provided in an embodiment of the present invention;
[0039] Figures 3(a) to 3(d) are schematic diagrams showing the principles of a relationship updating method provided by an embodiment of the present invention;
[0040] Figure 4 A schematic diagram of a flow chart of a relationship query method provided by an embodiment of the present invention;
[0041] Figure 5 A schematic structural diagram of a relationship updating device provided by an embodiment of the present invention;
[0042] Figure 6 A schematic structural diagram of a relationship query device provided by an embodiment of the present invention;
[0043] Figure 7 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments 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 based on the present invention are within the scope of protection of the present invention.
[0045] To better understand the embodiments of the present invention, the following describes the prior art in detail. The prior art lacks effective utilization of deep relationships. If the relationship to be queried is a multi-layer relationship, a recursive query must be performed on each single-layer relationship within the multi-layer relationship, or a graph traversal algorithm must be used on the relationship graph, resulting in high computational complexity and low query efficiency.
[0046] To improve data query efficiency, embodiments of the present invention provide a relationship update method, relationship query method, apparatus, device, and medium. The following first introduces a relationship update method provided by an embodiment of the present invention. The relationship update method provided by an embodiment of the present invention can be applied to an electronic device. For example, the electronic device can be a smartphone, tablet computer, or desktop computer.
[0047] An embodiment of the present invention provides a relationship updating method, which may include the following steps:
[0048] Obtaining a to-be-added association relationship; wherein any association relationship includes: an associating object, an associated object, and a relationship attribute between the associating object and the associated object; determining, from the currently stored association relationships used for relationship query, an association relationship having the same object as the to-be-added association relationship as the target matching association relationship; using the object in the to-be-added association relationship, replacing the object in the determined target matching association relationship to obtain a first replaced association relationship; for each first replaced association relationship, using the relationship attribute in the association relationship used to obtain the first replaced association relationship, updating the current relationship attribute in the first replaced association relationship to obtain a first newly added association relationship; storing the obtained newly added association relationship and the to-be-added association relationship to update the stored association relationship used for relationship query.
[0049] In an embodiment of the present invention, any association relationship includes: an associating object, an associated object, and the relationship attributes between the associating object and the associated object, that is, any association relationship represents a single-layer relationship; the obtained association relationship to be added and the stored association relationship both represent single-layer relationships. From the currently stored association relationships, an association relationship with the same object as the association relationship to be added is determined as the target matching association relationship, that is, an existing association relationship associated with the single-layer relationship to be added is determined. Then, the object in the determined target matching association relationship is replaced using the object in the association relationship to be added to obtain a first replaced association relationship; for each first replaced association relationship, the current relationship attributes in the first replaced association relationship are updated using the relationship attributes in the association relationship used to obtain the first replaced association relationship to obtain a first newly added association relationship. The newly added association relationship thus obtained can reflect the indirect relationship between the non-replaced object and the replaced object in the form of a single-layer relationship. In an embodiment of the present invention, the newly added association relationships and the association relationships to be added are stored to update the stored association relationships used for relationship queries, so that the stored association relationships can reflect the implicit indirect relationships in the form of single-layer relationships. Therefore, when querying data, there is no need to recursively query each single-layer relationship in the multi-layer relationship layer by layer, but all indirect relationships of the target object can be quickly queried directly through the stored single-layer relationships, thereby improving the efficiency of data query.
[0050] The following combination Figure 1 Introducing a relationship updating method provided by an embodiment of the present invention, such as Figure 1 As shown, the method may include steps S101-S105.
[0051] S101: Obtain the association relationship to be added.
[0052] It can be understood that any association relationship consists of an associating object, a related object, and the relationship attributes between the associating object and the related object. The associating object represents the relationship's initiating entity (which can be called the starting point), the related object represents the relationship's target entity (which can be called the end point), and the relationship attributes indicate the specific type of the relationship. For example, in a company management scenario, the associating object and the related object in a relationship can be people, and the relationship attributes can represent the management relationship between people. Specifically, a relationship can include the words "manager" and "team leader" as well as relationship attributes representing the management relationship. The associating object can be a manager, and the related object can be a team leader. The relationship attributes represent the management relationship, and the relationship can represent the manager managing the team leader. Another example is in a supply chain management scenario, where the associating object and the related object in a relationship can be organizations, and the relationship attributes can represent the supply relationship between organizations. Specifically, a relationship can include the words "manufacturer" and "distributor" as well as relationship attributes representing the supply relationship. The associating object can be a manufacturer, and the related object can be a distributor. The relationship attributes represent the supply relationship, and the relationship can represent the manufacturer supplying products to the distributor.
[0053] The specific form of an association relationship can be a relationship graph, where each association relationship is a directed edge with relationship attributes, running from the associating object to the associated object. For example, a relationship representing the president managing the manager can be a directed edge from the president to the manager, with the relationship attributes of this directed edge representing the management relationship. The specific form of an association relationship can also be tabular data, where each association relationship is a row of table data that records the associating object, the associated object, and the relationship attributes. For example, a relationship representing the president managing the manager can be a row of table data with three columns corresponding to the associating object, the associated object, and the relationship attributes. These three columns can respectively record the president, the manager, and the management relationship. The association relationships to be added can be relationships generated in actual business scenarios. For example, a new manager is appointed who manages a team leader, resulting in a manager-team leader association relationship.
[0054] It should be noted that any association relationship contains only one associating object, one associated object, and the relationship attributes between the associating object and the associated object. Any association relationship only represents a single-layer relationship between the associating object and the associated object. Similarly, the association relationship to be added obtained by the electronic device is also a single-layer relationship.
[0055] Optionally, before obtaining the association relationship to be added, the electronic device may obtain a multi-layer relationship consisting of multiple single-layer relationships, and then decompose the multi-layer relationship into multiple single-layer relationships, with each single-layer relationship being used as the association relationship to be added. This embodiment of the present invention is merely an example and does not specifically limit this.
[0056] S102: Determine, from the currently stored association relationships used for relationship query, an association relationship having the same object as the association relationship to be added, and use it as a target matching association relationship.
[0057] It is understandable that the electronic device can store the association relationship for relationship query. After obtaining the association relationship to be added, the electronic device can determine the association relationship with the same object as the association relationship to be added from the currently stored association relationships as the target matching association relationship.
[0058] Exemplarily, the electronic device may use the associating object or associated object in the to-be-added association relationship as a query basis, and query the association relationship from the currently stored association relationships. The queried association relationship may include the associating object or associated object in the to-be-added association relationship to obtain the target matching association relationship.
[0059] For example, if the association relationship to be added includes the president and the manager, the electronic device can query the association relationship including the president and the association relationship including the manager from the currently stored association relationships to obtain the target matching association relationship.
[0060] Optionally, in one implementation, the electronic device may obtain a direction identifier representing a query basis in the association relationship to be added before determining the target matching association relationship.
[0061] It is understood that when adding an association, the user can define a relationship transmission rule based on the business scenario requirements. The relationship transmission rule can characterize the characteristics of the target matching association to be determined. The relationship transmission rule can include a direction identifier representing the query basis in the association to be added. The electronic device can obtain the direction identifier before determining the target matching association.
[0062] Optionally, the direction indicator can represent a query basis, and the query basis includes the associating objects and / or associated objects in the relationship to be added. In other words, there are three optional query basis options: Method 1: The query basis includes both the associating objects and associated objects in the relationship to be added; Method 2: The query basis includes only the associating objects in the relationship to be added; and Method 3: The query basis includes only the associated objects in the relationship to be added.
[0063] Specifically, for the above three optional methods, step S102 may include steps S1021-S1023.
[0064] S1021, when the direction identifier indicates that the associating object and the associated object in the association relationship to be added are used as the query basis, perform the first processing to obtain the first association relationship, and perform the second processing to obtain the second association relationship; combine the obtained first association relationship and the second association relationship to obtain the target matching association relationship.
[0065] The first processing includes: determining, from the currently stored association relationships for relationship query, a first association relationship with the associated object in the association relationship to be added as the associated object; the second processing includes determining, from the currently stored association relationships for relationship query, a second association relationship with the associated object in the association relationship to be added as the associated object.
[0066] S1022: When the direction identifier indicates that the associated object in the association relationship to be added is used as the query basis, a first process is performed to obtain a first association relationship as a target matching association relationship.
[0067] S1023: When the direction identifier indicates that the associated object in the association relationship to be added is used as the query basis, a second process is performed to obtain a second association relationship as the target matching association relationship.
[0068] It is understood that when the direction indicator indicates that the associating object and the associated object in the to-be-added relationship are used as the query basis (i.e., in the case of Method 1), the electronic device can use the associating object in the to-be-added relationship as the query basis and the associated object in the to-be-added relationship as the query basis, respectively, to search for the target matching relationship in the currently stored relationships used for relationship query. In this case, the electronic device can determine all relationships associated with the object in the to-be-added relationship and perform comprehensive, deep-level relationship reasoning on all relationships in the stored relationships that are related to the to-be-added relationship.
[0069] It should be noted that if the association relationship is in the form of a relationship graph, each association relationship is a directed edge with relationship attributes, pointing from the associating object to the associated object, then the relationship in the direction of the arrow can be regarded as a low-level relationship, and the relationship in the opposite direction can be regarded as a high-level relationship. For example, association relationship 1 can be a directed edge from the president to the manager; association relationship 2 can be a directed edge from the manager to the team leader, then association relationship 1 is a high-level relationship relative to association relationship 2, and association relationship 2 is a low-level relationship relative to association relationship 1. In the case where the direction identifier indicates that the associating object and the associated object in the association relationship to be added are used as the query basis, the target matching association relationship determined by the electronic device can include: the high-level relationship and the low-level relationship of the association relationship to be added, so as to perform comprehensive deep-level relationship reasoning.
[0070] In the case where the direction indicator indicates that the associated objects in the association relationship to be added are used as the query basis (i.e., the case of method 2), the electronic device can use the associated objects in the association relationship to be added as the query basis to search for the target matching association relationship in the currently stored association relationships used for relationship query. In this case, only the association relationship related to the associated objects in the association relationship to be added can be determined, and then the associated objects can be determined for the associated objects in the association relationship to be added. If the association relationship to be added is a low-level relationship in the application scenario, only the associated objects in the association relationship to be added can be subjected to deep-level relationship reasoning, saving computing resources for determining the target matching association relationship. For example, in a company management scenario, the management of team members by the team leader is a low-level association relationship, and team members have no other association relationships except the team leader. In this case, the association relationship related to the team leader can be determined to determine the association relationship between other objects and team members.
[0071] If the direction indicator indicates that the associated object in the to-be-added relationship is used as the query basis (i.e., in the third scenario), the electronic device can use the associated object in the to-be-added relationship as the query basis to search for target matching relationships within the currently stored relationships. In this case, only the relationships related to the associated object in the to-be-added relationship can be determined, and then the associated objects for the associated objects in the to-be-added relationship can be determined. If the to-be-added relationship is a high-level relationship in the application scenario, deep-level relationship reasoning can be performed only on the associated objects in the to-be-added relationship, saving computing resources on determining the target matching relationship. For example, in a company management scenario, the highest-level relationship is that of the president managing managers, and the president has no other relationships other than managers. Therefore, relationships related to managers can be determined to determine the relationships between other objects and the president. For another example, in a company management scenario, the president managing managers is a higher-level relationship, but the president can also be a related object managed by the board of directors. However, due to privacy concerns regarding the members of the board of directors, the electronic device does not have the authority to reason about the board of directors' relationships. Therefore, the direction indicator can be used to restrict the determination of relationships related to managers, ignoring those related to the president.
[0072] The electronic device can search in the stored association relationships based on the associated object in the association relationship to be added as the query condition for the associated object. Specifically, the electronic device can determine the association relationship that includes the associated object in the association relationship to be added in the stored association relationships, and then determine the associated object in the association relationship to be added as the association relationship of the associated object in the determined association relationship. Exemplarily, the electronic device can search for the relationship identifier of the associated object in the association relationship to be added in the linked list, and then search the database for the association relationship of the position indicated by the found relationship identifier; the electronic device can determine whether the associated object in the association relationship to be added belongs to the associated object field in the association relationship at the position; if it does, the association relationship at the position can be determined as the first association relationship; if it does not, the association relationship at the position cannot be determined as the first association relationship.
[0073] The electronic device uses the associated object in the to-be-added association as the associated object as the first association. For example, if the to-be-added association indicates that a manager manages a team leader, the associated object in the to-be-added association is the manager and the associated object is the team leader. If the first association indicates that the president manages the manager, the associated object in the first association is the president and the associated object is the manager. The associated object (manager) in the first association is the associated object (manager) in the to-be-added association, both being managers.
[0074] The electronic device can search in the stored association relationships based on the associated object in the association relationship to be added as the query condition for the associated object. Specifically, the electronic device can determine the association relationship that includes the associated object in the association relationship to be added in the stored association relationships, and then determine the association relationship with the associated object in the association relationship to be added as the associated object in the determined association relationships. Exemplarily, the electronic device can search for the relationship identifier of the associated object in the association relationship to be added in the linked list, and then search the database for the association relationship of the position indicated by the found relationship identifier; the electronic device can determine whether the associated object in the association relationship to be added belongs to the associated object field in the association relationship at the position; if it does, the association relationship at the position can be determined to be the second association relationship; if it does not, the association relationship at the position cannot be determined to be the second association relationship.
[0075] The electronic device uses the associated object in the to-be-added association relationship as the associated object's association relationship, as the second association relationship. For example, if the to-be-added association relationship indicates that a manager manages a team leader, in the to-be-added association relationship, the associated object is the manager and the associated object is the team leader; if the second association relationship indicates that a team leader manages team members, in the second association relationship, the associated object is the team leader and the associated object is the team member; the associated object (team leader) in the second association relationship is the associated object (team leader) in the to-be-added association relationship, and both are team leaders. In this embodiment of the present invention, a target matching association relationship can be determined according to a direction identifier, and deep-level relationship reasoning can be performed for a variety of scenarios, with strong adaptability.
[0076] S103: Using the object in the association relationship to be added, the object in the determined target matching association relationship is replaced to obtain a first replaced association relationship.
[0077] It is understandable that in order to obtain the indirect relationship implicit in the association relationship to be added and the target matching association relationship, the electronic device can use the objects in the association relationship to be added to replace the objects in the determined target matching association relationship to obtain a first replaced association relationship.
[0078] Optionally, in one implementation, the replacement may be performed in the following manner.
[0079] A1: For each target matching association relationship, if the associated object in the target matching association relationship is the associated object in the association relationship to be added, then the associated object in the target matching association relationship is replaced with the associated object in the association relationship to be added.
[0080] It is understandable that, in the case where the associated object in a target matching association relationship is the associated object in the association relationship to be added, that is, the target matching association relationship is the first association relationship in the above embodiment, in this case, the end point of the target matching association relationship is the starting point of the association relationship to be added, and thus the end point of the association relationship to be added and the starting point of the target matching association relationship are associated. The electronic device can replace the associated object in the target matching association relationship with the associated object in the association relationship to be added, that is, replace the end point of the target matching association relationship with the end point of the association relationship to be added, so as to establish an association relationship between the associated object of the target matching association relationship and the associated object of the association relationship to be added.
[0081] For example, the relationship to be added indicates that a manager manages a team leader. In the relationship to be added, the associated object is the manager and the associated object is the team leader. The target matching relationship indicates that the president manages the manager. In the target matching relationship, the associated object is the president and the associated object is the manager. The associated object (manager) in the target matching relationship is the associated object (manager) in the relationship to be added. During the replacement process, the associated object (manager) in the target matching relationship can be replaced with the associated object (team leader) in the relationship to be added. The replaced target matching relationship contains the associated object (president) and the associated object (team leader).
[0082] A2: If the associated object in the target matching association relationship is the associated object in the association relationship to be added, the associated object in the target matching association relationship is replaced with the associated object in the association relationship to be added.
[0083] It is understandable that, in the case where the associated object in a target matching association relationship is the associated object in the association relationship to be added, that is, the target matching association relationship is the second association relationship in the above embodiment, in this case, the starting point of the target matching association relationship is the end point of the association relationship to be added, and thus the starting point of the association relationship to be added and the end point of the target matching association relationship are associated. The electronic device can replace the associated object in the target matching association relationship with the associated object in the association relationship to be added, that is, replace the starting point of the target matching association relationship with the starting point of the association relationship to be added, so as to establish an association relationship between the associated object of the association relationship to be added and the associated object of the target matching association relationship.
[0084] For example, the relationship to be added indicates that a manager manages a team leader. In the relationship to be added, the associated object is the manager and the associated object is the team leader. The target matching relationship indicates that a team leader manages a team member. In the target matching relationship, the associated object is the team leader and the associated object is the team member. The associated object (team leader) in the target matching relationship is the associated object (team member) in the relationship to be added. During the replacement process, the associated object (team leader) in the target matching relationship can be replaced with the associated object (manager) in the relationship to be added. The replaced target matching relationship then contains the associated object (manager) and the associated object (team member).
[0085] In an embodiment of the present invention, the starting point and the end point of the association relationship to be added can be used as a query basis to obtain a target matching association relationship; then, the object in the target matching association relationship that is the same as the association relationship to be added is replaced, and other objects between the association relationship to be added and the target matching association relationship can be replaced to construct an association relationship containing only one associating object and one associated object, so as to infer a new association relationship based on the association relationship to be added and the target matching association relationship.
[0086] S104 , for each first replaced association relationship, using the relationship attributes in the association relationship used to obtain the first replaced association relationship, update the current relationship attributes in the first replaced association relationship to obtain a first newly added association relationship.
[0087] It is understandable that after the objects in the first replaced association relationship obtained by replacing the object are determined, the relationship attributes between the objects in the first replaced association relationship need to be further determined. The electronic device can use the relationship attributes in the association relationship used to obtain the first replaced association relationship to update the current relationship attributes in the first replaced association relationship to obtain the first newly added association relationship. Among them, the association relationship used to obtain the first replaced association relationship may include: the association relationship to be added and the target matching association relationship. When the target matching association relationship is the first association relationship, the association relationship used to obtain the first replaced association relationship may include: the association relationship to be added and the first association relationship; when the target matching association relationship is the second association relationship, the association relationship used to obtain the first replaced association relationship may include: the association relationship to be added and the second association relationship.
[0088] Optionally, if the relationship attributes in the association relationship used to obtain the first replaced association relationship are all transferable relationship attributes (for example, a command relationship or a management relationship, A can command (or manage) B, B can command (or manage) C, then A can command (or manage) C), then the current relationship attributes in the first replaced association relationship are the same as the relationship attributes in the association relationship used to obtain the first replaced association relationship.
[0089] Optionally, if the relationship attributes in the association relationship used to obtain the first replaced association relationship are relationship attributes that can be compositely superimposed, then it is necessary to determine the updated relationship attributes based on the superposition result of the relationship attributes in the association relationship used to obtain the first replaced association relationship. Exemplarily, in a preset correspondence of superposition results, each superposition result corresponds to a relationship attribute. The electronic device can determine the superposition result of the relationship attributes in the association relationship used to obtain the first replaced association relationship, and then determine the relationship attribute corresponding to the superposition result from the preset correspondence relationship to determine the updated relationship attribute.
[0090] For example, the first replaced association relationship represents the relationship between a manager and a project. The association relationships used to obtain the first replaced association relationship include: the association relationship between the manager and the employee, and the association relationship between the employee and the project. The relationship attribute between the manager and the employee represents the management relationship, and the relationship attribute between the employee and the project represents the responsibility relationship. The superposition result of the management relationship and the responsibility relationship corresponds to an indirect management relationship. Therefore, the relationship attribute between the manager and the project represents an indirect management relationship.
[0091] Optionally, the corresponding relationship of the preset superposition results can be expressed by a relationship calculation formula. For example, by calculating relationship attribute 1 + relationship attribute 2 through the relationship calculation formula, relationship attribute 3 can be obtained. By using the relationship calculation formula relationship attribute 1 + relationship attribute 2 = relationship attribute 3, it can be expressed that the superposition result of relationship attribute 1 and relationship attribute 2 corresponds to relationship attribute 3.
[0092] S105: Store the newly added association relationship and the association relationship to be added to update the stored association relationship for relationship query.
[0093] It is understood that the electronic device can store the newly added associations and the associations to be added. Optionally, the electronic device can store the newly added associations in the inference database and the associations to be added in the business database. This embodiment of the present invention is only used as an example and is not specifically limited.
[0094] Optionally, in one implementation, step S105 may include the following steps.
[0095] S1051: Store the newly added association relationship and the association relationship to be added in the database. S1052: Generate a relationship identifier indicating the position of the newly added association relationship and the association relationship to be added in the database. S1053: Store the generated relationship identifier in a linked list.
[0096] It is understood that the association relationship storage table in the database may include the following fields: relationship attributes, associating objects, and associated objects. The electronic device may use the newly acquired association relationships and the association relationships to be added as association relationships to be stored. For each association relationship to be stored, the electronic device may write the object identifier representing the associating object in the association relationship to be stored into the association object field, the object identifier representing the associated object in the association relationship to be stored into the associated object field, and the attribute identifier representing the relationship attribute in the association relationship to be stored into the relationship attribute field.
[0097] When writing each to-be-stored relationship to the database, the electronic device can generate a unique identifier for the to-be-stored relationship, which serves as a relationship identifier. The relationship identifier can also serve as a pointer to indicate the location of the to-be-stored relationship in the database. In embodiments of the present invention, the relationship identifier serves as a relationship index for the relationship in the database, and relationships in the database can be queried based on the relationship identifier.
[0098] For example, the electronic device may use adjacency list storage technology to set up a corresponding linked list for each object. The linked list stores a relationship identifier for the object. The linked list also includes bitmap data indicating whether other objects have a relationship with the object, represented in binary form by a bitmap. For example, a 1 indicates that the object is associated with the other object, and a 0 indicates that the object is not associated with the other object. When querying the object's relationship, the relationship identifier of the object in the linked list can be used as a pointer to find the relationship containing the object in the database.
[0099] In the prior art, adjacency lists contain a large number of objects, not all of which have stored relationships. Some objects (referred to as intermediate objects) do not have stored relationships and thus occupy storage resources. In the embodiments of the present invention, a bitmap is used to indicate in binary form whether other objects have a relationship with the object. This avoids storing a large number of invalid intermediate objects in the adjacency list, retaining only objects with stored relationships, and thus reducing the waste of storage resources. For example, based on experimental comparisons, the compressed storage technology combining adjacency lists and bitmaps provided by the embodiments of the present invention can reduce storage space by 30% to 50% compared to the prior art.
[0100] Furthermore, the embodiments of the present invention treat each to-be-added relationship as a newly added relationship, infer the newly added relationship to obtain a first newly added relationship (which can be referred to as an incremental update mechanism), and then transfer the deeper relationship (indirect relationship) to the first newly added relationship, resulting in a single-layer relationship that can represent the implicit indirect relationship. This single-layer relationship is then added to the database, allowing for dynamic updates of the relationship and the relationship identifier, ensuring the real-time nature of the relationship identifier and adapting to ever-changing business scenarios. For example, based on experimental comparisons, updating the relationship using the solution provided by the embodiments of the present invention can reduce the update time of the relationship index from minutes in the prior art to seconds.
[0101] In addition, when a new association relationship changes in the relationship chain, the embodiment of the present invention can only update part of the relationship index related to the new association relationship, without recalculating the relationship index of each object in the relationship chain.
[0102] In an embodiment of the present invention, the newly added association relationships and the association relationships to be added are stored to update the stored association relationships used for relationship queries, so that the stored association relationships can reflect the implicit indirect relationships in the form of single-layer relationships. Therefore, when querying data, there is no need to recursively query each single-layer relationship in the multi-layer relationship layer by layer, but all indirect relationships of the target object can be quickly queried directly through the stored single-layer relationships, thereby improving the efficiency of data query.
[0103] In one embodiment, Figure 1 Based on the relationship updating method shown, each currently stored association relationship further includes the number of relationship layers between the association object and the associated object; and any association relationship further includes the weight of the association object and the weight of the associated object.
[0104] It is understandable that each currently stored association relationship also includes the number of relationship layers between the associating object and the associated object. The number of relationship layers may indicate the number of association relationships used by the electronic device when obtaining the association relationship.
[0105] For example, a stored association relationship represents the relationship between a manager and a team member. The association relationships used to obtain this association relationship include: the association relationship between the team leader and the team member, and the association relationship between the manager and the team leader. The relationship level of this association relationship is 2. For another example, a stored association relationship represents the relationship between the president and a team member. The association relationships used to obtain this association relationship include: the association relationship between the president and the manager, the association relationship between the manager and the team leader, and the association relationship between the team leader and the team member. The relationship level of this association relationship is 3.
[0106] Optionally, the stored association relationship may include: an association relationship identifier used to obtain the association relationship, and the electronic device may represent the number of relationship layers by the number of relationship identifiers.
[0107] It is understandable that any association relationship also includes the weight of the association object and the weight of the associated object. In actual application scenarios, there is a situation where an association object has an association relationship with multiple associated objects. For example, the leader of the association object can manage the associated object members 1 and 2 at the same time, and the leader has an association relationship with member 1, and the leader has an association relationship with member 2; or, there is a situation where multiple association objects have an association relationship with one associated object. For example, the associated object project can be managed by the associated object members 1 and 2 at the same time, and member 1 has an association relationship with the project, and member 2 has an association relationship with the project. In view of the above-mentioned situations in actual application scenarios, weights can be set in advance for each object in any association relationship. When a one-to-many situation occurs, an association relationship containing objects with large weights can be selected. The specific implementation method will be described in the subsequent embodiments. The weight is bound to each object. When the associated object in the target matching relationship is replaced with the associated object in the relationship to be added, the weight of the associated object in the replaced target matching relationship is the weight of the associated object in the relationship to be added; when the associated object in the target matching relationship is replaced with the associated object in the relationship to be added, the weight of the associated object in the replaced target matching relationship is the weight of the associated object in the relationship to be added.
[0108] Optionally, in the process of obtaining the first association relationship, determination may be made based on the number of relationship layers and / or weights, specifically including the following steps.
[0109] B1. From the currently stored association relationships used for relationship query, determine an association relationship with an association object in the association relationship to be added as an associated object, as the first association relationship to be used.
[0110] B2. Obtain a first association relationship based on the number of relationship levels and / or weights in the first association relationship to be utilized.
[0111] It is understood that the relationship transmission rules also include: a restriction rule indicating that the association relationship between objects does not exceed a preset number of layers, and / or a restriction rule indicating that the object weight is relatively large. Optionally, the electronic device can determine the first association relationship based on both the number of relationship layers and the weight. Optionally, the electronic device can determine the target matching association relationship based only on the number of relationship layers. Optionally, the electronic device can determine the target matching association relationship based only on the weight.
[0112] Specifically, in one implementation, B2 may include the following steps:
[0113] B21: Determine, as a first association relationship, an association relationship in which the number of relationship layers is not greater than a preset layer threshold in the first association relationship to be utilized.
[0114] It is understood that the electronic device may determine, as the first association relationship, any association relationship in the first association relationship to be utilized whose number of relationship layers is not greater than a preset layer threshold. For example, if the preset layer threshold is 7 and the number of relationship layers in the first association relationship to be utilized is 4, then the first association relationship to be utilized may be determined as the first association relationship; however, if the number of relationship layers in the first association relationship to be utilized is 7, then the first association relationship to be utilized will not be determined as the first association relationship.
[0115] If the relationship between two objects has many layers, it indicates a distant relationship. There's no need to query the relationship between the two objects, and reasoning about the relationship between them is meaningless. For example, the president of a multinational company manages managers of branches around the world. However, when analyzing the management of a single branch, it's unnecessary to consider relationships involving the president as well as relationships involving managers of other branches. Therefore, by presetting a layer threshold, the number of layers in the first relationship can be limited, avoiding meaningless reasoning and reducing wasted computing resources.
[0116] B22: Determine the association relationship with the largest weight of the association objects in the first association relationship to be utilized as the first association relationship.
[0117] It is understood that the associated object of the association relationship to be added is the associated object of the first association relationship to be utilized. The electronic device can compare the weights of the associated objects in each first association relationship to be utilized and determine the first association relationship to be utilized with the largest weight as the first association relationship. For example, if the weight of the associated object in the first association relationship to be utilized 1 is 0.8, and the weight of the associated object in the first association relationship to be utilized 2 is 0.5, the electronic device can determine the first association relationship to be utilized 1 as the first association relationship. Optionally, the weight of each object in the association relationship can be used as the weight of the object in the newly added association relationship, that is, the weight of each object in any association relationship is transferable. In this regard, the embodiments of the present invention are merely illustrative and do not provide specific limitations.
[0118] It should be noted that although the associated objects in each first association relationship to be utilized are the same, the relationship attributes of each first association relationship to be utilized may be different, and the associated objects may also be different. That is, each first association relationship to be utilized is different. In actual application scenarios, each first association relationship to be utilized may have a priority, and the weight of the associated objects in the first association relationship to be utilized with a higher priority will be greater. For example, the first association relationship to be utilized 1 indicates that the president manages the group leader, the president is the associated object, and the weight is 1. The first association relationship to be utilized 2 indicates that the manager manages the group leader, the manager is the associated object, and the weight is 0.8. The weight of the associated object in the first association relationship to be utilized 1 is greater than the weight of the associated object in the first association relationship to be utilized 2. The electronic device can determine the first association relationship to be utilized 1 as the first association relationship.
[0119] B23: Determine, as the first association relationship, an association relationship in which the number of relationship layers is not greater than a preset layer threshold and the weight of the associated object is the largest.
[0120] The electronic device can use both the number of relationship layers and the weight as constraints, i.e., combine steps B21 and B22 to determine the first association relationship. In an embodiment of the present invention, the electronic device can use the number of relationship layers and / or the weight as constraints to determine the first association relationship according to the actual application scenario, thereby improving the accuracy of the obtained association relationship and enhancing the user's query experience.
[0121] Optionally, in one implementation, the process of determining the second association relationship may include the following steps.
[0122] C1. From the currently stored association relationships used for relationship query, determine an association relationship with the associated object in the association relationship to be added as the associated object, as the second association relationship to be used.
[0123] C2: Obtain a second association relationship based on the number of relationship levels and / or weights in the second association relationship to be utilized.
[0124] It is understandable that the process of determining the second association relationship with the associated object in the association relationship to be added as the associating object is similar to the aforementioned process of determining the second association relationship with the associating object in the association relationship to be added as the associated object, and will not be elaborated here.
[0125] Specifically, in one implementation, C2 may include the following steps:
[0126] C21 , determining, in the second association relationship to be utilized, an association relationship whose number of relationship layers is not greater than a preset layer threshold as a second association relationship.
[0127] It can be understood that the process of the electronic device determining the second association relationship in the second association relationship to be utilized according to the number of relationship levels is similar to the aforementioned step B21, and will not be elaborated on here.
[0128] C22, determining the association relationship with the largest weight of the associated object in the second association relationship to be utilized as the second association relationship.
[0129] It is understandable that the associated object to be added is the associated object of the second association relationship to be utilized. The electronic device can compare the weights of the associated objects in each second association relationship to be utilized and determine the second association relationship to be utilized with the largest weight as the second association relationship.
[0130] It should be noted that although the associated objects in each second association relationship to be utilized are the same, the relationship attributes of each second association relationship to be utilized may be different, and the associated objects may also be different. That is, each second association relationship to be utilized is different. In actual application scenarios, each second association relationship to be utilized may have a priority, and the weight of the associated object in the second association relationship to be utilized with a higher priority will be greater. For example, second association relationship to be utilized 1 indicates that the manager manages the team leader, the team leader is the associated object, and the weight is 0.3. Second association relationship to be utilized 2 indicates that the manager manages the team members, the team members are the associated objects, and the weight is 0.1. The weight of the associated object in second association relationship to be utilized 1 is greater than the weight of the associated object in second association relationship to be utilized 2. The electronic device can determine second association relationship to be utilized 1 as the second association relationship.
[0131] C23 , determining, as the second association relationship, an association relationship in which the number of relationship layers is not greater than a preset layer threshold and the weight of the associated object is the largest in the second association relationship to be utilized.
[0132] It is understood that the electronic device can use both the number of relationship levels and the weight as constraints, i.e., combine steps C21 and C22 to determine the second association relationship. The electronic device can use the number of relationship levels and / or the weight as constraints to determine the target matching association relationship according to the actual application scenario, thereby improving the accuracy of the obtained association relationship and enhancing the user's query experience.
[0133] Optionally, in one implementation, the number of relationship levels in the first newly added association relationship may be obtained in the following manner.
[0134] The relationship attributes in the association relationship used to obtain the first replaced association relationship are used to update the current relationship attributes in the first replaced association relationship, and the current relationship level number in the first replaced association relationship is increased by one to obtain a first newly added association relationship.
[0135] It is understandable that, while the electronic device updates the current relationship attributes in the first replaced relationship, it also increments the current number of relationship levels in the first replaced relationship by one to obtain the first newly added relationship. For example, if the current number of relationship levels in the first replaced relationship is 2, then incrementing 2 by one results in a number of relationship levels in the first newly added relationship of 3.
[0136] Since the first replaced association relationship is obtained by replacing the object in the first association relationship with the object in the association relationship to be added, the first replaced association relationship can be considered as: adding the association relationship to be added on the basis of the target matching association relationship. The association relationship to be added is a single-layer relationship, that is, one relationship layer of the association relationship to be added is added to the relationship layer number of the target matching association relationship.
[0137] In the embodiment of the present invention, the newly added association relationship can be updated so that the target matching association relationship can be determined based on the number of relationship layers for the new association relationship to be added, thereby ensuring the accuracy of the number of relationship layers in the stored association relationship.
[0138] Optionally, in one embodiment, Figure 2 A schematic diagram of a process for updating a second newly added association relationship in a relationship updating method provided in an embodiment of the present invention is provided. Figure 1 Based on the relationship update method shown, Figure 2 As shown, the method further includes steps S201-S203.
[0139] S201: Obtain a direction identifier representing a query basis in the association relationship to be added.
[0140] It is understandable that the specific implementation of this step has been described in the aforementioned embodiment and will not be elaborated on here.
[0141] S202, when the direction indicator indicates that the associating object and the associated object in the to-be-added association relationship are used as the query basis, if each first newly added association relationship is obtained by updating the current relationship attributes in the replaced second association relationship, then the associated object in each first association relationship is replaced with the associated object in the first newly added association relationship to obtain a second replaced association relationship.
[0142] It is understood that, when the direction indicator indicates that the query is based on the associating object and the associated object in the association relationship to be added, the electronic device can determine a first association relationship in which the associating object in the association relationship to be added is the associated object, and a second association relationship in which the associated object in the association relationship to be added is the associating object. After obtaining the first newly added association relationship, the associating object of the first newly added association relationship can be used as a new association relationship, and the associating object of the new association relationship is the associated object of the first association relationship. In other words, another new association relationship can be established based on the first newly added association relationship and the first association relationship.
[0143] The electronic device may replace the associated object in each first association relationship with the associated object in the first newly added association relationship, thereby obtaining a second replaced association relationship, wherein the associated object in the first newly added association relationship is the associated object in the second association relationship and is also the associated object in the second association relationship. The first association relationship and the second association relationship are connected through the association relationship to be added, thereby establishing an association relationship between the associated object in the first association relationship and the associated object in the second association relationship.
[0144] S203 : For each second replaced association relationship, the current relationship attribute of the second replaced association relationship is updated by using the relationship attribute of the association relationship used to obtain the second replaced association relationship, so as to obtain a second newly added association relationship.
[0145] It can be understood that for each second replaced association relationship, the second replaced association relationship is obtained based on a first newly added association relationship and a first association relationship. The electronic device can use the relationship attributes in the first newly added association relationship and the relationship attributes in the first association relationship to update the current relationship attributes of the second replaced association relationship to obtain a second newly added association relationship. The specific implementation method of updating the relationship attributes based on the two relationship attributes has been described in the aforementioned embodiment and will not be elaborated on here. Similar to the first newly added association relationship, the second newly added association relationship can also be stored as the obtained newly added association relationship. The specific storage method is similar to that of the first newly added association relationship and will not be elaborated on here.
[0146] It should be noted that the second newly added association relationship is essentially the association relationship between the associating object in the first association relationship and the associated object in the second association relationship. However, in embodiments of the present invention, direct use of the first and second association relationships to construct the second newly added association relationship can be avoided, thereby avoiding the need to construct the second newly added association relationship by associating the first association relationship with the association relationship to be added, and the association relationship to be added with the second association relationship. Embodiments of the present invention can directly determine the second newly added association relationship based on the already determined first newly added association relationship and the first association relationship, thereby improving the efficiency of determining the second newly added association relationship and reducing the computing resources required to determine the second newly added association relationship.
[0147] Optionally, in one implementation, the number of relationship levels in the second newly added association relationship may be obtained in the following manner.
[0148] The relationship attributes of the relationship used to obtain the second replaced relationship are used to update the current relationship attributes of the second replaced relationship, and the number of relationship levels in the second replaced relationship is increased by the number of relationship levels in the first newly added relationship to obtain the second newly added relationship.
[0149] It is understandable that, while the electronic device updates the current relationship attributes in the second replaced relationship, it also adds the number of relationship levels in the first newly added relationship to the current number of relationship levels in the second replaced relationship, thereby obtaining the second newly added relationship. For example, if the current number of relationship levels in the second replaced relationship is 2, the number of relationship levels in the first newly added relationship is 2, and the number of relationship levels in the second newly added relationship is 4.
[0150] Since the second replaced association relationship is obtained by replacing the objects in the first association relationship with the objects in the first newly added association relationship, the second replaced association relationship can be considered as adding the first newly added association relationship to the first association relationship, that is, the number of relationship layers of the first newly added association relationship is added to the number of relationship layers of the first association relationship.
[0151] In the embodiment of the present invention, the newly added association relationship can be updated so that the target matching association relationship can be determined based on the number of relationship layers for the new association relationship to be added, thereby ensuring the accuracy of the number of relationship layers in the stored association relationship.
[0152] Figures 3(a) to 3(d) are schematic diagrams of the principles of a relationship updating method provided by an embodiment of the present invention. As shown in Figure 3(a), the association relationship is in the form of a relationship graph. The stored association relationships include multiple association relationships, which respectively represent: President 1 manages Manager 1 (relationship identifier 1, i.e., id=1), Group Leader 1 manages Group Member 1 (relationship identifier 2, i.e., id=2), and Group Leader 1 manages Group Member 2 (relationship identifier 3, i.e., id=3). The electronic device can obtain the association relationship to be added. As shown in Figure 3(b), the association relationship to be added represents Manager 1 managing Group Leader 1 (relationship identifier 4, i.e., id=4). The direction identifier indicates that the associated object and the associated object in the association relationship to be added are used as the query basis. Among them, the stored association relationships and the association relationship to be added are both management relationships and can be directly transferred.
[0153] Then, as shown in Figure 3(c), the electronic device can determine, from the stored association relationships, an association relationship with the associated object in the association relationship to be added as the associated object, as the second association relationship, i.e., querying with the endpoint of the association relationship to be added; the second association relationship includes an association relationship with a relationship identifier of 2 (i.e., id=2) and an association relationship with a relationship identifier of 3 (i.e., id=3). The electronic device can then replace the associated object (group leader 1) in the association relationship with a relationship identifier of 2 with the associated object (manager 1) in the association relationship to be added, and replace the associated object (group leader 1) in the association relationship with a relationship identifier of 3 with the associated object (manager 1) in the association relationship to be added, and update the relationship attributes in the replaced association relationships to represent the management relationship, resulting in a second newly added association relationship with a relationship identifier of 5 (relationship identifier 5, i.e., id=5) and a second newly added association relationship with a relationship identifier of 6 (relationship identifier 6, i.e., id=6).
[0154] Among them, the second newly added association relationship with relationship identifier 5 indicates that manager 1 manages team member 1, the second newly added association relationship with relationship identifier 6 indicates that manager 1 manages team member 2, the url[4,2] in the second newly added association relationship with relationship identifier 5 indicates that the reasoning path for obtaining the newly added association relationship includes association relationships with relationship identifier 4 and relationship identifier 2, and the url[4,3] in the second newly added association relationship with relationship identifier 6 indicates that the reasoning path for obtaining the newly added association relationship includes association relationships with relationship identifier 4 and relationship identifier 3.
[0155] Then, as shown in FIG3 (d), the electronic device can determine, from the stored association relationships, an association relationship with the association object (Manager 1) in the association relationship to be added as the associated object as the first association relationship, that is, querying based on the starting point of the association relationship to be added. The first association relationship includes an association relationship with a relationship identifier of 1. In addition, the association relationship with the association object (Manager 1) in the association relationship to be added as the associated object also includes the second newly added association relationship obtained in the above step. In other words, the association relationship with the association object (Manager 1) in the association relationship to be added as the associated object includes: association relationships with relationship identifiers of 1, 4, 5, and 6 (i.e., id=1, id=4, id=5, and id=6).
[0156] The electronic device can replace the associated objects in the association relationship with relationship identifier 1 with the associated objects in the association relationships with relationship identifiers 4, 5, and 6, respectively, to obtain new association relationships. The new association relationships include: the association relationship with relationship identifier 7 (relationship identifier 7, i.e., id=7), the association relationship with relationship identifier 8 (relationship identifier 8, i.e., id=8), and the association relationship with relationship identifier 9 (relationship identifier 9, i.e., id=9). The association relationship with relationship identifier 7 indicates that President 1 manages Group Leader 1. The URL [1,4] in the association relationship with relationship identifier 7 indicates that the reasoning path for obtaining the new association relationship includes the association relationships with relationship identifiers 1 and 4. The association relationship with relationship identifier 8 indicates that President 1 manages Group Member 1. The URL [1,4,2] in the association relationship with relationship identifier 8 indicates that the reasoning path for obtaining the new association relationship includes the association relationships with relationship identifiers 1, 4, and 2. The relationship with relationship ID 9 indicates that President 1 manages Team Member 2. The URL [1, 4, 3] in the relationship with relationship ID 9 indicates that the reasoning path for obtaining the new relationship includes relationships with relationship IDs 1, 4, and 3. Finally, the electronic device can store relationships with relationship IDs 4, 5, 6, 7, 8, and 9 to update the stored relationships used for relationship query.
[0157] The embodiment of the present invention further provides a relationship query method, wherein the relationship update method provided by the embodiment of the present invention can be applied to an electronic device. For example, the electronic device can be a smart phone, a tablet computer or a desktop computer. Figure 4 As shown, the relationship query method may include steps S401-S402.
[0158] S401: Obtain a query instruction for a target object.
[0159] The electronic device can obtain a query instruction for a target object. Exemplarily, the query instruction can include an object identifier of the target object and content to be queried. When the content to be queried is an object for a specified relationship attribute, that is, the content to be queried is used to query the object, the electronic device can query the association relationship including the target object and the specified relationship attribute, determine the objects other than the target object in the queried association relationship, and obtain the query result. For example, the query instruction includes the president and the content to be queried representing an object for a management relationship. The electronic device can query the president as an associated object and an association relationship whose relationship attribute is represented as a management relationship, and then use the associated object in the association relationship as the query result.
[0160] When the query content is a relationship attribute for a specified object, that is, the query content is used to query the relationship attribute, the electronic device can query the relationship between the target object and the specified object, and then determine the relationship attribute in the queried relationship as the query result. For example, if the query instruction includes the word "president" and the query content indicates a relationship for the manager, the electronic device can query the relationship between the president and the manager, determine that the relationship attribute in the relationship indicates a management relationship, and use the relationship attribute indicating the management relationship as the query result.
[0161] The electronic device that executes the relationship query method and the electronic device that executes the relationship update method may be the same device or different devices. This embodiment of the present invention is merely an example for illustration and does not impose any specific limitation.
[0162] S402: Searching for association relationships that include the target object in the stored association relationships to obtain a query result for responding to the query instruction.
[0163] It is understood that the electronic device can search for stored relationships that include the target object and, based on the content of the relationships obtained through the search, generate a query result in response to the query instruction. For example, if the query instruction is used to search for objects, the electronic device can determine that the objects other than the target object in the relationships obtained through the search are the objects to be searched, and generate a query result containing the determined objects. For another example, if the query instruction is used to search for relationship attributes, the electronic device can determine the relationship attributes in the relationships obtained through the search, and generate a query result containing the determined relationship attributes.
[0164] Since the stored association relationships are obtained based on the aforementioned relationship update method, the stored association relationships are all single-layer relationships, and the stored association relationships implicitly contain indirect relationships obtained by reasoning. Querying the association relationships containing the target object in the stored association relationships can avoid recursively traversing all intermediate relationships layer by layer, and can directly locate all indirect relationships of the target object quickly through the stored single-layer relationships, thereby improving data query efficiency.
[0165] Optionally, if the association relationship is stored in a database, and the relationship identifier indicating the position of the association relationship in the database is stored in a linked list, the electronic device can query the relationship identifier in the linked list of the target object through the linked list, and query the association relationship containing the target object in the database according to the position indicated by the relationship identifier. Since the stored association relationships are all single-layer relationships, the connection relationship of the linked list is a single-layer connection between two objects. When querying the relationship identifier in the linked list, there is no need to traverse the multi-layer connections of multiple linked lists. Compared with the time complexity of traversing the multi-layer connections of multiple linked lists, , n represents the number of objects, k represents the number of levels of relationships, and the time complexity of the query in the embodiment of the present invention is Smaller, greatly reducing query time and improving data query efficiency.
[0166] The embodiment of the present invention also provides a relationship updating device, such as Figure 5 As shown, the device includes:
[0167] The first acquisition module 510 is used to obtain the association relationship to be added; wherein, any association relationship includes: an associating object, an associated object, and the relationship attribute between the associating object and the associated object; the first determination module 520 is used to determine the association relationship with the same object as the association relationship to be added from the currently stored association relationships used for relationship query, as the target matching association relationship; the first replacement module 530 is used to use the object in the association relationship to be added to replace the object in the determined target matching association relationship to obtain a first replaced association relationship; the first update module 540 is used to update the current relationship attribute in the first replaced association relationship for each first replaced association relationship using the relationship attribute in the association relationship used to obtain the first replaced association relationship to obtain a first newly added association relationship; the storage module 550 is used to store the obtained newly added association relationship and the association relationship to be added to update the stored association relationship for relationship query.
[0168] Optionally, the device further includes: a third acquisition module, configured to acquire a direction identifier representing a query basis in the association relationship to be added;
[0169] The first determination module 520 includes: a first determination unit, which is used to perform a first process to obtain a first relationship and a second process to obtain a second relationship when the direction identifier indicates that the associating object and the associated object in the to-be-added relationship are used as the query basis; and to combine the obtained first relationship and the second relationship to obtain a target matching relationship; wherein the first process includes: determining a first relationship with the associating object in the to-be-added relationship as the associated object from the currently stored relationship for relationship query; the second process includes determining a second relationship with the associated object in the to-be-added relationship as the associated object from the currently stored relationship for relationship query; a second determination unit, which is used to perform the first process to obtain the first relationship as the target matching relationship when the direction identifier indicates that the associating object in the to-be-added relationship is used as the query basis; and a third determination unit, which is used to perform the second process to obtain the second relationship as the target matching relationship when the direction identifier indicates that the associated object in the to-be-added relationship is used as the query basis.
[0170] Optionally, the first replacement module 530 includes: a first replacement unit, used to replace the associated object in each target matching association relationship with the associated object in the association relationship to be added if the associated object in the target matching association relationship is the associated object in the association relationship to be added; and a second replacement unit, used to replace the associated object in the target matching association relationship with the associated object in the association relationship to be added if the associated object in the target matching association relationship is the associated object in the association relationship to be added.
[0171] Optionally, the device also includes: a second replacement module, which is used to replace the associated object in each first association relationship with the associated object in the first newly added association relationship when the direction identifier indicates that the associating object and the associated object in the association relationship to be added are used as the query basis. If each first newly added association relationship is obtained by updating the current relationship attributes in the second association relationship after replacement, the associated object in each first association relationship is replaced with the associated object in the first newly added association relationship to obtain the second replaced association relationship; a second update module, which is used to update the current relationship attributes of the second replaced association relationship for each second replaced association relationship using the relationship attributes of the association relationship used to obtain the second replaced association relationship to obtain the second newly added association relationship.
[0172] Optionally, each currently stored association relationship further includes the number of relationship layers between the associating object and the associated object; any association relationship further includes the weight of the associating object and the weight of the associated object;
[0173] The first determining unit and the second determining unit include: a first determining subunit, configured to determine, from currently stored association relationships for relationship query, an association relationship with an associated object in the association relationship to be added as an associated object, as a first association relationship to be utilized; a first utilizing unit, configured to obtain a first association relationship based on the number of relationship levels and / or weights in the first association relationship to be utilized;
[0174] And / or, the first determination unit and the third determination unit include: a second determination subunit, used to determine, from the currently stored association relationships for relationship query, an association relationship with the associated object in the association relationship to be added as the associated object, as the second association relationship to be utilized; a second utilization unit, used to obtain the second association relationship based on the number of relationship layers and / or weights in the second association relationship to be utilized.
[0175] Optionally, the first update module 540 is specifically used to use the relationship attributes in the association relationship used to obtain the first replaced association relationship to update the current relationship attributes in the first replaced association relationship, and increase the current number of relationship layers in the first replaced association relationship by one to obtain a first newly added association relationship; the second update module is specifically used to use the relationship attributes of the association relationship used to obtain the second replaced association relationship to update the current relationship attributes of the second replaced association relationship, and increase the current number of relationship layers in the second replaced association relationship by the number of relationship layers in the first newly added association relationship to obtain a second newly added association relationship.
[0176] Optionally, the first utilization unit is specifically used to determine the association relationship in the first association relationship to be utilized, whose number of relationship layers is not greater than a preset layer threshold, as the first association relationship; or, determine the association relationship in the first association relationship to be utilized, whose weight of the associated object is the largest, as the first association relationship; or, determine the association relationship in the first association relationship to be utilized, whose number of relationship layers is not greater than the preset layer threshold and whose weight of the associated object is the largest, as the first association relationship; and / or, the second utilization unit is specifically used to determine the association relationship in the second association relationship to be utilized, whose number of relationship layers is not greater than the preset layer threshold, as the second association relationship; or, determine the association relationship in the second association relationship to be utilized, whose weight of the associated object is the largest, as the second association relationship; or, determine the association relationship in the second association relationship to be utilized, whose number of relationship layers is not greater than the preset layer threshold and whose weight of the associated object is the largest, as the second association relationship.
[0177] Optionally, the storage module 550 is specifically used to store the obtained newly added association relationship and the association relationship to be added in the database; generate a relationship identifier representing the position of the obtained newly added association relationship and the association relationship to be added in the database; and store the generated relationship identifier in a linked list.
[0178] In an embodiment of the present invention, the newly added association relationships and the association relationships to be added are stored to update the stored association relationships used for relationship queries, so that the stored association relationships can reflect the implicit indirect relationships in the form of single-layer relationships. Therefore, when querying data, there is no need to recursively query each single-layer relationship in the multi-layer relationship layer by layer, but all indirect relationships of the target object can be quickly queried directly through the stored single-layer relationships, thereby improving the efficiency of data query.
[0179] The embodiment of the present invention also provides a relationship query device, such as Figure 6 As shown, the device includes:
[0180] The second acquisition module 610 is used to obtain a query instruction for the target object; the query module 620 is used to query the stored association relationships that include the target object and obtain a query result for responding to the query instruction; wherein the stored association relationships are obtained based on the aforementioned relationship update method.
[0181] Since the stored association relationships are obtained based on the aforementioned relationship update method, the stored association relationships are all single-layer relationships, and the stored association relationships implicitly contain indirect relationships obtained by reasoning. Querying the association relationships containing the target object in the stored association relationships can avoid recursively traversing all intermediate relationships layer by layer, and can directly locate all indirect relationships of the target object quickly through the stored single-layer relationships, thereby improving data query efficiency.
[0182] The embodiment of the present invention further provides an electronic device, such as Figure 7 As shown, it includes a processor 701 , a communication interface 702 , a memory 703 and a communication bus 704 , wherein the processor 701 , the communication interface 702 and the memory 703 communicate with each other via the communication bus 704 .
[0183] The memory 703 is used to store computer programs; the processor 701 is used to implement the aforementioned relationship updating method and relationship query method when executing the program stored in the memory 703.
[0184] The communication bus mentioned in the electronic devices mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into address buses, data buses, control buses, etc. For ease of illustration, only a single thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0185] The communication interface is used for communication between the above electronic device and other devices.
[0186] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0187] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0188] In another embodiment of the present invention, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned relationship updating methods and relationship query methods are implemented.
[0189] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes any one of the relationship updating methods and relationship query methods in the above embodiments.
[0190] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state disk (SSD)).
[0191] It should be noted that, in this article, relational terms such as first and second are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device comprising the elements. The various embodiments in this specification are described in a related manner, and the same and similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0192] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection of the present invention.
Claims
1. A relationship updating method, characterized in that: The method comprises: Obtaining the association relationship to be added; wherein any association relationship includes: an associating object, an associated object, and the relationship attributes between the associating object and the associated object; Obtaining a direction identifier representing a query basis in the association relationship to be added; When the direction indicator indicates that the associated object in the to-be-added association relationship is used as a query basis, performing a first process to obtain a first association relationship as a target matching association relationship; wherein the first process includes: determining, from currently stored association relationships for relationship query, a first association relationship with the associated object in the to-be-added association relationship as an associated object; When the direction indicator indicates that the associated object in the to-be-added association relationship is used as a query basis, performing a second process to obtain a second association relationship as a target matching association relationship; the second process includes determining, from currently stored association relationships for relationship query, a second association relationship with the associated object in the to-be-added association relationship as an associated object; Using the object in the to-be-added association relationship, the object in the determined target matching association relationship is replaced to obtain a first replaced association relationship; For each first replaced association relationship, using the relationship attribute in the association relationship used to obtain the first replaced association relationship, the current relationship attribute in the first replaced association relationship is updated to obtain a first newly added association relationship; The obtained newly added association relationship and the association relationship to be added are stored to update the stored association relationship used for relationship query.
2. The method according to claim 1, characterized in that The method further comprises: When the direction identifier indicates that the associating object and the associated object in the association relationship to be added are used as the query basis, the first processing is performed to obtain the first association relationship, and the second processing is performed to obtain the second association relationship; the obtained first association relationship and the second association relationship are combined to obtain the target matching association relationship.
3. The method according to claim 2, characterized in that The replacing of the objects in the determined target matching association relationship with the objects in the association relationship to be added includes: for each target matching association relationship, if the associated object in the target matching association relationship is the associated object in the association relationship to be added, replacing the associated object in the target matching association relationship with the associated object in the association relationship to be added; if the associated object in the target matching association relationship is the associated object in the association relationship to be added, replacing the associated object in the target matching association relationship with the associated object in the association relationship to be added; and / or, After, for each first replaced association relationship, the relationship attributes in the association relationship used to obtain the first replaced association relationship are used to update the current relationship attributes in the first replaced association relationship to obtain the first newly added association relationship, the method further includes: when the direction indicator indicates that the associating object and the associated object in the association relationship to be added are used as the query basis, if each first newly added association relationship is obtained by updating the current relationship attributes in the second replaced association relationship, then replacing the associated object in each first association relationship with the associated object in the first newly added association relationship to obtain the second replaced association relationship; and for each second replaced association relationship, updating the current relationship attributes of the second replaced association relationship by using the relationship attributes of the association relationship used to obtain the second replaced association relationship to obtain the second newly added association relationship.
4. The method according to claim 2, characterized in that Each currently stored association relationship also includes the number of relationship layers between the associating object and the associated object; any association relationship also includes the weight of the associating object and the weight of the associated object; Determining, from the currently stored association relationships for relationship query, a first association relationship in which the associated object in the association relationship to be added is used as the associated object, includes: determining, from the currently stored association relationships for relationship query, an association relationship in which the associated object in the association relationship to be added is used as the associated object, as the first association relationship to be utilized; and obtaining the first association relationship based on the number of relationship levels and / or weights in the first association relationship to be utilized; and / or, The determining, from currently stored association relationships for relationship query, a second association relationship with the associated object in the association relationship to be added as the associated object includes: determining, from currently stored association relationships for relationship query, an association relationship with the associated object in the association relationship to be added as the associated object, as the second association relationship to be utilized; and obtaining the second association relationship based on the number of relationship levels and / or weights in the second association relationship to be utilized.
5. The method according to claim 3, characterized in that The step of updating the current relationship attributes in the first replaced association relationship by using the relationship attributes in the association relationship used to obtain the first replaced association relationship to obtain the first newly added association relationship includes: Using the relationship attributes of the association relationship used to obtain the first replaced association relationship, updating the current relationship attributes of the first replaced association relationship, and increasing the current number of relationship levels in the first replaced association relationship by one to obtain a first newly added association relationship; using the relationship attributes of the association relationship used to obtain the second replaced association relationship, updating the current relationship attributes of the second replaced association relationship to obtain a second newly added association relationship, includes: using the relationship attributes of the association relationship used to obtain the second replaced association relationship, updating the current relationship attributes of the second replaced association relationship, and increasing the current number of relationship levels in the second replaced association relationship by the number of relationship levels in the first newly added association relationship to obtain a second newly added association relationship; and / or, The storing of the obtained newly added association relationship and the association relationship to be added includes: storing the obtained newly added association relationship and the association relationship to be added in a database; generating a relationship identifier representing the position of the obtained newly added association relationship and the association relationship to be added in the database; and storing the generated relationship identifier in a linked list.
6. A relationship query method, characterized in that: The method comprises: Get query instructions for the target object; Query the stored association relationships for association relationships that include the target object, and obtain a query result for responding to the query instruction; wherein the stored association relationships are obtained based on the method according to any one of claims 1 to 5.
7. A relationship updating device, characterized in that: The device comprises: A first acquisition module is configured to acquire an association relationship to be added; wherein any association relationship includes: an associating object, an associated object, and relationship attributes between the associating object and the associated object; A third acquisition module is used to obtain a direction identifier representing a query basis in the association relationship to be added; The first determining module is specifically configured to, when the direction identifier indicates that the associated object in the to-be-added association relationship is used as a query basis, perform a first process to obtain a first association relationship as a target matching association relationship; and when the direction identifier indicates that the associated object in the to-be-added association relationship is used as a query basis, perform a second process to obtain a second association relationship as a target matching association relationship; wherein the first process includes: determining, from currently stored association relationships for relationship query, a first association relationship with the associated object in the to-be-added association relationship as an associated object; and the second process includes determining, from currently stored association relationships for relationship query, a second association relationship with the associated object in the to-be-added association relationship as an associated object. A first replacement module is configured to replace the object in the determined target matching relationship with the object in the to-be-added relationship to obtain a first replaced relationship; A first updating module is configured to update, for each first replaced association relationship, the current relationship attribute in the first replaced association relationship by using the relationship attribute in the association relationship used to obtain the first replaced association relationship, to obtain a first newly added association relationship; The storage module is used to store the newly added association relationship and the association relationship to be added, so as to update the stored association relationship used for relationship query.
8. A relationship query device, characterized in that: The device comprises: The second acquisition module is used to obtain a query instruction for the target object; A query module is used to query the stored association relationships that include the target object and obtain a query result for responding to the query instruction; wherein the stored association relationships are obtained based on the method described in any one of claims 1-5.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 6 when executing a program stored in a memory.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Association object obtaining method and device
CN108628941A
