A method and apparatus for constructing entity relationships
By constructing mapping and direct relationships between entities and behavior types, and utilizing spatiotemporal overlap values and feature matching, the problem of low efficiency in constructing entity relationships in complex entity data is solved, achieving efficient and accurate construction and feature representation of entity relationships.
Patent Information
- Application Number
- CN202310415029.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-18
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2043-04-18
AI Technical Summary
Existing technologies struggle to effectively construct entity relationships within complex entity data, resulting in low efficiency in entity relationship construction in scenarios such as intelligent search, intelligent question answering, and risk control.
By constructing mapping and direct relationships between entities and behavior types, and utilizing spatiotemporal overlap values, behavioral feature matching, and feature data filtering, the level of direct relationship and associated features between entities are determined, thus constructing clear entity relationships.
It improves the efficiency and accuracy of entity relationship construction, can clearly characterize the features of entities, understand the actual degree of direct relationship between entities, and enrich the preset feature data.
Smart Images

Figure CN116541473B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular, to a method and device for constructing entity relationship. BACKGROUND
[0002] An entity is an objective existence and can be distinguished from each other, and is often used to refer to a person or a thing. In a database, an entity is used to represent a data object and a component in a data model. By constructing the relationship between multiple entities, a user in a specific scenario can more clearly and directly understand the connection between the entities. The construction of entity relationship can be applied to scenarios such as intelligent search, intelligent question answering, personalized recommendation, and the like. A user can filter entities meeting the user's demand through the relationship between a target entity and other entities.
[0003] For example, when a public security organ investigates personnel having a case-related relationship with a case suspect, if the personnel having a close relationship with the case suspect can be determined, the progress of the case can be promoted more quickly. For another example, in the field of risk control, by determining the relationship between a high-risk event and a to-be-investigated event, a risk control personnel can facilitate the risk control personnel to take precautions in advance for the to-be-investigated event.
[0004] Based on the actual needs in the above scenarios, how to construct entity relationship from complex entity data is crucial. SUMMARY
[0005] The present application provides a method and device for constructing entity relationship to solve the problem of constructing entity relationship from complex entity data.
[0006] The first aspect of the present application provides a method for constructing entity relationship, applied to a data processing server, obtaining feature data of multiple entities and data of multiple behavior types from a source database, the multiple entities including a first entity and a second entity; constructing a mapping relationship between the multiple entities and the multiple behavior types according to the feature data of the multiple entities and the data of the multiple behavior types; constructing a direct relationship between the multiple entities according to the feature data of the multiple entities and the data of the multiple behavior types; and constructing an entity relationship between the first entity and the second entity, the entity relationship including the direct relationship and the mapping relationship.
[0007] The present application adopts the above method, constructs a mapping relationship between multiple entities and multiple behavior types, and constructs a direct relationship between the multiple entities, thereby obtaining an entity relationship between the first entity and the second entity, and realizes the construction of entity relationship from complex entity data. In addition, the constructed entity relationship matches and corresponds each entity and multiple behaviors, and constructs the association between the entity and the behavior.
[0008] In a possible implementation, a spatio-temporal overlap value between the first entity and the second entity is obtained, and the spatio-temporal overlap value is obtained from a time overlap interval in which the first entity and the second entity appear at the same place; and a level of the direct relationship is determined according to the spatio-temporal overlap value; wherein the higher the spatio-temporal overlap value is, the higher the level of the direct relationship is.
[0009] According to the method, the level of the direct relationship is obtained according to the spatio-temporal overlap value, and the strength of the direct relationship is further determined, so that the user can know the closeness of the direct relationship between the entities.
[0010] In a possible implementation, the mapping relationship between the plurality of entities and the plurality of behavior types includes one of or both of the following: one entity corresponds to a plurality of behavior types; and one behavior type corresponds to a plurality of entities.
[0011] According to the method, when the mapping relationship between the plurality of entities and the plurality of behavior types is constructed, the case that a plurality of entities are involved in the same behavior type is considered. Meanwhile, one entity often has a plurality of behavior types, so that the obtained mapping relationship is more accurate.
[0012] In a possible implementation, the direct relationship between the plurality of entities is constructed according to the feature data of the plurality of entities and the data of the plurality of behavior types; and the method specifically includes: obtaining a plurality of behavior features corresponding to a first entity, and obtaining a plurality of behavior features corresponding to a second entity, one behavior type corresponding to a plurality of behavior features; wherein the plurality of behavior features corresponding to the first entity include a first behavior feature, and the plurality of behavior features corresponding to the second entity include a second behavior feature; and when the first behavior feature and the second behavior feature are the same behavior feature, it is determined that the first entity and the second entity have a direct relationship.
[0013] According to the method, when the direct relationship between the plurality of entities is constructed, whether the entities have a direct relationship can be determined first, and the entities that do not have a direct relationship can be filtered out, so that the efficiency of constructing the direct relationship between the entities is improved.
[0014] In a possible implementation, the first behavior feature is any one of the plurality of behavior features corresponding to the first entity, and the second behavior feature is any one of the plurality of behavior features corresponding to the second entity; and the method further includes: obtaining a number of times of occurrence of the same behavior feature; and determining a level of the direct relationship according to the number of times; wherein the higher the number of times is, the higher the level of the direct relationship is.
[0015] The application obtains the level of the direct relationship through the number of occurrences of the same behavior characteristics between multiple entities, further judges the strength of the direct relationship, and enables the user to understand the actual degree of the direct relationship between entities.
[0016] In a possible implementation, the method further includes: screening the preset characteristic data corresponding to the first entity and the preset characteristic data corresponding to the second entity from the characteristic data through a preset screening manner; and adding the preset characteristic data corresponding to the first entity and the preset characteristic data corresponding to the second entity to the entity relationship.
[0017] The application screens the characteristic data to obtain the preset characteristic data corresponding to each entity, and makes the entity relationship clearer.
[0018] In a possible implementation, the first number of occurrences of the first behavior characteristic in the multiple behavior characteristics corresponding to the first entity is obtained; when the first number of occurrences is greater than or equal to a preset number threshold, the first behavior characteristic is determined as a preference characteristic; and the preference characteristic is added to the preset characteristic data corresponding to the first entity.
[0019] The application obtains a new preference characteristic according to the behavior characteristics of the entity, enriches the preset characteristic data of the entity, and makes the preset characteristic data more clearly represent the characteristics of the entity.
[0020] In a possible implementation, the first correlation degree between the first behavior characteristic and the direct relationship is obtained; when the first correlation degree is greater than or equal to a preset correlation degree threshold, the first behavior characteristic is determined as an association characteristic of the first entity; and the association characteristic is added to the preset characteristic data corresponding to the first entity.
[0021] The application obtains a new association characteristic according to the correlation degree between the behavior characteristics of the entity and the direct relationship, enriches the preset characteristic data of the entity, and makes the preset characteristic data more clearly represent the characteristics of the entity.
[0022] The second aspect of the application provides a device for constructing an entity relationship. The device is a data processing server, which comprises a data acquisition unit, a mapping construction unit, a direct relationship construction unit, and an entity relationship construction unit. The data acquisition unit is configured to acquire characteristic data of a plurality of entities and data of a plurality of behavior types from a source database, wherein the plurality of entities comprise a first entity and a second entity. The mapping construction unit is configured to construct a mapping relationship between the plurality of entities and the plurality of behavior types according to the characteristic data of the plurality of entities and the data of the plurality of behavior types. The direct relationship construction unit is configured to construct a direct relationship between the plurality of entities according to the characteristic data of the plurality of entities and the data of the plurality of behavior types. The entity relationship construction unit is configured to construct an entity relationship between the first entity and the second entity, wherein the entity relationship comprises the direct relationship and the mapping relationship.
[0023] In a possible implementation, the data processing server further comprises a relationship level judgment unit. The relationship level judgment unit is configured to acquire a time-space overlap value between the first entity and the second entity, wherein the time-space overlap value is obtained from a time overlap interval in which the first entity and the second entity appear at the same location. The relationship level judgment unit is further configured to determine a level of the direct relationship according to the time-space overlap value, wherein the higher the time-space overlap value, the higher the level of the direct relationship.
[0024] In a possible implementation, the direct relationship construction unit comprises a behavior characteristic acquisition subunit and a direct relationship confirmation subunit. The behavior characteristic acquisition subunit is configured to acquire a plurality of behavior characteristics corresponding to the first entity and a plurality of behavior characteristics corresponding to the second entity, wherein one behavior type corresponds to a plurality of behavior characteristics. The first behavior characteristics comprise a first behavior characteristic, and the second behavior characteristics comprise a second behavior characteristic. The direct relationship confirmation subunit is configured to determine that the first entity and the second entity have a direct relationship when the first behavior characteristic and the second behavior characteristic are the same behavior characteristic.
[0025] In a possible implementation, the first behavior characteristic is any one of the plurality of behavior characteristics corresponding to the first entity, and the second behavior characteristic is any one of the plurality of behavior characteristics corresponding to the second entity. The direct relationship construction unit further comprises a relationship level judgment subunit. The relationship level judgment subunit is configured to acquire a number of times that the same behavior characteristic appears. The relationship level judgment subunit is further configured to determine a level of the direct relationship according to the number of times, wherein the higher the number of times, the higher the level of the direct relationship.
[0026] In a possible implementation, the data processing server further comprises an entity relationship adding unit. The entity relationship adding unit is configured to filter out preset characteristic data corresponding to the first entity and preset characteristic data corresponding to the second entity from the characteristic data by using a preset filtering manner. The entity relationship adding unit is further configured to add the preset characteristic data corresponding to the first entity and the preset characteristic data corresponding to the second entity to the entity relationship.
[0027] In a possible implementation, the entity relationship adding unit comprises a first adding subunit; the first adding subunit is configured to obtain a first number of times that the first behavior feature appears in the plurality of behavior features corresponding to the first entity; determine that the first behavior feature is a preference feature when the first number of times is greater than or equal to a preset number threshold; and add the preference feature to the preset feature data corresponding to the first entity.
[0028] In a possible implementation, the entity relationship adding unit comprises a second adding subunit; the second adding subunit is configured to obtain a first correlation degree between the first behavior feature and the direct relationship; determine that the first behavior feature is a correlation feature of the first entity when the first correlation degree is greater than or equal to a preset correlation degree threshold; and add the correlation feature to the preset feature data corresponding to the first entity.
[0029] The third aspect of the present application provides an electronic device, the electronic device comprising a processor, a memory, a user interface and a network interface, the memory being configured to store instructions, the user interface and the network interface being configured to communicate with other devices, and the processor being configured to execute the instructions stored in the memory to enable the electronic device to perform the method of any one of the above.
[0030] The fourth aspect of the present application provides a computer-readable storage medium, the computer-readable storage medium storing instructions, when the instructions are executed, performing the method of any one of the above.
[0031] Compared with related technologies, the beneficial effects of this application are as follows: By constructing mapping relationships between multiple entities and multiple behavior types, and by constructing direct relationships between multiple entities, the entity relationship between the first entity and the second entity is obtained, realizing the construction of entity relationships from complex entity data. Furthermore, in the constructed entity relationships, each entity is matched with multiple behaviors to establish the association between entities and behaviors. Regarding the obtained direct relationships between entities, the level of direct relationship is obtained through spatiotemporal overlap values, further judging the strength of the direct relationship, enabling users to understand the actual degree of direct relationship between entities. When constructing mapping relationships between multiple entities and multiple behavior types, the possibility of multiple entities being involved in the same behavior type is considered. Simultaneously, an entity often has multiple behavior types, ultimately making the obtained mapping relationships more accurate. When constructing direct relationships between multiple entities, the existence of direct relationships between entities can be judged first. By judging whether there is a direct relationship, entities without direct relationships can be filtered out, improving the efficiency of constructing direct relationships between entities. The level of direct relationship is obtained by the frequency of occurrence of the same behavioral features among multiple entities, further judging the strength of the direct relationship, enabling users to understand the actual degree of direct relationship between entities. By filtering the feature data, pre-defined feature data corresponding to each entity is obtained, making the entity relationships clearer. Preference features are obtained based on the entity's behavioral characteristics, enriching the entity's pre-defined feature data and enabling it to more clearly represent the entity's characteristics. Association features are obtained based on the correlation between the entity's behavioral characteristics and direct relationships, further enriching the entity's pre-defined feature data and enabling it to more clearly represent the entity's characteristics. Attached Figure Description
[0032] Figure 1 This is a first flowchart illustrating a method for constructing entity relationships provided in an embodiment of this application;
[0033] Figure 2 This is a schematic diagram of a first scenario of a method for constructing entity relationships provided in an embodiment of this application;
[0034] Figure 3 This is a second flowchart illustrating a method for constructing entity relationships provided in an embodiment of this application;
[0035] Figure 4 This is a third flowchart illustrating a method for constructing entity relationships provided in an embodiment of this application;
[0036] Figure 5 This is a schematic diagram of a second scenario of a method for constructing entity relationships provided in an embodiment of this application;
[0037] Figure 6is a fourth flow diagram of a method for constructing entity relationship provided by an embodiment of the present application;
[0038] Figure 7 is a fifth flow diagram of a method for constructing entity relationship provided by an embodiment of the present application;
[0039] Figure 8 is a structural diagram of a device for constructing entity relationship provided by an embodiment of the present application;
[0040] Figure 9 is a structural diagram of an electronic device provided by an embodiment of the present application.
[0041] Fig. 11 is a data acquisition unit; Fig. 12 is a mapping construction unit; Fig. 13 is a direct relationship construction unit; Fig. 14 is an entity relationship construction unit; Fig. 900 is an electronic device; Fig. 901 is a processor; Fig. 902 is a communication bus; Fig. 903 is a user interface; Fig. 904 is a network interface; and Fig. 905 is a memory. DETAILED DESCRIPTION
[0042] In order to make the personnel in the technical field better understand the technical solutions in the specification, the technical solutions in the specification will be clearly and completely described below in combination with the drawings in the specification. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments.
[0043] In the description of the embodiments of the present application, the words "exemplary", "for example", or "for instance" are used to mean serving as an example, instance, or illustration. Any embodiment or design presented as "exemplary", "for example", or "for instance" in the embodiments of the present application should not be interpreted as being more preferred or advantageous than other embodiments or design solutions. Rather, the use of "exemplary", "for example", or "for instance" is intended to present concepts in a concrete manner.
[0044] In the description of the embodiments of the present application, unless otherwise specified, the term "a plurality of" means two or more. For example, a plurality of systems means two or more systems, and a plurality of screen terminals means two or more screen terminals. In addition, the terms "first", "second", etc. are used only for the purpose of description, and should not be interpreted as indicating or implying relative importance or implicitly indicating the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more features. The terms "include", "contain", "have" and their variants mean "include but are not limited to", unless otherwise specifically emphasized.
[0045] In the embodiments of the present application, the definitions of entities and entity features are described below.
[0046] Entity: used to represent a subject, for example, person Zhang San can be an entity, person Li Si can also be an entity, the behavior of person Zhang San can also be an entity, the relationship between person Zhang San and person Li Si can also be an entity, and the criminal case of person Zhang San can also be an entity. Entity feature: used to represent the attributes and attribute information of the entity. For example, the entity features of the criminal case entity corresponding to the criminal case implemented by person Zhang San include attributes such as case occurrence place, case occurrence time, case type, criminal means and brief case, and each attribute corresponds to attribute information.
[0047] In the embodiment of the application, each entity is stored in the electronic device in the form of an entity document, and the user data in the application is presented in the form of an entity document. In the application, criminal behavior can include stealing behavior, robbery behavior and fraud behavior, and can be set according to actual conditions, which will not be illustrated one by one here.
[0048] The embodiment of the application provides a method for constructing an entity relationship, which is applied to a data processing server to solve the problem of constructing an entity relationship from complex entity data.
[0049] As shown in FIG. 1, a first flowchart of a method for constructing an entity relationship provided by the embodiment of the application includes steps S101-S105. Figure 1
[0050] S101, obtaining feature data of a plurality of entities and data of a plurality of behavior types from a source database, the plurality of entities including a first entity and a second entity.
[0051] In the embodiment of the application, the source database is used to directly provide original information or specific data about the entity, so that the user does not need to consult other information sources. The source of the data in the source database can be obtained by public collection; at the same time, the user can also add new source data and update the source database. The feature data of the plurality of entities is obtained from the source database, and is used to represent the attribute features of each entity. For example, when the entity is a person, the feature data includes birthplace, name, age, etc. The data of the plurality of behavior types refers to data related to a specific behavior type, and the data of a single behavior type can represent all related information of the behavior in a behavior action. In the embodiment of the application, the data in the source database is entity data.
[0052] S102, constructing a mapping relationship between the plurality of entities and the plurality of behavior types according to the feature data of the plurality of entities and the data of the plurality of behavior types.
[0053] By constructing the mapping relationship between the plurality of entities and the plurality of behavior types, the behavior type corresponding to a single entity is found out.
[0054] In a possible implementation, the mapping relationship between the plurality of entities and the plurality of behavior types includes one or both of the following: one entity corresponds to a plurality of behavior types; and one behavior type corresponds to a plurality of entities.
[0055] Specifically, in the same event, a plurality of entities can be involved in the same behavior, and therefore the mapping relationship between the plurality of entities and the plurality of behavior types includes one or both of the following: one entity corresponds to a plurality of behavior types; and one behavior type corresponds to a plurality of entities. In the embodiments of the present application, each entity has a unique entity identifier ID. For the case where the entity is a person, the entity identifier ID can be an identity card; for the case where the entity is a computer, a vehicle, a mobile phone, or the like, the entity identifier ID can be a device code. For an entity that does not have a mark number, a corresponding entity identifier ID can be re-constructed. In the embodiments of the present application, after the mapping relationship between the plurality of entities and the plurality of behavior types is constructed, the behavior type corresponding to the entity can be found by using the unique entity identifier ID of the entity.
[0056] S103, constructing a direct relationship between the plurality of entities according to the feature data of the plurality of entities and the data of the plurality of behavior types.
[0057] In the embodiments of the present application, the direct relationship between entities refers to a real relationship that best reflects the interaction and mutual influence between two entities.
[0058] For example, as shown in FIG. 1, the entity identifier ID of entity A is 12345, and the entity identifier ID of entity B is 2345. The direct relationship between entity A and entity B is a classmate relationship. Figure 2 In a possible implementation, as shown in FIG. 1, step S103 includes S1031-S1032.
[0059] Figure 3
[0060] S1031, obtaining a plurality of behavior features corresponding to a first entity and a plurality of behavior features corresponding to a second entity, one behavior type corresponding to a plurality of behavior features; wherein the plurality of behavior features corresponding to the first entity include a first behavior feature, and the plurality of behavior features corresponding to the second entity include a second behavior feature.
[0061] S1032, when the first behavior feature and the second behavior feature are the same behavior feature, determining that the first entity and the second entity have a direct relationship.
[0062] In the embodiments of the present application, before the direct relationship between the two entities is acquired, by comparing the behavior characteristics corresponding to the two entities, when there are same behavior characteristics, it can be determined that there is a direct relationship between the two entities. After it is determined that there is a direct relationship between the two entities, it is further determined which specific relationship the direct relationship between the two entities is. For example, in the behavior of entity A going to school, there is a behavior characteristic "school C". In the behavior characteristics of entity B, there is also a behavior characteristic "school C". At this time, it can be determined that entity A and entity B have a direct relationship.
[0063] In a possible implementation, when the first behavior characteristic and the second behavior characteristic are different behavior characteristics, it is determined that the first entity and the second entity do not have a direct relationship.
[0064] Similarly, when there is no same behavior characteristic in the multiple behavior characteristics corresponding to the first entity and the multiple behavior characteristics corresponding to the second entity, it is determined that the two entities do not have a direct relationship.
[0065] In a possible implementation, the first behavior characteristic is any one of the multiple behavior characteristics corresponding to the first entity, and the second behavior characteristic is any one of the multiple behavior characteristics corresponding to the second entity. As shown in Figure 3 It is shown that step S103 further includes steps S1033-S1034.
[0066] S1033, acquiring the number of times of occurrence of the same behavior characteristic.
[0067] Specifically, in the multiple behavior characteristics corresponding to entity A and the multiple behavior characteristics corresponding to entity B, the number of times of occurrence of the same behavior characteristic is acquired. For example, in entity A and entity B, the number of times of occurrence of the same behavior characteristic is 3; in entity A and entity C, the number of times of occurrence of the same behavior characteristic is 4.
[0068] S1034, determining the level of the direct relationship according to the number of times; wherein the higher the number of times is, the higher the level of the direct relationship is.
[0069] Specifically, if the direct relationship between entity A and entity B is "classmate relationship", and the direct relationship between entity A and entity C is also "classmate relationship". The number of times of occurrence of the same behavior characteristic between entity A and entity B is 3; the number of times of occurrence of the same behavior characteristic between entity A and entity C is 4. Therefore, compared with the "classmate relationship" between entity A and entity B, the "classmate relationship" between entity A and entity C has a higher level of direct relationship.
[0070] In a possible implementation, as shown in Figure 4 It is shown that step S103 further includes steps S1035-S1036.
[0071] S1035, using a preset filtering method, filter out the preset feature data corresponding to the first entity and the preset feature data corresponding to the second entity from the feature data.
[0072] For example, a user can perform preliminary filtering on a certain entity type to obtain multiple preset feature data that can characterize the entity's attribute features. The filtering methods can include manual filtering, machine learning filtering, etc., which will not be elaborated on in this embodiment.
[0073] S1036, Add the preset feature data corresponding to the first entity and the preset feature data corresponding to the second entity to the entity relationship.
[0074] In this embodiment, the preset feature data includes multiple preset features, and each preset feature has a corresponding preset feature value. In entity relationships, such as... Figure 5 As shown, the first entity is a computer, and the second entity is a person. The preset characteristic data of the first entity includes entity ID, computer IP address, computer MAC address, the person to whom the computer belongs, the department to which the computer belongs, and the unit to which the computer belongs. The preset characteristic data of the second entity includes entity ID, person's name, person's department, person's unit, and the ID of the computer owned by the entity. Figure 5 It is easy to see that, although the names of the preset features differ between the first and second entities, their corresponding preset feature values are often the same. When constructing entity relationships, it is necessary to filter the feature data based on the direct relationship between the first and second entities to obtain preset feature data, so that the preset feature data can, as far as possible, demonstrate the direct relationship between the first and second entities.
[0075] In one possible implementation, such as Figure 6 As shown, steps S1036a-S1036c.
[0076] S1036a, obtain the first occurrence count of the first behavioral feature among multiple behavioral features corresponding to the first entity.
[0077] S1036b, when the first count is greater than or equal to the preset count threshold, the first behavioral feature is determined to be a preference feature.
[0078] Specifically, for entity A, the same behavioral feature may appear repeatedly in multiple behavioral types. For example, for the behaviors of "eating breakfast" and "eating dinner," the "dining location" is restaurant number one, while for the behavior of "eating lunch," the "dining location" is restaurant number two. For entity A, a preset frequency threshold of 2 is set. Since restaurant number one appears twice, restaurant number one is considered a preference feature of entity A.
[0079] S1036c, add the preference feature to the preset feature data corresponding to the first entity.
[0080] In the preset feature data corresponding to entity A, the preference feature item "preferred dining location" is set. In the embodiments of the present application, the name setting of the newly added preference feature can be determined according to actual conditions, which is not specifically limited in the embodiments of the present application.
[0081] In a possible implementation manner, as shown in Figure 6 S1036d-S1036f.
[0082] S1036d, obtain a first correlation degree of the first behavior feature and the direct relationship.
[0083] S1036e, when the first correlation degree is greater than or equal to a preset correlation degree threshold, determine that the first behavior feature is a correlation feature of the first entity.
[0084] S1036f, add the correlation feature to the preset feature data corresponding to the first entity.
[0085] For example, in the embodiments of the present application, the direct relationship between entity A and entity B is determined as a classmate relationship; at the same time, it is obtained that the first behavior feature of entity A is determined as "length of time of enrollment". The specific length of time of enrollment has an associated influence on the strength of the classmate relationship between entity A and entity B. For another example, the first behavior feature of entity A is determined as "commuting time", and the specific length of time of "commuting time" has no direct associated influence on the strength of the classmate relationship between entity A and entity B. Based on the above situation, the first correlation degree of the first behavior feature "length of time of enrollment" and the "classmate relationship" can be obtained through the word correlation degree calculation. Further, by setting the correlation degree threshold, the correlation feature is added to the preset feature data corresponding to entity A.
[0086] In the embodiments of the present application, the correlation degree threshold can be set to 0-1, and the greater the first correlation degree, the higher the correlation degree of the first behavior feature and the direct relationship. By setting the correlation degree threshold, it is judged whether the first behavior feature and the direct relationship have a correlation, and the setting of the correlation degree threshold is not specifically limited in the embodiments of the present application.
[0087] S104, constructing an entity relationship between the first entity and the second entity, the entity relationship including a direct relationship and a mapping relationship.
[0088] In a possible implementation manner, as shown in Figure 7 S105-S106.
[0089] S105, obtain a space-time overlap value between the first entity and the second entity, the space-time overlap value being obtained from a time overlap interval in which the first entity and the second entity appear at the same place.
[0090] In the embodiment of the application, in the behavior features corresponding to the first entity and the behavior features corresponding to the second entity, a behavior place of the first entity and a behavior place of the second entity are obtained; each behavior place has a time period in which the corresponding entity performs a behavior at the place; the multiple behavior places of the first entity are compared with the multiple behavior places of the second entity; thereby obtaining the time overlap interval in which the first entity and the second entity appear at the same place, and multiple times of the same place are counted to obtain the space-time overlap value between the first entity and the second entity.
[0091] For example, the behavior time of entity A at a first behavior place is 8:00-12:00, the behavior time of entity A at a second behavior place is 13:00-14:00, and the behavior time of entity A at a third behavior place is 18:00-18:30. The behavior time of entity B at the first behavior place is 9:40-11:30, the behavior time of entity B at the second behavior place is 12:00-15:00, and the behavior time of entity B at the third behavior place is 12:00-14:30. It can be obtained that the time overlap interval of entity A and entity B at the first behavior place is 9:40-11:30, the time overlap interval of entity A and entity B at the second behavior place is 13:00-14:00, and the time overlap interval of entity A and entity B at the third behavior place does not exist. The time overlap intervals are counted to obtain a space-time overlap value of 2.83h. It should be noted that if the time overlap interval of the behavior place does not exist, the behavior place cannot be determined as the same behavior place.
[0092] S106, determine the level of the direct relationship according to the space-time overlap value; wherein the higher the space-time overlap value, the higher the level of the direct relationship.
[0093] For example, multiple space-time overlap thresholds are set to determine the level of the direct relationship. When the space-time overlap value is greater than or equal to 2h, the level of the direct relationship is determined as a first level; when the space-time overlap value is greater than or equal to 4h, the level of the direct relationship is determined as a second level 4h; when the space-time overlap value is greater than or equal to 8h, the level of the direct relationship is determined as a third level; the higher the level, the closer the direct relationship.
[0094] The beneficial effects that can be achieved by the embodiment of the application include:
[0095] 1. The mapping relationship between the multiple entities and the multiple behavior types is constructed, and the direct relationship between the multiple entities is constructed, so as to obtain the entity relationship between the first entity and the second entity, and the entity relationship is constructed from complex entity data.
[0096] 2、In the additionally constructed entity relationship, each entity is matched with multiple behaviors, and the association between the entity and the behavior is constructed.
[0097] 3、In the obtained direct relationship of the entity, the level of the direct relationship is obtained through the time-space overlap value, and the strength of the direct relationship is further judged, so that the user can understand the actual degree of the direct relationship between the entities.
[0098] 4、In the construction of the mapping relationship between the multiple entities and the multiple behavior types, the case that multiple entities are involved in the same behavior type is considered. Meanwhile, one entity often has multiple behavior types, so that the obtained mapping relationship is more accurate. Through the above method, the present application can judge whether there is a direct relationship between the entities when constructing the direct relationship between the multiple entities. The entities without a direct relationship can be filtered out, and the efficiency of constructing the direct relationship between the entities is improved.
[0099] 5、The level of the direct relationship is obtained through the number of times of the same behavior characteristics between the multiple entities, and the strength of the direct relationship is further judged, so that the user can understand the actual degree of the direct relationship between the entities.
[0100] 6、The feature data is filtered to obtain the preset feature data corresponding to each entity, so that the entity relationship is more clear. Through the above method, the present application obtains the preference characteristics according to the behavior characteristics of the entity, enriches the preset feature data of the entity, and makes the preset feature data more clearly represent the characteristics of the entity.
[0101] 7、The association characteristics are obtained according to the correlation degree of the behavior characteristics of the entity and the direct relationship, the preset feature data of the entity is enriched, and the preset feature data can more clearly represent the characteristics of the entity.
[0102] As shown in Figure 8 , the present application provides a device for constructing an entity relationship. The data processing server includes a data acquisition unit 11, a mapping construction unit 12, a direct relationship construction unit 13, and an entity relationship construction unit 14.
[0103] The data acquisition unit 11 is used to acquire the feature data of multiple entities and the data of multiple behavior types from a source database, and the multiple entities include a first entity and a second entity.
[0104] The mapping construction unit 12 is used to construct the mapping relationship between the multiple entities and the multiple behavior types according to the feature data of the multiple entities and the data of the multiple behavior types.
[0105] The direct relationship construction unit 13 is configured to construct a direct relationship between the plurality of entities according to the characteristic data of the plurality of entities and the data of the plurality of behavior types.
[0106] The entity relationship construction unit 14 is configured to construct an entity relationship between the first entity and the second entity, the entity relationship including the direct relationship and the mapping relationship.
[0107] In a possible implementation, the data processing server further includes a relationship level judgment unit; the relationship level judgment unit is configured to obtain a time-space overlap value between the first entity and the second entity, the time-space overlap value being obtained from a time overlap interval in which the first entity and the second entity appear at the same place; determine a level of the direct relationship according to the time-space overlap value; and the higher the time-space overlap value, the higher the level of the direct relationship.
[0108] In a possible implementation, the direct relationship construction unit 13 includes a behavior characteristic acquisition subunit and a direct relationship confirmation subunit; the behavior characteristic acquisition subunit is configured to obtain a plurality of behavior characteristics corresponding to the first entity and a plurality of behavior characteristics corresponding to the second entity, one behavior type corresponding to a plurality of behavior characteristics; wherein the plurality of behavior characteristics corresponding to the first entity include a first behavior characteristic, and the plurality of behavior characteristics corresponding to the second entity include a second behavior characteristic; and the direct relationship confirmation subunit is configured to determine that the first entity and the second entity have the direct relationship when the first behavior characteristic and the second behavior characteristic are the same behavior characteristic.
[0109] In a possible implementation, the first behavior characteristic is any one of the plurality of behavior characteristics corresponding to the first entity, and the second behavior characteristic is any one of the plurality of behavior characteristics corresponding to the second entity; the direct relationship construction unit 13 further includes a relationship level judgment subunit; the relationship level judgment subunit is configured to obtain a number of times of occurrence of the same behavior characteristic; determine a level of the direct relationship according to the number of times; and the higher the number of times, the higher the level of the direct relationship.
[0110] In a possible implementation, the data processing server further includes an entity relationship adding unit; the entity relationship adding unit is configured to filter out preset characteristic data corresponding to the first entity and preset characteristic data corresponding to the second entity from the characteristic data through a preset filtering manner; and add the preset characteristic data corresponding to the first entity and the preset characteristic data corresponding to the second entity to the entity relationship.
[0111] In a possible implementation, the entity relationship adding unit comprises a first adding subunit; the first adding subunit is configured to acquire a first number of times that the first behavior feature appears in the plurality of behavior features corresponding to the first entity; when the first number of times is greater than or equal to a preset number threshold, the first behavior feature is determined as a preference feature; and the preference feature is added to the preset feature data corresponding to the first entity.
[0112] In a possible implementation, the entity relationship adding unit comprises a second adding subunit; the second adding subunit is configured to acquire a first correlation degree between the first behavior feature and the direct relationship; when the first correlation degree is greater than or equal to a preset correlation degree threshold, the first behavior feature is determined as a correlation feature of the first entity; and the correlation feature is added to the preset feature data corresponding to the first entity.
[0113] It should be noted that, when the apparatuses provided in the above embodiments implement their functions, only the division of the above functional modules is exemplified, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be described here.
[0114] Please refer to Figure 9 The embodiment of the present application provides a structural schematic diagram of an electronic device. As shown in the figure Figure 9 The electronic device 900 can include at least one processor 901, at least one network interface 904, a user interface 903, a memory 905, and at least one communication bus 902.
[0115] The communication bus 902 is used to realize the connection and communication between the components.
[0116] The user interface 903 can include a display screen (Display) and a camera (Camera), and the optional user interface 903 can also include a standard wired interface and a wireless interface.
[0117] The network interface 904 can optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
[0118] The processor 901 can include one or more processing cores. The processor 901 connects various parts within the server through various interfaces and lines, performs various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 905, and calling data stored in the memory 905. Alternatively, the processor 901 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 901 can integrate a combination of one or more of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes operating systems, user interfaces, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; and the modem is used for processing wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 901, but can be realized by a separate chip.
[0119] The memory 905 can include a random access memory (RAM) and a read-only memory (ROM). Optionally, the memory 905 includes a non-transitory computer-readable storage medium. The memory 905 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 905 can include a program storage area and a data storage area, wherein the program storage area can store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area can store data involved in the above-mentioned various method embodiments, etc. The memory 905 can also be at least one storage device located away from the aforementioned processor 901. As shown, the memory 905 as a computer storage medium can include an operating system, a network communication module, a user interface module, and an application program related to topology identification of building entity relationships. Figure 9 As shown, the memory 905 as a computer storage medium can include an operating system, a network communication module, a user interface module, and an application program related to topology identification of building entity relationships.
[0120] In Figure 9In the electronic device 900 shown, the user interface 903 is mainly used to provide an interface for the user to input, and obtain data input by the user; and the processor 901 can be used to call the method application stored in the memory 905 for constructing an entity relationship, which, when executed by one or more processors, causes the electronic device 900 to perform the method described in one or more of the above embodiments.
[0121] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all described as a combination of a series of actions, but those skilled in the art should know that the present application is not limited to the order of the actions described, because according to the present application, certain steps can be performed in other order or at the same time. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0122] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0123] In several embodiments provided by the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic. The division of the units is only a logical function division. There can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different parts can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical or other forms.
[0124] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0125] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware, or in the form of software functional unit.
[0126] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable memory. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a memory and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned memory includes: a U disk, a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0127] The above-described are only exemplary embodiments of the present disclosure, and cannot limit the scope of the present disclosure. That is, any equivalent changes and modifications made in accordance with the teachings of the present disclosure are still within the scope of the present disclosure. Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon considering the specification and practicing the disclosure. The present application is intended to cover any variations, uses or adaptive changes of the present disclosure that follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not described in the present disclosure.
Claims
1. A method of constructing an entity relationship, characterized by, Applied to a data processing server, the method comprises: obtaining feature data of a plurality of entities and data of a plurality of behavior types from a source database, the plurality of entities including a first entity and a second entity, wherein the entities include people, computers, criminal cases, and the behavior types include taking a train, going to school, starting a computer, securely logging in, and installing software; constructing a mapping relationship between the plurality of entities and the plurality of behavior types according to the feature data of the plurality of entities and the data of the plurality of behavior types; constructing a direct relationship between the plurality of entities according to the feature data of the plurality of entities and the data of the plurality of behavior types, comprising: obtaining a plurality of behavior characteristics corresponding to the first entity, and obtaining a plurality of behavior characteristics corresponding to the second entity, one behavior type corresponding to a plurality of behavior characteristics; wherein the plurality of behavior characteristics corresponding to the first entity include a first behavior characteristic, and the plurality of behavior characteristics corresponding to the second entity include a second behavior characteristic; when the first behavior characteristic and the second behavior characteristic are the same behavior characteristic, it is determined that the first entity and the second entity have the direct relationship; constructing an entity relationship between the first entity and the second entity, the entity relationship including the direct relationship and the mapping relationship; the method further comprises: obtaining a spatio-temporal overlap value between the first entity and the second entity, the spatio-temporal overlap value being obtained from a time overlap interval in which the first entity and the second entity appear at the same place; determining the level of the direct relationship according to the spatio-temporal overlap value; wherein the higher the spatio-temporal overlap value, the higher the level of the direct relationship; the method further comprises: filtering out preset feature data corresponding to the first entity and preset feature data corresponding to the second entity from the feature data through a preset filtering method; adding the preset feature data corresponding to the first entity and the preset feature data corresponding to the second entity to the entity relationship; the method further comprises: obtaining a first number of times the first behavior characteristic appears in the plurality of behavior characteristics corresponding to the first entity; when the first number of times is greater than or equal to a preset number threshold, determining that the first behavior characteristic is a preference characteristic; adding the preference characteristic to the preset feature data corresponding to the first entity.
2. The method of claim 1, wherein, the mapping relationship includes one or both of: one entity corresponds to a plurality of behavior types; one behavior type corresponds to a plurality of entities.
3. The method of claim 1, wherein, the first behavior characteristic is any one of the plurality of behavior characteristics corresponding to the first entity, and the second behavior characteristic is any one of the plurality of behavior characteristics corresponding to the second entity; the method further comprises: obtaining the number of times the same behavior characteristic appears; determining the level of the direct relationship according to the number of times; wherein the higher the number of times, the higher the level of the direct relationship.
4. The method of claim 1, wherein, the method further comprises: obtaining a first correlation degree between the first behavior characteristic and the direct relationship; determining that the first behavior feature is a correlation feature of the first entity when the first correlation degree is greater than or equal to a preset correlation degree threshold; adding the correlation feature into preset feature data corresponding to the first entity.
5. An apparatus for constructing an entity relationship, characterized by The device is a data processing server, which comprises a data acquisition unit (11), a mapping construction unit (12), a direct relationship construction unit (13), and an entity relationship construction unit (14); The data acquisition unit (11) is configured to acquire feature data of a plurality of entities and data of a plurality of behavior types from a source database, wherein the plurality of entities comprise a first entity and a second entity, and the entities comprise a person, a computer, and a criminal case, and the behavior types comprise taking a train, going to school, starting a computer, safely logging in, and installing software. The mapping construction unit (12) is configured to construct a mapping relationship between the plurality of entities and the plurality of behavior types according to the feature data of the plurality of entities and the data of the plurality of behavior types. The direct relationship construction unit (13) is configured to construct a direct relationship between the plurality of entities according to the feature data of the plurality of entities and the data of the plurality of behavior types. The direct relationship construction unit (13) comprises a behavior feature acquisition subunit and a direct relationship confirmation subunit. The behavior feature acquisition subunit is configured to acquire a plurality of behavior features corresponding to the first entity and a plurality of behavior features corresponding to the second entity, wherein one behavior type corresponds to a plurality of behavior features. The first entity corresponds to a first behavior feature, and the second entity corresponds to a second behavior feature. The direct relationship confirmation subunit is configured to determine that the first entity and the second entity have the direct relationship when the first behavior feature and the second behavior feature are the same behavior feature. The entity relationship construction unit (14) is configured to construct an entity relationship between the first entity and the second entity, wherein the entity relationship comprises the direct relationship and the mapping relationship. The data processing server further comprises a relationship level judgment unit. The relationship level judgment unit is configured to acquire a space-time overlap value between the first entity and the second entity, wherein the space-time overlap value is obtained from a time overlap interval in which the first entity and the second entity appear at the same location. The relationship level judgment unit is configured to determine a level of the direct relationship according to the space-time overlap value, wherein the higher the space-time overlap value is, the higher the level of the direct relationship is. The data processing server further comprises an entity relationship adding unit. The entity relationship adding unit is configured to filter out preset feature data corresponding to the first entity and preset feature data corresponding to the second entity from the feature data through a preset filtering mode, and add the preset feature data corresponding to the first entity and the preset feature data corresponding to the second entity into the entity relationship. The entity relationship adding unit comprises a first adding sub-unit; the first adding sub-unit is configured to acquire a first number of times that the first behavior feature appears in a plurality of behavior features corresponding to the first entity; when the first number of times is greater than or equal to a preset number threshold, determine that the first behavior feature is a preference feature; and add the preference feature to preset feature data corresponding to the first entity.
6. An electronic device, comprising: The electronic device (900) comprises a processor (901), a user interface (903), a network interface (904) and a memory (905). The memory (905) is configured to store instructions. The user interface (903) and the network interface (904) are configured to communicate with other devices. The processor (901) is configured to execute the instructions stored in the memory (905) to enable the electronic device (900) to perform the method according to any one of claims 1-4.
Citation Information
Patent Citations
Data processing method and device, electronic equipment and storage medium
CN114297317A
Accompanying data analysis method and device, computer equipment and storage medium
CN114398454A
Flood type Natch disaster event knowledge graph construction method based on text mining
CN114860960A