Data rollback method, device, equipment and storage medium
By acquiring user tag backtracking information and using a database to obtain tag bitmaps and user data anchor maps, the problem of being unable to build and quickly backtrack tag source data in real time in existing technologies is solved, achieving efficient and accurate user data backtracking.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MERCHANTS BANK
- Filing Date
- 2023-08-31
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies cannot build user tag bit charts in real time and cannot quickly trace back the tag source data, making data verification and effect review difficult.
By acquiring user tag backtracking information, a tag bitmap and user data anchoring map are obtained using a preset first database, and backtracking is performed using a preset second database to obtain user data corresponding to user tags.
It enables rapid backtracking of user data, improves backtracking efficiency and accuracy, and supports the need to build label charts in real time.
Smart Images

Figure CN117171133B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing, and in particular to a data backtracking method, apparatus, device, and storage medium. Background Technology
[0002] Data backtracking refers to tracing and retracing the flow and changes of data during data processing and analysis to understand the data's origin, transformation, and usage. Data backtracking helps researchers, analysts, and data scientists understand the historical changes in data, thereby better understanding its reliability, quality, and usability. Data backtracking is widely used in fields such as finance, healthcare, and food safety.
[0003] The current mainstream solution for data backtracking is to build a user profiling platform based on ElasticSearch. However, user tag data in this type of solution can only be analyzed offline and cannot be built into a user tag table in real time. In addition, it can only output a set of users with a specified combination of tags and cannot provide detailed data at the same time, which poses a significant obstacle to subsequent data verification and effect review. Summary of the Invention
[0004] The main objective of this invention is to provide a data backtracking method, apparatus, device, and storage medium, which aims to solve the problems that tag bitmaps cannot be constructed in real time and that tag source data cannot be quickly backtracked.
[0005] To achieve the above objectives, the present invention provides a data backtracking method, which includes the following steps:
[0006] Obtain user tag backtracking information;
[0007] Based on the user tag backtracking information, the tag bitmap and user data anchor positioning map corresponding to the user tags are obtained through the preset first database;
[0008] Based on the tag bitmap and user data anchor map corresponding to the user tags, backtracking is performed through a preset second database to obtain the user data corresponding to the user tags.
[0009] Optionally, the step of obtaining user tag backtracking information may further include:
[0010] Obtain the user data;
[0011] Based on the Lambda method, the tag bit chart is constructed according to the user data;
[0012] Based on data tagging technology, the user data anchor positioning map is obtained according to the user data and the tag bitmap.
[0013] The label bitmap and user data anchor map are stored in a preset first database.
[0014] Optionally, the step of constructing the tag bitmap based on the user data using the Lambda method includes:
[0015] Based on a preset computing engine, the user data is analyzed to obtain user tag data;
[0016] Based on the user tag data, obtain the original tag table;
[0017] The global user ID mapping table is associated with the original tag table, and the global user ID mapping table is stored in a preset second database;
[0018] Based on the original label table, construct the label bit chart.
[0019] Optionally, the step of analyzing the user data based on a preset computing engine to obtain user tag data includes:
[0020] Based on the first computing engine in the preset computing engine, the offline user data in the user data is analyzed to obtain offline user tag data;
[0021] Based on the second computing engine in the preset computing engine, the real-time user data in the user data is analyzed to obtain real-time user tag data;
[0022] The user tag data is obtained based on the offline user tag data and the real-time user tag data.
[0023] Optionally, after the step of constructing the tag bitmap based on the user data using the Lambda method, the method further includes:
[0024] Create a distributed table based on the aforementioned tag bit chart;
[0025] The original label table and the distributed table are stored in a preset first database.
[0026] Optionally, the step of obtaining the user data anchor map based on the user data and the tag bitmap using data tagging technology includes:
[0027] Based on the user data, construct user identification data;
[0028] The user identification data is classified according to the label bitmap in the label bitmap to obtain a user identification dataset;
[0029] The user data anchor location map is generated based on the label bitmap and the user identifier dataset.
[0030] Optionally, the step of obtaining user data corresponding to user tags by backtracking through a preset second database based on the tag bitmap and user data anchor location map corresponding to the user tags includes:
[0031] Based on a preset list of user IDs, the tag bitmap and user data anchor map corresponding to the user tags are processed to obtain the user identifier dataset corresponding to the user tags.
[0032] Based on the user identifier dataset corresponding to the user tag, the user data is backtracked through a preset second database to obtain the user data corresponding to the user tag.
[0033] Furthermore, to achieve the above objectives, the present invention also provides a data backtracking device, the data backtracking device comprising:
[0034] The acquisition module is used to obtain user tag backtracking information;
[0035] The chart calling module is used to obtain the tag position chart and user data anchor positioning chart corresponding to the user tag through a preset first database based on the user tag backtracking information.
[0036] The backtracking module is used to retrieve user data corresponding to user tags by backtracking through a preset second database based on the tag bitmap and user data anchor map corresponding to the user tags.
[0037] This invention also proposes a terminal device, which includes a memory, a processor, and a data backtracking program stored in the memory and executable on the processor. When the data backtracking program is executed by the processor, it implements the steps of the data backtracking method described above.
[0038] This invention also proposes a calculator-readable storage medium storing a data backtracking program, which, when executed by a processor, implements the steps of the data backtracking method described above.
[0039] This invention proposes a data backtracking method, apparatus, device, and storage medium. It acquires user tag backtracking information; based on this information, it obtains a tag bitmap and a user data anchor map corresponding to the user tag through a preset first database; and then, based on these tags and the anchor map, it performs backtracking through a preset second database to obtain the user data corresponding to the user tag. By calling the tag bitmap and the anchor map, the user data corresponding to the user tag is obtained. This achieves user data backtracking and solves the technical problem of being unable to quickly backtrack tag source data. Compared to existing technologies, it has the advantages of high efficiency and high accuracy.
[0040] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention. Attached Figure Description
[0041] Figure 1 This is a schematic diagram of the functional modules of the terminal device to which the data backtracking device of this invention belongs;
[0042] Figure 2 This is a flowchart illustrating a first exemplary embodiment of the data backtracking method of the present invention;
[0043] Figure 3 This is a flowchart illustrating a second exemplary embodiment of the data backtracking method of the present invention;
[0044] Figure 4 This is a flowchart illustrating a third exemplary embodiment of the data backtracking method of the present invention;
[0045] Figure 5 This is a flowchart illustrating a fourth exemplary embodiment of the data backtracking method of the present invention;
[0046] Figure 6 This is a flowchart illustrating a fifth exemplary embodiment of the data backtracking method of the present invention;
[0047] Figure 7 This is a schematic diagram of the structure of the distributed table in the data backtracking method of the present invention;
[0048] Figure 8 This is a flowchart illustrating a sixth exemplary embodiment of the data backtracking method of the present invention;
[0049] Figure 9 This is a schematic diagram of user identification data in the data backtracking method of the present invention;
[0050] Figure 10This is a schematic diagram of the user data anchor location map in the data backtracking method of the present invention;
[0051] Figure 11 This is a flowchart illustrating a seventh exemplary embodiment of the data backtracking method of the present invention;
[0052] Figure 12 This is a schematic diagram of the overall process of another exemplary embodiment of the data backtracking method of the present invention.
[0053] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0054] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0055] The main solution of this invention is as follows: First, obtain user tag backtracking information. Second, based on the user tag backtracking information, obtain a tag bitmap and user data anchor map corresponding to the user tag through a preset first database. Third, based on the tag bitmap and user data anchor map, perform backtracking through a preset second database to obtain the user data corresponding to the user tag. By calling the tag bitmap and user data anchor map, the user data corresponding to the user tag is obtained. This achieves user data backtracking and solves the technical problem of being unable to quickly backtrack tag source data. Compared to existing technologies, it has the advantages of high efficiency and high accuracy.
[0056] The embodiments of the present invention take into account that, when performing data backtracking, the relevant technical solutions cannot build a tag position chart in real time and cannot quickly backtrack the tag source data.
[0057] Based on this, the present invention proposes a solution that enables rapid backtracking of user data, solving the technical problems of being unable to build tag bit charts in real time and being unable to quickly backtrack tag source data, making data backtracking more convenient and efficient.
[0058] Specifically, refer to Figure 1 , Figure 1 This is a schematic diagram of the functional modules of the terminal device to which the data backtracking device of the present invention belongs. This data backtracking device can be an independent device capable of data backtracking, and it can be carried on the terminal device in hardware or software form. The terminal device can be a smart mobile device with data processing capabilities, such as a mobile phone or tablet computer, or it can be a fixed terminal device or server with data processing capabilities.
[0059] In this embodiment, the terminal device to which the data backtracking device belongs includes at least an output module 110, a processor 120, a memory 130, and a communication module 140.
[0060] The memory 130 stores the operating system and data backtracking program. The data backtracking device can acquire user tag backtracking information; based on the user tag backtracking information, it obtains the tag bitmap and user data anchor positioning map corresponding to the user tag through a preset first database; based on the tag bitmap and user data anchor positioning map corresponding to the user tag, it performs backtracking through a preset second database to obtain the user data corresponding to the user tag. The tag bitmap constructed by the data backtracking program and the backtracking of user data are stored in the memory 130. The output module 110 can be a display screen, etc. The communication module 140 can include a WIFI module, a mobile communication module, and a Bluetooth module, etc., and communicates with external devices or servers through the communication module 140.
[0061] When the data backtracking program in memory 130 is executed by the processor, it performs the following steps:
[0062] Obtain user tag backtracking information;
[0063] Based on the user tag backtracking information, the tag bitmap and user data anchor positioning map corresponding to the user tags are obtained through the preset first database;
[0064] Based on the tag bitmap and user data anchor map corresponding to the user tags, backtracking is performed through a preset second database to obtain the user data corresponding to the user tags.
[0065] Furthermore, when the data backtracking program in memory 130 is executed by the processor, it also performs the following steps:
[0066] Before the steps of tracing user tag information, the following are included:
[0067] Obtain the user data;
[0068] Based on the Lambda method, the tag bit chart is constructed according to the user data;
[0069] Based on data tagging technology, the user data anchor positioning map is obtained according to the user data and the tag bitmap.
[0070] The label bitmap and user data anchor map are stored in a preset first database.
[0071] Furthermore, when the data backtracking program in memory 130 is executed by the processor, it also performs the following steps:
[0072] Based on a preset computing engine, the user data is analyzed to obtain user tag data;
[0073] Based on the user tag data, obtain the original tag table;
[0074] The global user ID mapping table is associated with the original tag table, and the global user ID mapping table is stored in a preset second database;
[0075] Based on the original label table, construct the label bit chart.
[0076] Furthermore, when the data backtracking program in memory 130 is executed by the processor, it also performs the following steps:
[0077] Based on the first computing engine in the preset computing engine, the offline user data in the user data is analyzed to obtain offline user tag data;
[0078] Based on the second computing engine in the preset computing engine, the real-time user data in the user data is analyzed to obtain real-time user tag data;
[0079] The user tag data is obtained based on the offline user tag data and the real-time user tag data.
[0080] Furthermore, when the data backtracking program in memory 130 is executed by the processor, it also performs the following steps:
[0081] Create a distributed table based on the aforementioned tag bit chart;
[0082] The original label table and the distributed table are stored in a preset first database.
[0083] Furthermore, when the data backtracking program in memory 130 is executed by the processor, it also performs the following steps:
[0084] Based on the user data, construct user identification data;
[0085] The user identification data is classified according to the label bitmap in the label bitmap to obtain a user identification dataset;
[0086] The user data anchor location map is generated based on the label bitmap and the user identifier dataset.
[0087] Furthermore, when the data backtracking program in memory 130 is executed by the processor, it also performs the following steps:
[0088] Based on a preset list of user IDs, the tag bitmap and user data anchor map corresponding to the user tags are processed to obtain the user identifier dataset corresponding to the user tags.
[0089] Based on the user identifier dataset corresponding to the user tag, the user data is backtracked through a preset second database to obtain the user data corresponding to the user tag.
[0090] This embodiment, through the above-described scheme, specifically obtains user tag backtracking information; based on the user tag backtracking information, it retrieves the tag bit chart and user data anchor positioning chart corresponding to the user tag through a preset first database; based on the tag bit chart and user data anchor positioning chart corresponding to the user tag, it performs backtracking through a preset second database to obtain the user data corresponding to the user tag. By calling the tag bit chart and user data anchor positioning chart, the user data corresponding to the user tag is obtained. Thus, user data backtracking is achieved, solving the technical problem of being unable to quickly backtrack tag source data. Compared to existing technologies, it has the advantages of high efficiency and high accuracy.
[0091] Based on, but not limited to, the terminal device architecture described above, embodiments of the method of the present invention are proposed.
[0092] Reference Figure 2 , Figure 2 This is a flowchart illustrating a first exemplary embodiment of the data backtracking method of the present invention. The data backtracking method includes:
[0093] Step S101: Obtain user tag backtracking information;
[0094] The execution subject of the method in this embodiment is a data backtracking service system, or it can be a data backtracking device or a data backtracking equipment. This embodiment takes a data backtracking device as an example. The data backtracking device can be integrated into a device with data processing function.
[0095] To address the current inability to quickly trace back to the source data of user tags, it is particularly important to trace back user data based on user tag tracing information. The following steps are taken to achieve this:
[0096] First, a special data backtracking device is integrated into a device with data processing capabilities, which allows for the backtracking of tag source data.
[0097] Finally, user tag tracing information is obtained through the detection management server in the data tracing device.
[0098] Step S102: Based on the user tag backtracking information, obtain the tag bitmap and user data anchor positioning map corresponding to the user tag through the preset first database;
[0099] The data backtracking device obtains the tag bitmap and user data anchor location map corresponding to the user tags based on the acquired user tag backtracking information, and performs the following steps:
[0100] First, the data backtracking device calls a preset first database, which can be ClickHouse;
[0101] Finally, the data backtracking device uses a pre-set first database to obtain the tag bitmap and user data anchor positioning map corresponding to the user tags based on the user tag backtracking information.
[0102] Step S103: Based on the tag bitmap and user data anchor positioning map corresponding to the user tag, backtrack through the preset second database to obtain the user data corresponding to the user tag.
[0103] The data backtracking device retrieves user data corresponding to user tags by backtracking based on the tag bitmap and user data anchor map corresponding to user tags, and achieves this through the following steps:
[0104] First, the data backtracking device calls a preset second database, which can be HBase or Hive;
[0105] Finally, the data backtracking device obtains the user data corresponding to the user tags through a preset second database, based on the tag bitmap and user data anchor map corresponding to the user tags.
[0106] This embodiment, through the above-described scheme, obtains user tag backtracking information; based on the user tag backtracking information, it retrieves the tag bit chart and user data anchor positioning chart corresponding to the user tag through a preset first database; based on the tag bit chart and user data anchor positioning chart corresponding to the user tag, it performs backtracking through a preset second database to obtain the user data corresponding to the user tag. By calling the tag bit chart and user data anchor positioning chart, the user data corresponding to the user tag is obtained. Thus, user data backtracking is achieved, solving the technical problem of being unable to quickly backtrack tag source data. Compared with existing technologies, it has the advantages of high efficiency and high accuracy.
[0107] Reference Figure 3 , Figure 3 This is a flowchart illustrating a second exemplary embodiment of the data backtracking method of the present invention.
[0108] Based on the above Figure 2 In the embodiment shown, step S101, before obtaining user tag backtracking information, further includes:
[0109] Step S001: Obtain the user data;
[0110] Step S002: Based on the Lambda method, construct the tag bit chart according to the user data;
[0111] Step S003: Based on data tagging technology, obtain the user data anchor positioning map according to the user data and the tag bitmap;
[0112] Step S004: Store the tag bitmap and user data anchor location map into a preset first database.
[0113] Specifically, before acquiring user tag backtracking information, the data backtracking device acquires user data, generates and stores a tag bitmap and a user data anchoring map, and achieves this through the following steps:
[0114] First, the data backtracking device acquires user data;
[0115] Then, the data backtracking device, based on the Lambda method, constructs a tag bit chart based on user data;
[0116] Then, the data backtracking device obtains the user data anchor location map based on data tagging technology, according to user data and tag bitmap;
[0117] Finally, the data backtracking device stores the tag bitmap and user data anchor location map into a preset first database.
[0118] This embodiment, through the above-described scheme, specifically involves: acquiring the user data; constructing the tag bitmap based on the user data using a Lambda method; obtaining the user data anchor map based on the user data and the tag bitmap using data tagging technology; and storing the tag bitmap and user data anchor map in a preset first database. By acquiring user data, the tag bitmap and user data anchor map are obtained. Thus, obtaining and storing the tag bitmap and user data anchor map provides support for user data backtracking.
[0119] Reference Figure 4 , Figure 4 This is a flowchart illustrating a third exemplary embodiment of the data backtracking method of the present invention.
[0120] Based on the above Figure 2 In the embodiment shown, step S002, based on the Lambda method, constructs the tag bitmap according to the user data, including:
[0121] Step S0021: Based on a preset computing engine, analyze the user data to obtain user tag data;
[0122] Step S0022: Obtain the original tag table based on the user tag data;
[0123] Step S0023: Associate the global user ID mapping table with the original tag table. The global user ID mapping table is stored in a preset second database.
[0124] Step S0024: Construct the tag bitmap based on the original tag table.
[0125] Specifically, the data backtracking device is based on the Lambda method. It constructs a tag graph based on the acquired user data and implements it through the following steps:
[0126] First, the data backtracking device analyzes user data based on a preset computing engine to obtain user tag data. The preset computing engine can be a Spark / Flink computing engine. The Spark engine is used to process offline user data and generate offline user tag data, while the Flink engine is used to process real-time user data and generate real-time user tag data, thus meeting the real-time requirements of the business.
[0127] Secondly, the data backtracking device obtains the original tag table based on the user tag data;
[0128] Then, the data backtracking device associates the global user ID mapping table with the original tag table, wherein the global user ID mapping table is stored in a preset second database;
[0129] Finally, the data backtracking device constructs a label bit chart based on the original label table.
[0130] This embodiment, through the above-described scheme, specifically analyzes the user data using a preset computing engine to obtain user tag data; based on the user tag data, it obtains an original tag table; it associates a global user ID mapping table with the original tag table, the global user ID mapping table being stored in a preset second database; and it constructs the tag bitmap based on the original tag table. Thus, a tag bitmap is obtained based on the user data. This provides support for backtracking user data.
[0131] Reference Figure 5 , Figure 5 This is a flowchart illustrating a fourth exemplary embodiment of the data backtracking method of the present invention.
[0132] Based on the above Figure 4 In the embodiment shown, step S0021, based on a preset computing engine, analyzes the user data to obtain user tag data, including:
[0133] Step S00211: Based on the first computing engine in the preset computing engine, analyze the offline user data in the user data to obtain offline user tag data;
[0134] Step S00212: Based on the second computing engine in the preset computing engine, analyze the real-time user data in the user data to obtain real-time user tag data;
[0135] Step S00213: Obtain the user tag data based on the offline user tag data and the real-time user tag data.
[0136] Specifically, the data backtracking device analyzes user data based on a preset computing engine to obtain user tag data, and achieves this through the following steps:
[0137] First, the data backtracking device analyzes the offline user data in the user data based on the first computing engine in the preset computing engine to obtain offline user tag data. The first computing engine can be the Spark computing engine.
[0138] Secondly, the data backtracking device analyzes the real-time user data in the user data based on the second computing engine in the preset computing engine to obtain real-time user tag data. The second computing engine can be the Flink computing engine, which processes the real-time user data and generates real-time user tag data to meet the real-time requirements of the business.
[0139] Finally, the data backtracking device obtains user tag data based on offline user tag data and real-time user tag data.
[0140] This embodiment, through the above-described scheme, specifically analyzes offline user data from the user data using a first computing engine within the preset computing engine to obtain offline user tag data; it then analyzes real-time user data from the user data using a second computing engine within the preset computing engine to obtain real-time user tag data; and finally, based on the offline and real-time user tag data, it obtains the user tag data. Based on the user data, user tag data is obtained. This provides support for constructing a tag bitmap.
[0141] Reference Figure 6 , Figure 6 This is a flowchart illustrating a fifth exemplary embodiment of the data backtracking method of the present invention.
[0142] Based on the above Figure 3 In the embodiment shown, step S002, after constructing the tag bitmap based on the user data using the Lambda method, further includes:
[0143] Step S00201: Create a distributed table based on the label bitmap;
[0144] Step S00202: Store the original tag table and the distributed table in a preset first database.
[0145] Specifically, the data backtracking device creates a distributed table based on the tag bitmap and stores the original tag table and the distributed table in a preset first database, which is achieved through the following steps:
[0146] First, the data backtracking device creates a distributed table based on the tag bitmap;
[0147] Finally, the data backtracking device stores the original tag table and the distributed table into a pre-defined first database.
[0148] Reference Figure 7 , Figure 7 This is a schematic diagram of the structure of the distributed table in the data backtracking method of the present invention.
[0149] Let's take ClickHouse as the default first database as an example.
[0150] Figure 7 The distributed table contains four tag bit charts and is associated with three global user ID mapping tables. Through the distributed table, upper-layer tag query applications can quickly query the tag bit charts.
[0151] Furthermore, this embodiment has made further optimizations to address issues related to tag write speed, data consistency, and high availability:
[0152] Tag data is characterized by large data volume and frequent changes in user tags. Frequent data update operations are very inefficient. In this embodiment, update operations are uniformly transformed into add operations, increasing the write speed to 50-200M / s;
[0153] ClickHouse cannot guarantee that every query will return an aggregated result. To ensure that data is aggregated before a query, this embodiment uses a timer to force the aggregation process by issuing an optimize command at regular intervals and during queries.
[0154] This embodiment, through the above-described scheme, specifically creates a distributed table based on the tag bitmap; and stores the original tag table and the distributed table in a preset first database. The distributed table is obtained and stored through the tag bitmap. Thus, a distributed table is obtained, providing support for calling the tag bitmap.
[0155] Reference Figure 8 , Figure 8 This is a flowchart illustrating the sixth exemplary embodiment of the data backtracking method of the present invention.
[0156] Based on the above Figure 3In the illustrated embodiment, step S003, based on data tagging technology, obtains the user data anchor location map according to the user data and the tag bitmap, including:
[0157] Step S0031: Construct user identification data based on the user data;
[0158] Step S0032: Classify the user identification data according to the label bitmap in the label bitmap to obtain a user identification dataset;
[0159] Step S0033: Generate the user data anchor location map based on the label bitmap and the user identifier dataset.
[0160] Specifically, the data backtracking device, based on data tagging technology, obtains the user data anchor location map according to the user data and the tag bitmap, and achieves this by taking the following steps:
[0161] First, the data backtracking device constructs user identification data based on user data. This can be achieved by concatenating the user ID and the hash value of the user data to construct a fixed-length UUID value from the source data, which is then used for subsequent backtracking and location.
[0162] Then, the data backtracking device classifies the user identification data according to the label bitmap in the label bitmap to obtain the user identification dataset;
[0163] Finally, the data backtracking device generates a user data anchor location map based on the tag bitmap and user identifier dataset.
[0164] Reference Figure 9 and Figure 10 , Figure 9 This is a schematic diagram of user identification data in the data backtracking method of the present invention. Figure 10 This is a schematic diagram of the user data anchor location map in the data backtracking method of the present invention.
[0165] Take the user identification data as a fixed-length UUID value from the source data as an example.
[0166] The fixed-length UUID value of the source data is formed by concatenating the UID in the user data and the hash value of the user data. The anchor map of the user data includes the tag name, tag value, user ID bitmap, data bitmap, gender, etc.
[0167] This embodiment, through the above-described scheme, specifically involves constructing user identification data based on the user data; classifying the user identification data according to the label bitmap in the label bitmap to obtain a user identification dataset; and generating the user data anchor map based on the label bitmap and the user identification dataset. The user data anchor map is thus obtained based on the user data and the label bitmap. This provides support for backtracking user data.
[0168] Reference Figure 11 , Figure 11 This is a flowchart illustrating the seventh exemplary embodiment of the data backtracking method of the present invention.
[0169] Based on the above Figure 2 In the embodiment shown, step S103, which involves backtracking through a preset second database to obtain user data corresponding to the user tags based on the tag bitmap and user data anchor map corresponding to the user tags, includes:
[0170] Step S1031: Based on the preset user ID list, process the tag bitmap and user data anchor map corresponding to the user tag to obtain the user identifier dataset corresponding to the user tag.
[0171] Step S1032: Based on the user identifier dataset corresponding to the user tag, the user data is backtracked through a preset second database to obtain the user data corresponding to the user tag.
[0172] Specifically, the data backtracking device retrieves user data corresponding to user tags by backtracking through a preset second database based on the tag bitmap and user data anchor map corresponding to the user tags, and performs the following steps:
[0173] First, the data backtracking device processes the tag bitmap and user data anchor map corresponding to the user tags according to the preset user ID list to obtain the user identifier dataset corresponding to the user tags.
[0174] Finally, the data backtracking device uses the user identifier dataset corresponding to the user tag and a preset second database to backtrack the user data and obtain the user data corresponding to the user tag.
[0175] This embodiment, through the above-described scheme, specifically processes the tag bitmap and user data anchor map corresponding to the user tags based on a preset user ID list to obtain the user identifier dataset corresponding to the user tags; based on the user identifier dataset corresponding to the user tags, it uses a preset second database to backtrack the user data and obtain the user data corresponding to the user tags. By calling the tag bitmap and user data anchor map, the user data corresponding to the user tags is obtained. Thus, user data backtracking is achieved, solving the technical problem of not being able to quickly backtrack tag source data. Compared to existing technologies, it has the advantages of high efficiency and high accuracy.
[0176] As another exemplary embodiment, this embodiment can realize the tracing of user data through a data tracing device, and the process of the data tracing method is as follows: Figure 12 As shown:
[0177] Taking user tag backtracking information as a tag combination, the tag bitmap and user data anchor map corresponding to the user tag as the source data bitmap result set, the user identifier dataset corresponding to the user tag as the source data UUID result set, and the user data corresponding to the user tag as the source data, with the preset second database being HBase as an example.
[0178] First, the data backtracking device acquires the tag combination;
[0179] Secondly, the data backtracking device obtains the source data bitmap result set through a preset first database based on the tag combination;
[0180] Then, the data backtracking device uses a preset list of user IDs as filtering conditions to perform parallel filtering on the source data bitmap result set and obtain the source data UUID result set.
[0181] Finally, the data backtracking device uses the source data UUID result set to perform data backtracking in HBase to obtain the source data.
[0182] This embodiment, through the above-described scheme, specifically obtains user tag backtracking information; based on the user tag backtracking information, it retrieves the tag bit chart and user data anchor positioning chart corresponding to the user tag through a preset first database; based on the tag bit chart and user data anchor positioning chart corresponding to the user tag, it performs backtracking through a preset second database to obtain the user data corresponding to the user tag. By calling the tag bit chart and user data anchor positioning chart, the user data corresponding to the user tag is obtained. Thus, user data backtracking is achieved, solving the technical problem of being unable to quickly backtrack tag source data. Compared to existing technologies, it has the advantages of high efficiency and high accuracy.
[0183] Furthermore, the present invention also provides a data backtracking device, the data backtracking device comprising:
[0184] The acquisition module is used to obtain user tag backtracking information;
[0185] The chart calling module is used to obtain the tag position chart and user data anchor positioning chart corresponding to the user tag through a preset first database based on the user tag backtracking information.
[0186] The backtracking module is used to retrieve user data corresponding to user tags by backtracking through a preset second database based on the tag bitmap and user data anchor map corresponding to the user tags.
[0187] The principle of data backtracking in this embodiment is explained in the above embodiments and will not be repeated here.
[0188] Furthermore, this embodiment of the invention also proposes a terminal device, which includes a memory, a processor, and a data backtracking program stored in the memory and executable on the processor. When the data backtracking program is executed by the processor, it implements the steps of the data backtracking method described above.
[0189] Since the data backtracking program employs all the technical solutions of all the aforementioned embodiments when executed by the processor, it possesses at least all the beneficial effects brought about by all the technical solutions of all the aforementioned embodiments, which will not be elaborated upon here.
[0190] This invention also proposes a calculator-readable storage medium storing a data backtracking program, which, when executed by a processor, implements the steps of the data backtracking method described above.
[0191] Since this data backtracking program employs all the technical solutions of all the aforementioned embodiments when executed by the processor, it possesses at least all the beneficial effects brought about by all the technical solutions of all the aforementioned embodiments, which will not be elaborated upon here.
[0192] Compared to existing technologies, the data backtracking scheme proposed in this invention obtains user tag backtracking information; based on this information, it retrieves a tag bitmap and a user data anchor map corresponding to the user tag through a preset first database; and then, based on these tags and anchor maps, it performs backtracking through a preset second database to obtain the user data corresponding to the user tag. This solves the problem of being unable to quickly backtrack tag source data. Based on this invention, starting from the real-world problem of being unable to quickly backtrack tag source data, a data backtracking scheme was designed, and its effectiveness was verified in backtracking user data. Finally, the efficiency and accuracy of data backtracking using this invention were significantly improved.
[0193] Compared with existing technologies, the solutions of the embodiments of the present invention have the following advantages:
[0194] 1. It can analyze user data based on data type and build user tag tables in real time.
[0195] 2. It can output the tag position chart and user data anchor position chart corresponding to the user tags, and provide the user data corresponding to the user tags, so as to realize the rapid backtracking of data.
[0196] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0197] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0198] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, controlled terminal, or network device, etc.) to execute the methods of each embodiment of the present invention.
[0199] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A data backtracking method, characterized in that, The data backtracking method includes the following steps: Obtain user tag backtracking information; Based on the user tag backtracking information, the tag bitmap and user data anchor positioning map corresponding to the user tags are obtained through the preset first database; Based on the tag bitmap and user data anchor map corresponding to the user tags, backtracking is performed through a preset second database to obtain the user data corresponding to the user tags; Prior to the step of obtaining user tag backtracking information, the following steps are included: Obtain the user data; Based on the Lambda method, the tag bit chart is constructed according to the user data; Based on data tagging technology, the user data anchor positioning map is obtained according to the user data and the tag bitmap. Store the label bitmap and user data anchor location map into a preset first database; The step of obtaining the user data anchor map based on the user data and the tag bitmap using data tagging technology includes: Based on the user data, user identification data is constructed, wherein the user identification data is a fixed-length UUID value of the source data obtained by concatenating the user ID and the hash value of the user data; The user identification data is classified according to the label bitmap in the label bitmap to obtain a user identification dataset; Based on the label bitmap and the user identifier dataset, the user data anchor map is generated. The user data anchor map includes at least the label name, the tag value, the user ID bitmap, and the data bitmap.
2. The data backtracking method as described in claim 1, characterized in that, The steps for constructing the tag bitmap based on the user data using the Lambda method include: Based on a preset computing engine, the user data is analyzed to obtain user tag data; Based on the user tag data, obtain the original tag table; The global user ID mapping table is associated with the original tag table, and the global user ID mapping table is stored in a preset second database; Based on the original label table, construct the label bit chart.
3. The data backtracking method as described in claim 2, characterized in that, The step of analyzing the user data based on a preset computing engine to obtain user tag data includes: Based on the first computing engine in the preset computing engine, the offline user data in the user data is analyzed to obtain offline user tag data; Based on the second computing engine in the preset computing engine, the real-time user data in the user data is analyzed to obtain real-time user tag data; The user tag data is obtained based on the offline user tag data and the real-time user tag data.
4. The data backtracking method as described in claim 1, characterized in that, The step of constructing the tag bitmap based on the user data using the Lambda method further includes: Create a distributed table based on the aforementioned tag bit chart; The original label table and the distributed table are stored in a preset first database.
5. The data backtracking method as described in claim 1, characterized in that, The step of obtaining user data corresponding to user tags by backtracking through a preset second database based on the tag bitmap and user data anchor map corresponding to the user tags includes: Based on a preset list of user IDs, the tag bitmap and user data anchor map corresponding to the user tags are processed to obtain the user identifier dataset corresponding to the user tags. Based on the user identifier dataset corresponding to the user tag, the user data is backtracked through a preset second database to obtain the user data corresponding to the user tag.
6. A data backtracking device, characterized in that, The data backtracking device includes: The acquisition module is used to obtain user tag backtracking information; The chart calling module is used to obtain the tag position chart and user data anchor positioning chart corresponding to the user tag through a preset first database based on the user tag backtracking information. The backtracking module is used to retrieve user data corresponding to user tags by backtracking through a preset second database based on the tag bitmap and user data anchor positioning map corresponding to the user tags. The acquisition module is further configured to acquire the user data before the step of acquiring user tag backtracking information; construct the tag bitmap based on the user data using the Lambda method; obtain the user data anchor map based on the user data and the tag bitmap using data tagging technology; and store the tag bitmap and the user data anchor map in a preset first database. The acquisition module is further configured to construct user identification data based on the user data, wherein the user identification data is a fixed-length UUID value of the source data obtained by concatenating the user ID and the hash value of the user data; classify the user identification data according to the label bitmap in the label bitmap to obtain a user identification dataset; and generate the user data anchor map according to the label bitmap and the user identification dataset, wherein the user data anchor map includes at least a label name, a tag value, a user ID bitmap, and a data bitmap.
7. A terminal device, characterized in that, The terminal device includes a memory, a processor, and a data backtracking program stored in the memory and executable on the processor. When the data backtracking program is executed by the processor, it implements the steps of the data backtracking method as described in any one of claims 1-5.
8. A calculator-readable storage medium, characterized in that, The computer-readable storage medium stores a data backtracking program, which, when executed by a processor, implements the steps of the data backtracking method as described in any one of claims 1-5.