A service system that provides high QPS statistical query based on the sales data of the car maintenance platform

By adopting a distributed computing engine and fault tolerance mechanism on the SaaS car maintenance platform, the performance and consistency issues of high QPS and high-dimensional sales data queries have been resolved, achieving efficient data aggregation and query services and ensuring high availability and data consistency of the system.

CN114462635BActive Publication Date: 2024-09-06南京爱福路汽车科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111608388.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-24
Publication Date
2024-09-06
Estimated Expiration
2041-12-24

AI Technical Summary

Technical Problem

Existing technologies struggle to provide high-QPS, high-dimensional sales data query services on SaaS car maintenance platforms, especially when data volume is large, data models are complex, and real-time requirements are high. Traditional databases and big data technology stacks cannot meet performance and consistency needs.

Method used

It adopts a distributed computing engine based on MPP architecture, combining data collection, computing, storage and fault tolerance modules. Through data collection, transformation, storage and query, it uses Kafka message middleware and Alibaba Cloud's Hologres distributed data engine to achieve high QPS real-time data aggregation and query, and the fault tolerance module ensures data consistency and high availability.

Benefits of technology

It has achieved high QPS real-time aggregation service for hundreds of millions of sales data, ensuring data consistency and high system availability, and solving the data query problem for store customers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114462635B
    Figure CN114462635B
Patent Text Reader

Abstract

The present invention discloses a service system that provides high QPS statistical query based on the sales data of a car maintenance platform, including a data collection module that can collect billions of sales data of a SAAS car maintenance platform, a data calculation module connected to the data collection module, a data storage module connected to the data calculation module, and a user client. The user client is connected to the data storage module through a set data query module, and a data fault tolerance module connected to the data collection module, the data calculation module, and the data storage module. The service system of the present invention solves the problem of high QPS real-time aggregation service of billions of sales data of complex sales data models; after the present invention passes through a complex ETL process, the sales model data and the business data of multiple business domains can be kept ultimately consistent; the present invention can summarize the sales data query service in real time with high availability, solving the problem that store customers cannot store statistical data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle services, and in particular to a service system that provides high QPS statistical query based on sales data of a vehicle maintenance platform. Background Art

[0002] In the existing technology, SAAS car maintenance platform products provide real-time high-dimensional statistical analysis and detailed data query services, which is now called corporate military advisor services (see the product prototype in the attached Figure 2 , Figure 3 ), the data that the enterprise military advisor service relies on spans multiple business domains such as work orders, finance, inventory, membership, materials, etc., and the business detail data of the above multiple business domains are encapsulated and processed to generate data models such as sales with relatively complex data structures. Since the encapsulation process involves more business domain data and a longer process, consistency with the business data needs to be ensured throughout the entire process.

[0003] The sales data of this car maintenance platform has a data volume of more than 1 billion. The latest sales detail data model contains 167 fields. The main attributes include: company, store, region, member and related information, vehicle and classification attributes, vehicle status information, member card and related information, material and specification classification attributes, material batch, material quantity, service items, working hours, business type, document type, channel information, reception, repair, quality inspection, creation staff, document time, construction time, settlement time, in and out of the factory time, cooperative store, red check, receivable, actual collection, cost, commission and other attributes. Some of the above attributes need to support real-time updates, such as red check, and some attributes can be specified arbitrarily, such as the settlement time can be specified to a certain day in history.

[0004] The summary data service provided is based on optional company stores, regions, time, business type, vehicles, employees and other dimensions to calculate and summarize corresponding sales amounts, gross profits, average order values, number of vehicles entering the factory and other indicators. Considering that there are tens of thousands of store customers using the SAAS car maintenance platform, it is necessary to provide high-dimensional summary data services with high QPS and ensure high availability of query services, because once a problem occurs, it will affect tens of thousands of users.

[0005] There are several options to consider when designing your system:

[0006] Based on the traditional OLTP database as the computing query engine, when supporting the grouping and statistics of billions of business data, if the time period is longer than a quarter, such as the vehicles settled in the last few months, it often takes several minutes. The QPS and response time cannot meet our business performance indicators.

[0007] Traditional big data technology stacks, such as the Hadoop series, can better support data calculations above TB level, but they cannot meet the needs in terms of data aggregation calculation time, support for updating historical data, and high QPS real-time query.

[0008] Finally, we chose a distributed computing engine based on the MPP architecture. These distributed databases can meet the needs of real-time data updates, but there are bottlenecks in the performance and QPS of real-time summary queries, which are issues that need to be addressed separately. In addition, the above-mentioned data computing engines can generally only guarantee the consistency of data after it is connected to the engine, and the consistency of data in complex ETL processes cannot be guaranteed. Summary of the invention

[0009] The purpose of the present invention is to provide a service system for providing high QPS statistical query based on the sales data of a car maintenance platform in view of the shortcomings of the prior art. The technical solution is as follows:

[0010] A service system for providing high QPS statistical query based on the sales data of a car maintenance platform, characterized by: comprising a data collection module capable of correspondingly collecting billions of sales data of a SAAS car maintenance platform;

[0011] A data calculation module connected to the data collection module;

[0012] A data storage module connected to the data calculation module;

[0013] A user client, which is connected to the data storage module via a set data query module;

[0014] A data fault-tolerant module connected to the data collection module, the data calculation module and the data storage module.

[0015] Furthermore, the data collection module is provided with two data collection modes:

[0016] 1. Use dts to subscribe to binlog data in row mode of business database in real time and collect data directly;

[0017] 2. Use message middleware to embed points in the business app code. The business end triggers the corresponding logic to send business data to the message middleware, and collects information data through the message middleware;

[0018] And a data access module is also arranged in the data collection module.

[0019] Furthermore, the message middleware is specifically a kafka module.

[0020] Furthermore, the data computing module includes four submodules: data dimension expansion encapsulation, data high-dimensional aggregation, distributed data engine, and data double writing;

[0021] The data calculation module converts the original business data into data corresponding to the model according to the sales data model collected in advance by the data collection module, and splits the data into fine-grained data and high-dimensional data according to the business scenario requirements. The fine-grained data is used to meet the needs of combined analysis of data in various dimensions; the high-dimensional data is used in scenarios with high real-time requirements and high access volume;

[0022] The data dimension expansion encapsulation will associate the data collected by the data collection module with the dimensions to be analyzed and expand the dimensions. The expanded dimensions are correspondingly obtained from the distributed data engine on the front end. The distributed data engine will synchronize various basic business domains in real time. The high-dimensional data aggregation will continuously calculate high-granularity data in real time. The data dual-write module will write important data to multiple clusters. When an exception occurs in a cluster, it can still ensure that other clusters can write data normally.

[0023] Furthermore, the data storage module is composed of several holo clusters, and the holo cluster is set as Alibaba Cloud's commercial distributed data engine hologres, which can provide OLAP services for TB-level data and data point query services of tens of thousands of QPS.

[0024] Furthermore, the data query module includes a cache module, a query module and a data source dynamic control module;

[0025] The query module is responsible for processing all requests from real users of the user client, and querying different sales data model data according to business data requests from customers in different scenarios.

[0026] Furthermore, the data fault tolerance module includes three submodules: abnormal monitoring and repair, consistency monitoring and repair, and data playback;

[0027] Abnormal monitoring and repair is responsible for processing abnormalities that occur during data calculation and repairing data to ensure consistency with business data and data consistency among multiple clusters. When an abnormality occurs in the data calculation module, the abnormality will be recorded and the data will be updated throughout the entire chain when appropriate.

[0028] The consistency monitoring and repair module monitors the data in the data storage module and the original business data for calculation and comparison. If any inconsistency is found, the data will be recalculated and updated according to the actual data dimensions.

[0029] Data playback adds classification information to the incoming message data, persists the summary information of the message to the database, and recalculates and updates the message based on the persisted summary information.

[0030] Beneficial effects: The present invention has the following beneficial effects:

[0031] 1) The service system of the present invention solves the high QPS real-time aggregation service problem of complex sales data models with hundreds of millions of sales data;

[0032] 2) After the complex ETL process, the sales model data and the business data of multiple business domains can be ultimately consistent;

[0033] 3) The present invention can summarize sales data in real time and provide high availability query services, thus solving the problem that store customers cannot collect statistical data. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a schematic diagram of the structure of the present invention;

[0035] Figure 2 Application diagram for enterprise military advisors;

[0036] Figure 3 This is an application diagram for enterprise military advisor report. DETAILED DESCRIPTION

[0037] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. The embodiments are implemented based on the technical solution of the present invention. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention.

[0038] like Figure 1 As shown, the entire system of the present invention is mainly composed of a data collection module, a data calculation module, a data storage module, a data query module and a data fault tolerance module. The specific functions and implementations of each module are as follows:

[0039] There are two main modes for data collection in the data collection module. One is to directly use DTS to subscribe to the binlog data in the row mode of the business database in real time and then collect data. This method does not require business development intervention, but requires users to understand the underlying business data structure;

[0040] One method is to use message middleware, embed points in the business app code, and the business end triggers the corresponding logic to send business data to the message middleware, and then the module collects related messages. In actual development, the message middleware can use the kafka module.

[0041] The data calculation module converts the original business data into data of the corresponding model based on the pre-designed sales data model. Generally, the data is split into fine-grained data and high-dimensional data according to the needs of the business scenario. The fine-grained data is used to meet the needs of various dimensional combination analysis data. For example, users expect to see the multi-dimensional data analysis presentation of user vehicles, materials, suppliers, employees, etc. mentioned in the background technology. High-dimensional data is generally used in scenarios with high real-time requirements and high traffic, such as the operating indicators of all stores owned by the company in the current quarter, and the revenue indicator analysis of the year.

[0042] The data dimension expansion package will associate the data collected by the above data collection module with the dimensions to be analyzed to expand the dimensions. The expanded dimensions will be obtained from the distributed data engine, and the distributed data engine will synchronize various basic business domains in real time; data high-dimensional aggregation will continuously calculate high-granularity data in real time. For example, to calculate the sales turnover of a store for a day, the store will continuously generate new or modify the details of historical order work orders, so the corresponding turnover indicators for that day need to be continuously calculated and updated. The data dual-write module will write important data to multiple clusters, so that when an abnormality occurs in a cluster, it can still ensure that other clusters can write data normally to achieve higher data availability.

[0043] The high-dimensional aggregation calculation of data in the data calculation module of the present invention is a solution to high-QPS high-dimensional summary queries. When detailed data is added or changed, high-dimensional granular data that meets business needs will be summarized and calculated in real time, and the corresponding high-dimensional summary data model will be formulated considering the versatility of the business. The model may be single or multiple.

[0044] The distributed data engine can meet the system requirements in terms of service performance at the detailed data level. However, in high-dimensional statistical scenarios, the performance and stability have bottlenecks due to the large amount of calculation. Therefore, we use real-time aggregation to reduce the amount of calculation for the final query aggregation and provide high QPS aggregation queries.

[0045] The data storage module of the present invention is composed of multiple holo clusters. Holo is Alibaba Cloud's commercial distributed computing engine hologres, which can provide OLAP services for TB-level data and data point query services of tens of thousands of QPS. The detailed-level data service performance can meet system requirements. Although there are bottlenecks in high-dimensional statistics, the cluster itself is highly available.

[0046] The data query module of the present invention is responsible for processing all requests from real users, querying different sales data model data according to business data requests from customers in different scenarios, and it is also one of the components of high service availability. The system monitors multiple holo clusters of the data storage module. If a cluster service is abnormal, we will dynamically switch the query data source to other available clusters to ensure that the service will not be abnormal, so as to achieve high service availability.

[0047] High-availability query relies on all modules being highly available. All businesses and databases in the data collection module are disaster-tolerant. The data computing module has multiple computing nodes to ensure the normal operation of the service. The data storage and writing adopts a dual-write multi-cluster service mutual backup solution. The data of the two clusters will be consistent with the business data. In the data query module, the query service of each cluster will be monitored to see if it is normal. If a problem occurs in one of the clusters, the query service will dynamically switch the data source to a cluster without abnormalities to ensure that the overall service is not affected. At the same time, there are monitoring alarms to allow R&D to quickly locate cluster problems.

[0048] The fault-tolerant module of the present invention includes three sub-modules: exception monitoring and repair, consistency monitoring and repair, and data playback; exception monitoring and repair is responsible for processing and repairing the exceptions that occur during the data calculation process to ensure consistency with the business data and the consistency of multi-cluster data. When an exception occurs in the data calculation module, such as data delay and failure to obtain the latest dimension data during dimension expansion, we will record the exception and perform a full-link update on this data when appropriate; the consistency monitoring and repair module will monitor the data of our data storage module and the original business data for calculation and comparison. If inconsistency is found, the data will be recalculated and updated according to the actual data dimension; data playback adds classification and other information to the accessed message data, such as business type, business object, time and other labels, and persists the summary information of the message to the database. The message can be recalculated and updated based on the persisted summary information. The results of multiple calculations are idempotent. In addition, the classification information we added provides the function of formulating specific types of data playback.

[0049] Data playback, abnormal data monitoring and recovery, and data consistency monitoring and repair in data fault tolerance are the key to ensuring data consistency in the overall system; if data calculation and writing exceptions occur during data encapsulation and writing to the cluster, the relevant exceptions will be automatically recorded and then automatically repaired. If a large number of exceptions occur, manual intervention can be used to confirm the problem and then solve the problem through data playback. In order to solve the data consistency at each update, the data idempotence will be guaranteed in the new update scenario of high-dimensional data, and the full amount of detailed data under these dimensions will be calculated by high-dimensional statistics instead of incremental calculation. However, this will increase the load on the system, and the incremental idempotence solution will be considered later.

[0050] In summary, the service system of the present invention solves the problem of high QPS real-time aggregation service of billions of sales data in complex sales data models; after the present invention goes through a complex ETL process, the sales model data and the business data of multiple business domains can remain ultimately consistent; the present invention can aggregate sales data query services in real time with high availability, solving the problem that store customers cannot count statistics.

[0051] The above specific implementation is only a preferred embodiment of the present invention and is not intended to limit the implementation of the present invention and the scope of the claims. All equivalent changes and modifications made according to the content of the patent protection scope of the present invention should be included in the scope of the patent application of the present invention.

Claims

1. A service system for providing high QPS statistical query based on car maintenance platform sales data, characterized by: It includes a data collection module that can collect billions of sales data of SAAS car maintenance platform; A data calculation module connected to the data collection module; A data storage module connected to the data calculation module; A user client, which is connected to the data storage module via a set data query module; A data fault-tolerant module connected to the data collection module, the data calculation module and the data storage module; The data computing module includes four submodules: data dimension expansion encapsulation, data high-dimensional aggregation, distributed data engine, and data double writing; The data calculation module converts the original business data into data corresponding to the model according to the sales data model collected in advance by the data collection module, and splits the data into fine-grained data and high-dimensional data according to the business scenario requirements. The fine-grained data is used to meet the needs of combined analysis of data in various dimensions; the high-dimensional data is used in scenarios with high real-time requirements and high access volume; The data dimension expansion package will associate the data collected by the data collection module with the dimensions to be analyzed to expand the dimensions. The expanded dimensions are obtained from the distributed data engine on the front end. The distributed data engine will synchronize various basic business domains in real time. The high-dimensional data aggregation will continuously calculate high-granularity data in real time. The data dual-write module will write important data to multiple clusters. When an exception occurs in a cluster, it can still ensure that other clusters can write data normally. The data storage module is composed of several holo clusters, and the holo cluster is set as the distributed data engine hologres of Alibaba Cloud for commercial use, which can provide OLAP services for TB-level data and data point query services of tens of thousands of QPS; The data fault tolerance module includes three submodules: abnormal monitoring and repair, consistency monitoring and repair, and data playback; Abnormal monitoring and repair is responsible for processing abnormalities that occur during data calculation and repairing data to ensure consistency with business data and data consistency among multiple clusters. When an abnormality occurs in the data calculation module, the abnormality will be recorded and the data will be updated throughout the entire chain when appropriate. The consistency monitoring and repair module monitors the data in the data storage module and the original business data for calculation and comparison. If any inconsistency is found, the data will be recalculated and updated according to the actual data dimensions. Data playback adds classification information to the incoming message data, persists the summary information of the message to the database, and recalculates and updates the message based on the persisted summary information.

2. According to claim 1, a service system for providing high QPS statistical query based on car maintenance platform sales data is characterized by: The data collection module is provided with two data collection modes:

1. Use dts to subscribe to binlog data in row mode of business database in real time and collect data directly; 2. Use message middleware to embed points in the business app code. The business end triggers the corresponding logic to send business data to the message middleware, and collects information data through the message middleware; And a data access module is also arranged in the data collection module.

3. A service system for providing high QPS statistical query based on car maintenance platform sales data according to claim 2, characterized in that: The message middleware is specifically a kafka module.

4. According to claim 1, a service system for providing high QPS statistical query based on car maintenance platform sales data is characterized by: The data query module includes a cache module, a query module and a data source dynamic control module; The query module is responsible for processing all requests from real users of the user client, and querying different sales data model data according to business data requests from customers in different scenarios.