Data aggregation method and related equipment based on business rules
Through the data aggregation method based on business rules, data is automatically acquired and aggregation rules are configured, and the problem of low efficiency of manual data aggregation is solved, the automation and flexibility of data aggregation is realized, and business decision-making efficiency is improved.
Patent Information
- Application Number
- CN202411901464.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-04
AI Technical Summary
In supply chain-related business scenarios, manual data aggregation efficiency is low, errors and omissions are prone to occur, and a lot of labor and time costs are required.
A data aggregation method based on business rules is proposed. By obtaining the pending data and business requirements information of the columnar structure, configuring the data aggregation rules, starting the data aggregation process, merging the local aggregation results, and obtaining the final data aggregation results.
The automation and flexibility of the data aggregation process is realized, the tedious steps of traditional manual configuration rules are reduced, the rapid and accurate nature of large-scale data processing by business personnel is improved, and the overall business decision-making efficiency is improved.
Smart Images

Figure CN119759971A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a business rule-based data aggregation method and related equipment. Background Art
[0002] In supply chain-related business scenarios, when the database stores large amounts of data, business personnel need to aggregate the data from different dimensions at different times and make business decisions based on the aggregation results.
[0003] Generally speaking, without IT system support, business personnel can complete data aggregation through Excel perspective charts. However, data aggregation is not just a simple summation, and often requires the use of Excel copy formulas to design various rules to complete. This requires users to have certain Excel usage experience, especially when data is stored in a database, requiring users to be familiar with and master a large number of aggregation functions in different databases. Even with IT system support, a lot of custom development is required, which is not suitable for business personnel to understand.
[0004] Therefore, manual operations to complete data aggregation are not only prone to errors, but also lead to high consumption of manpower and time costs, making the efficiency of data aggregation low. Summary of the invention
[0005] The purpose of the embodiments of the present application is to propose a data aggregation method and related equipment based on business rules to solve the technical problem of low efficiency of manual data aggregation in supply chain-related business scenarios.
[0006] In order to solve the above technical problems, the embodiment of the present application provides a data aggregation method based on business rules, which adopts the following technical solutions:
[0007] A data aggregation method based on business rules comprises the following steps:
[0008] Acquire the data to be processed in a column structure and the business requirement information corresponding to the data to be processed;
[0009] According to the business requirement information and the preset rule configuration information, a data aggregation rule is configured;
[0010] According to the data aggregation rule, at least one data aggregation process is started to obtain a local aggregation result corresponding to each data aggregation process;
[0011] The local aggregation results are merged to obtain a data aggregation result corresponding to the data to be processed.
[0012] Furthermore, the step of starting at least one data aggregation process according to the data aggregation rule and obtaining a local aggregation result corresponding to each data aggregation process specifically includes:
[0013] Obtaining a column identifier corresponding to each of the data aggregation processes;
[0014] Determine the target column data corresponding to each of the data aggregation processes according to the mapping relationship between the column identifier and the data to be processed;
[0015] Each target column data is calculated according to the data aggregation rule to obtain each local aggregation result.
[0016] Furthermore, after the step of calculating each target column data according to the data aggregation rule to obtain each local aggregation result, the method further includes:
[0017] Generate a corresponding result column identifier according to each of the local aggregation results;
[0018] The result column identifier is stored in a cache queue of a preset database.
[0019] Furthermore, the step of merging the local aggregation results to obtain the data aggregation result corresponding to the data to be processed specifically includes:
[0020] Reading the result column identifier from the cache queue;
[0021] Determine the result column data corresponding to each of the local aggregation results according to the result column identifier;
[0022] The result column data is merged to obtain the data aggregation result.
[0023] Furthermore, the step of configuring the data aggregation rule according to the business demand information and the preset rule configuration information specifically includes:
[0024] Determining target indicator information in the data to be processed according to the business demand information;
[0025] The target indicator information is configured according to the rule configuration information to obtain a calculation rule corresponding to each element in the data to be processed;
[0026] The calculation rules are summarized to obtain the data aggregation rules.
[0027] Furthermore, the step of obtaining the data to be processed in a column structure and the business requirement information corresponding to the data to be processed specifically includes:
[0028] receiving a data aggregation instruction carrying target query information and the business demand information, and determining target data in a preset database according to the target query information;
[0029] The target data is converted according to a preset columnar data format to obtain the data to be processed.
[0030] Furthermore, after the step of merging the local aggregation results to obtain the data aggregation result corresponding to the data to be processed, the method further includes:
[0031] According to the data aggregation result, a corresponding global column identifier is generated and sent to a preset administrator user terminal;
[0032] The data aggregation result is stored in a preset blockchain node.
[0033] In order to solve the above technical problems, the embodiment of the present application also provides a data aggregation system based on business rules, which adopts the following technical solutions:
[0034] A data aggregation system based on business rules, comprising:
[0035] An acquisition module is used to acquire the data to be processed in a column structure and the business demand information corresponding to the data to be processed;
[0036] A configuration module, configured to obtain data aggregation rules according to the business demand information and preset rule configuration information;
[0037] An aggregation module, used to start at least one data aggregation process according to the data aggregation rule, and obtain a local aggregation result corresponding to each data aggregation process;
[0038] The merging module is used to merge the local aggregation results to obtain the data aggregation results corresponding to the data to be processed. In order to solve the above technical problems, the embodiment of the present application also provides a computer device, which adopts the following technical solution:
[0039] A computer device includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the business rule-based data aggregation method as described above when executing the computer-readable instructions.
[0040] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0041] A computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the business rule-based data aggregation method as described above.
[0042] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0043] The data aggregation method based on business rules disclosed in the present application obtains the data to be processed in a column structure and the business demand information corresponding to the data to be processed; then, according to the business demand information and the preset rule configuration information, the data aggregation rules are configured; then, according to the data aggregation rules, at least one data aggregation process is started to obtain the local aggregation results corresponding to each data aggregation process; thereby, the local aggregation results are merged to obtain the data aggregation results corresponding to the data to be processed. The present application realizes the automation and flexibility of the data aggregation process by automatically acquiring data and configuring aggregation rules according to business needs, avoiding the tedious steps of traditional manual configuration of rules, allowing business personnel to process large-scale data more quickly and accurately, and can flexibly respond to different business needs. The system can efficiently and accurately handle complex data aggregation tasks, thereby improving the overall business decision-making efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0046] Figure 2 is a flow chart of an embodiment of a business rule-based data aggregation method according to the present application;
[0047] Figure 3 is a structural diagram of an embodiment of a business rule-based data aggregation system according to the present application;
[0048] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0050] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0051] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0052] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0053] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0054] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.
[0055] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0056] It should be noted that the business rule-based data aggregation method provided in the embodiment of the present application is generally executed by a terminal device, and accordingly, the business rule-based data aggregation system is generally set in the terminal device.
[0057] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0058] Continue to refer Figure 2 , shows a flow chart of an embodiment of a data aggregation method based on business rules according to the present application. The data aggregation method based on business rules comprises the following steps:
[0059] Step S201: Acquire data to be processed in a column structure and business requirement information corresponding to the data to be processed.
[0060] In this embodiment, the data aggregation method based on business rules is executed on the electronic device (eg Figure 1 The terminal device shown in the figure can send or receive data through a wired connection or a wireless connection. It should be noted that the above wireless connection methods may include but are not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0061] In this embodiment, when the system starts, it first receives a data aggregation request from the user, which includes business demand information (such as the required aggregation indicators, query conditions, data screening rules, etc.) and target query information (for example, querying sales data and inventory data within a specific time period). Based on this information, the system queries the preset columnar database through the interface, extracts data that meets the business requirements, converts the format, and converts it into data to be processed in a columnar structure.
[0062] Step S202: configuring a data aggregation rule according to the business demand information and preset rule configuration information.
[0063] In this embodiment, the system identifies the target indicators that need to be aggregated (such as sales, inventory, sales growth rate, etc.) based on the received business demand information, and specifies corresponding aggregation rules (such as sum, average, maximum value, minimum value, etc.) for each target indicator by matching the preset rule configuration information. The configuration of these aggregation rules can be flexibly adjusted according to different business scenarios, such as using "sum" for monthly sales and "average" for inventory levels.
[0064] Step S203: start at least one data aggregation process according to the data aggregation rule, and obtain a local aggregation result corresponding to each data aggregation process.
[0065] In this embodiment, the system starts multiple data aggregation processes to process data in parallel according to the configured aggregation rules. These aggregation processes divide the data into different task units according to different column identifiers, and each process performs aggregation calculations on a certain column or data area. For example, for the indicator "sales", the system may start several processes to calculate sales in different regions.
[0066] Step S204: merge the local aggregation results to obtain data aggregation results corresponding to the data to be processed.
[0067] In this embodiment, after each data aggregation process is calculated, the system aggregates all local aggregation results together. The merging operation usually includes summing, averaging or other calculation operations on the results of different columns. Finally, the system obtains the aggregation results of the data to be processed, which provide a basis for subsequent data analysis and decision-making.
[0068] This application achieves automation and flexibility in the data aggregation process by automatically acquiring data and configuring aggregation rules according to business needs, avoiding the tedious steps of traditional manual configuration rules, allowing business personnel to process large-scale data more quickly and accurately, and to flexibly respond to different business needs. This enables the system to efficiently and accurately handle complex data aggregation tasks, thereby improving overall business decision-making efficiency.
[0069] In some optional implementations of this embodiment, the step of starting at least one data aggregation process according to the data aggregation rule and obtaining a local aggregation result corresponding to each data aggregation process specifically includes:
[0070] Obtaining a column identifier corresponding to each of the data aggregation processes;
[0071] Determine the target column data corresponding to each of the data aggregation processes according to the mapping relationship between the column identifier and the data to be processed;
[0072] Each target column data is calculated according to the data aggregation rule to obtain each local aggregation result.
[0073] In this embodiment, when each data aggregation process is executed, it will first assign corresponding column identifiers according to the preset rule configuration and the column structure of the data to be processed. Each column identifier corresponds to a column in the data to be aggregated. For example, a column identifier may correspond to the "sales area" column, and another may correspond to the "sales" column. Then, the system will search for the corresponding target column data in the data to be processed based on the column identifier of each aggregation process. For example, if the column identifier of a process points to the "sales" column, the system will extract the data of this column from the data to be processed for subsequent calculations. Finally, the system calculates the corresponding data according to the aggregation rules configured for each target column. For example, for the "sales" column, the system can perform a "sum" operation to obtain the total sales of each region; for the "inventory" column, the system may perform an "average" operation.
[0074] Based on business analysis, this application can use the following definition rules:
[0075]
[0076]
[0077] It should be noted that rules such as CELL_SUM, CELL_MAX, CELL_MIN, and CELL_AVG are the most commonly used numerical calculations, used to extract statistical information from large-scale data sets; rules such as CELL_FIRST and CELL_LAST focus on the order of data and are used for time series analysis and aggregation of log data; rules such as CELL_AND and CELL_OR are used for logical calculations of Boolean (true / false) data; CELL_ANY is a general choice under non-specific requirements, returning any value in the data set, suitable for scenarios without specific requirements for data. In the implementation of parserAggFunction, these aggregation rules will be parsed into functions of a specific database. For example: CELL_SUM corresponds to the SUM function in SQL; CELL_MAX corresponds to the MAX function in SQL; CELL_AND and CELL_OR can be implemented through Boolean operations or custom logic in SQL. Through these rules, the system can quickly parse and execute different aggregation tasks to meet a variety of data analysis needs.
[0078] Furthermore, the execution management of aggregation tasks is implemented through the abstract class AbstractAggregatorExecutor, which abstracts the common operation steps: setting rules, parsing rules, and executing operations. The code is as follows:
[0079]
[0080]
[0081]
[0082] It needs to be explained that in actual implementation, the aggregation rule is configured through the setAggRule method according to the business demand information and the preset rule configuration information. The rule is used to guide the specific calculation process of data aggregation. For example, when the user wants to calculate the sum of a business field, the target field and its calculation logic will be recorded in the rule; the aggregation rule is mapped to the calculation function used in the specific database through the parserAggFunction method. For example, the functions of different databases (such as MySQL and PostgreSQL) may be different. This method ensures cross-database adaptability and flexibility through dynamic mapping; the specific execution of the aggregation calculation is completed according to the target column identifier and the aggregation rule through the aggAction method. This step calls the underlying database or distributed computing framework to complete efficient data aggregation operations and stores the results in the AggResult object.
[0083] This application can realize parallel processing of data by starting multiple parallel computing tasks according to column identifiers and data mapping relationships, greatly improving the data processing speed, especially when facing large amounts of data, significantly reducing the processing time.
[0084] In some optional implementations of this embodiment, after the step of calculating each target column data according to the data aggregation rule to obtain each local aggregation result, the method further includes:
[0085] Generate a corresponding result column identifier according to each of the local aggregation results;
[0086] The result column identifier is stored in a cache queue of a preset database.
[0087] In this embodiment, each time an aggregation process is completed, the system will generate a new column identifier for the result to identify the source and content of the result data. For example, "regional sales total" may correspond to a new result column identifier. In this way, the relationship between the aggregation result and the target data can be clearly represented. Then, all generated result column identifiers will be stored in the cache queue of the database, which can improve data access efficiency and avoid recalculating the aggregation results every time a query is made.
[0088] This application can ensure that the results of each aggregation task can be clearly and accurately tracked and managed by generating and storing result column identifiers.
[0089] In some optional implementations of this embodiment, the step of merging the local aggregation results to obtain the data aggregation result corresponding to the data to be processed specifically includes:
[0090] Reading the result column identifier from the cache queue;
[0091] Determine the result column data corresponding to each of the local aggregation results according to the result column identifier;
[0092] The result column data is merged to obtain the data aggregation result.
[0093] In this embodiment, when the aggregation results need to be merged, the system will read the corresponding result column identifier from the cache queue and prepare for subsequent operations; then, the system extracts the corresponding result data from the cache queue based on the result column identifier, which will be used in subsequent merge operations to ensure that each local aggregation result is correctly merged. Finally, the system merges all local aggregation results to obtain the final data aggregation result. For example, for the aggregation of sales data, the system may add up the total sales of different regions to obtain the total sales of the country.
[0094] This application ensures the integrity and consistency of the data aggregation process by merging local aggregation results, thereby obtaining accurate final data aggregation results.
[0095] In some optional implementations of this embodiment, the step of configuring the data aggregation rule according to the business demand information and the preset rule configuration information specifically includes:
[0096] Determining target indicator information in the data to be processed according to the business demand information;
[0097] The target indicator information is configured according to the rule configuration information to obtain a calculation rule corresponding to each element in the data to be processed;
[0098] The calculation rules are summarized to obtain the data aggregation rules.
[0099] In this embodiment, based on the received business demand information, the system first identifies the target indicators that need to be aggregated, such as "total sales" and "inventory". These indicators are the core of the business needs, and the system will generate aggregation rules based on these target indicators. Then, the system configures the corresponding calculation rules based on the target indicator information to ensure that each indicator can be aggregated using the correct method. For example, one indicator may need to use summation, while another may use average.
[0100] By flexibly configuring data aggregation rules, this application can quickly generate corresponding calculation rules according to different business needs and apply them to the data to be processed, thereby improving the adaptability of the system and business processing efficiency.
[0101] In some optional implementations of this embodiment, the step of obtaining the data to be processed in a column structure and the business requirement information corresponding to the data to be processed specifically includes:
[0102] receiving a data aggregation instruction carrying target query information and the business demand information, and determining target data in a preset database according to the target query information;
[0103] The target data is converted according to a preset columnar data format to obtain the data to be processed.
[0104] In this embodiment, the system will start multiple parallel computing tasks according to a preset parallel computing strategy. Each task processes different parts of the data and can be performed simultaneously. In this way, multiple aggregation processes can be calculated in parallel without interfering with each other.
[0105] Through the implementation of parallel computing strategies, this application can perform multiple tasks simultaneously, significantly improving the efficiency of data aggregation processing.
[0106] In some optional implementations of this embodiment, after the above step of merging the local aggregation results to obtain the data aggregation result corresponding to the data to be processed, the following step is further included:
[0107] According to the data aggregation result, a corresponding global column identifier is generated and sent to a preset administrator user terminal;
[0108] The data aggregation result is stored in a preset blockchain node.
[0109] In this embodiment, the system monitors the running status of parallel computing tasks in real time and dynamically adjusts the allocation of computing resources according to the load of the tasks. For example, when the load of a task is too high, the system will transfer part of the data to the task with lower load, so as to ensure the balance of the entire computing process.
[0110] By dynamically adjusting the task allocation strategy, the system can optimize resource allocation in a timely manner according to the running status of parallel computing tasks, avoid task overload, and ensure load balancing.
[0111] It should be emphasized that in order to further ensure the privacy and security of the above data aggregation results, the above data aggregation results can also be stored in a blockchain node.
[0112] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0113] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0114] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0115] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0116] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0117] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a data aggregation system based on business rules. Figure 2 Corresponding to the method embodiment shown, the system can be specifically applied to various electronic devices.
[0118] like Figure 3 As shown, the business rule-based data aggregation system 300 described in this embodiment includes: an acquisition module 301, a configuration module 302, an aggregation module 303 and a merging module 304. Among them:
[0119] An acquisition module 301 is used to acquire the data to be processed in a column structure and the business requirement information corresponding to the data to be processed;
[0120] Configuration module 302, configured to obtain data aggregation rules according to the business demand information and preset rule configuration information;
[0121] Aggregation module 303, used to start at least one data aggregation process according to the data aggregation rule, and obtain a local aggregation result corresponding to each data aggregation process;
[0122] The merging module 304 is used to merge the local aggregation results to obtain the data aggregation results corresponding to the data to be processed.
[0123] The business rule-based data aggregation system provided by this application realizes the automation and flexibility of the data aggregation process by automatically acquiring data and configuring aggregation rules according to business needs, avoiding the tedious steps of traditional manual configuration of rules, allowing business personnel to process large-scale data more quickly and accurately, and can flexibly respond to different business needs. The system can efficiently and accurately handle complex data aggregation tasks, thereby improving the overall business decision-making efficiency.
[0124] In some optional implementations of this embodiment, the aggregation module 303 is further configured to:
[0125] Obtaining a column identifier corresponding to each of the data aggregation processes;
[0126] Determine the target column data corresponding to each of the data aggregation processes according to the mapping relationship between the column identifier and the data to be processed;
[0127] Each target column data is calculated according to the data aggregation rule to obtain each local aggregation result.
[0128] The business rule-based data aggregation system provided in the present application can realize parallel processing of data by starting multiple parallel computing tasks according to column identifiers and data mapping relationships, thereby greatly improving the data processing speed, and significantly reducing the processing time when facing large amounts of data.
[0129] In some optional implementations of this embodiment, the aggregation module 303 is further configured to:
[0130] Generate a corresponding result column identifier according to each of the local aggregation results;
[0131] The result column identifier is stored in a cache queue of a preset database.
[0132] The business rule-based data aggregation system provided in this application can ensure that the results of each aggregation task can be clearly and accurately tracked and managed by generating and storing result column identifiers.
[0133] In some optional implementations of this embodiment, the aggregation module 303 is further configured to:
[0134] Reading the result column identifier from the cache queue;
[0135] Determine the result column data corresponding to each of the local aggregation results according to the result column identifier;
[0136] The result column data is merged to obtain the data aggregation result.
[0137] The business rule-based data aggregation system provided in the present application ensures the integrity and consistency of the data aggregation process by merging local aggregation results, thereby obtaining accurate final data aggregation results.
[0138] In some optional implementations of this embodiment, the configuration module 302 is further configured to:
[0139] Determining target indicator information in the data to be processed according to the business demand information;
[0140] The target indicator information is configured according to the rule configuration information to obtain a calculation rule corresponding to each element in the data to be processed;
[0141] The calculation rules are summarized to obtain the data aggregation rules.
[0142] The business rule-based data aggregation system provided in the present application can quickly generate corresponding calculation rules according to different business needs through flexible configuration of data aggregation rules, and apply them to the data to be processed, thereby improving the adaptability of the system and business processing efficiency.
[0143] In some optional implementations of this embodiment, the acquisition module 301 is further used to:
[0144] receiving a data aggregation instruction carrying target query information and the business demand information, and determining target data in a preset database according to the target query information;
[0145] The target data is converted according to a preset columnar data format to obtain the data to be processed.
[0146] The business rule-based data aggregation system provided in the present application can perform multiple tasks simultaneously through the implementation of parallel computing strategies, thereby significantly improving the efficiency of data aggregation processing.
[0147] In some optional implementations of this embodiment, the merging module 304 is further configured to:
[0148] According to the data aggregation result, a corresponding global column identifier is generated and sent to a preset administrator user terminal;
[0149] The data aggregation result is stored in a preset blockchain node.
[0150] The business rule-based data aggregation system provided in this application can optimize resource allocation in a timely manner according to the running status of parallel computing tasks, avoid task overload, and ensure load balancing by dynamically adjusting the task allocation strategy.
[0151] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0152] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0153] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0154] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of a data aggregation method based on business rules, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0155] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the computer-readable instructions stored in the memory 41 or process data, such as running the computer-readable instructions of the business rule-based data aggregation method.
[0156] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0157] The computer device provided by this application realizes the automation and flexibility of the data aggregation process by automatically acquiring data and configuring aggregation rules according to business needs, avoiding the tedious steps of traditional manual configuration rules, allowing business personnel to process large-scale data more quickly and accurately, and can flexibly respond to different business needs. The system can efficiently and accurately handle complex data aggregation tasks, thereby improving the overall business decision-making efficiency.
[0158] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the business rule-based data aggregation method as described above.
[0159] The computer-readable storage medium provided by the present application realizes the automation and flexibility of the data aggregation process by automatically acquiring data and configuring aggregation rules according to business needs, avoiding the tedious steps of traditional manual configuration rules, allowing business personnel to process large-scale data more quickly and accurately, and can flexibly respond to different business needs. The system can efficiently and accurately handle complex data aggregation tasks, thereby improving the overall business decision-making efficiency.
[0160] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0161] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A data aggregation method based on business rules, characterized in that: The steps include: Acquire the data to be processed in a column structure and the business requirement information corresponding to the data to be processed; According to the business requirement information and the preset rule configuration information, a data aggregation rule is configured; According to the data aggregation rule, at least one data aggregation process is started to obtain a local aggregation result corresponding to each data aggregation process; The local aggregation results are merged to obtain a data aggregation result corresponding to the data to be processed.
2. The data aggregation method based on business rules according to claim 1, characterized in that: The step of starting at least one data aggregation process according to the data aggregation rule and obtaining a local aggregation result corresponding to each data aggregation process specifically includes: Obtaining a column identifier corresponding to each of the data aggregation processes; Determine the target column data corresponding to each of the data aggregation processes according to the mapping relationship between the column identifier and the data to be processed; Each target column data is calculated according to the data aggregation rule to obtain each local aggregation result.
3. The data aggregation method based on business rules according to claim 2, characterized in that: After the step of calculating each target column data according to the data aggregation rule to obtain each local aggregation result, the method further includes: Generate a corresponding result column identifier according to each of the local aggregation results; The result column identifier is stored in a cache queue of a preset database.
4. The data aggregation method based on business rules according to claim 3 is characterized in that: The step of merging the local aggregation results to obtain the data aggregation result corresponding to the data to be processed specifically includes: Reading the result column identifier from the cache queue; Determine the result column data corresponding to each of the local aggregation results according to the result column identifier; The result column data is merged to obtain the data aggregation result.
5. The data aggregation method based on business rules according to claim 1, characterized in that: The step of configuring the data aggregation rule according to the business requirement information and the preset rule configuration information specifically includes: Determining target indicator information in the data to be processed according to the business demand information; The target indicator information is configured according to the rule configuration information to obtain a calculation rule corresponding to each element in the data to be processed; The calculation rules are summarized to obtain the data aggregation rules.
6. The data aggregation method based on business rules according to claim 1, characterized in that: The step of obtaining the data to be processed in a column structure and the business requirement information corresponding to the data to be processed specifically includes: receiving a data aggregation instruction carrying target query information and the business demand information, and determining target data in a preset database according to the target query information; The target data is converted according to a preset columnar data format to obtain the data to be processed.
7. The data aggregation method based on business rules according to any one of claims 1 to 6, characterized in that: After the step of merging the local aggregation results to obtain the data aggregation result corresponding to the data to be processed, the method further includes: According to the data aggregation result, a corresponding global column identifier is generated and sent to a preset administrator user terminal; The data aggregation result is stored in a preset blockchain node.
8. A data aggregation system based on business rules, characterized in that: include: An acquisition module is used to acquire the data to be processed in a column structure and the business demand information corresponding to the data to be processed; A configuration module, configured to obtain data aggregation rules according to the business demand information and preset rule configuration information; An aggregation module, used to start at least one data aggregation process according to the data aggregation rule, and obtain a local aggregation result corresponding to each data aggregation process; The merging module is used to merge the local aggregation results to obtain the data aggregation results corresponding to the data to be processed.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the business rule-based data aggregation method according to any one of claims 1 to 7 when executing the computer-readable instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the business rule-based data aggregation method according to any one of claims 1 to 7 are implemented.