Real-time data tag acquisition method, device, computer equipment and storage medium
By receiving and integrating user behavior data and historical data in real-time messages, real-time full data is formed, which solves the problem of lagging big data real-time label processing in the existing technology and enables timely processing and analysis of large amounts of data.
Patent Information
- Application Number
- CN201910923962.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-27
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2039-09-27
AI Technical Summary
Existing technology cannot perform real-time label processing on big data, resulting in data analysis lagging behind.
By receiving real-time messages sent by the server backend, user behavior data is extracted, and real-time incremental data and historical full data are integrated according to the indicators in the preset analysis tasks to form real-time full data for storage, reducing the lag time of data processing.
It realizes real-time label processing of large amounts of data, reduces the lag time of data processing, and improves the timeliness and efficiency of data analysis.
Smart Images

Figure CN110825820B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a real-time data tag acquisition method, device, computer equipment and storage medium. Background Art
[0002] With the rise of mobile Internet technology and the development of big data technology, Internet applications based on big data are gradually changing our daily lives, such as news reading, online shopping, social chatting, casual games, etc. Each application has a huge user base, and the relevant big data centered on the user base is the part that data analysts are most concerned about. Data analysts label the valuable data in big data, classify and filter the data in the form of labels, which will help data analysis.
[0003] In traditional data warehouse management using Hive as a processing tool, since the underlying principle of Hive is distributed computing initiated by MapReduce, it is impossible to perform real-time computing on big data and can only be applied to offline batch computing. That is, the stock data in the data warehouse can only be counted at certain time intervals, such as daily, weekly or other preset time intervals. This makes it impossible to perform real-time statistics on incremental data, resulting in a relative lag in data analysis, which brings great inconvenience to data analysis. Summary of the invention
[0004] The embodiments of the present invention provide a real-time data label acquisition method, device, computer equipment and storage medium to solve the technical problem in the prior art that it is impossible to perform real-time label processing on data with too large a stock, resulting in a relatively delayed data analysis.
[0005] A real-time data tag acquisition method, the method comprising:
[0006] Receive real-time messages sent by the server backend and obtain user behavior data from the real-time messages;
[0007] According to a preset indicator in a preset analysis task, extracting fields that are correlated with fields in the preset indicator from the user behavior data, and using the extracted fields in the user behavior data as real-time incremental data, wherein the preset indicator is task analysis requirement information in the preset analysis task;
[0008] Integrate the common fields in the real-time incremental data and the preset historical full data, use the integrated common fields as the real-time full data, and store the real-time full data in a preset database.
[0009] A real-time data tag acquisition device, the device comprising:
[0010] A real-time data receiving module is used to receive real-time messages sent by the server backend and obtain user behavior data from the real-time messages;
[0011] A real-time incremental data extraction module, for extracting fields that are correlated with fields in the preset indicators from the user behavior data according to preset indicators in the preset analysis task, and using the extracted fields in the user behavior data as real-time incremental data, wherein the preset indicators are task analysis requirement information in the preset analysis task;
[0012] The data integration module is used to integrate the common fields in the real-time incremental data and the preset historical full data, use the integrated common fields as the real-time full data, and store the real-time full data in a preset database.
[0013] A computer device comprises a memory and a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned real-time data tag acquisition method when executing the computer program.
[0014] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned real-time data tag acquisition method are implemented.
[0015] The above-mentioned real-time data label acquisition method, device, computer equipment and storage medium, by dividing user big data into historical data and real-time data, obtains the field data of historical data and real-time data according to preset indicators, and integrates the obtained field data as index tags of historical data and real-time data, that is, real-time full data, can achieve the purpose of real-time labeling processing of large amounts of existing data. Through real-time full data, huge amounts of real-time data or historical data can be processed in a timely manner, which greatly reduces the lag time when processing real-time data. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0017] Figure 1 A schematic diagram of an application environment of a real-time data tag acquisition method in an embodiment;
[0018] Figure 2A flowchart of a method for acquiring real-time data tags in one embodiment;
[0019] Figure 3 A schematic diagram of a flow chart of a method for acquiring real-time data tags in another embodiment;
[0020] Figure 4 A flowchart of step 202 in a real-time data tag acquisition method in another embodiment;
[0021] Figure 5 A schematic diagram of a real-time data tag acquisition device in one embodiment;
[0022] Figure 6 FIG. 1 is a schematic diagram of a computer device in one embodiment. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0024] The real-time data tag acquisition method provided by the embodiment of the present invention can be applied to Figure 1 In the application environment shown. Among them, the real-time operation of the user on the client 106 is sent to the server backend 102 in the form of a real-time message, and the server backend 102 sends the real-time message to the server 104 for processing. The server 104 filters the real-time message sent by the server backend 102, extracts fields, integrates with the fields of historical user data, and obtains the required fields from the historical user data and the real-time user data as real-time full data, and then displays the real-time full data on the client 106 through the network, which is convenient for subsequent analysis and search operations. Among them, the client 106 and the server backend 102, the client 106 and the server 104, and the server backend 102 and the server 104 are all connected through a network, which can be a wired network or a wireless network, the client 106 can be but not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server backend 102 and the server 104 can be implemented with an independent server or a server cluster composed of multiple servers.
[0025] In one embodiment, Figure 2 As shown, a real-time data label acquisition method is provided, which is applied to Figure 1 The server in the example is used as an example to illustrate, including the following steps:
[0026] Step 202: Receive the real-time message sent by the server backend, and obtain user behavior data from the real-time message.
[0027] Among them, the server backend, that is, the server backend of the online application is connected to the user client. The user's real-time operation behavior is sent to the server backend of the online application in the form of real-time messages, and then the server backend sends the real-time message to the server for processing. The user behavior data is transmitted to the server backend mainly to reduce the memory pressure of the user client. Storing it in the server backend also makes it convenient for the server to pull data for analysis and processing.
[0028] Real-time messages are data that has been appropriately processed for message communication; user behavior data is a data representation of the user's real-time operational behavior. For example, in a social application, if a user likes or forwards a post, the user behavior data can be represented as: user name + post number + like action / forward action + other user names.
[0029] When the server receives the real-time message sent by the server backend, it performs data processing, data extraction and other operations on the received real-time message to obtain the user behavior data in the real-time message.
[0030] Step 204, according to the preset indicators in the preset analysis task, extract fields that are correlated with the fields in the preset indicators from the user behavior data, and use the extracted fields in the user behavior data as real-time incremental data, wherein the preset indicators are the task analysis requirement information in the preset analysis task.
[0031] The preset analysis tasks are data analysis tasks related to actual specific business applications, and the preset analysis tasks corresponding to different specific businesses are also different.
[0032] Specifically, according to the preset indicators, fields in the user behavior data that are correlated with the fields in the preset indicators are obtained to obtain labels in the user behavior data, wherein the correlation represents the fields associated with the fields in the preset indicators. For example, the "SUV" or "seated car" field in the user behavior data related to the field "car model" in the preset indicators are both fields that are correlated with the fields in the preset indicators, and then the obtained fields are used as real-time incremental data.
[0033] Step 206, integrating the common fields in the real-time incremental data and the preset historical full data, using the integrated common fields as the real-time full data, and storing the real-time full data in the preset database.
[0034] The historical full data refers to the fields obtained from non-real-time user behavior data that are correlated with the fields in the preset indicators.
[0035] In this embodiment, the real-time full data obtained after integration processing is stored in a preset database, or pushed by the server to the user's client for easy viewing by the user. The real-time incremental data, historical full data, and real-time full data mentioned in this embodiment are all index tags of the corresponding user behavior data, and the above real-time incremental data, historical full data, and real-time full data can be used to index the corresponding user behavior data.
[0036] This embodiment divides user big data into historical data and real-time data, then obtains field data of historical data and real-time data according to preset indicators, and integrates the obtained field data as index tags of historical data and real-time data, that is, real-time full data, which can achieve the purpose of real-time labeling processing of large amounts of existing data. Through real-time full data, huge amounts of real-time data or historical data can be processed in a timely manner, which greatly reduces the lag time in processing real-time data.
[0037] In one embodiment, step 206 further includes:
[0038] The preset database mentioned in step 206 may be TiDB, which is an open source distributed NewSQL database implemented by PingCAP based on the Google Spanner / F1 paper.
[0039] Specifically, if there are common fields in the historical full data and the real-time incremental data, the common fields are filtered and only one field is left as label data for two or more user behavior data; for different fields in the historical full data and the real-time incremental data, they are merged into one set as label data for the user behavior data, and the label data of all user behavior data obtained is used as the real-time full data; the different fields after integration correspond to one or more user behavior data for user viewing or data analysis.
[0040] Taking the application of the car owner club as an example, if the historical full data includes the car owner's "car model" field, and other relevant data from the car owner's registration to the previous data storage period before the preset analysis task, such as the mileage and maintenance record of the car model; and the real-time incremental data also includes the "car model" field, as well as other relevant data from the previous data storage period to the current time node, the server can merge all the "car model" fields in the two sets of data, the real-time incremental data and the historical full data, into one, and perform set union operations on different fields to obtain the real-time full data on the "car model" field.
[0041] The server stores the real-time full data in TiDB to complete the real-time labeling of user data.
[0042] Specifically, the server can perform write operations through the insert write interface provided by TiDB.
[0043] Furthermore, the server can execute the above steps in a loop at a certain time interval. That is, after completing the operation of writing the full historical data to TiDB, the real-time incremental data is updated to TiDB through TiDB's update interface, so that TiDB stores the latest data.
[0044] This embodiment integrates the common fields in the historical full data and the real-time incremental data, thereby greatly reducing the amount of data stored in the preset database. By performing a union operation on different fields in the historical full data and the real-time incremental data, more comprehensive label data of user behavior data can be obtained. By storing the real-time full data in the preset database TIDB, storage space on the server side can also be saved.
[0045] In one embodiment, Figure 3 As shown, before step 202, a process of obtaining the entire historical data is also included, which is described in detail as follows:
[0046] Step 302: If a preset analysis task is received, historical data is synchronized from the data warehouse to obtain user historical data to be processed.
[0047] Specifically, the historical data synchronized from the data warehouse is the user behavior data before the server receives the preset analysis task. When the server receives the preset analysis task, the server synchronizes the historical data from the data warehouse according to the preset analysis task to obtain the user historical data to be processed.
[0048] Step 304, obtain the preset indicators in the preset analysis task, extract the fields that are correlated with the fields in the preset indicators from the user's historical data, and use the extracted fields in the user's historical data as the full historical data.
[0049] Among them, the preset indicators in the preset analysis task are the refinement of the tasks in the preset analysis task.
[0050] For example, if the preset analysis task is "the relationship between the car owner's car model and the car owner's driving habits", the preset indicators can be "the car owner's mileage", "the time interval between car maintenance", "the insurance claim rate" and other data fields that are relevant to the car owner's driving habits. Such data fields are the car owner's driving habit labels; these driving habit labels are the historical full data obtained; users can use the historical full data for data analysis, or obtain the historical full data through the server backend, and obtain the user behavior data corresponding to the historical full data, etc.
[0051] This implementation obtains preset indicators in the preset analysis task, and then obtains the full historical data from the user's historical data based on the preset indicators. Since the preset indicators specifically refine the preset analysis task, the label data in the user behavior data obtained based on the preset indicators is more accurate, avoiding the problem of data redundancy caused by obtaining all label data in the user behavior data.
[0052] In one embodiment, step 304 further includes:
[0053] Create a field extraction task through the Spark computing engine, and extract fields that are relevant to the fields in the preset indicators from the user's historical data according to the field extraction task.
[0054] Among them, the field extraction task is a data processing task created by the computing engine based on the preset analysis task. Different preset analysis tasks will have different field extraction tasks. Generally, the field extraction task is created based on the business content in the preset analysis task. If the business content is "the relationship between the car owner's car model and driving habits", then the field extraction task can be to obtain the "owner's mileage", "car maintenance time interval", "insurance claim rate" and other data fields in the user's historical data that are related to the owner's driving habits.
[0055] Among them, Spark's full name is Apache Spark, which is a fast and general computing engine designed for large-scale data processing. It is also an open source cluster computing environment. Spark is a general big data framework based on memory computing. Because it is well compatible with the Hadoop ecosystem, Spark can be used as the preferred computing engine.
[0056] In this embodiment, the server is a server or server cluster that performs user behavior data analysis. Spark, Hadoop, Kafka, and Groovy are deployed on the server, where Spark is a big data computing engine; Kafka is a data stream processing platform; and Groovy is a Java-based development language. The Spark computing engine performs statistical processing of indicators to obtain the full amount of historical data, that is, the fast computing capability of Spark is utilized to quickly process a huge amount of historical data, greatly improving the data processing rate.
[0057] In one embodiment, Figure 4 As shown, in step 202, it also includes receiving a real-time message sent by the server backend, and obtaining user behavior data from the real-time message, including:
[0058] Step 402: monitor the real-time messages sent by the server backend in real time.
[0059] The server backend, that is, the server backend of the online application, can also be called the online server.
[0060] Specifically, the server backend is connected to the user client and receives the user's real-time behavior. For example, if a user of the car owner club modifies his or her personal information through the client, the server backend will receive the data from the user's mobile client and then send the acquired real-time message to the server. The server always monitors the real-time messages sent by the server backend.
[0061] Step 404: extract the user's real-time action data from the real-time message according to a preset data encapsulation format.
[0062] The user real-time action data is the real-time action data of the user at the user client, and the real-time action data is sent to the server in the form of a real-time message after data encapsulation.
[0063] Specifically, the real-time message includes data obtained by encapsulating the user's real-time action data.
[0064] Step 406 , filtering the user real-time action data that is relevant to the preset analysis task, and using the filtered user real-time action data as user behavior data.
[0065] Specifically, the user real-time action data that is relevant to the business in the preset analysis task is obtained from the user real-time action data, and the user real-time action data that is not relevant to the business in the preset analysis task is eliminated, and the obtained user real-time action data is used as the user behavior data. In detail, if the preset analysis task is "the relationship between the car model and the car owner's driving habits", the user real-time action data related to the car model, mileage, etc. is obtained.
[0066] In one embodiment, step 404 may specifically include:
[0067] Extract user real-time action data from real-time messages based on the Kafka data encapsulation method.
[0068] The Kafka data encapsulation format is completed by the message middleware Kafka. If the message middleware uses Kafka, the user's real-time action data is formatted and encapsulated through Kafka to obtain real-time messages. Which message middleware is used to format the user's real-time action data can be agreed upon in advance between the server backend and the server.
[0069] Specifically, if the message middleware Kafka is deployed on both the server and the server backend, then according to the Kafka message communication mode, the server backend can be set as a "producer" and the server can be set as a "consumer". The server listens to the real-time messages sent from the online server at any time. After listening to the real-time messages, the user's real-time action data is extracted from the real-time messages according to the Kafka data encapsulation format agreed in advance with the online server.
[0070] This embodiment uses the real-time communication function of the Kafka message middleware to obtain real-time user data from the online system server in a timely manner, making up for the lack of historical full data in the data warehouse when doing real-time big data analysis.
[0071] It should be understood that although Figure 2-Figure 4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-Figure 4 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0072] In one embodiment, Figure 5 As shown, a real-time data label acquisition device is provided, which corresponds to the real-time data label acquisition method in the above embodiment. The real-time data label acquisition device includes a real-time data receiving module 502, a real-time incremental data extraction module 504 and a data integration module 506. The functional modules are described in detail as follows:
[0073] The real-time data receiving module 502 is used to receive the real-time message sent by the server backend and obtain the user behavior data from the real-time message.
[0074] The real-time incremental data extraction module 504 is used to perform indicator statistical processing on the user behavior data according to the preset indicators in the preset analysis task, extract fields that are correlated with the fields in the preset indicators from the user behavior data, and use the extracted fields in the user behavior data as real-time incremental data, wherein the preset indicators are the task analysis requirement information in the preset analysis task.
[0075] The data integration module 506 is used to integrate the common fields in the real-time incremental data and the preset historical full data, use the integrated common fields as the real-time full data, and store the real-time full data in the preset database.
[0076] Furthermore, the device also includes:
[0077] The historical data synchronization module 508 is used to synchronize historical data from the data warehouse to obtain user historical data to be processed if a preset analysis task is received;
[0078] The historical full data extraction module 510 is used to obtain preset indicators in the preset analysis task, extract fields that are correlated with the fields in the preset indicators from the user's historical data, and use the extracted fields in the user's historical data as the historical full data.
[0079] Furthermore, the real-time data receiving module 502 includes:
[0080] The data monitoring submodule 5022 is used to monitor the real-time messages sent by the server backend in real time.
[0081] The data encapsulation submodule 5024 is used to extract the user's real-time action data from the real-time message according to a preset data encapsulation format.
[0082] The data screening submodule 5026 is used to screen the user real-time action data that is relevant to the preset analysis task, and use the screened user real-time action data as user behavior data.
[0083] Furthermore, the data encapsulation submodule 5024 is also used to extract the user's real-time action data from the real-time message according to the Kafka data encapsulation format.
[0084] Furthermore, the historical full data extraction module 510 is also used to create a field extraction task through the Spark computing engine, and extract fields that are correlated with the fields in the preset indicators from the user's historical data according to the field extraction task.
[0085] The above-mentioned real-time data label acquisition device divides the user big data into historical data and real-time data, and then obtains the field data of historical data and real-time data according to preset indicators, and integrates the obtained field data as index labels for historical data and real-time data, that is, real-time full data, which can achieve the purpose of real-time labeling processing of large amounts of existing data. Through real-time full data, huge amounts of real-time data or historical data can be processed in a timely manner, which greatly reduces the lag time in processing real-time data.
[0086] For the specific definition of the real-time data label acquisition device, please refer to the definition of the real-time data label acquisition method above, which will not be repeated here. Each module in the above-mentioned real-time data label acquisition device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0087] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the acquired user behavior data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a real-time data tag acquisition method is implemented.
[0088] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0089] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the real-time data tag acquisition method in the above embodiment are implemented, such as Figure 2Steps 202 to 206 shown in the figure, or when the processor executes the computer program, the functions of each module / unit of the real-time data tag acquisition device in the above embodiment are realized, for example Figure 5 The functions of modules 502 to 510 are shown in Figure 5. To avoid repetition, they are not described here again.
[0090] In one embodiment, a computer-readable storage medium is provided on which a computer program is stored. When the computer program is executed by a processor, the steps of the real-time data tag acquisition method in the above embodiment are implemented, such as Figure 2 Steps 202 to 206 shown in the figure, or when the processor executes the computer program, the functions of each module / unit of the real-time data tag acquisition device in the above embodiment are realized, for example Figure 5 The functions of modules 502 to 510 are shown in Figure 5. To avoid repetition, they are not described here again.
[0091] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0092] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0093] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0094] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for those of ordinary skill in the art, without departing from the concept of the present application, several modifications, improvements or equivalent replacements of some technical features can be made, and these modifications or replacements do not make the essence of the same technical solution depart from the spirit and scope of the technical solution of each embodiment of the present invention, and all belong to the protection scope of the present application. Therefore, the protection scope of the patent of this application shall be subject to the attached claims.
Claims
1. A real-time data tag acquisition method, characterized in that: The method comprises: Receive real-time messages sent by the server backend and obtain user behavior data from the real-time messages; According to a preset indicator in a preset analysis task, extracting fields that are correlated with fields in the preset indicator from the user behavior data, and using the extracted fields in the user behavior data as real-time incremental data, wherein the preset indicator is task analysis requirement information in the preset analysis task; Integrate the common fields in the real-time incremental data and the preset historical full data. If the preset historical full data and the real-time incremental data have common fields, filter the common fields and leave only one of the common fields as label data for two or more user behavior data. For different fields in the preset historical full data and the real-time incremental data, merge the different fields into a set as label data for user behavior data, and use the acquired label data of all the user behavior data as real-time full data, and store the real-time full data in a preset database. Before receiving the real-time message sent by the server backend and extracting the user behavior data from the real-time message, the method further includes: If the preset analysis task is received, historical data is synchronized from the data warehouse to obtain user historical data to be processed; Obtaining the preset indicator in the preset analysis task, extracting fields that are correlated with the fields in the preset indicator from the user historical data, and using the extracted fields in the user historical data as the full historical data; The receiving a real-time message sent by the server backend and obtaining user behavior data from the real-time message includes: Monitor the real-time messages sent by the server backend in real time; Extracting user real-time action data from the real-time message according to a preset data encapsulation format; The user real-time action data that is relevant to the preset analysis task is screened, and the screened user real-time action data is used as the user behavior data.
2. The method according to claim 1, characterized in that The extracting, from the user historical data, fields that are relevant to the fields in the preset index comprises: A field extraction task is created through the Spark computing engine, and fields that are correlated with the fields in the preset indicators are extracted from the user historical data according to the field extraction task.
3. The method according to claim 1, characterized in that: The extracting the user real-time action data from the real-time message according to the preset data encapsulation format comprises: The user real-time action data is extracted from the real-time message according to the Kafka data encapsulation format.
4. A real-time data tag acquisition device, characterized in that: The device comprises: A real-time data receiving module is used to receive real-time messages sent by the server backend and obtain user behavior data from the real-time messages; A real-time incremental data extraction module, used to perform indicator statistical processing on the user behavior data according to preset indicators in the preset analysis task, extract fields that are correlated with the fields in the preset indicators from the user behavior data, and use the extracted fields in the user behavior data as real-time incremental data, wherein the preset indicators are task analysis requirement information in the preset analysis task; A data integration module is used to integrate the common fields in the real-time incremental data and the preset historical full data. If the preset historical full data and the real-time incremental data have common fields, the common fields are screened to leave only one of the common fields as label data for two or more user behavior data. For different fields in the preset historical full data and the real-time incremental data, the different fields are merged into a set as label data for user behavior data, and the obtained label data of all the user behavior data are used as real-time full data, and the real-time full data are stored in a preset database; The device also includes: A historical data synchronization module is used to synchronize historical data from the data warehouse to obtain user historical data to be processed if the preset analysis task is received; A historical full data extraction module, used to obtain the preset indicator in the preset analysis task, extract fields that are correlated with the fields in the preset indicator from the user historical data, and use the extracted fields in the user historical data as the historical full data; The real-time data receiving module comprises: A data monitoring submodule is used to monitor the real-time messages sent by the server backend in real time; A data encapsulation submodule, used to extract user real-time action data from the real-time message according to a preset data encapsulation format; The data screening submodule is used to screen the user real-time action data that is relevant to the preset analysis task, and use the screened user real-time action data as user behavior data.
5. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 3 are implemented.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.
