CN113468278B - System for acquiring association relation of target users - Google Patents
System for acquiring association relation of target users Download PDFInfo
- Publication number
- CN113468278B CN113468278B CN202110734909.XA CN202110734909A CN113468278B CN 113468278 B CN113468278 B CN 113468278B CN 202110734909 A CN202110734909 A CN 202110734909A CN 113468278 B CN113468278 B CN 113468278B
- Authority
- CN
- China
- Prior art keywords
- user
- time
- association
- record
- database
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
- G06F16/288—Entity relationship models
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/283—Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The invention relates to a system for acquiring a target user association relation, which comprises the following steps of S1, establishing an operation table of a first user, searching a second database, and adding a user data record of the first user containing first search time information and a user data record of the second user with at least one same user data with the first user into the operation table; step S2, traversing the operation table, and determining a second user with the user data similarity greater than a preset similarity threshold value as a third user; step S3, based on the third user i d, the first user i d, and the association time and the association number status value corresponding to the third user id and the first user i d history association record closest to the current time, an added history association record corresponding to the first user i d and the third user i d is generated and stored in the third database. The method and the device can rapidly and accurately acquire the association relation of the target user based on the multidimensional relevant information of the target user.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a system for acquiring an association relationship of a target user.
Background
In many existing application scenarios, the association relationship of the target user needs to be acquired. Along with the rapid development of big data technology, the related information of the target user can be acquired from multiple dimensions, so how to rapidly and accurately acquire the association relationship of the target user based on the multi-dimensional related information of the target user becomes a technical problem to be solved.
Disclosure of Invention
The invention aims to provide a system for acquiring the association relationship of a target user, which can quickly and accurately acquire the association relationship of the target user based on multidimensional related information of the target user.
According to a first aspect of the present invention, there is provided a system for acquiring an association relationship of a target user, including: a first database, a second database, and a third database, a memory storing a computer program, and a processor; the first database is used for storing the target user id, and is dynamically updated along with the addition and deletion of the target user id; the second database is used for storing user data records of each target user in the first database within preset target time, and the user data records comprise target user id, one or more user data and a reporting time field; the third database user stores a history association record between target users, wherein the history association record comprises a first user id, a third user id, association time and association times state values; the processor, when executing the computer program, is configured to implement the steps of:
step S1, an operation table corresponding to a preset first user is established, the second database is searched based on preset first search time information, and a user data record corresponding to the first user containing the first search time information and a user data record corresponding to a second user containing the first search time information and having at least one same user data with the first user are added into the operation table;
step S2, traversing the operation table, and determining a second user with the similarity of the user data and the user data of the first user larger than a preset similarity threshold value as a third user;
step S3, for each third user, based on the third user id, the first user id, and the association time and association times status values corresponding to the third user id and the first user id history association record closest to the current time, generating a first user id and an added history association record corresponding to the third user id, and storing the first user id and the added history association record in the third database.
Compared with the prior art, the invention has obvious advantages and beneficial effects. By means of the technical scheme, the system for acquiring the association relation of the target user can achieve quite technical progress and practicality, has wide industrial utilization value, and has at least the following advantages:
the method and the device can rapidly and accurately acquire the ids and the association relation states of other target users with the association relation with the target user based on the multidimensional related information of the target user.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention, as well as the preferred embodiments thereof, together with the following detailed description of the invention, given by way of illustration only, together with the accompanying drawings.
Drawings
FIG. 1 is a schematic diagram of a system for obtaining a target user association according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an association relationship provided in an embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the present invention to achieve the preset purposes, the following detailed description refers to a specific implementation of a system for obtaining the association relationship of the target user and its effects according to the present invention, which are described in detail below with reference to the accompanying drawings and preferred embodiments.
Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts steps as a sequential process, many of the steps may be implemented in parallel, concurrently, or with other steps. Furthermore, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like.
The embodiment of the invention provides a system for acquiring an association relationship of a target user, which comprises the following steps: a first database, a second database, and a third database, a memory storing a computer program, and a processor; the first database is used for storing the target user id, and it can be understood that the first database is dynamically updated along with the addition and deletion of the target user id, that is, the same user id is likely to be the target user id in a first period of time, and is not likely to be the target user id in another period of time. The second database is configured to store a user data record of each target user in the first database within a preset target time, where it is understood that the preset target time is a time required to obtain user data corresponding to the target user, and may be set according to a specific processing requirement. As an embodiment, the preset target time is a time point from a time point when the target user id joins the first database to a time point when the target user id is deleted from the first database, or is a preset time point before joining the first database to a time point when the target user id is deleted from the first database. The user data record comprises a target user id, one or more user data and a reporting time field; the third database user stores a history association record between target users, wherein the history association record comprises a first user id, a third user id, association time and association times state values; the processor, when executing the computer program, is configured to implement the steps of:
step S1, an operation table corresponding to a preset first user is established, the second database is searched based on preset first search time information, and a user data record corresponding to the first user containing the first search time information and a user data record corresponding to a second user containing the first search time information and having at least one same user data with the first user are added into the operation table;
step S2, traversing the operation table, and determining a second user with the similarity of the user data and the user data of the first user larger than a preset similarity threshold value as a third user;
it can be appreciated that the first user, the second user and the third user are all target users corresponding to the first database. The preset similarity threshold is set according to factors such as specific association relation accuracy.
Step S3, for each third user, based on the third user id, the first user id, and the association time and association times status values corresponding to the third user id and the first user id history association record closest to the current time, generating a first user id and an added history association record corresponding to the third user id, and storing the first user id and the added history association record in the third database.
The embodiment of the invention can rapidly and accurately acquire the ids and the association states of other target users with the association relationship with the target user based on the multidimensional related information of the target user.
The following details of the data record structure of the second database and the corresponding operation table acquisition form are given by two specific embodiments:
embodiment one,
All time information is in days, i.e. each record of each user corresponds to information of a certain day. The user data includes a trip data pair including a trip id and a trip time, and a hotel data pair including a hotel id and a hotel time, the trip time is a trip plan occurrence time or a hotel plan check-in time, the report time is a reservation trip or a hotel order time, the preset first search time information is a trip time, the trip id includes one or more of a trip id, a train id, and a car id, and the step S1 includes:
step S11, searching all records in the second database based on the first search time information, determining a travel data pair in the user data records corresponding to the first user and/or the user data records containing the first search time information in the hotel data pair as the first user records, and adding the first user records into the operation table;
and step S12, searching all records in the second database based on the travel data pair or the hotel data pair in the first user record, determining the user data record with the travel data pair or the hotel data pair in the first user record as a second user record, and adding the second user record into the running table.
The user information stored in the second database in the first embodiment is mainly reservation information, the association relation of the user can be predicted based on the reservation information, the real-time performance is good, the user can be directly predicted without really realizing aggregation, and the method is applicable to scenes with high requirements on the real-time performance of the association relation prediction.
However, it can be understood that in the first embodiment, if some subscription information is wrong subscription information generated by the user operating the wrong operation, or the user operating the wrong operation is cancelled after the subscription, the processing accuracy may be lower, and the process of obtaining the running table needs to traverse the whole table, so that the resource consumption is higher, and therefore, for an application scenario with higher accuracy requirement and lower resource consumption requirement, the second embodiment may be adopted.
Embodiment II,
The time information is in days, i.e. each record of each user corresponds to information of a certain day. The user data includes an actual trip id and an actual hotel check-in id, the reporting time is a time corresponding to the actual trip id and the actual hotel check-in occurrence, the first search information is the reporting time, and the step S1 includes:
step S101, acquiring a target user record data table corresponding to the retrieval time information in the second database based on the first retrieval time information;
step S102, adding a first user record in the target user record data table and a second user record with at least one same user data with the first user record into the operation table.
The user information stored in the second database of the second embodiment is the user information corresponding to the actual occurrence, the accuracy is higher, and the operation table is generated by directly searching based on the data of the day, so that the calculated amount is greatly reduced, and the resource consumption is reduced. It will be appreciated that the scheme described in embodiment one may be selected for a scenario where accuracy requirements are low but real-time requirements are high.
As an embodiment, the step S2 may include:
step S21, traversing the operation table, comparing each item of user data of the first user with the corresponding user data of each second user, if the user data are consistent, determining a preset similarity weight value corresponding to the item of user data as the similarity corresponding to the item of user data, otherwise, determining the similarity corresponding to the item of user data as 0;
it can be appreciated that the similarity weight threshold corresponding to each user data may be set according to specific application requirements, and the similarity weight value of the user data for determining that the higher the contribution degree of the user association relationship is, the higher the similarity weight value of the user data is.
And S22, obtaining the sum of the similarity of all the user data of each second user and the first user, and determining the second user with the sum of the similarity larger than a preset similarity threshold as a third user.
As an embodiment, the step S3 may include:
step S31, for each third user, judging whether the third database stores the history association records of the third user and the first user, if not, establishing the newly added history association records of the third user and the first user in the third database, and if so, executing step S32, wherein the corresponding association times state value is recorded as 1;
step S32, judging whether the time interval between the correlation time corresponding to the last historical correlation record of the third user and the first user and the current time is smaller than a preset first time threshold value, if yes, establishing the newly added historical correlation record of the third user and the first user in the third database, and recording the corresponding correlation time state value as the correlation time state value corresponding to the last historical correlation record of the third user and the first user plus 1, otherwise, executing step S33;
step S33, a record of the association relation between the third user and the first user is established in the third database, and the corresponding association time status value is recorded as 1.
Based on the association record in the third database, association data corresponding to any one of the first user ids can be displayed to the user in the forms of description information, association graphs and the like, and the association graphs can be, for example, knowledge graphs and the like.
As an embodiment, the system further includes a display device, configured to present, in real time, an association graph of the first user, where the association graph includes a first user node, at least one third user node, a connection line between the first user node and each user node, and an association number state value corresponding to each connection line, and after step S3, further includes:
step S4, if the association number state value of the new history association relation record of the third user and the first user is 1, traversing the current association relation diagram, judging whether the third user node exists in the current association relation diagram, if so, updating the association number state value corresponding to the connection line between the third user node and the first user node to be 1, if not, newly adding the third user node in the current association relation diagram, establishing a connection line with the first user node, and setting the association number state value corresponding to the connection line to be 1;
and S5, if the association time state value of the record of the new history association relation between the third user and the first user is not 1, updating the association time state value corresponding to the third user node and the first user node in the current association relation diagram to the association time state value of the record of the new history association relation between the third user and the first user.
Fig. 2 shows an association diagram generated by an embodiment of the present invention, where a point a represents a certain first user node, a point B, C, D, E represents a third user node having an association with the first user node, and a value corresponding to a connection between the point a and the node B, C, D, E is an association number state value corresponding to a node at two ends of the connection.
In order to avoid generating a large amount of noise data when the data volume is too large, the following embodiments may be used to adjust the third database and the association relationship graph, so as to improve accuracy of obtaining the association relationship. Specifically, as an embodiment, when an additional history association record of a third user and the first user is established in the third database, the additional history association record of the original corresponding to the third user and the first user is deleted from the third database, and after step S3, the method further includes:
step S6, a third user id corresponding to a history association record with the association time greater than a preset second time threshold in time interval from the current time is obtained from the third database, and a third user node corresponding to the third user id in the current association relation diagram is determined to be a node to be processed;
and S7, deleting the node to be processed, the connection line of the node to be processed and the first user node and the association time state value corresponding to the connection line from the current association relation diagram.
The present invention is not limited to the above-mentioned embodiments, but is intended to be limited to the following embodiments, and any modifications, equivalents and modifications can be made to the above-mentioned embodiments without departing from the scope of the invention.
Claims (8)
1. A system for acquiring the association relation of target users is characterized in that,
comprising the following steps: a first database, a second database, and a third database, a memory storing a computer program, and a processor; the first database is used for storing the target user id, and is dynamically updated along with the addition and deletion of the target user id; the second database is used for storing user data records of each target user in the first database within preset target time, and the user data records comprise target user id, one or more user data and a reporting time field; the third database user stores a history association record between target users, wherein the history association record comprises a first user id, a third user id, association time and association times state values; the processor, when executing the computer program, is configured to implement the steps of:
step S1, an operation table corresponding to a preset first user is established, the second database is searched based on preset first search time information, and a user data record corresponding to the first user containing the first search time information and a user data record corresponding to a second user containing the first search time information and having at least one same user data with the first user are added into the operation table;
step S2, traversing the operation table, and determining a second user with the similarity of the user data and the user data of the first user larger than a preset similarity threshold value as a third user;
step S3, for each third user, based on the third user id, the first user id, and the association time and association times status values corresponding to the third user id and the first user id history association record closest to the current time, generating a first user id and an added history association record corresponding to the third user id, and storing the first user id and the added history association record in the third database.
2. The system of claim 1, wherein the system further comprises a controller configured to control the controller,
preferably, the preset target time is a time point from a time point when the target user id joins the first database to a time point when the target user id is deleted from the first database, or is a preset time point before joining the first database to a time point when the target user id is deleted from the first database.
3. The system of claim 1, wherein the system further comprises a controller configured to control the controller,
preferably, all time information is in a unit of a day, the user data includes a trip data pair including a trip id and a trip time, and a hotel data pair including a hotel id and a trip time, the trip time is a trip planning occurrence time or a hotel plan check-in time, the report time is a trip time of the trip or a hotel, the preset first search time information is the trip time, the trip id includes one or more of a trip id, a train id and a car id, and the step S1 includes:
step S11, searching all records in the second database based on the first search time information, determining a travel data pair in the user data records corresponding to the first user and/or the user data records containing the first search time information in the hotel data pair as the first user records, and adding the first user records into the operation table;
and step S12, searching all records in the second database based on the travel data pair or the hotel data pair in the first user record, determining the user data record with the travel data pair or the hotel data pair in the first user record as a second user record, and adding the second user record into the running table.
4. The system of claim 1, wherein the system further comprises a controller configured to control the controller,
preferably, the time information is in a unit of a day, the user data includes an actual trip id and an actual hotel check-in id, the reporting time is a time corresponding to the actual trip id and the actual hotel check-in, the first search information is a reporting time, and the step S1 includes:
step S101, acquiring a target user record data table corresponding to the retrieval time information in the second database based on the first retrieval time information;
step S102, adding a first user record in the target user record data table and a second user record with at least one same user data with the first user record into the operation table.
5. The system of claim 3 or 4, wherein the system comprises a plurality of sensors,
the step S2 includes:
step S21, traversing the operation table, comparing each item of user data of the first user with the corresponding user data of each second user, if the user data are consistent, determining a preset similarity weight value corresponding to the item of user data as the similarity corresponding to the item of user data, otherwise, determining the similarity corresponding to the item of user data as 0;
and S22, obtaining the sum of the similarity of all the user data of each second user and the first user, and determining the second user with the sum of the similarity larger than a preset similarity threshold as a third user.
6. The system of claim 3 or 4, wherein the system comprises a plurality of sensors,
the step S3 includes:
step S31, for each third user, judging whether the third database stores the history association records of the third user and the first user, if not, establishing the newly added history association records of the third user and the first user in the third database, and if so, executing step S32, wherein the corresponding association times state value is recorded as 1;
step S32, judging whether the time interval between the correlation time corresponding to the last historical correlation record of the third user and the first user and the current time is smaller than a preset first time threshold value, if yes, establishing the newly added historical correlation record of the third user and the first user in the third database, and recording the corresponding correlation time state value as the correlation time state value corresponding to the last historical correlation record of the third user and the first user plus 1, otherwise, executing step S33;
step S33, a record of the association relation between the third user and the first user is established in the third database, and the corresponding association time status value is recorded as 1.
7. The system of claim 6, wherein the system further comprises a controller configured to control the controller,
the system further comprises a display device, wherein the display device is used for presenting an association relation diagram of the first user in real time, the association relation diagram comprises a first user node, at least one third user node, a connection line between the first user node and each user node and an association time state value corresponding to each connection line, and the step S3 further comprises:
step S4, if the association number state value of the new history association relation record of the third user and the first user is 1, traversing the current association relation diagram, judging whether the third user node exists in the current association relation diagram, if so, updating the association number state value corresponding to the connection line between the third user node and the first user node to be 1, if not, newly adding the third user node in the current association relation diagram, establishing a connection line with the first user node, and setting the association number state value corresponding to the connection line to be 1;
and S5, if the association time state value of the record of the new history association relation between the third user and the first user is not 1, updating the association time state value corresponding to the third user node and the first user node in the current association relation diagram to the association time state value of the record of the new history association relation between the third user and the first user.
8. The system of claim 7, wherein the system further comprises a controller configured to control the controller,
when an additional history association record of the third user and the first user is established in the third database, deleting the original additional history association record corresponding to the third user and the first user from the third database, wherein the step S3 further includes:
step S6, a third user id corresponding to a history association record with the association time greater than a preset second time threshold in time interval from the current time is obtained from the third database, and a third user node corresponding to the third user id in the current association relation diagram is determined to be a node to be processed;
and S7, deleting the node to be processed, the connection line of the node to be processed and the first user node and the association time state value corresponding to the connection line from the current association relation diagram.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110734909.XA CN113468278B (en) | 2021-06-30 | 2021-06-30 | System for acquiring association relation of target users |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110734909.XA CN113468278B (en) | 2021-06-30 | 2021-06-30 | System for acquiring association relation of target users |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113468278A CN113468278A (en) | 2021-10-01 |
CN113468278B true CN113468278B (en) | 2023-09-08 |
Family
ID=77874404
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110734909.XA Active CN113468278B (en) | 2021-06-30 | 2021-06-30 | System for acquiring association relation of target users |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113468278B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007183859A (en) * | 2006-01-10 | 2007-07-19 | Konica Minolta Holdings Inc | Information retrieval system, information retrieval method, and information management apparatus |
CN109816482A (en) * | 2019-01-04 | 2019-05-28 | 平安科技(深圳)有限公司 | Knowledge mapping construction method, device, equipment and the storage medium of electric business platform |
CN112765473A (en) * | 2021-01-28 | 2021-05-07 | 杭州云深科技有限公司 | Data processing system for acquiring target associated equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4633162B2 (en) * | 2008-12-01 | 2011-02-16 | 株式会社エヌ・ティ・ティ・ドコモ | Index generation system, information retrieval system, and index generation method |
-
2021
- 2021-06-30 CN CN202110734909.XA patent/CN113468278B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007183859A (en) * | 2006-01-10 | 2007-07-19 | Konica Minolta Holdings Inc | Information retrieval system, information retrieval method, and information management apparatus |
CN109816482A (en) * | 2019-01-04 | 2019-05-28 | 平安科技(深圳)有限公司 | Knowledge mapping construction method, device, equipment and the storage medium of electric business platform |
CN112765473A (en) * | 2021-01-28 | 2021-05-07 | 杭州云深科技有限公司 | Data processing system for acquiring target associated equipment |
Non-Patent Citations (1)
Title |
---|
基于用户标签和时间维度的信息检索方法;刘合兵;尚俊平;席磊;张浩;;农业工程技术(33);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113468278A (en) | 2021-10-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10061804B2 (en) | Optimizing an order of execution of multiple join operations | |
US11709918B2 (en) | Building resilient models to address dynamic customer data use rights | |
KR101557294B1 (en) | Search results ranking using editing distance and document information | |
US20190102427A1 (en) | Online optimizer statistics maintenance during load | |
US7415455B2 (en) | Self-healing RDBMS optimizer | |
CN103299267A (en) | Methods and systems for performing cross store joins in a multi-tenant store | |
US11372858B2 (en) | Estimated query performance | |
CN102890697B (en) | Based on the object search method of map localized area | |
US20120191639A1 (en) | Statistics forecast for range partitioned tables | |
US10824498B2 (en) | Quantification of failure using multimodal analysis | |
US20180336199A1 (en) | System and method for query resource caching | |
CN113326343B (en) | Road network data storage method and system based on multi-level grids and file indexes | |
CN113468278B (en) | System for acquiring association relation of target users | |
CN114416324A (en) | Task triggering method and device, computer equipment and storage medium | |
CN113468279B (en) | System for acquiring association relation of target users | |
US8548980B2 (en) | Accelerating queries based on exact knowledge of specific rows satisfying local conditions | |
CN113254463A (en) | List updating method, system and medium | |
Zöller et al. | Seismicity scenarios for the remaining operating period of the gas field in Groningen, Netherlands | |
CN111666302A (en) | User ranking query method, device, equipment and storage medium | |
CN109828984B (en) | Analysis processing method and device, computer storage medium and terminal | |
CN107704507A (en) | Data base processing method and equipment | |
US20130086021A1 (en) | Apparatus and method for controlling data access | |
CN113961592A (en) | Data query method, device, equipment and storage medium based on master-slave database | |
CN109284291B (en) | Efficient space-time data retrieval method based on self-adaptive multi-baseline correction model | |
CN115809268B (en) | Adaptive query method and device based on fragment index |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |