A method for real-time user data collection, transmission and data monitoring based on redis
By using a Redis-based real-time user data collection method, the problem of data silos across different applications is solved, enabling unified sharing and analysis of user status data across multiple applications. It provides fast, efficient, and secure batch parsing and data transmission, and supports the construction of data marts and business databases.
Patent Information
- Application Number
- CN202111375483.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-19
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2041-11-19
AI Technical Summary
In the traditional software industry, user data from different applications within the same group is stored in independent data services, resulting in data silos that cannot be shared or analyzed. Furthermore, the parsing operations are not user-friendly and cannot meet the needs for rapid response and batch processing.
It adopts a Redis-based real-time user data collection method, which monitors the configuration center in real time through the core engine, and synchronously updates the scheduling tasks and parsing rules to realize the parsing and multi-source storage of heterogeneous user status data from multiple application terminals. It uses multi-threading to parse in batches and write data to multi-source storage media, and provides task monitoring.
It enables unified sharing and analysis of user status data across multiple application terminals, solves the data silo problem, provides fast and efficient batch parsing and secure data transmission, and supports the construction of data marts, business databases, and data warehouses.
Smart Images

Figure CN114064778B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data transmission, and more specifically, relates to a method for real-time user data collection, transmission and data monitoring based on redis. Background Art
[0002] With the advent of the Internet era, user data, as the most important component of the Internet in the context of big data, guides the production and operation of enterprises. How to use and analyze user data has become an indispensable part, and user data security, data sharing and data analysis are a crucial link in the context of big data.
[0003] However, in the traditional software industry, user data of different application terminals under the same group are generally stored in independent data services, which only meet the needs of their own applications. This has created the following disadvantages: due to the internal blockage of data services, data islands are formed, resulting in the inability to share and analyze data; due to the differences in user data structures and authentication methods on different application terminals, different data services have data mismatches or mismatches; in addition, traditional data analysis is not friendly enough for concurrent and batch analysis operations; in actual production, we often need to respond quickly to user analysis requests and be able to analyze user data in batches, extract, transform and load the data here, form data marts, business libraries and data warehouses, and provide data analysis and use, but the original user status data service model does not support this operation.
[0004] To sum up, how to share multi-terminal application data services on the same type of data service platform and connect the internal relationships of the data to provide data sharing, application and analysis for enterprise production guidance has become a problem that needs to be urgently solved by technical personnel in this field. Summary of the invention
[0005] The purpose of the present invention is to provide a method for real-time user data collection, transmission and data monitoring based on redis, which can realize large-scale real-time configurable scheduling through configuration, intermittently parse user real-time status data to a unified target multi-data source, and provide task monitoring.
[0006] In order to achieve the above objectives, this application provides the following technical solutions:
[0007] A method for real-time user data collection, transmission and data monitoring based on redis is applied to the analysis of real-time status data of heterogeneous users on multiple application terminals and transmission of multi-source storage media, including:
[0008] The core engine monitors the application scheduling configuration of the configuration center in real time and updates the corresponding scheduling task configuration synchronously;
[0009] The core engine monitors the changes in the application parsing rules of the configuration center in real time and performs real-time configuration synchronization;
[0010] The core engine intelligently schedules the real-time data consumption engine, which parses user status data in batches and writes it into multi-source storage media.
[0011] The real-time data consumption engine parses and saves log information.
[0012] Preferably, the core engine monitors the application scheduling configuration of the configuration center in real time and synchronously updates the corresponding scheduling task configuration, including:
[0013] Determine whether the task scheduling configuration version in the core engine is consistent with the scheduling configuration version in the configuration center;
[0014] If they are inconsistent, update the task scheduling configuration in the core engine.
[0015] Preferably, the core engine updates the task scheduling configuration in the core engine, specifically including:
[0016] Update the core engine scheduling configuration version;
[0017] Archive the old configuration and mark it as unusable;
[0018] Regenerate a new scheduling task configuration based on the new scheduling configuration.
[0019] Preferably, the core engine monitors the changes of the configuration center application parsing rules in real time and performs real-time configuration synchronization, including:
[0020] Determine whether the parsing rule version in the core engine is consistent with the parsing rule version in the configuration center;
[0021] If they are inconsistent, synchronize the rule configuration in the real-time data collection engine / consumption engine;
[0022] If they are inconsistent, update the core engine parsing scheduling version.
[0023] Preferably, the rule configuration in the synchronous real-time data collection engine / consumption engine specifically includes:
[0024] Update the real-time data collection engine parsing configuration version;
[0025] Update the real-time data collection engine parsing configuration cache;
[0026] Update the real-time data consumption engine parsing configuration version;
[0027] Update the real-time data consumption engine parsing configuration cache.
[0028] Preferably, the core engine intelligently schedules the real-time data consumption engine, including:
[0029] Determine whether the current schedule is fully executed;
[0030] If yes, schedule all real-time consumption engines;
[0031] Otherwise, only the specific real-time consumer engine in the scheduling configuration is scheduled.
[0032] Preferably, the real-time data consumption engine batch parses user status data, including:
[0033] Obtain the user status data to be consumed from the distributed cache in batches based on multi-threading on the application side;
[0034] Parse user status data based on multi-threaded batch mapping on the application side;
[0035] Preferably, writing the consumption parsed data into a multi-source storage medium includes:
[0036] Analyze the data source's destination based on the application-side parsing configuration;
[0037] If influxdb is included, it will be solidified into the time series database Influxdb;
[0038] If redis is included, it is solidified into the cache redis;
[0039] If MySQL is included, it will be solidified into the relational database MySQL;
[0040] Preferably, the real-time data consumption engine parses and saves log information, further comprising:
[0041] Save abnormal analysis data log;
[0042] Save multi-dimensional data of successful data analysis, mainly including the number of application terminals, the number of user status data types, the number of successful analyses, etc.
[0043] Preferably, it is applied to the timing, encryption, large-batch, multi-threaded monitoring and transmission of heterogeneous user status data from multiple application terminals to a unified target source, and the user status data transmission and analysis program implements the steps of data scheduling, encryption, transmission and monitoring methods.
[0044] The present invention discloses a processing method for real-time parsing of heterogeneous user status data of multiple application terminals to a unified target source, which solves the problem that the heterogeneous user status information data of multiple application terminals are of various types and the data cannot be shared. It also discloses a method for safe, fast, efficient and large-scale parsing of heterogeneous user status data of multiple application terminals to unified target source data in real time, optimizes the problems of slow parsing and writing data and heterogeneous user status data of multiple application terminals, and also provides log monitoring to monitor the execution status of tasks during the execution process. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a schematic diagram of the principle of the present invention;
[0046] Figure 2 It is the actual interaction diagram of each service of the present invention. DETAILED DESCRIPTION
[0047] The present invention will be further described in detail below in conjunction with the accompanying drawings, but this does not limit the protection scope of the present invention.
[0048] like Figure 1 and 2 As shown, a method for real-time user data collection, transmission and data monitoring based on redis includes intelligent scheduling tasks of the core engine, dynamic update scheduling configuration and dynamic synchronization data analysis configuration, asynchronous data storage of the real-time data collection engine, multi-threaded batch processing of data analysis by the real-time data consumption engine and intelligent storage in multi-source storage media, and generation of scheduling logs. The specific steps are as follows:
[0049] 1) Configure the application-side user data parsing configuration information in the configuration center, including the parsing number, application-side name, data type, identity authentication type, identity authentication key, and data mapping relationship, as the parsing configuration information of the user status data;
[0050] 2) Configure the application-side user data consumption scheduling configuration information in the configuration center, including the scheduling number, scheduling name, application-side number, resolution number, scheduling time validity period, scheduling time, scheduling interval, data screening range, and target data source destination, as the scheduling configuration information for user status data consumption;
[0051] 3) The core engine monitors the changes in data parsing configuration in real time, and updates and synchronizes the parsing configuration if there are any changes;
[0052] 4) The core engine monitors the changes in the data consumption scheduling configuration in real time. If there are any changes, the parsing configuration is updated and synchronized. At the same time, the core engine also monitors the scheduling in real time. If there are scheduling tasks that meet the conditions, the corresponding scheduling operations are performed;
[0053] 5) The real-time data collection engine monitors the changes in the parsing configuration in real time, performs a preliminary simple parsing of the asynchronously processed data, and synchronizes it to the distributed cache redis;
[0054] 6) The real-time data consumption engine monitors the changes in the parsing configuration in real time and updates the parsing configuration cache if necessary;
[0055] 7) The real-time data consumption engine accepts the consumption scheduling task from the core engine, parses the user status data and synchronizes the execution log to the log center, and finally ends the current consumption scheduling task;
[0056] 8) The core engine continues to monitor tasks that meet the conditions and need to be scheduled.
[0057] The invention is a method developed based on an open source distributed cache redis real-time user status data synchronization tool, which is specifically used for the timing, encryption, large-scale, multi-threaded monitoring and transmission of heterogeneous user status data of multiple applications to a unified target source. The method comprises: a core engine synchronizes application-side user status data configuration rule information to a real-time data collection engine in real time; the real-time data collection engine performs simple data verification according to the target application-side rule configuration and asynchronously synchronizes to the distributed cache redis, so as to facilitate the next stage of data consumption; the core engine monitors the data configuration changes of the configuration center in real time and provides active and passive methods to synchronize the application-side user status information configuration rules; the distributed cache redis stores data in different business data queues according to the business configuration information of different application ends; the core engine performs intelligent scheduling on the real-time data consumption engine according to the application-side scheduling configuration, and the real-time data consumption engine assimilates and maps the heterogeneous data into a unified data structure according to the application-side configuration and parses the key information of user identity in batches; after the parsing is completed, the real-time core consumption engine solidifies the data to a corresponding storage medium according to the configuration setting, so as to facilitate subsequent application to business scenarios.
Claims
1. A method for real-time user data collection, transmission and data monitoring based on redis, characterized in that: Applied to the analysis of real-time status data of heterogeneous users on multiple application terminals and transmission of multi-source storage media, including: The core engine monitors the application scheduling configuration of the configuration center in real time and updates the corresponding scheduling task configuration synchronously; The core engine monitors the changes in the application parsing rules of the configuration center in real time and performs real-time configuration synchronization; The core engine intelligently schedules the real-time data consumption engine, which parses user status data in batches and writes it into multi-source storage media. The real-time data consumption engine parses and saves log information; The core engine monitors the application scheduling configuration of the configuration center in real time and synchronously updates the corresponding scheduling task configuration, including: Determine whether the task scheduling configuration version in the core engine is consistent with the scheduling configuration version in the configuration center; If they are inconsistent, update the task scheduling configuration in the core engine; The core engine monitors the changes in the application parsing rules of the configuration center in real time and performs real-time configuration synchronization, including: Determine whether the parsing rule version in the core engine is consistent with the parsing rule version in the configuration center; If they are inconsistent, synchronize the rule configuration in the real-time data collection engine / consumption engine; If they are inconsistent, update the core engine parsing scheduling version; The core engine intelligently schedules the real-time data consumption engine, including: Determine whether the current schedule is fully executed; If yes, schedule all real-time consumption engines; Otherwise, only the specific real-time consumer engine in the scheduling configuration is scheduled; The real-time data consumption engine batch parses user status data, including: Obtain the user status data to be consumed from the distributed cache in batches based on multi-threading on the application side; Parse user status data based on multi-threaded batch mapping on the application side; Write the parsed data to multi-source storage media, including: Analyze the data source's destination based on the application-side parsing configuration; If influxdb is included, it will be solidified into the time series database Influxdb; If redis is included, it is solidified into the cache redis; If MySQL is included, it will be solidified into the relational database MySQL; The real-time data consumption engine parses and saves log information, and also includes: Save abnormal analysis data log; Save the multi-dimensional data of successful parsing, including the number of application terminals, the number of user status data types, and the number of successful parsing.
2. The method for real-time user data collection, transmission and data monitoring based on redis according to claim 1 is characterized in that: Core Engine Updates the task scheduling configuration in the core engine, including: Update the core engine scheduling configuration version; Archive the old configuration and mark it as unusable; Regenerate a new scheduling task configuration based on the new scheduling configuration.
3. The method for real-time user data collection, transmission and data monitoring based on redis according to claim 1 is characterized in that: Synchronize the rule configuration in the real-time data collection engine / consumption engine, including: Update the real-time data collection engine parsing configuration version; Update the real-time data collection engine parsing configuration cache; Update the real-time data consumption engine parsing configuration version; Update the real-time data consumption engine parsing configuration cache.
4. A method for real-time user data collection, transmission and data monitoring based on redis, characterized in that: Applied to the timing, encryption, large-scale, multi-threaded monitoring and transmission of heterogeneous user status data from multiple application terminals to a unified target source, the user status data transmission and analysis program implements the steps of the data acquisition, transmission and data monitoring method as described in any one of claims 1 to 3.
