Method for constructing a base data model based on hash data
By using a hash-based approach and employing standardized interfaces and data structures to reorganize basic data vertically, horizontally, and in a combined manner, the problems of data storage redundancy and inconsistency are solved, and unified data management and flexible traceability of historical information are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-29
- Publication Date
- 2026-03-24
AI Technical Summary
Existing technologies suffer from problems such as redundant and inconsistent data storage, inconsistent formats, and inability to trace historical information when building basic data models. In particular, the lack of unified standards in the public transportation industry leads to a large workload and poor flexibility in data management.
By adopting a hash-based approach, standardizing interface specifications and data structures, storing data attributes as the smallest unit, and reorganizing them vertically, horizontally, and in combination, a basic data model is generated and accessed via a RESTful interface.
It has achieved the unification and standardization of basic data management, reduced data redundancy, and improved the flexibility of data reorganization and the traceability of historical information.
Smart Images

Figure CN115905379B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of information data processing, and in particular to a method for constructing a basic data model based on hash data. Background Technology
[0002] Basic data, as the foundation of information system construction, determines the level of enterprise informatization to a certain extent. The construction of basic data models integrates basic data from various source systems through highly abstract data models, ultimately forming a unified, standardized, and easy-to-use data warehouse to provide upper-level services. As core data for all industries, almost all business systems cannot operate independently without basic data. Faced with numerous business systems, basic data management is not only about leading to repetitive maintenance workloads, but also about a series of problems such as inconsistent data, inconsistent formats, and the inability to trace historical information. These problems directly affect the standardization of the basic data model and directly impact the normal operation of business and decision analysis.
[0003] The development of basic data models in the public transportation industry started relatively late and lacks unified standards. Various business systems generally use historical data and attribution details to construct basic data models. This method involves copying all or part of the basic data to create a historical record. While convenient for data generation, it doesn't specifically copy changed information. Each data entry is stored as the smallest unit, failing to store data at the attribute level, leading to data redundancy. Furthermore, copied data cannot be marked with updated content, resulting in unupdated attributes having new update dates and causing ambiguity. Using the model data also lacks flexibility, as it cannot be used at the attribute level. Especially regarding the standardization of basic data models, data copying requires establishing separate model specifications for different basic data types. For example, in the public transportation industry, multiple data models need to be created for personnel, vehicles, routes, and stations. As business grows, the types of basic data also increase, each additional type adding to the workload.
[0004] like Figure 1 The basic data model shown relies on the data copied each time. In the data model of the process, the content that has not been changed and has been copied causes data redundancy. Summary of the Invention
[0005] To address the problem that traditional methods for building basic data models rely on the structure of traditional basic data tables, resulting in data storage redundancy, this invention provides a method for building basic data models based on hash data. This method no longer depends on the structure of traditional basic data tables, but instead generates basic data models by establishing standardized interface specifications and data structures.
[0006] The solution adopted by this invention to solve its technical problem is a method for constructing a basic data model based on hash data. The attributes of business data are stored as the smallest granularity. Using this smallest granularity storage method, the attribute items of business data are minimized and split to obtain basic data for different businesses. Then, the obtained basic data is reorganized to construct a basic data data model. The relevant data model is accessed using a unified interface provided to the outside world.
[0007] The basic data restructuring includes vertical restructuring, horizontal restructuring, and a combination of both. Vertical restructuring mainly focuses on data items and uses the timeline as the basis to restructure the data and generate historical change records for the data items.
[0008] Horizontal reorganization involves cutting horizontally at a point on the timeline of the basic data to obtain the current version status of the basic data. The number of data items can be dynamically controlled by the horizontal section. Based on the set data items and time points, the latest data item less than or equal to that time point is taken, and then each data item is integrated to generate the so-called field version.
[0009] Based on horizontal and vertical data restructuring, the data is constructed in a three-dimensional manner. Vertically, the data items are based on data items, and horizontally, the time points are based on time points. The data items of the basic data are transformed from points to lines, and then from lines to surfaces, thereby constructing the model data of the basic data.
[0010] In the above scheme, business data is stored at the basic granularity of data items. The data items are abstracted as points. Based on the time axis of the data items, the data items are connected into a line to generate the historical version of the data item vertically. Based on the horizontal plane of the time point, the data object of the time point is generated horizontally. Based on the cross combination of horizontal and vertical, a three-dimensional data model is generated.
[0011] Furthermore, the interfaces provided by this invention uniformly use the RESTful method for request access, and authentication information is set in the HTTP HEADER in each request.
[0012] In addition, this invention can also extract model data from basic data and use hash storage unit data items to reduce redundancy, making the data model data clearer and more standardized, and making the historical information tracing of the model more flexible and simple.
[0013] The beneficial effects of this invention are:
[0014] This invention, through distributed storage and storage of basic data in the smallest unit, makes the management of basic data no longer dependent on data type, thus making the management of basic data more unified and standardized. Since data items are used as the smallest unit in storage, the reorganization of data is more flexible, avoiding the redundancy problems caused by the combination of multiple data items.
[0015] This invention, through the horizontal and vertical reorganization of data items, makes the dimensions and angles of data use more flexible, and makes it easier to track and locate historical versions. Attached Figure Description
[0016] Figure 1 It is a graphical diagram of the construction of traditional basic data models.
[0017] Figure 2 This is a block diagram of the data model generated by this invention.
[0018] Figure 3 This is a chart of the data storage fields and types of this invention.
[0019] Figure 4 This is the data format requested by this invention.
[0020] Figure 5 This is the data format returned by the present invention.
[0021] Figure 6 This is a flowchart of the structure call of the present invention.
[0022] Figure 7 It is a graph of relevant data items versus time points. Detailed Implementation
[0023] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0024] Example 1: The method of building a basic data model based on hash data is applied in the informatization construction of various fields, such as public transportation, power, railway, and hospitals. The method of building a basic data model based on hash data no longer relies on the traditional basic data table structure. Instead, it establishes standardized interface specifications and data structures. Business functions drive the calling of basic data interfaces to generate distributed attributes and data of basic data. The interface processes and stores the data in a distributed manner. When business users call the interface, the interface reconstructs and models the data horizontally, vertically, and from a three-dimensional perspective, and returns the results to the business users.
[0025] The following section explains the process of establishing a basic data model through structural definition, interface definition, and remodeling.
[0026] For the structure definition, to adapt to different basic data types, this approach stores business data attributes as the smallest granularity. Using this smallest granularity storage method not only minimizes the breakdown of business data attribute items but also allows the structure to adapt to different business basic data, achieving data generalization. Based on the smallest granularity of business data, it facilitates the reorganization of business data. In this case, business data items are stored as the smallest granularity, and these data items can be abstracted as points. Based on the timeline of the data items, data items can be connected into a line, vertically generating historical versions of the data items; based on the horizontal plane of time points, data objects at that time point can be horizontally generated. Based on the cross-combination of horizontal and vertical data, a three-dimensional data model can be generated, and the generation process is as follows: Figure 2 As shown.
[0027] like Figure 3 As shown, data storage is performed using a relational database, primarily storing data in terms of business tables, attribute names, attribute values, time, and business data identifiers.
[0028] Regarding the definition of the access request interface in this invention, the interfaces provided by this invention uniformly use the RESTful approach. Authentication information must be set in the HTTP HEADER for each request. For specific authentication methods, please refer to [token authentication]. The interface specifications are as follows: Figure 4 and Figure 5 As shown.
[0029] In this invention, all parameters are named using camelCase, and there may be errors in the writing of some attributes in some examples.
[0030] The token authentication process is as follows: Before calling the API of this system, you need to apply for a token authentication code. The token type is a 32-bit string.
[0031] When sending a request, the Authorization parameter needs to be set in the HEADER of the HTTP request. The parameter value is the Base64 encoding of token +: + accountCode +: + time, for example, [1510BA7487DF108CAE58129C38D4EB7E:9527:1605591261335] after transcoding to [MTUxMEJBNzQ4N0RGMTA4Q0FFNTgxMjlDMzhENEVCN0U6OTUyNzoxNjA1NTkxMjYxMzM1].
[0032] Note the separator and time here. The time must be a long integer, accurate to milliseconds. Requests for a time operation within 15 seconds or requests for an account that does not exist will result in authentication failure.
[0033] For modeling the reorganization of basic data, such as Figure 6 As shown, the API call process mainly includes the client initiating a request, the server responding, and when the client initiates a request again, it needs to encrypt information such as the key and parameters. After receiving the request, the server will reassemble the data from the three requests and return it.
[0034] Because the basic data is stored as data items, such as Figure 7 As shown, the horizontal line represents the content of the data item (A), and the vertical line represents the time node (T).
[0035] The reorganization of basic data includes vertical, horizontal, and combined vertical and horizontal methods. Vertical reorganization mainly takes data items as the core and uses the time axis as the basis to reorganize the data and generate historical change records for the data items. Here, min(T) and max(T) represent the minimum and maximum time nodes of the vertical statistics. Based on the time nodes, the data items are arranged and combined in chronological order. Taking the company data item in personnel information as an example, the result of vertical reorganization is {Company T0|Company T1|Company T2|Company T3|Company T5}.
[0036]
[0037] Where T0 represents the minimum time, Tn represents the maximum time, a represents the code of the data item that needs to be reorganized, v represents the value of the data object at a certain point in time, and object is the data information of each point in time in the final output.
[0038] Horizontal reorganization of basic data involves cutting horizontally at a point on the timeline of the basic data to obtain the current version status of the basic data. The number of data items can be dynamically controlled by the horizontal section. Based on the set data items and time points, the latest data item less than or equal to that time point is taken, and then the data items are integrated to generate the so-called field version. In the above figure, a total of 5 field versions are formed. V1 represents the initial version. Every business data must contain an initial version, which represents the version of the data. There is only one version. Version V2 indicates that the data items of company and route were added at time point T1. Combined with the department and status data items of the initial version, version V2 is formed.
[0039]
[0040] By combining data horizontally and vertically, the data is reconstructed in a three-dimensional way. Vertically, the data items are based on data items, and horizontally, the time points are based on data points. The data items of the basic data are transformed from points to lines, and then from lines to surfaces, thereby constructing the model data of the basic data.
[0041] Example 2: The commonly used basic data backup method is to achieve the purpose of building a data model. The historical version tracking achieved by this method has a certain redundancy in data storage, and the data backup cannot distinguish change information, let alone specifically locate the change process of data items.
[0042] In this embodiment, model data of basic data is extracted. Hash storage is used here, and the data items are basic units. This reduces redundancy, makes the data model data clearer and more standardized, and makes the historical information tracing of the model more flexible and simple. Other methods of creating historical data models can achieve similar results.
[0043] The basic principles, main features, and advantages of this invention have been described above. Those skilled in the art should understand that this invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made without departing from the spirit and scope of the invention, and all such changes and modifications fall within the scope of the claimed invention.
Claims
1. A method for constructing a basic data model based on hash data, characterized in that, The attributes of business data are stored as the smallest unit of granularity. Using this smallest unit of granularity storage method, the attribute items of business data are minimized and split to obtain the basic data of different businesses. Then, the obtained basic data is reorganized to construct the data model of the basic data. The relevant data model can be accessed using the unified interface provided to the outside world. The basic data restructuring includes vertical restructuring, horizontal restructuring, and a combination of vertical and horizontal restructuring. Vertical restructuring mainly focuses on data items and uses the timeline as the basis to restructure the data and generate historical change records for the data items. Horizontal reorganization involves cutting horizontally at a point on the timeline of the basic data to obtain the current version status of the basic data. The number of data items can be dynamically controlled by the horizontal section. Based on the set data items and time points, the latest data item less than or equal to that time point is taken, and then each data item is integrated to generate the so-called field version. Based on horizontal and vertical data restructuring, the data is constructed in a three-dimensional manner. Vertically, the data items are based on the data items, and horizontally, the time points are based on the data items of the basic data. The data items of the basic data are transformed from points to lines, and then from lines to surfaces, thereby constructing the model data of the basic data. Business data is stored at the basic granularity of data items, which are abstracted as points. Based on the timeline of the data items, the data items are connected into a line to generate the historical version of the data item vertically; based on the horizontal plane of the time point, the data object of that time point is generated horizontally; based on the cross combination of horizontal and vertical, a three-dimensional data model is generated.
2. The method for constructing a basic data model based on hash data according to claim 1, characterized in that, All external interfaces are accessed using the RESTful API, and authentication information is set in the HTTP header for each request.
3. The method for constructing a basic data model based on hash data according to claim 1, characterized in that, The model data of the basic data is extracted and stored in hash form. This reduces redundancy and makes the data model data clearer and more standardized, while making the historical information of the model more flexible and simple to trace.
Citation Information
Patent Citations
A Hive-based hierarchical design method of a university data warehouse
CN109189764A
User interface for analyzing multiple dimension data
US6965380B1