Relationship acquisition method and device

By analyzing location access sequences and dividing them into subsequences based on access time, the method improves the accuracy and recall rate of social relationship mining in mobile social networks.

CN113641917BActive Publication Date: 2024-12-10HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010393432.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-11
Publication Date
2024-12-10
Estimated Expiration
2040-05-11

AI Technical Summary

Technical Problem

Current mobile social relationship acquisition methods based on spatiotemporal co-occurrence are inaccurate due to limited spatiotemporal co-occurrence in real mobile social relationships, leading to low accuracy and recall rates.

Method used

A method and device that analyze location access sequences by dividing them into subsequences based on access time to identify relationships between objects, using temporal information to enhance social relationship mining accuracy.

Benefits of technology

Enhances the accuracy and recall rate of social relationship mining by leveraging temporal information in location access sequences, improving the extraction of effective social relationships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113641917B_ABST
    Figure CN113641917B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a relationship acquisition method and device, the method comprising: determining a location access sequence corresponding to each location among a plurality of locations, each location access sequence including a plurality of elements, each element including an identifier of an object and an access time of the object accessing the location corresponding to the location access sequence; dividing each location access sequence according to the access time included in each location access sequence, respectively, to obtain a plurality of location access subsequences corresponding to each location access sequence; and obtaining the relationship between the objects according to each of the location access subsequences. The scheme of the embodiment of the present invention makes full use of the time sequence information in the location access sequence, mines the real mobile social relationship from the time sequence, can extract more and more effective social relationships, and solves the problem of low accuracy and recall rate of mining the existence of social relationships based on the traditional method of spatiotemporal co-occurrence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of data mining technology, and in particular to a relationship acquisition method and device. Background Art

[0002] With the rapid development of smart devices and location-based mobile social networks, a large amount of behavioral information containing location is recorded, such as social network check-in data, mobile base station data, checkpoint passing data, and so on.

[0003] Based on the above data containing location information, people's interactive behaviors in the real world can be discovered, and people's real mobile social relationships can be mined from them. The discovery of such mobile social relationships is of great significance to research in the fields of social science, smart cities, product marketing, privacy protection, and anomaly detection. The current mobile social relationship acquisition scheme is mainly obtained by obtaining the spatiotemporal co-occurrence of people's behaviors. Spatiotemporal co-occurrence refers to two people appearing in the same location within a short period of time. That is, the current way of extracting social relationships is based on the principle that behavioral interactions will occur in real physical space only if two people have a social relationship. When there are more spatiotemporal co-occurrences of the behaviors of two people, for example, two people often appear in the same location within a certain period of time, it indicates that the possibility of a social relationship between the two people is greater.

[0004] However, since real mobile social relationships may not have much spatiotemporal co-occurrence in behavior, the relationships mined by the above method may not be accurate. Summary of the invention

[0005] The embodiments of the present invention provide a relationship acquisition method and device to solve the problem of low accuracy and recall rate of the relationship acquisition method and realize more and more effective social relationship mining.

[0006] In a first aspect, an embodiment of the present invention provides a relationship acquisition method, including:

[0007] Determine a location access sequence corresponding to each location in the plurality of locations, each location access sequence comprising a plurality of elements, each element comprising an identifier of an object and an access time of the object accessing the location corresponding to the location access sequence;

[0008] According to the access time included in each location access sequence, each location access sequence is divided to obtain a plurality of location access subsequences corresponding to each location access sequence;

[0009] The subsequences are accessed according to the positions to obtain the relationship between the objects.

[0010] In a possible implementation, each location access sequence is divided according to the access time included in each location access sequence to obtain multiple location access subsequences corresponding to each location access sequence, including:

[0011] sorting a plurality of elements included in each location access sequence according to access times included in each location access sequence;

[0012] Each position access sequence is divided according to a plurality of sorted elements in each position access sequence to obtain a plurality of position access subsequences corresponding to each position access sequence.

[0013] In a possible implementation, each position access sequence is divided according to a plurality of sorted elements in each position access sequence to obtain a plurality of position access subsequences corresponding to each position access sequence, including:

[0014] The sorted multiple elements in each position access sequence are divided according to a preset time interval to obtain multiple position access subsequences corresponding to each position access sequence, wherein the difference in access time between any two elements in each position access subsequence is less than or equal to the preset time interval.

[0015] In a possible implementation, each position access sequence is divided according to a plurality of sorted elements in each position access sequence to obtain a plurality of position access subsequences corresponding to each position access sequence, including:

[0016] According to the identification of the object in each position access sequence, the sorted multiple elements in each position access sequence are divided to obtain multiple position access subsequences corresponding to each position access sequence, wherein there are two related elements in each position access subsequence, and the identification of the objects in the two related elements is the same.

[0017] In a possible implementation, the sorted multiple elements in each position access sequence are divided according to the identifier of the object of each position access sequence to obtain multiple position access subsequences corresponding to each position access sequence, including:

[0018] Execute a first operation, the first operation comprising: determine whether there is an element in the first i elements of the nth co-sequence whose object identifier is the same as the object identifier in the i+1th element, if so, obtain a position access subsequence and an n+1th co-sequence according to the nth co-sequence, the position access subsequence includes the first i+1 elements in the nth co-sequence, the n+1th co-sequence includes the last ki elements in the nth co-sequence, and update k to ki, wherein k is the number of elements included in the nth co-sequence, k>=i; if not, update i to i+1; initially, n is 0, i is 1, the co-sequence is a subset of the position access sequence, and the 0th co-sequence is the position access sequence;

[0019] Update n to n+1, update i to 1, and repeat the first operation until there are no two related elements in the nth co-sequence, and use the nth co-sequence as a position access subsequence.

[0020] In a possible implementation, accessing the subsequences according to the positions to obtain the relationship between the objects includes:

[0021] According to each of the position access subsequences, the relationship strength between any two objects is obtained, wherein the relationship strength between the two objects is used to indicate the frequency of the identifiers of the two objects in the same position access subsequence;

[0022] According to the strength of the relationship between any two objects, the corresponding relationship between any two objects is obtained.

[0023] In a possible implementation, accessing the subsequences according to the positions to obtain the relationship between the objects includes:

[0024] According to each of the position access subsequences, a global weight factor and a private weight factor of any two objects are obtained, wherein the global weight factor is used to indicate the influence weight of the target position, and the private weight factor is used to indicate the influence weight of the target position on the relationship between the any two objects, wherein the target position is a position visited by the any two objects;

[0025] According to the global weight factors of any two objects, or according to the private weight factors of any two objects, or according to the comprehensive weight factors of any two objects, the relationship between the corresponding any two objects is obtained, wherein the comprehensive weight factor is obtained by fusing the global weight factor and the private weight factor.

[0026] In a possible implementation, determining a location access sequence corresponding to each location in a plurality of locations includes:

[0027] Determine a plurality of locations and obtain event data for each location, wherein for any location j, the event data for the location j includes an identifier of each object accessing the location j and an access time of each object accessing the location j;

[0028] According to the event data of each position, a plurality of elements corresponding to each position are obtained, each element including an object and the access time of the object accessing the position;

[0029] According to the multiple elements corresponding to each position, a position access sequence corresponding to each position is obtained.

[0030] In a possible implementation, multiple elements corresponding to each position are obtained according to the event data of each position, including:

[0031] The event data of each position is filtered according to a preset object identifier set to obtain multiple elements corresponding to each position, wherein the preset object identifier set includes one or more identifiers, and the sequence composed of the multiple elements corresponding to each position includes at least one element whose identifier belongs to the preset object identifier set.

[0032] In a second aspect, an embodiment of the present invention provides a relationship acquisition device, including:

[0033] A processing module, configured to determine a location access sequence corresponding to each location in a plurality of locations, wherein each location access sequence includes a plurality of elements, each element includes an identifier of an object and an access time of the object accessing the location corresponding to the location access sequence;

[0034] A division module, used for dividing each location access sequence according to the access time included in each location access sequence, to obtain a plurality of location access subsequences corresponding to each location access sequence;

[0035] The acquisition module is used to access the subsequence according to each of the positions to obtain the relationship between the objects.

[0036] In a possible implementation, the partitioning module is specifically used to:

[0037] sorting a plurality of elements included in each location access sequence according to access times included in each location access sequence;

[0038] Each position access sequence is divided according to a plurality of sorted elements in each position access sequence to obtain a plurality of position access subsequences corresponding to each position access sequence.

[0039] In a possible implementation, the partitioning module is specifically used to:

[0040] The sorted multiple elements in each position access sequence are divided according to a preset time interval to obtain multiple position access subsequences corresponding to each position access sequence, wherein the difference in access time between any two elements in each position access subsequence is less than or equal to the preset time interval.

[0041] In a possible implementation, the partitioning module is specifically used to:

[0042] According to the identification of the object in each position access sequence, the sorted multiple elements in each position access sequence are divided to obtain multiple position access subsequences corresponding to each position access sequence, wherein there are two related elements in each position access subsequence, and the identification of the objects in the two related elements is the same.

[0043] In a possible implementation, the partitioning module is specifically used to:

[0044] Execute a first operation, the first operation comprising: determine whether there is an element in the first i elements of the nth co-sequence whose object identifier is the same as the object identifier in the i+1th element, if so, obtain a position access subsequence and an n+1th co-sequence according to the nth co-sequence, the position access subsequence includes the first i+1 elements in the nth co-sequence, the n+1th co-sequence includes the last ki elements in the nth co-sequence, and update k to ki, wherein k is the number of elements included in the nth co-sequence, k>=i; if not, update i to i+1; initially, n is 0, i is 1, the co-sequence is a subset of the position access sequence, and the 0th co-sequence is the position access sequence;

[0045] Update n to n+1, update i to 1, and repeat the first operation until there are no two related elements in the nth co-sequence, and use the nth co-sequence as a position access subsequence.

[0046] In a possible implementation, the acquisition module is specifically used to:

[0047] According to each of the position access subsequences, the relationship strength between any two objects is obtained, wherein the relationship strength between the two objects is used to indicate the frequency of the identifiers of the two objects in the same position access subsequence;

[0048] According to the strength of the relationship between any two objects, the corresponding relationship between any two objects is obtained.

[0049] In a possible implementation, the acquisition module is specifically used to:

[0050] According to each of the position access subsequences, a global weight factor and a private weight factor of any two objects are obtained, wherein the global weight factor is used to indicate the influence weight of the target position, and the private weight factor is used to indicate the influence weight of the target position on the relationship between the any two objects, wherein the target position is a position visited by the any two objects;

[0051] According to the global weight factors of any two objects, or according to the private weight factors of any two objects, or according to the comprehensive weight factors of any two objects, the relationship between the corresponding any two objects is obtained, wherein the comprehensive weight factor is obtained by fusing the global weight factor and the private weight factor.

[0052] In a possible implementation manner, the processing module is specifically configured to:

[0053] Determine a plurality of locations and obtain event data for each location, wherein for any location j, the event data for the location j includes an identifier of each object accessing the location j and an access time of each object accessing the location j;

[0054] According to the event data of each position, a plurality of elements corresponding to each position are obtained, each element including an object and the access time of the object accessing the position;

[0055] According to the multiple elements corresponding to each position, a position access sequence corresponding to each position is obtained.

[0056] In a possible implementation manner, the processing module is specifically configured to:

[0057] The event data of each position is filtered according to a preset object identifier set to obtain multiple elements corresponding to each position, wherein the preset object identifier set includes one or more identifiers, and the sequence composed of the multiple elements corresponding to each position includes at least one element whose identifier belongs to the preset object identifier set.

[0058] In a third aspect, an embodiment of the present invention provides a relationship acquisition device, including: at least one processor and a memory;

[0059] The memory stores computer-executable instructions;

[0060] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the relationship acquisition method as described in any one of the first aspects.

[0061] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the relationship acquisition method as described in any one of the first aspects is implemented.

[0062] The relationship acquisition method and device provided by the embodiment of the present invention first determine the location access sequence corresponding to each location in multiple locations to obtain the event data of each object. Each location access sequence includes multiple elements, each element includes an object identifier and the access time of the object accessing the location corresponding to the corresponding location access sequence. According to the location access sequence, it is possible to know which locations each object accessed at what time. After obtaining multiple location access sequences, each location access sequence is divided according to the access time included in each location access sequence to obtain multiple location access subsequences corresponding to each location access sequence. Each location access sequence is divided by the access time to extract the temporal relationship in the location access sequence. Finally, the relationship between each object is obtained according to each location access subsequence. The solution of the embodiment of the present invention makes full use of the temporal information in the location access sequence, mines the real mobile social relationship from the temporal sequence, and can extract more effective social relationships, which solves the problem that the mined social relationships are inaccurate and the recall rate of real social relationships is low due to less spatiotemporal co-occurrence in behavior. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0064] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present invention;

[0065] Figure 2 A schematic diagram of a flow chart of a relationship acquisition method provided by an embodiment of the present invention;

[0066] Figure 3 A schematic diagram of a flow chart of a relationship acquisition method provided by another embodiment of the present invention;

[0067] Figure 4 A schematic diagram of event data acquisition provided by an embodiment of the present invention;

[0068] Figure 5 A schematic diagram of a process for generating a location access sequence according to an embodiment of the present invention;

[0069] Figure 6 A schematic diagram of generating a location access sequence provided by an embodiment of the present invention;

[0070] Figure 7 A schematic diagram of a location access sequence division process provided by an embodiment of the present invention;

[0071] Figure 8 A schematic diagram of the structure of a relationship acquisition device provided by an embodiment of the present invention;

[0072] Fig. 9 A schematic diagram of the hardware structure of a relationship acquisition device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0073] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0074] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present invention, such as Figure 1 As shown, cameras are set up in various areas of the city to monitor people coming and going in various public areas. There is a person A who is related to a case, so it is necessary to mine the social relationship of person A. Figure 1 In the example scenario, the social relationship of character A may be mined through places that character A has visited and places that other characters have visited.

[0075] exist Figure 1 In the example, three locations visited by person A are shown, namely location A, location B and location C. Monitoring devices are set at the above three locations, wherein monitoring device 11 is used to monitor location A, monitoring device 12 is used to monitor location B, and monitoring device 13 is used to monitor location C.

[0076] At this time, the monitoring data of the monitoring device can be retrieved to obtain the event data. For example, the monitoring data of the monitoring device 11 is retrieved and sent to the server 10. The server 10 can obtain the event data of the location A according to the monitoring data of the monitoring device 11, including which characters visited the location A and the time when these characters visited the location A. Correspondingly, the monitoring data of the monitoring device 12 and the monitoring device 13 are retrieved and sent to the server 10. The server 10 can obtain the event data of the location B according to the monitoring data of the monitoring device 12, including which characters visited the location B and the time when these characters visited the location B. The event data of the location C can be obtained according to the monitoring data of the monitoring device 13, including which characters visited the location C and the time when these characters visited the location C.

[0077] Then, by obtaining the event data of each location, the relationship between character A and other characters can be explored, thereby determining which characters have a relationship with character A.

[0078] exist Figure 1 In the example, event data is obtained through monitoring data of monitoring equipment. Figure 1 The acquisition method is only an example, and does not limit the event data to be acquired through monitoring equipment. In fact, it also includes many other acquisition methods. For example, if the user's current location is uploaded through a mobile terminal with a positioning function, an event data can be obtained based on the user's location uploaded by the mobile terminal and the time of uploading. For example, a user posts a status on a social software through a terminal device, and the posted status carries positioning information. Then, an event data can be constructed based on the positioning information carried in the status posted by the user and the time of posting the status, and so on.

[0079] The following specific embodiments are used to describe in detail the technical solutions of the present invention and how the technical solutions of the present application solve the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.

[0080] Figure 2 A flow chart of a method for acquiring a relationship provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the method may include:

[0081] S21, determining a location access sequence corresponding to each location among a plurality of locations, each location access sequence comprising a plurality of elements, each element comprising an identifier of an object and an access time of the object accessing a location corresponding to the location access sequence.

[0082] The location access sequence records the event data of each location, where each location has a corresponding location access sequence. In each location access sequence, there are multiple elements, each of which records an event data, that is, an object accesses the corresponding location and the access time of the corresponding location. An element can be constructed based on an event data, each element includes an object identifier and the access time of the location corresponding to the location access sequence of the object. The object is the target of the access behavior, and the object can be, for example, a person, a vehicle, etc.

[0083] For example, there are three position access sequences corresponding to three existing positions, which are position A, position B and position C. Each element in the position access sequence corresponding to position A includes an identifier of an object and the access time when the object accesses position A. Each element in the position access sequence corresponding to position B includes an identifier of an object and the access time when the object accesses position B. Each element in the position access sequence corresponding to position C includes an identifier of an object and the access time when the object accesses position C.

[0084] In the same position access sequence, the object identifiers in each element may be the same or different. When the object identifiers in multiple elements are the same, it means that the same object accessed the corresponding position at different times. In the same position access sequence, the access time in each element may be the same or different. When the access time in multiple elements is the same, it means that different objects accessed the corresponding position at the same time.

[0085] S22, dividing each location access sequence according to the access time included in each location access sequence, to obtain a plurality of location access subsequences corresponding to each location access sequence.

[0086] After obtaining multiple location access sequences corresponding to multiple locations, the location access sequences need to be divided. In the embodiment of the present invention, the location access sequences are divided according to the access times included in the location access sequences.

[0087] It is understandable that, under other similar circumstances, the probability that two objects that visited the same location in a relatively close time period have a social relationship is greater than the probability that two objects that visited the same location in a relatively long time period have a social relationship. Therefore, dividing the location visit sequence by access time can extract more effective social relationships.

[0088] When dividing each position access sequence, first obtain the access times corresponding to multiple elements in the position access sequence, and then try to divide the access times that are closely spaced into the same position access subsequence to obtain multiple position access subsequences corresponding to each position access sequence, so that the access times of multiple elements in each position access subsequence can be closely spaced.

[0089] S23, accessing subsequences according to the positions to obtain the relationship between the objects.

[0090] After dividing a plurality of location access sequences to obtain a plurality of location access subsequences corresponding to the plurality of location access sequences, the relationship between the objects is mined according to each location access subsequence.

[0091] If the identifiers of two objects appear in multiple location access subsequences, it means that the two objects have visited the same location multiple times in a similar time interval, and the probability that the two objects have a social relationship is high. On the contrary, if the identifiers of two objects rarely appear in the location access subsequence, it means that the two objects have almost never visited the same location in a similar time interval, and the probability that the two objects have a social relationship is low. Therefore, according to each location access subsequence, the relationship between each object can be determined, and objects with social relationships can be obtained.

[0092] The relationship acquisition method provided by the embodiment of the present invention first determines multiple location access sequences corresponding to multiple locations to obtain event data of each object. Each location access sequence includes multiple elements, each element includes an object identifier and the access time of the object accessing the location corresponding to the corresponding location access sequence. According to the location access sequence, it is possible to know which locations each object accessed at what time. After obtaining multiple location access sequences, each location access sequence is divided according to the access time included in each location access sequence to obtain multiple location access subsequences corresponding to each location access sequence. Each location access sequence is divided by the access time to extract the temporal relationship in the location access sequence. Finally, the relationship between each object is obtained according to each location access subsequence. The solution of the embodiment of the present invention makes full use of the temporal information in the location access sequence, mines the real mobile social relationship from the temporal sequence, and can extract more effective social relationships, which solves the problem that the mined social relationships are inaccurate and the recall rate of real social relationships is low due to less spatiotemporal co-occurrence in behavior.

[0093] Combine the following Figure 3 , and uses specific embodiments to explain the scheme of the embodiments of the present invention in detail.

[0094] Figure 3A flowchart of a method for acquiring a relationship according to another embodiment of the present invention is shown in FIG. Figure 3 As shown, including:

[0095] S31, determine multiple locations and obtain event data of each location. For any location j, the event data of location j includes the identifier of each object accessing the location j and the access time of each object accessing the location j.

[0096] This step is to record event data. First, multiple locations need to be determined, and then the event data of each location is obtained. For example, an object (such as a person, a car, etc.) p visits a location j at time t, which is an access event. The access event is an event data, which includes the object's identifier p and the access time t of the object's access to the location j.

[0097] Figure 4 A schematic diagram of event data acquisition provided by an embodiment of the present invention, such as Figure 4 As shown, there are four locations, namely, a shopping mall 41, a hospital 42, a park 43, and a school 44. One way to obtain event data of the above four locations is to include monitoring devices in the above four locations, and through the monitoring video of the monitoring devices, it is possible to know which objects have visited the above four locations and the access time of each object to the above four locations.

[0098] According to the surveillance video of the monitoring device, it is known that the objects visiting the shopping mall 41 include object A, object B, object C, object D, object E, and object F; the objects visiting the hospital 42 include object A, object B, object E, object G, object H, and object I; the objects visiting the park 43 include object B, object C, object D, object G, object H, object J, and object K; the objects visiting the school 44 include object A, object C, object D, object F, object K, object L, and object M, and the time each object visits each location is as shown in FIG. Figure 4 Schematic. The visit of object A, object B, object C, object D, object E and object F to shopping mall 41 and the visit time of visiting shopping mall 41 constitute the event data of shopping mall 41, the visit of object A, object B, object E, object G, object H and object I to hospital 42 and the visit time of visiting hospital 42 constitute the event data of hospital 42, the visit of object B, object C, object D, object G, object H, object J and object K to park 43 and the visit time of visiting park 43 constitute the event data of park 43, and the visit of object A, object C, object D, object F, object K, object L and object M to school 44 and the visit time of visiting school 44 constitute the event data of school 44. Figure 4 The access time of each object accessing each location is illustrated in the example, and the event data corresponding to each location is obtained according to the access time of each object accessing each location.

[0099] S32, obtaining multiple elements corresponding to each position according to the event data of each position, each element including an object and the access time of the object accessing the position.

[0100] After obtaining the event data of each position, multiple elements corresponding to each position are obtained according to the event data of each position. Figure 4 Taking the event data of the mall 41 in as an example, the objects accessing the mall 41 include object A, object B, object C, object D, object E, and object F. According to the access time of each object to the mall 41, the following elements can be obtained:

[0101] (A, 9:20:21), (A, 13:10:33), (B, 9:25:36), (C, 11:50:08), (D, 10:33:58), (E, 12:28:44), (E, 13:15:18), (F, 13:20:31).

[0102] S33, obtaining a position access sequence corresponding to each position according to multiple elements corresponding to each position.

[0103] After obtaining multiple elements corresponding to each position, the event data of each position is filtered according to a preset object identifier set to obtain multiple elements corresponding to each position, wherein the preset object identifier set includes one or more identifiers, and the sequence composed of multiple elements corresponding to each position contains at least one element whose identifier belongs to the preset object identifier set.

[0104] According to the preset object identification set, the location access sequences containing the target group are filtered and selected to generate the corresponding location access sequence subset. This step can filter out the behavior sequence information that is not related to the object in advance, reducing the computational complexity of the subsequent algorithm. For example, if you only focus on the temporal relationship of the bad guys, you only need to filter out the location access sequences containing the bad guys. For example, if you only want to collect the temporal relationship of males, you only need to filter out the location access sequences containing males. For example, if you are only interested in the temporal relationship between object p and object q, where p and q are the object identifications of the two objects, then the preset object identification set can include p and q. By filtering the location access sequence through the preset object identification set, the location access sequence containing objects p and q in the location access sequence can be retained.

[0105] The specific identifiers included in the preset object identifier set need to be determined according to the temporal relationship actually extracted. In addition, this step is an optional step module. If the object group is actually all objects, there is no need to perform a filtering operation.

[0106] Figure 5A schematic diagram of a flow chart of generating a location access sequence according to an embodiment of the present invention is shown in FIG. Figure 5 As shown, including:

[0107] S51, input event data.

[0108] Each event data includes the identity of the object that accessed a location and the access time at which the object accessed the location. Figure 6 A schematic diagram of generating a location access sequence provided by an embodiment of the present invention is shown in FIG. Figure 6 As shown, multiple event data are included to form an event data set 60. In the event data set 60, multiple event data are included, namely Figure 4 The event data corresponding to the four positions in .

[0109] S52, event data normalization processing (ID, place, time).

[0110] The normalization of event data is to determine the ID of the object in each event data, the location where the object is accessed, and the time when the location is accessed. Figure 6 In , 41 represents the location of shopping mall 41, 42 represents the location of hospital 42, 43 represents the location of park 43, and 44 represents the location of school 44, and the event data after normalization is obtained. For example, Figure 6 Any normalized event data 44C, 14:53:23, indicates that object C visited the location of school 44 at 14:53:23.

[0111] S53, aggregate the corresponding sequences with place as the key value and sort them according to the access time.

[0112] This step is to distinguish the event data after normalization by location, and obtain the event data corresponding to each location. Figure 6 As shown in Figure 6 A total of 4 locations are involved, and the event data in the event data set 60 are distinguished by the location ID to obtain set 61, set 62, set 63 and set 64, among which set 61 contains the event data of shopping mall 41, set 62 contains the event data of hospital 42, set 63 contains the event data of park 43, and set 64 contains the event data of school 44.

[0113] S54, generating a location access sequence.

[0114] By arranging the elements constituting the event data of each position, the position access sequence of each position can be obtained, wherein the arrangement rule is to sort according to the access time. Figure 6The example of sorting four sets according to the order of access time is shown in FIG. The elements in set 61 are sorted to obtain sequence 65, the elements in set 62 are sorted to obtain sequence 66, the elements in set 63 are sorted to obtain sequence 67, and the elements in set 64 are sorted to obtain sequence 68.

[0115] Figure 6 The example in the figure shows that the access time is arranged in order from early to late. In practice, the access time can also be arranged in order from late to early. The arrangement method is similar and will not be repeated here.

[0116] S34, sorting the multiple elements included in each location access sequence according to the access time included in each location access sequence.

[0117] Sort multiple elements by access time, where the sorting can be in the order of access time or in the reverse order of access time. Figure 4 Taking the order of multiple elements and access time in the mall 41 as an example, the multiple elements in the mall 41 are arranged to obtain the following ordered multiple elements:

[0118] (A, 9:20:21), (B, 9:25:36), (D, 10:33:58), (C, 11:50:08), (E, 12:28:44), (A, 13:10:33), (E, 13:15:18), (F, 13:20:31).

[0119] S35, dividing each position access sequence according to the sorted multiple elements in each position access sequence to obtain multiple position access subsequences corresponding to each position access sequence.

[0120] The location access sequence is segmented according to the object's activity cycle or a fixed time threshold. The purpose is to segment semantically incoherent location access sequences to obtain more location access subsequences, avoid introducing too much noise during relationship calculation, and facilitate the calculation of the relationship strength of temporal relationships.

[0121] One possible implementation method is to divide the sorted multiple elements in each position access sequence according to a preset time interval to obtain multiple position access subsequences corresponding to each position access sequence, wherein the difference in access time between any two elements in each position access subsequence is less than or equal to the preset time interval.

[0122] Specifically, a preset time interval is first defined, and then for each location access sequence, when the time interval in each element exceeds the preset time interval, it is considered that the access events of the two elements are not semantically coherent, and the location access sequence can be divided.

[0123] Still taking the multiple orderly arranged elements in the shopping mall 41 as an example, assuming that the preset time interval is 1 hour, for the following elements:

[0124] (A, 9:20:21), (B, 9:25:36), (D, 10:33:58), (C, 11:50:08), (E, 12:28:44), (A, 13:10:33), (E, 13:15:18), (F, 13:20:31).

[0125] It can be seen that the difference between the access time of (A, 9:20:21) and (B, 9:25:36) is less than 1 hour, while the difference between the access time of (A, 9:20:21) and (D, 10:33:58) is greater than 1 hour, so (A, 9:20:21) and (B, 9:25:36) constitute a location access subsequence of shopping mall 41. Then for the remaining elements, the difference between the access time of (D, 10:33:58) and (C, 11:50:08) is greater than 1 hour, so (D, 10:33:58) constitutes a location access subsequence of shopping mall 41. According to the above method, the multiple ordered elements in shopping mall 41 are divided into the following 4 location access subsequences:

[0126] (A, 9:20:21), (B, 9:25:36);

[0127] (D, 10:33:58);

[0128] (C, 11:50:08), (E, 12:28:44);

[0129] (A, 13:10:33), (E, 13:15:18), (F, 13:20:31).

[0130] In addition to dividing the location access sequence based on the access time, it can also be divided based on the object access cycle.

[0131] One possible implementation method is to divide the sorted multiple elements in each position access sequence according to the identification of the object in each position access sequence to obtain multiple position access subsequences corresponding to each position access sequence, wherein there are two related elements in each position access subsequence, and the identification of the objects in the two related elements is the same.

[0132] That is, given the access sequence S at position l l , when the position access sequence repeats for the first time the identifier of an object that has already appeared in the position access sequence, it is considered that the object has reached a cycle in accessing the position l. For example: position access sequence S l =A, C, G, E, B, H, C, E (the access time of each object to position l is not shown here, the identifier of each object is used to represent each element in the position access sequence, and each element is arranged in order of access time), where object C appears repeatedly for the first time in the position access sequence, which means that the object access has reached a cycle, and the position access subsequence within the cycle is: A, C, G, E, B, H, C.

[0133] When the target access has reached a cycle, the position access sequence is segmented. At the same time, the target is added to the first position of the subsequent sub-position access sequence, and the cycle is repeated until the sequence segmentation is completed. The sub-sequences with a sequence length greater than 1 are selected to construct the position access sequence set.

[0134] Specifically, a first operation is performed, and the first operation includes: determining whether there is an element in the first i elements of the nth co-sequence whose object identifier is the same as the object identifier in the i+1th element, and if so, obtaining a position access subsequence and an n+1th co-sequence according to the nth co-sequence, wherein the position access subsequence includes the first i+1 elements in the nth co-sequence, and the n+1th co-sequence includes the last ki elements in the nth co-sequence, and updating k to ki, wherein k is the number of elements included in the nth co-sequence, and k>=i; if not, updating i to i+1; initially, n is 0, i is 1, the co-sequence is a subset of the position access sequence, and the 0th co-sequence is the position access sequence;

[0135] Update n to n+1, update i to 1, and repeat the first operation until there are no two related elements in the nth co-sequence, and use the nth co-sequence as a position access subsequence.

[0136] For example, suppose a position access sequence Sl = A, B, C, F, G, A, E, H, B, G, H. Initially, n is 0. First, determine whether there are elements in the first i elements of the 0th remainder sequence whose object identifier is the same as the object identifier in the i+1th element. The 0th remainder sequence is the position access sequence Sl.

[0137] When n=0 and i=1, the 0th remainder sequence is the position access sequence Sl, which includes 11 elements, and k is initially 11. The identifier of the object in the first element of the position access sequence Sl is A, and the identifier of the object in the second element is B, which are different, and i is updated to 2 at this time; when i=2, the identifiers of the objects in the first two elements of the position access sequence Sl are A and B, and the identifier of the object in the third element is C, which are different, and i is updated to 3 at this time; when i=3, the identifiers of the objects in the first three elements of the position access sequence Sl are A, B and C, and the identifier of the object in the fourth element is F, which are different, and i is updated to 4 at this time, and so on. When i=5, the object identifiers of the first five elements in the position access sequence S1 are A, B, C, F and G, and the object identifier of the sixth element is A. At this time, there are two elements with the same object identifier, so a position access subsequence is obtained based on the first six (i.e., the first i+1) elements in the 0th cosequence, and the first cosequence is obtained based on the last six (i.e., ki) elements in the 0th cosequence. Among them, the arrangement order of each element in the obtained position access sequence remains unchanged, and is the same as the arrangement order of the first i+1 elements in the 0th cosequence. Similarly, the arrangement order of each element in the first cosequence remains unchanged, and is the same as the arrangement order of the last ki elements in the 0th cosequence. Therefore, the obtained position access sequence is A, B, C, F, G, A, and the first cosequence is A, E, H, B, G, H.

[0138] Then, n is updated to 1, i is updated to 1, and it is determined whether there is an element in the first i elements of the first remainder sequence whose object identifier is the same as the object identifier in the i+1th element, and the operations performed are similar to the above.

[0139] Through this method, the following position access subsequence can be obtained:

[0140] A, B, C, F, G, A;

[0141] A, E, H, B, G, H;

[0142] H.

[0143] Based on the sequence segmentation rules defined above, the location access sequence can be segmented to obtain a large number of semantically coherent sub-location access sequences.

[0144] When dividing the location access sequence, one of the above two methods can be selected, or both methods can be used at the same time. Figure 7 A schematic diagram of a location access sequence division process provided by an embodiment of the present invention, such as Figure 7 As shown, including:

[0145] S701, input a location access sequence and set a time threshold threshold.

[0146] Threshold is a preset time interval, which is a preset value. After the location access sequence is input to the server, it can be divided according to the time threshold threshold, wherein the location access sequence is one or more.

[0147] S702, traverse the position access sequence sequence one by one.

[0148] Access the sequence sequence at any position, traverse each element in the sequence one by one, and Figure 7 In the example, the location access sequence is first divided according to the access time, and then based on it, it is further divided according to the object cycle.

[0149] S703, determine whether all location access sequences have been traversed, if so, execute S704, if not, execute S706.

[0150] If all the location access sequences are traversed, the divided sub-location access sequence set is obtained. If the traversal is not completed, it is necessary to continue the traversal.

[0151] S704, obtaining a set of sub-location access sequences after division.

[0152] S705, retaining sub-position access sequences whose length is greater than 1.

[0153] This step is to remove the position access subsequence with a length of 1. Because when there is only one element in the position access subsequence, only one object is involved, which is useless for obtaining the relationship between objects. Removing it can save storage space.

[0154] S706, initialize i=0.

[0155] After initializing i=0, the traversal process for a position access sequence begins.

[0156] S707, determine whether i is less than the sequence length, if so, execute S708, if not, execute S703.

[0157] sequence.length is the sequence length of the nth cosequence, which is a changing value. When position access subsequences are continuously divided from the position access sequence, sequence.length will become smaller. Therefore, it is necessary to determine the value based on the specific divided cosequence.

[0158] S708, determine whether the time difference between two consecutive events is greater than a time threshold threshold, if so, execute S709, if not, execute S710.

[0159] S709, divide the sequence and execute S712.

[0160] During the traversal process, if the time difference between two events is greater than the threshold, the sequence is divided according to the preset time threshold to divide a position access subsequence.

[0161] S710, determine whether the object p appears repeatedly for the first time in the sequence, if so, execute S711, if not, execute S712.

[0162] S711, divide the sequence, add the object p to the first position of the remaining subsequence, and execute S712.

[0163] This step is to divide according to the object period. If an object p appears repeatedly, the sequence is divided. The division method is as described above.

[0164] S712, i=i+1.

[0165] By updating i, the sequence is traversed.

[0166] Figure 7 The following example demonstrates the operations performed by both partitioning methods. In practice, you can choose Figure 7 In the example, any one of the two division methods can be used.

[0167] S36, accessing subsequences according to the positions to obtain the relationship between the objects.

[0168] One possible implementation method is to obtain the strength of the relationship between any two objects based on the access subsequences at each position, wherein the strength of the relationship between the two objects is used to indicate the frequency of the identifiers of the two objects in the same position access subsequence; then, based on the strength of the relationship between any two objects, obtain the corresponding relationship between any two objects.

[0169] For example, the following sub-position access sequence set includes three position access sub-sequences, (A, B, G), (A, H, F, G), (H, F). The first position access sub-sequence includes the identifiers of three objects, namely object A, object B, and object G. The second position access sub-sequence includes the identifiers of four objects, namely object A, object H, object F, and object G. The third position access sub-sequence includes the identifiers of two objects, namely object H and object F.

[0170] According to the three position access subsequences, relationship point pairs and their corresponding relationship strengths are generated. Table 1 is a table of relationship point pairs and corresponding relationship strengths.

[0171] Table 1

[0172] Relationship Points Relationship Strength Relationship Points Relationship Strength A,B 1 A,G 2 B,G 1 A,H 1 A,F 1 H,F 2 F,G 1 H,G 1

[0173] After generating a large number of candidate relationship point pairs and their corresponding intensities, the relationship between each object can be obtained.

[0174] However, since it is easy to introduce more noise information when calculating the time series relationship, a large number of noise point pairs are generated. At the same time, it is easy to ignore the low-frequency relationship point pair information only based on the frequency of occurrence of the time series relationship as the measure of the relationship strength. Therefore, in the process of generating the final time series relationship, the following method can be used to obtain the final relationship information.

[0175] Since the time series relationship contains a lot of noise data, a certain threshold minSupport is usually set for filtering. For example, when the relationship point pair information generated in Table 1 is filtered according to the threshold minSupport = 2, the final relationship point pair is:

[0176] Table 2

[0177] Relationship Points Relationship Strength Relationship Points Relationship Strength H,F 2 A,G 2

[0178] The method based on relationship strength threshold filtering can filter out a large number of low-frequency relationship point pairs, thus improving the accuracy of relationship mining to a certain extent.

[0179] The method based on relationship strength threshold filtering can filter out a large amount of noise data to a certain extent, but in some scenarios it will capture a large number of noise point pairs, or lose too much effective relationship point pair information. For example, at a popular subway station in the city, people A and B who work near the subway frequently take the subway at this station. The temporal behavior relationship mined based on the location access sequence of the station has a high strength (such as 20), but the actual situation may be that A and B do not have a social relationship. On the contrary, people C and D who appear in a certain community have a low temporal relationship strength (such as 3), but C and D may have a high possibility of having a social relationship.

[0180] In order to solve the above problems, a solution based on weight threshold filtering can be designed. Based on the mined relationship point pairs and combined with the object behavior patterns, location characteristics and other information contained in the original behavior records, the relationship strength can be optimized and calculated to avoid the negative impact of using a single time series frequency as a relationship strength measurement indicator, thereby mining effective time series relationships.

[0181] One possible implementation method is to obtain a global weight factor and a private weight factor of any two objects based on each location access subsequence, wherein the global weight factor is used to indicate the influence weight of the target location, and the private weight factor is used to indicate the influence weight of the target location on the relationship between the any two objects, and the target location is a location that has been visited by the any two objects.

[0182] Then, according to the global weight factors of any two objects, or according to the private weight factors of any two objects, or according to the comprehensive weight factors of any two objects, the relationship between the corresponding any two objects is obtained, wherein the comprehensive weight factor is obtained by performing a fusion operation based on the global weight factor and the private weight factor.

[0183] The weight threshold filtering method includes three types of weight calculations, including global weight factors, private weight factors, and comprehensive weight factors. Appropriate thresholds are set for different weight factors to filter and generate the final timing relationship.

[0184] First, the global weight factor is introduced.

[0185] The global weight factor is used to capture the popularity of each location. The global weight factor of the two objects is used to indicate the influence weight of the target location, which is the location visited by both objects. Different locations have different influences on the relationship between the two objects. For example, if both objects have visited a subway station and the other two objects have visited a community, then under similar conditions, the probability that the two objects that have visited the same community have a relationship is greater than the probability that the two objects that have visited the same subway station have a relationship. This is due to the different popularity of different locations. There is a huge flow of people at the subway station every day, so even if both objects have visited the subway station, it is difficult to prove that the two objects have a relationship. That is, the subway station is less convincing for the existence of a relationship between the two objects. The number of visits to the community is small, and the two objects have visited a community, so the probability that the two objects have a relationship is relatively large, and the global weight factor reflects the influence weight of the target location.

[0186] First, define E ij ={e1,e2,...} represents the locations that have been visited by objects i and j together, where objects i and j are any two objects, e k =(loc k ,c k ) represents the location loc that object i and object j have visited together k and frequency c k Therefore, the relationship F between object i and object j is ij It can be expressed as Eij The function, that is, F ij =G(E ij ). It should be noted that the frequency c k The location loc that objects i and j have visited together k For example, if object i visits location A 3 times and object j visits location A 2 times, then the frequency of location A visited by object i and object j together is c k For 2 times.

[0187] The common access frequency is: G0(E ij )=∑c k , where if object i and object j have visited k locations together, then the frequency of visiting each location can be added to get G0(E ij )=∑c k .

[0188] Object i at position loc k The access probability can be expressed as the access frequency:

[0189]

[0190] Among them, |S i (loc k )| indicates S i (loc k ) modulo, S i (loc k ) indicates that object i is at position loc k The number of occurrences, Indicates all objects at position loc k The number of occurrences, P(i,loc k ) represents object i at position loc k The probability of access.

[0191] For different locations loc k Information entropy can be used to measure its own characteristics (whether it is frequently visited, visited by different target groups, etc.). Taking Shannon entropy as an example, the location loc k The information entropy is:

[0192]

[0193] The global weight factor is used to capture the popularity of a location. For example, subway stations and scenic spots often have a large number of people, while personal residences and villas usually have only a few people. Therefore, the co-occurrence at different types of locations has different meanings for whether there is a relationship. The influence weight of the global weight factor is the index of the information entropy corresponding to the commonly visited location. The global weight factor includes but is not limited to the following calculation methods.

[0194]

[0195] Among them, G2(E ij ) represents the global weight factor,

[0196] The above embodiment introduces the global weight factor, and the private weight factor will be introduced below.

[0197] The private weight factor is used to indicate the weight of the target location on the relationship between any two objects. The target location is a location that has been visited by both objects. Usually, the same location has different meanings for different targets (such as different people). For example, the West Lake business district in Hangzhou has obviously different meanings for people who live nearby and people who travel there. Therefore, whether there is a relationship between different people appearing in the same location requires considering the meaning of the location for each object, and the private weight factor can reflect the meaning of each location to the object.

[0198] Private weight factors include but are not limited to the following calculation methods:

[0199]

[0200] in,

[0201] Based on the above analysis, the combined impact of the global weight factor and the private weight factor is:

[0202] G total (E ij )=G1(E ij )*G2(E ij ),

[0203] Among them, G total (E ij ) is the comprehensive weight factor, G1(E ij ) is the private weight factor, G2(E ij ) is the global weight factor.

[0204] Optionally, the comprehensive weight factor can be obtained by fusing the global weight factor and the private weight factor, wherein the global weight factor and the private weight factor can be fused in their respective corresponding proportions to obtain the comprehensive weight factor, or a mapping relationship between the comprehensive weight factor and the global weight factor and the private weight factor can be established. Through this mapping relationship, and when the global weight factor and the private weight factor are known, the comprehensive weight factor can be obtained. Furthermore, the mapping relationship between the comprehensive weight factor and the global weight factor and the private weight factor can be a linear relationship, a nonlinear relationship, or a mapping relationship established by a training model, etc. The specific manner of the mapping relationship is not particularly limited in the embodiments of the present application.

[0205] The relationship between objects is obtained by using global weight factors, private weight factors, and comprehensive weight factors. The value of each type of weight factor is a measure of the weight of the relationship between objects in different dimensions. The larger the weight, the stronger the relationship between objects.

[0206] In the embodiments of the present application, only the global weight factor may be used to obtain the relationship between objects, or only the private weight factor may be used to obtain the relationship between objects. Alternatively, the global weight factor and the private weight may be appropriately integrated to obtain a comprehensive weight factor, thereby obtaining the relationship between objects based on the comprehensive weight factor. The specific method adopted may be determined according to actual needs.

[0207] The relationship between objects obtained in this way can take into account the impact of different positions on the relationship between objects, avoid mining the relationship between objects based solely on the strength of the relationship, and thus achieve more effective relationship acquisition.

[0208] The relationship acquisition method provided by the embodiment of the present invention first determines the location access sequence corresponding to each location in multiple locations to obtain the event data of each object. Each location access sequence includes multiple elements, each element includes an object identifier and the access time of the object accessing the location corresponding to the corresponding location access sequence. According to the location access sequence, it is possible to know which locations each object accessed at what time. After obtaining multiple location access sequences, each location access sequence is divided according to the access time included in each location access sequence to obtain multiple location access subsequences corresponding to each location access sequence. Each location access sequence is divided by the access time to extract the temporal relationship in the location access sequence. Finally, according to each location access subsequence, the relationship between each object is obtained. The scheme of the embodiment of the present invention makes full use of the temporal information between behavior records, mines more effective mobile social relationships, and has good interpretability; by constructing a location access sequence of the event location and fully segmenting the location access sequence, full use of information in the behavior sequence is achieved, avoiding the introduction of a large amount of noise, and effectively reducing the computational complexity of the algorithm; a sequence segmentation method based on object access cycle is adopted to avoid the algorithm parameter adjustment task caused by setting a large number of time thresholds, and fully mine the semantic information contained in the behavior events of the object group; a weight threshold filtering method is adopted to comprehensively consider the influence of the event location, object activity pattern, etc. on the relationship formation by calculating the private, global and comprehensive factors contained in the relationship point pairs, effectively reducing the noise in the time series relationship point pairs, and effectively improving the accuracy of relationship discovery.

[0209] Figure 8 A schematic diagram of the structure of a relationship acquisition device provided by an embodiment of the present invention is shown in FIG. Figure 8 As shown, it includes a processing module 81, a division module 82 and an acquisition module 83, wherein:

[0210] The processing module 81 is used to determine a location access sequence corresponding to each location in a plurality of locations, each location access sequence includes a plurality of elements, each element includes an identifier of an object and an access time of the object accessing the location corresponding to the location access sequence;

[0211] The division module 82 is used to divide each location access sequence according to the access time included in each location access sequence, so as to obtain a plurality of location access subsequences corresponding to each location access sequence;

[0212] The acquisition module 83 is used to access the subsequence according to each of the positions to obtain the relationship between the objects.

[0213] In a possible implementation, the division module 82 is specifically configured to:

[0214] sorting a plurality of elements included in each location access sequence according to access times included in each location access sequence;

[0215] Each position access sequence is divided according to a plurality of sorted elements in each position access sequence to obtain a plurality of position access subsequences corresponding to each position access sequence.

[0216] In a possible implementation, the division module 82 is specifically configured to:

[0217] The sorted multiple elements in each position access sequence are divided according to a preset time interval to obtain multiple position access subsequences corresponding to each position access sequence, wherein the difference in access time between any two elements in each position access subsequence is less than or equal to the preset time interval.

[0218] In a possible implementation, the division module 82 is specifically configured to:

[0219] According to the identification of the object in each position access sequence, the sorted multiple elements in each position access sequence are divided to obtain multiple position access subsequences corresponding to each position access sequence, wherein there are two related elements in each position access subsequence, and the identification of the objects in the two related elements is the same.

[0220] In a possible implementation, the division module 82 is specifically configured to:

[0221] Execute a first operation, the first operation comprising: determine whether there is an element in the first i elements of the nth co-sequence whose object identifier is the same as the object identifier in the i+1th element, if so, obtain a position access subsequence and an n+1th co-sequence according to the nth co-sequence, the position access subsequence includes the first i+1 elements in the nth co-sequence, the n+1th co-sequence includes the last ki elements in the nth co-sequence, and update k to ki, wherein k is the number of elements included in the nth co-sequence, k>=i; if not, update i to i+1; initially, n is 0, i is 1, the co-sequence is a subset of the position access sequence, and the 0th co-sequence is the position access sequence;

[0222] Update n to n+1, update i to 1, and repeat the first operation until there are no two related elements in the nth co-sequence, and use the nth co-sequence as a position access subsequence.

[0223] In a possible implementation, the acquisition module 83 is specifically used to:

[0224] According to each of the position access subsequences, the relationship strength between any two objects is obtained, wherein the relationship strength between the two objects is used to indicate the frequency of the identifiers of the two objects in the same position access subsequence;

[0225] According to the strength of the relationship between any two objects, the corresponding relationship between any two objects is obtained.

[0226] In a possible implementation, the acquisition module 83 is specifically used to:

[0227] According to each of the position access subsequences, a global weight factor and a private weight factor of any two objects are obtained, wherein the global weight factor is used to indicate the influence weight of the target position, and the private weight factor is used to indicate the influence weight of the target position on the relationship between the any two objects, wherein the target position is a position visited by the any two objects;

[0228] According to the global weight factors of any two objects, or according to the private weight factors of any two objects, or according to the comprehensive weight factors of any two objects, the relationship between the corresponding any two objects is obtained, wherein the comprehensive weight factor is obtained by fusing the global weight factor and the private weight factor.

[0229] In a possible implementation, the processing module 81 is specifically used for:

[0230] Determine a plurality of locations and obtain event data for each location, wherein for any location j, the event data for the location j includes an identifier of each object accessing the location j and an access time of each object accessing the location j;

[0231] According to the event data of each position, a plurality of elements corresponding to each position are obtained, each element including an object and the access time of the object accessing the position;

[0232] According to the multiple elements corresponding to each position, a position access sequence corresponding to each position is obtained.

[0233] In a possible implementation, the processing module 81 is specifically used for:

[0234] The event data of each position is filtered according to a preset object identifier set to obtain multiple elements corresponding to each position, wherein the preset object identifier set includes one or more identifiers, and the sequence composed of the multiple elements corresponding to each position includes at least one element whose identifier belongs to the preset object identifier set.

[0235] The device provided in the embodiment of the present invention can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0236] Fig. 9 A schematic diagram of the hardware structure of a relationship acquisition device provided in an embodiment of the present invention is shown in FIG. Fig. 9 As shown, the relationship acquisition device includes: at least one processor 91 and a memory 92. The processor 91 and the memory 92 are connected via a bus 93.

[0237] Optionally, the model determination also includes a communication component. For example, the communication component may include a receiver and / or a transmitter.

[0238] In a specific implementation process, at least one processor 91 executes the computer-executable instructions stored in the memory 92, so that at least one processor 91 executes the above relationship acquisition method.

[0239] The specific implementation process of the processor 91 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0240] In the above Fig. 9 In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the application may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0241] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk storage.

[0242] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0243] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the relationship acquisition method as described above is implemented.

[0244] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0245] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0246] The division of the units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, which may be electrical, mechanical or other forms.

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

[0248] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0249] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0250] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0251] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A relationship acquisition method, characterized in that: include: Determine a location access sequence corresponding to each location in the plurality of locations, each location access sequence comprising a plurality of elements, each element comprising an identifier of an object and an access time of the object accessing the location corresponding to the location access sequence; sorting a plurality of elements included in each location access sequence according to access times included in each location access sequence; Divide each position access sequence according to the sorted multiple elements in each position access sequence to obtain multiple position access subsequences corresponding to each position access sequence; Access the subsequence according to each of the positions to obtain the relationship between the objects; The step of dividing each position access sequence according to the sorted multiple elements in each position access sequence to obtain multiple position access subsequences corresponding to each position access sequence includes: Execute a first operation, the first operation comprising: determine whether there is an element in the first i elements of the nth co-sequence whose object identifier is the same as the object identifier in the i+1th element, if so, obtain a position access subsequence and an n+1th co-sequence according to the nth co-sequence, the position access subsequence includes the first i+1 elements in the nth co-sequence, the n+1th co-sequence includes the last ki elements in the nth co-sequence, and update k to ki, wherein k is the number of elements included in the nth co-sequence, k>=i; if not, update i to i+1; initially, n is 0, i is 1, the co-sequence is a subset of the position access sequence, and the 0th co-sequence is the position access sequence; Update n to n+1, update i to 1, and repeat the first operation until there are no two related elements in the nth co-sequence, and use the nth co-sequence as a position access subsequence.

2. The method according to claim 1, characterized in that Access the subsequences according to the positions to obtain the relationship between the objects, including: According to each of the position access subsequences, the relationship strength between any two objects is obtained, wherein the relationship strength between the two objects is used to indicate the frequency of the identifiers of the two objects in the same position access subsequence; According to the strength of the relationship between any two objects, the corresponding relationship between any two objects is obtained.

3. The method according to claim 1, characterized in that: Access the subsequences according to the positions to obtain the relationship between the objects, including: According to each of the position access subsequences, a global weight factor and a private weight factor of any two objects are obtained, wherein the global weight factor is used to indicate the influence weight of the target position, and the private weight factor is used to indicate the influence weight of the target position on the relationship between the any two objects, wherein the target position is a position visited by the any two objects; According to the global weight factors of any two objects, or according to the private weight factors of any two objects, or according to the comprehensive weight factors of any two objects, the relationship between the corresponding any two objects is obtained, wherein the comprehensive weight factor is obtained by fusing the global weight factor and the private weight factor.

4. The method according to claim 1, characterized in that Determine a location access sequence corresponding to each of a plurality of locations, including: Determine a plurality of locations and obtain event data for each location, wherein for any location j, the event data for the location j includes an identifier of each object accessing the location j and an access time of each object accessing the location j; According to the event data of each position, a plurality of elements corresponding to each position are obtained, each element including an object and the access time of the object accessing the position; According to the multiple elements corresponding to each position, a position access sequence corresponding to each position is obtained.

5. The method according to claim 4, characterized in that According to the event data of each position, multiple elements corresponding to each position are obtained, including: The event data of each position is filtered according to a preset object identifier set to obtain multiple elements corresponding to each position, wherein the preset object identifier set includes one or more identifiers, and the sequence composed of the multiple elements corresponding to each position includes at least one element whose identifier belongs to the preset object identifier set.

6. A relationship acquisition device, characterized in that: include: A processing module, configured to determine a location access sequence corresponding to each location in a plurality of locations, wherein each location access sequence includes a plurality of elements, each element includes an identifier of an object and an access time of the object accessing the location corresponding to the location access sequence; A partitioning module is used to sort multiple elements included in each position access sequence according to the access time included in each position access sequence; and to partition each position access sequence according to the sorted multiple elements in each position access sequence to obtain multiple position access subsequences corresponding to each position access sequence; An acquisition module, used for accessing the subsequence according to each of the positions to obtain the relationship between the objects; The partitioning module is specifically used to perform a first operation, which includes: determining whether there are elements in the first i elements of the nth co-sequence whose object identifier is the same as the object identifier in the i+1th element; if so, obtaining a position access subsequence and an n+1th co-sequence based on the nth co-sequence, wherein the position access subsequence includes the first i+1 elements in the nth co-sequence, and the n+1th co-sequence includes the last ki elements in the nth co-sequence, and updating k to ki, wherein k is the number of elements included in the nth co-sequence, and k>=i; if not, updating i to i+1; initially, n is 0, i is 1, the co-sequence is a subset of the position access sequence, and the 0th co-sequence is the position access sequence; updating n to n+1, updating i to 1, and repeatedly performing the first operation until there are no two related elements in the nth co-sequence, and the nth co-sequence is used as a position access subsequence.

7. A relationship acquisition device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the relationship acquisition method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the relationship acquisition method according to any one of claims 1 to 5 is implemented.