Data aggregation method, device and equipment, readable storage medium and program product
By generating data aggregation configuration information and object instances, performing object association hooking and aggregation processing, and using object storage and key-value relationships, the problem of low data aggregation efficiency is solved, and efficient data aggregation and secondary utilization are achieved.
Patent Information
- Application Number
- CN202410627864.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2024-08-23
AI Technical Summary
The existing technology has the problem of repeated aggregation of data and unreduced association paths during the data aggregation process, resulting in low efficiency.
By generating data aggregation configuration information and object instances based on the object model and collected data information, if associated hooking is required, hook it up, and perform aggregation processing according to preset logic after all object instances do not need to be hooked up, using objectification Processing and key-value relational storage improve efficiency.
It effectively reduces the cost of repeated aggregation and associated access of data, improves the efficiency and secondary utilization of data aggregation, and solves the problem of inefficient repeated aggregation and association.
Smart Images

Figure CN118535628A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data aggregation method, apparatus, device, readable storage medium and program product. Background Art
[0002] Data aggregation refers to the accumulation of a large amount of various data in enterprises and other organizations due to continuous digitalization. If these data are viewed separately or discretely, they often have low business value or even no business value. In order to maximize and tap the value of data, it is often necessary to effectively organize discrete and fragmented data through their inherent relationships, and to support actual business scenarios by forming business modeling information with business significance and intrinsic value, thereby creating revenue and new growth points for the organization. However, the scenarios of data aggregation are complex and diverse. Different information systems have great differences in model design, table structure, and data usage due to the natural heterogeneity of data.
[0003] In the implementation scenario of data aggregation, a business system with large and comprehensive data is built based on a relational database, and discrete data related to each business is centralized in the business system. However, this does not fundamentally reduce data duplication and improve the secondary utilization rate of aggregation results. Each time a business scenario is supported, although data aggregation is completed in the system, the association paths of the tables are not reduced, the problem of duplicate aggregation still exists, and the data aggregation efficiency is low. Summary of the invention
[0004] The main purpose of this application is to provide a data aggregation method, device, equipment, readable storage medium and program product, aiming to solve the problem of how to improve the efficiency of data aggregation.
[0005] To achieve the above purpose, the present application provides a data aggregation method, which includes the following steps:
[0006] Generate data aggregation configuration information and object instances based on the object model and collected data information;
[0007] If it is determined according to the data aggregation configuration information that the object instance needs to be associated and mounted, then the object instance is associated and mounted;
[0008] After determining that all object instances do not need to be associated and mounted, the associated and mounted object instances are aggregated according to a preset aggregation logic.
[0009] Optionally, before the step of generating data aggregation configuration information and object instances according to the object model and the collected data information, the step further includes:
[0010] Generate data aggregation requirements based on business scenarios, business objectives, or data collection scope;
[0011] Determine the model parameter information of the object model according to the data aggregation requirement; wherein the model parameter information includes a model name, a model key attribute, and a model key behavior;
[0012] The object model is generated according to the model parameter information.
[0013] Optionally, the method further comprises:
[0014] Determine whether the collected data information meets the preset verification conditions;
[0015] If the preset verification condition is met, the step of associating and mounting the object instance if it is determined according to the data aggregation configuration information that the object instance needs to be associated and mounted is performed;
[0016] Among them, satisfying the preset verification conditions includes: the collected data information contains preset necessary information.
[0017] Optionally, after the step of generating data aggregation configuration information and object instances according to the object model and the collected data information, the step further includes:
[0018] Determine whether the object instance corresponding to the collected data information exists;
[0019] If it exists, the existing object instance is updated according to the newly generated object instance;
[0020] If it does not exist, create an object instance corresponding to the collected data information.
[0021] Optionally, the step of generating data aggregation configuration information according to the object model and the collected data information includes:
[0022] Generate the data aggregation configuration information according to the complexity of the object model and the collected data information;
[0023] The complexity of the object model includes a simple model or a complex model, the simple model does not have a data association feature, and the complex model has a data association feature.
[0024] Optionally, after the step of aggregating the associated and mounted object instances according to a preset aggregation logic, the method further includes:
[0025] Determine a key-value relationship between the object instance and the storage location; wherein the key is the stored object instance and the value is the storage location of the object instance;
[0026] The key-value relationship is stored.
[0027] To achieve the above object, the present application also provides a data aggregation device, the data aggregation device comprising:
[0028] A generation module, used to generate data aggregation configuration information and object instances according to the object model and the collected data information;
[0029] an association module, configured to associate and mount the object instance if it is determined according to the data aggregation configuration information that the object instance needs to be associated and mounted;
[0030] The processing module is used for, after determining that all object instances do not need to be associated and mounted, performing aggregation processing on the associated and mounted object instances according to a preset aggregation logic.
[0031] To achieve the above objectives, the present application also provides a data aggregation device, which includes a memory, a processor, and a data aggregation program stored in the memory and executable on the processor, and when the data aggregation program is executed by the processor, the various steps of the data aggregation method described above are implemented.
[0032] To achieve the above objectives, the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a data aggregation program, and when the data aggregation program is executed by a processor, the various steps of the data aggregation method described above are implemented.
[0033] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a data aggregation program, and when the data aggregation program is executed by a processor, it implements the steps of the data aggregation method described above.
[0034] The present application provides a data aggregation method, apparatus, device, readable storage medium and program product, which generate data aggregation configuration information and object instances according to an object model and collected data information; if it is determined according to the data aggregation configuration information that an object instance needs to be associated and mounted, the object instance is associated and mounted; after determining that all object instances do not need to be associated and mounted, the associated and mounted object instances are aggregated according to a preset aggregation logic, and through objectization processing and based on the data aggregation configuration information, it is determined whether object instances need to be associated and mounted, so that the association relationship between the object instances to be aggregated is aggregated based on the associated and mounted object instances, thereby improving the efficiency of data aggregation. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is a schematic diagram of the hardware structure of a data aggregation device involved in an embodiment of the present application;
[0036] Figure 2 A schematic diagram of a flow chart of an embodiment of the data aggregation method of the present application;
[0037] Figure 3 This is a flow chart of another embodiment of the data aggregation method of the present application;
[0038] Figure 4 A schematic diagram of the correlation structure of the simple model and the complex model of the data aggregation method of this application;
[0039] Figure 5 This is a flow chart of a second embodiment of the data aggregation method of the present application;
[0040] Figure 6 A flowchart of the object-oriented processing of the data aggregation method of this application;
[0041] Figure 7 A flowchart of the model definition of the data aggregation method of this application;
[0042] Figure 8 This is a schematic diagram of the logical structure of the data aggregation device of this application.
[0043] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0044] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0045] The main solution of the embodiment of the present application is: generate data aggregation configuration information and object instances according to the object model and the collected data information; if it is determined according to the data aggregation configuration information that the object instance needs to be associated and mounted, then the object instance is associated and mounted; after determining that all object instances do not need to be associated and mounted, the associated and mounted object instances are aggregated according to the preset aggregation logic, and through objectization processing and based on the data aggregation configuration information, it is determined whether the object instances need to be associated and mounted, so that the association relationship between the object instances to be aggregated is aggregated based on the associated and mounted object instances, thereby improving the efficiency of data aggregation.
[0046] As an implementation solution, the data aggregation device can be Figure 1 shown.
[0047] The embodiment of the present application relates to a data aggregation device, which includes: a processor 101, such as a CPU, a memory 102, and a communication bus 103. The communication bus 103 is used to realize connection and communication between these components.
[0048] The memory 102 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Figure 1 As shown, the memory 102 as a computer-readable storage medium may include a data aggregation program; and the processor 101 may be used to call the data aggregation program stored in the memory 102 and perform the following operations:
[0049] Generate data aggregation configuration information and object instances based on the object model and collected data information;
[0050] If it is determined according to the data aggregation configuration information that the object instance needs to be associated and mounted, then the object instance is associated and mounted;
[0051] After determining that all object instances do not need to be associated and mounted, the associated and mounted object instances are aggregated according to a preset aggregation logic.
[0052] Optionally, the processor 101 may be configured to call a data aggregation program stored in the memory 102, and perform the following operations:
[0053] Generate data aggregation requirements based on business scenarios, business objectives, or data collection scope;
[0054] Determine the model parameter information of the object model according to the data aggregation requirement; wherein the model parameter information includes a model name, a model key attribute, and a model key behavior;
[0055] The object model is generated according to the model parameter information.
[0056] Optionally, the processor 101 may be configured to call a data aggregation program stored in the memory 102, and perform the following operations:
[0057] Determine whether the collected data information meets the preset verification conditions;
[0058] If the preset verification condition is met, the step of associating and mounting the object instance if it is determined according to the data aggregation configuration information that the object instance needs to be associated and mounted is performed;
[0059] Among them, satisfying the preset verification conditions includes: the collected data information contains preset necessary information.
[0060] Optionally, the processor 101 may be configured to call a data aggregation program stored in the memory 102, and perform the following operations:
[0061] Determine whether the object instance corresponding to the collected data information exists;
[0062] If it exists, the existing object instance is updated according to the newly generated object instance;
[0063] If it does not exist, create an object instance corresponding to the collected data information.
[0064] Optionally, the processor 101 may be configured to call a data aggregation program stored in the memory 102, and perform the following operations:
[0065] Generate the data aggregation configuration information according to the complexity of the object model and the collected data information;
[0066] The complexity of the object model includes a simple model or a complex model, the simple model does not have a data association feature, and the complex model has a data association feature.
[0067] Optionally, the processor 101 may be configured to call a data aggregation program stored in the memory 102, and perform the following operations:
[0068] Determine a key-value relationship between the object instance and the storage location; wherein the key is the stored object instance and the value is the storage location of the object instance;
[0069] The key-value relationship is stored.
[0070] Based on the hardware architecture of the above-mentioned data aggregation device, an embodiment of the data aggregation method of the present application is proposed.
[0071] Reference Figure 2 , Figure 2 This is the first embodiment of the data aggregation method of the present application, and the data aggregation method comprises the following steps:
[0072] Step S10: Generate data aggregation configuration information and object instances according to the object model and the collected data information.
[0073] Optionally, data aggregation configuration information refers to configuration parameters and rules used to guide data aggregation operations during data processing and analysis, including association attachment configuration, encrypted field configuration, source table (object) definition configuration, SCN initialization configuration, enumeration conversion configuration, source field to target field attachment, etc. The above are key configurations, and other constraints and restrictions can be expanded if needed.
[0074] Optionally, the association attachment configuration configures the association attachment relationship from the source table to the target object. Optionally, if there are multiple complex associations, it can be divided into two layers of configuration, namely, the configuration of generating intermediate objects and the configuration of generating target objects from intermediate objects. The association attachment configuration information includes but is not limited to the source table type (source table, intermediate table, object), target object (source table, intermediate object, object), transfer table, filter conditions, aggregate fields, etc. Here, because the source table, intermediate table, and object can be regarded as newly collected data and can be associated and attached, the source table type is distinguished and defined, and they are actually all associated attachment processes. There are direct attachments, multi-table associations, conditional filtering attachments, etc., which can be distinguished by configuration and judged according to the actual situation. Only direct attachment is described here. For example, configure Table (source table), A_User (A area user table), User (user object), A_User_ID (attachment field), and the rest of the configuration is not necessary and can be left blank. According to the complexity of the situation, it can be divided into direct generation of objects from the main table, such as direct generation of user objects from the user table; direct generation from the table, such as generation of user objects from the user table and user work information table; generation from table selection, such as generation of objects containing the user's latest address information from the user table and user address information change table. It can also be extended to association configuration by associating slave tables with each other, generating primary keys, and other methods.
[0075] Optionally, configure the encrypted field configuration, configure the source table's encrypted fields and encryption methods, and it can be expanded to decrypt the source data first and then encrypt it, etc.
[0076] Optionally, the source table (object) definition configuration includes configuring the object name (table name), object field (table field), primary key and other information, such as A_User (A area user table), [User_Id, Date, Order_Id] (user field name), User_Id (primary key name), etc.
[0077] Optionally, the SCN (System Change Number) initialization configuration exists in each table, and messages less than this value are useless messages. Exemplarily, it is first necessary to determine a specific SCN value as a threshold, indicating that messages before this value are useless messages. Traverse the data in each table and obtain the SCN value corresponding to each message. For each message, if the SCN value is less than the set threshold, the message is considered to be a useless message. According to business needs, useless messages can be deleted, archived, or otherwise processed to clean up useless data in the database.
[0078] Optionally, enumeration conversion configuration configures the configuration method when different enumeration fields exist between the source table and the target object.
[0079] Optionally, the source field is linked to the target field, the source field is configured to contain: information [column], the target field is configured to contain information [column], block, conversion field, configuration conditions are considered based on whether conversion is required, etc.
[0080] In this embodiment, the associated configuration information generated after the initialization data aggregation configuration information designs the associated object is the configuration information loading process. For example, it is assumed that the student information of Zhang San (student information table), the academic performance of Zhang San (student performance table), and the residence information of Zhang San (resident information table) are input here.
[0081] Optionally, data aggregation configuration information and object instances are generated based on the object model and the collected data information. First, the object model needs to be clearly defined, including information such as each object, the relationship between them, and attributes. The object model can be represented in the form of a class diagram or an entity relationship diagram.
[0082] In this embodiment, relevant data information is collected and organized, including data sources, field structures, data types, etc. that need to be aggregated. These data information can come from data sources such as databases, API interfaces, log files, etc. According to the object model and data information, data aggregation configuration information is designed, including data source connection information, data filtering rules, aggregation calculation logic, data conversion rules, etc.
[0083] Optionally, after step S10, it also includes: judging whether the object instance corresponding to the collected data information exists; if it exists, updating the existing object instance according to the newly generated object instance; if it does not exist, creating the object instance corresponding to the collected data information, so as to establish the object instance of the data information and improve the accuracy of data aggregation. Optionally, it is judged whether the object exists, and if it does not exist, a new object is generated, and if it does exist, the data of the existing object is updated. Exemplarily, there is no student object for Zhang San, but there is a resident object for Zhang San. The student object for Zhang San is created according to preset rules, for example, by using the association between the student information of Zhang San and the performance information of Zhang San. If the resident object for Zhang San exists, the fields of the existing object are updated.
[0084] Optionally, generating data aggregation configuration information according to the object model and the collected data information includes: generating the data aggregation configuration information according to the complexity of the object model and the collected data information; wherein the complexity of the object model includes a simple model or a complex model, the simple model does not have data association features, and the complex model has data association features. Wherein, the data aggregation configuration information is generated according to whether the model has data association features and the collected data information to adapt to the scenario or business purpose of data aggregation, thereby improving the efficiency of data aggregation. Optionally, according to the complexity of the object model, it can be divided into two categories, as shown in the following diagram of the classification of aggregation models. Figure 4As shown, one type is a simple model, such as data without association features; one type is a complex model, such as data with one or more levels of association features. Optionally, according to the role of the aggregation model, it can be divided into three categories: one is a simple model that does not participate in any association. This type of model has complete data aggregation capabilities; one type participates in the complex model as a child model object. This type of model has the ability to receive and transmit data, but does not perform specific data aggregation logic; the last type participates in the complex model as a parent model object. This type of model is relatively complex and has complete data aggregation capabilities.
[0085] Step S20: If it is determined according to the data aggregation configuration information that the object instance needs to be associated and mounted, then the object instance is associated and mounted.
[0086] In this embodiment, if Figure 3 As shown, it is determined whether association attachment is required based on the data aggregation configuration information. Optionally, association attachment includes table attachment, object attachment, and table and object attachment. For example, if a new student object of Zhang San is generated, and the resident object contains employment information, then the newly generated Zhang San object should be configured with a transfer association to transfer student information such as reading to the user object.
[0087] Optionally, determine whether the collected data information meets the preset verification conditions; if the preset verification conditions are met, execute step S20, wherein meeting the preset verification conditions includes: the collected data information contains preset necessary information. Optionally, the inspection is a data model data necessary information inspection, according to the field configuration of the input table in the data configuration table, such as the table includes a source table, an intermediate table, and an intermediate object, check whether the input data already contains the necessary information, and output abnormalities. This embodiment implements the verification of data information, eliminates data information that does not meet the preset verification conditions, and improves the efficiency and accuracy of data processing.
[0088] Step S30: after determining that all object instances do not need to be associated and mounted, aggregate the associated and mounted object instances according to a preset aggregation logic.
[0089] In this embodiment, if Figure 3 As shown, after determining that all object instances do not need to be associated and attached, the object model uses the preset aggregation logic for aggregation processing. The aggregation logic in the process can be defined according to the needs of the actual scenario, and the definition method can be program coding, configuration, or program implementation plus configuration. Among them, the program implementation plus configuration method can reduce the difficulty of configuration logic and ensure sufficient flexibility, ease of use and scalability.
[0090] Optionally, the resident Zhang San object is located using a key-value method. The key is generated based on the primary key and other information when the object is stored, and the value is the object storage location. Distributed storage can perform multi-layer key-value positioning to implement updates to the resident Zhang San object.
[0091] Optionally, after step S30, the method further includes: determining a key-value relationship between the object instance and the storage location, wherein the key key is the stored object instance and the value value is the storage location of the object instance; and storing the key-value relationship. The key-value relationship enables fast data location and reduces management costs.
[0092] In the embodiments of the present application, fast data positioning, fast association, fast storage, single aggregation and multiple reuse are achieved, achieving less data movement, less repeated aggregation times, and high association access efficiency. Compared with the repeated association of relational centralized systems, the cost is extremely high and the transformation is difficult. Compared with the high cost of data warehouse systems, limited data aggregation improvement, and the disadvantages of insufficient portability of secondary utilization of aggregation results, the present application uses design object models, association information and other configuration information to fully reduce the repeated aggregation of data. Among them, there is no strict order of data arrival, and an object can also be an object with only part of the source table information, and subsequent data arrival is supplemented; data can be associated and attached, and objects can be associated and queried, such as Zhang San user object can query Zhang San student object, improving the secondary utilization of data aggregation, for example, there is no need to re-retrieve the table for adding new objects. If there is existing information and it is a parent-child relationship, the object information can be configured to be used to generate the target object, and the configuration association method and the object-oriented design model are used to change the object without touching or modifying the code as little as possible, greatly reducing the cost of system changes.
[0093] The embodiment of the present application is a set of methods for efficiently implementing data aggregation based on the object storage and computing integration characteristics. The key to the aggregation process lies in data association, aggregation execution and data storage access, among which data association is the basis for data aggregation execution, data object storage and key-value access are the means and methods for data aggregation execution, and are also important ways to avoid repeated aggregation and effectively improve performance. Storage and computing integration is a characteristic guarantee for data aggregation execution performance.
[0094] In this embodiment, the definition of data association can be defined in a variety of ways such as programmatic definition and configuration definition. It is recommended to use configuration definition, which is reflected in the process as the initialization of configuration information. In addition, in practice, table definition, security rule definition and other information can also be added to the configuration. Since these aspects are not the focus of this application, they will not be repeated here.
[0095] In this embodiment, during the data aggregation process, when the data enters the process, data access judgment will be performed first, such as compliance verification, timeliness judgment, etc. After the access judgment is passed, the process will perform data association processing according to the semantics of the data association configuration. When the data arrives for the first time, the process will build the corresponding object and incorporate the data into the object structure. Otherwise, the process will find the object key according to the data field, and then find the associated object through the key value method, and incorporate the data into the object structure. After the incoming data is included in the object structure, the process will further determine whether the association needs to be transferred based on the semantics of the association definition. If necessary, the target node is calculated by adding the object namespace and the object key and the data is transferred out. After the data arrives at the corresponding node, it enters a new aggregation process. If the association does not need to be transferred, the process will execute the aggregation logic based on the object storage and computing integration characteristics.
[0096] In this embodiment, efficient data aggregation and quick call are achieved based on key-value access. Data access is based on key-value access and is implemented in an object-oriented manner. Since the time complexity of key-value access is O(1), efficient data retrieval access can be achieved when the key is known. After quickly retrieving the object, combined with the object-oriented characteristics, efficient data aggregation operations can be achieved by utilizing the storage and computing integration characteristics.
[0097] In the embodiments of the present application, a data object model is defined according to the object-oriented concept, data aggregation configuration information is generated according to the data object model and the collected data information, and whether association attachment and transmission association need to be performed is determined based on the data aggregation configuration information with the object as the granularity, and the data that needs to be associated, attached and transmitted is aggregated using the set aggregation logic in the object model. The aggregation model is defined based on the object-oriented concept: conventional data aggregation methods are either to achieve data movement and aggregation through interface calls, or to achieve data aggregation through data warehouses, and then to process data associations and achieve data aggregation in a hard-coded manner; the embodiments of the present application achieve data association aggregation through an object-oriented model, and achieve aggregation logic through the storage and computing integration characteristics of objects.
[0098] In an embodiment of the present application, an aggregation process is designed based on the integration of storage and computing. The conventional data aggregation process is to first aggregate the data involved in the scenario, and then design and implement the aggregation logic according to the needs of the scenario. Conventional data aggregation solutions have problems such as repeated aggregation and inefficient association processing. The process of this application is more sophisticated, and the flexibility, maintainability and scalability of the process are ensured through configuration. Efficient data association and aggregation are achieved through key-value access + objectification. The efficiency of data aggregation is ensured through the integrated characteristics of storage and computing, which solves the problems of repeated aggregation and inefficient association.
[0099] In the embodiments of the present application, a method for processing complex data associations based on objectification is provided: conventional data aggregation methods usually process data associations based on structured programming languages. When encountering complex associations, there are problems such as high implementation difficulty, repeated operations, and poor performance; the present application is based on an objectified approach and cleverly solves the problems of high implementation difficulty, repeated operations, and poor performance in conventional data aggregation methods through a design combination of parent-child objects, transitive associations, and key-value access.
[0100] In the embodiments of the present application, the problems of repeated aggregation and inefficient association are significantly solved. Different from the repeated aggregation and inefficient association of conventional aggregation methods, this embodiment realizes one-time aggregation and multiple reuse, object-oriented and efficient data association from a mechanism perspective, ensuring the efficiency of the data aggregation process. This embodiment has strong versatility. Conventional data aggregation is often deeply coupled with the scene and has poor versatility. This embodiment supports custom extensions of object model behaviors and allows specific behaviors to be implemented in a code + configuration manner, which can easily adapt to the data aggregation needs of various projects, products, and scenarios. This embodiment has strong flexibility, ease of use, and scalability. Different from the conventional hard-coded implementation of data aggregation, it supports information configuration for possible extension points such as table definition, security rule definition, association relationship definition, object behavior definition, etc., retaining sufficient flexibility, ease of use and scalability.
[0101] In the technical solution of this embodiment, data aggregation configuration information and object instances are generated according to the object model and the collected data information; if it is determined according to the data aggregation configuration information that the object instance needs to be associated and mounted, the object instance is associated and mounted; after it is determined that all object instances do not need to be associated and mounted, the associated and mounted object instances are aggregated according to the preset aggregation logic, and through objectization processing and based on the data aggregation configuration information, it is determined whether the object instances need to be associated and mounted, so that the association relationship between the object instances to be aggregated is aggregated based on the associated and mounted object instances, thereby improving the efficiency of data aggregation.
[0102] Reference Figure 5 , Figure 5 This is the second embodiment of the data aggregation method of the present application. Based on the first embodiment, before step S10, it also includes:
[0103] Step S40, generating data aggregation requirements according to the business scenario or business purpose or data collection scope;
[0104] Step S50, determining model parameter information of the object model according to the data aggregation requirement; wherein the model parameter information includes a model name, model key attributes, and model key behaviors;
[0105] Step S60: generating the object model according to the model parameter information.
[0106] In this embodiment, this method makes full use of the correlation between data, the integrated characteristics of object storage and computing, and the fast access characteristics of key values, and realizes fast data positioning, fast association, fast storage, and multiple reuse of single aggregation. Ultimately, in the aggregation process, the method achieves the minimum data movement, the minimum number of repeated aggregations, and the highest associated access efficiency. The design ensures high cohesion and low coupling of aggregated data, and fully improves the efficiency of data aggregation.
[0107] The correlation between data refers to a certain association characteristic between data. This association characteristic is usually divided into two categories. One is explicit association with obvious business characteristics. For example, student information can be associated with the information of the school through the organization ID. The other is implicit association that needs to be defined according to the scenario. For example, a student's student ID number has an implicit corresponding relationship with his or her ID number. The association between student information and ID information can be established according to the needs of the specific scenario.
[0108] An object is a carrier and data structure that efficiently organizes all related data together, and can have multiple specific behaviors. These behaviors cover the logic of data processing and are usually embodied as methods. These characteristics enable the object to have the ability to integrate storage and computing after being loaded into memory. For example, a student object can calculate its average subject score based on its grades in each course through its statistical behavior method. Objects are usually divided into two categories. One is the abstraction of real-world things, such as schools, students, teachers, etc. The other is objects that only have a sense of use. For example, in order to evaluate the performance of a device, a performance evaluation model object is constructed. This object only has a sense of use and contains various relevant parameters required by the device performance evaluation model and a performance evaluation algorithm. The following is a diagram of the object-oriented processing of data record association. Figure 6 shown.
[0109] Assume that there are data records A[UserId, Name], data records B[UserId, DoNumber, Professional], data records C[UserId, score], data records D[DoNumber, T1, T2], and data records E[Professional, score]. The association relationships are: AB, BD, BE, AC, for example Figure 6 In the figure, A is a hexagon, B is a heptagon, C is a triangle, D is an octagon, and E is a enneagon. Traditional association requires obtaining all data records at the same time for association. After objectification, the generated association relationship is as follows: Figure 6 On the right side, the association exists as an object, and the association can be connected, that is, the data has no order.
[0110] Key-value access is an efficient way to access data, and its performance advantage becomes more prominent as the amount of data increases. This access method reduces the time complexity to O(1) based on the hash table method, ensuring fast access to data. For example, the business implementation program can quickly locate the machine where the object is located by adding the hash value of the object namespace plus the object key, and then quickly locate the object data by the object key.
[0111] In this embodiment, the aggregation model is defined by object-oriented thinking. Data aggregation often needs to abstract different aggregation models according to different scenarios or business purposes or different data collection scopes. The aggregation model is constructed by abstracting the object-oriented thinking. Specifically, the actual data aggregation requirements are abstracted and transformed using object-oriented language, and the model is described by objects. The specific process is as follows: Figure 7 As shown in the figure. In the process of model definition, the key attributes of the model include input information, output information and configuration information, and the key behaviors of the model include input information verification, processing from input information to output information, updating and saving of output information attributes, etc. In addition, other attributes and behaviors of the model can be defined and expanded according to actual needs.
[0112] Optionally, according to the complexity of the object model, it can be divided into two categories, as shown in the following diagram of the classification of aggregation models: Figure 4 As shown, one type is a simple model, such as data without association features; one type is a complex model, such as data with one or more levels of association features. Optionally, according to the role of the aggregation model, it can be divided into three categories: one is a simple model that does not participate in any association. This type of model has complete data aggregation capabilities; one type participates in the complex model as a child model object. This type of model has the ability to receive and transmit data, but does not perform specific data aggregation logic; the last type participates in the complex model as a parent model object. This type of model is relatively complex and has complete data aggregation capabilities.
[0113] For example, there are existing personal information models, such as those containing personal information such as ID cards, student identity models, such as those containing ID card and student number information, and new aggregated student information models. The student information table contains student number, major, dormitory, grades and other student-related information. At this time, based on the object-oriented idea, an aggregate model is designed: the student model, in which the student information table is abstracted into real-life students, including attributes: student number, major, dormitory number, grades, etc., including behaviors: calculating the average grades of each subject, etc. The process is as follows Figure 7 As shown. It is known that the personal information model already exists. According to the model complexity analysis, the student model has associated features with the personal information object. The student identity model is used as the data receiving and transmission capability. At this time, the object association information is configured: student-student identity-personal information, which is used for aggregation and association. The model in this example can be referenced Figure 4 The complex models listed in the figure are simple models without associated features, such as mouse, keyboard, etc. Optionally, the model definition is configurable, in which case the model supports expansion at any time.
[0114] In the technical solution of this embodiment, by determining the model parameter information of the object model according to the data aggregation requirements, and generating the object model based on the model parameter information, the efficiency of data aggregation is improved by subsequent object processing.
[0115] In one embodiment, if Figure 8 As shown, the present application also provides a data aggregation device, the data aggregation device comprising:
[0116] A generation module 100, used to generate data aggregation configuration information and object instances according to the object model and the collected data information;
[0117] The association module 200 is used to associate and mount the object instance if it is determined according to the data aggregation configuration information that the object instance needs to be associated and mounted;
[0118] The processing module 300 is used to aggregate the object instances after association and attachment according to a preset aggregation logic after determining that all object instances do not need to be associated and attached.
[0119] Optionally, before the step of generating data aggregation configuration information and object instances according to the object model and the collected data information, the step further includes:
[0120] Generate data aggregation requirements based on business scenarios, business objectives, or data collection scope;
[0121] Determine the model parameter information of the object model according to the data aggregation requirement; wherein the model parameter information includes a model name, a model key attribute, and a model key behavior;
[0122] The object model is generated according to the model parameter information.
[0123] Optionally, the method further comprises:
[0124] Determine whether the collected data information meets the preset verification conditions;
[0125] If the preset verification condition is met, the step of associating and mounting the object instance if it is determined according to the data aggregation configuration information that the object instance needs to be associated and mounted is performed;
[0126] Among them, satisfying the preset verification conditions includes: the collected data information contains preset necessary information.
[0127] Optionally, after the step of generating data aggregation configuration information and object instances according to the object model and the collected data information, the step further includes:
[0128] Determine whether the object instance corresponding to the collected data information exists;
[0129] If it exists, the existing object instance is updated according to the newly generated object instance;
[0130] If it does not exist, create an object instance corresponding to the collected data information.
[0131] Optionally, the step of generating data aggregation configuration information according to the object model and the collected data information includes:
[0132] Generate the data aggregation configuration information according to the complexity of the object model and the collected data information;
[0133] The complexity of the object model includes a simple model or a complex model, the simple model does not have a data association feature, and the complex model has a data association feature.
[0134] Optionally, after the step of aggregating the associated and mounted object instances according to a preset aggregation logic, the method further includes:
[0135] Determine a key-value relationship between the object instance and the storage location; wherein the key is the stored object instance and the value is the storage location of the object instance;
[0136] The key-value relationship is stored.
[0137] The present application also provides a data aggregation device, which includes a memory, a processor, and a data aggregation program stored in the memory and executable on the processor, and when the data aggregation program is executed by the processor, the various steps of the data aggregation method described in the above embodiment are implemented.
[0138] The present application also provides a computer-readable storage medium, which stores a data aggregation program. When the data aggregation program is executed by a processor, the various steps of the data aggregation method described in the above embodiment are implemented.
[0139] In addition, an embodiment of the present application also proposes a computer program product, including a data aggregation program, which implements the steps of the data aggregation method described above when executed by a processor.
[0140] The specific implementation methods of the computer program product of the present application are basically the same as the above-mentioned data aggregation method embodiments, and will not be repeated here.
[0141] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0142] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, system, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, system, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, system, article or device including the element.
[0143] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment system 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 computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a parking management device, an air conditioner, or a network device, etc.) to execute the system described in each embodiment of the present application.
[0144] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A data aggregation method, characterized in that: The data aggregation method comprises: Generate data aggregation configuration information and object instances based on the object model and collected data information; If it is determined according to the data aggregation configuration information that the object instance needs to be associated and mounted, then the object instance is associated and mounted; After determining that all object instances do not need to be associated and mounted, the associated and mounted object instances are aggregated according to a preset aggregation logic.
2. The data aggregation method according to claim 1, characterized in that: Before the step of generating data aggregation configuration information and object instances according to the object model and the collected data information, the method further includes: Generate data aggregation requirements based on business scenarios, business objectives, or data collection scope; Determine the model parameter information of the object model according to the data aggregation requirement; wherein the model parameter information includes a model name, a model key attribute, and a model key behavior; The object model is generated according to the model parameter information.
3. The data aggregation method according to claim 1, characterized in that: The method further comprises: Determine whether the collected data information meets the preset verification conditions; If the preset verification condition is met, the step of associating and mounting the object instance if it is determined according to the data aggregation configuration information that the object instance needs to be associated and mounted is performed; Among them, satisfying the preset verification conditions includes: the collected data information contains preset necessary information.
4. The data aggregation method according to claim 1, characterized in that: After the step of generating data aggregation configuration information and object instances according to the object model and the collected data information, the method further includes: Determine whether the object instance corresponding to the collected data information exists; If it exists, the existing object instance is updated according to the newly generated object instance; If it does not exist, create an object instance corresponding to the collected data information.
5. The data aggregation method according to claim 1, characterized in that: The step of generating data aggregation configuration information according to the object model and the collected data information includes: Generate the data aggregation configuration information according to the complexity of the object model and the collected data information; The complexity of the object model includes a simple model or a complex model, the simple model does not have a data association feature, and the complex model has a data association feature.
6. The data aggregation method according to claim 1, characterized in that: After the step of aggregating the associated and mounted object instances according to the preset aggregation logic, the method further includes: Determine a key-value relationship between the object instance and the storage location; wherein the key is the stored object instance and the value is the storage location of the object instance; The key-value relationship is stored.
7. A data aggregation device, characterized in that: The data aggregation device comprises: A generation module, used to generate data aggregation configuration information and object instances according to the object model and the collected data information; an association module, configured to associate and mount the object instance if it is determined according to the data aggregation configuration information that the object instance needs to be associated and mounted; The processing module is used for, after determining that all object instances do not need to be associated and mounted, performing aggregation processing on the associated and mounted object instances according to a preset aggregation logic.
8. A data aggregation device, characterized in that: The data aggregation device includes a memory, a processor, and a data aggregation program stored in the memory and executable on the processor. When the data aggregation program is executed by the processor, each step of the data aggregation method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a data aggregation program, and when the data aggregation program is executed by a processor, the data aggregation program implements the steps of the data aggregation method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The computer program product comprises a data aggregation program, and when the data aggregation program is executed by a processor, the steps of the data aggregation method according to any one of claims 1 to 6 are implemented.
