A data model construction and data processing method, apparatus and electronic device
By constructing a node index structure and attribute structure for basic entity data, the connection between data records and entities is realized, solving the problem of data fragmentation in existing technologies and improving the convenience and efficiency of data analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-02
- Publication Date
- 2026-03-06
AI Technical Summary
In existing technologies, the recording of basic entity data is separated from the entities themselves, which makes analysis inconvenient and prevents the effective use of object-oriented methods for data abstraction.
By constructing a data model, the node index structure, node attribute structure, and node structure of basic entity data are generated. An object-oriented approach is used for abstraction to realize the connection between data records and entities.
It improves the convenience and efficiency of data analysis, supports the rapid location, retrieval and association of natural resource entities, reflects historical changes, dynamically updates attribute information, and improves the addressing efficiency within the data model.
Smart Images

Figure CN115794828B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a data model construction and data processing method, apparatus and electronic device. Background Technology
[0002] In existing technologies, when storing basic entity data, there is a disconnect between data records and entities. Attribute information belonging to different classes of the same object is split into multiple relational tables. For example, layer data is organized as GIS layers, rather than abstracting the real world in an object-oriented manner. This causes inconvenience for the analysis of basic entity data. Summary of the Invention
[0003] This invention provides a data model construction and data processing method, apparatus, and electronic device. By constructing a data model from basic entity data, it no longer expresses a single attribute of the basic entity separately, but abstracts the real world in an object-oriented manner, avoiding fragmentation and realizing the connection between data records and entities, making it more convenient to analyze basic entity data.
[0004] In a first aspect, embodiments of the present invention provide a data model construction method, comprising: generating a node index structure for each basic entity data based on the association relationship between the associated basic entity data directly related to each basic entity data and each basic entity data in a plurality of basic entity data, wherein the node index structure is used to locally index the associated basic entity data of the corresponding basic entity data; determining a node attribute structure for each basic entity data based on the attribute data of each basic entity data; generating a node structure for each basic entity data based on the node index structure and the node attribute structure of each basic entity data, wherein the node structure is used to address the node index structure and the node attribute structure of the corresponding basic entity data; and constructing a data model of the plurality of basic image recognition data using the node index structure, the node attribute structure, and the node structure.
[0005] Secondly, embodiments of the present invention provide a data processing method, which utilizes any data model in the embodiments of the present invention to perform data processing, including: obtaining the node structure of any basic entity data required for data processing as a starting node structure; obtaining the node index structure and node attribute structure of any basic entity data according to the starting node structure, and using the node index structure of any basic entity data as the starting node index structure; and obtaining the node structure, node index structure, and node attribute structure of associated basic entity data directly associated with any basic entity data according to the starting node index structure, and using the node structure and node index structure of the associated basic entity data as the new starting node structure and the new starting node index structure respectively; until the node attribute structure of all basic entity data required for data processing is obtained.
[0006] Thirdly, embodiments of the present invention provide a data model construction apparatus, characterized in that it includes:
[0007] The module includes an index structure acquisition module, which generates a node index structure for each basic entity data based on the association relationships between the related basic entity data and each basic entity data in multiple basic entity data sets. The node index structure is used to locally index the related basic entity data of the corresponding basic entity data. The module also includes an attribute structure acquisition module, which determines the node attribute structure of each basic entity data based on its attribute data. The module further includes a node structure acquisition module, which generates a node structure for each basic entity data based on its node index structure and node attribute structure. The node structure is used to address the node index structure and node attribute structure of the corresponding basic entity data. Finally, the module includes a model building module, which uses the node index structure, node attribute structure, and node structure to build a data model of the aforementioned multiple basic mapping data sets.
[0008] Fourthly, embodiments of the present invention provide a data processing apparatus for performing data processing using any data model in the embodiments of the present invention. A first data acquisition module is used to acquire the node structure of any basic entity data required for data processing as a starting node structure; a second data acquisition module is used to acquire the node index structure and node attribute structure of any basic entity data according to the starting node structure, and use the node index structure of any basic entity data as the starting node index structure; and a third data acquisition module is used to acquire the node structure, node index structure, and node attribute structure of associated basic entity data directly related to any basic entity data according to the starting node index structure, and use the node structure and node index structure of the associated basic entity data as the new starting node structure and the new starting node index structure, respectively; until the node attribute structures of all basic entity data required for data processing are obtained.
[0009] Fifthly, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements any of the data model construction methods or data processing methods described in the embodiments of the present invention.
[0010] In this embodiment of the invention, by constructing a data model based on basic entity data, instead of expressing a single attribute of the basic entity, the real world is abstracted in an object-oriented manner, avoiding fragmentation and realizing the connection between data records and entities, making it more convenient to analyze basic entity data. Attached Figure Description
[0011] Figure 1 This is a flowchart illustrating a data model construction method provided in an embodiment of the present invention;
[0012] Figure 2 This is a flowchart illustrating a data model construction method provided in another embodiment of the present invention;
[0013] Figure 3 This is a schematic diagram of the node index structure in the data model construction method provided in this embodiment of the invention;
[0014] Figure 4 This is a schematic diagram of the node structure in the data model construction method provided in this embodiment of the invention;
[0015] Figure 5 This is a flowchart illustrating a data processing method provided in an embodiment of the present invention;
[0016] Figure 6 This is a schematic diagram of a data model building apparatus provided in an embodiment of the present invention;
[0017] Figure 7 This is a schematic diagram of a data processing device provided in an embodiment of the present invention;
[0018] Figure 8 This is a structural schematic diagram provided in an embodiment of the present invention. Detailed Implementation
[0019] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0020] In existing technologies, the storage of basic entity data results in a disconnect between data records and entities. Attribute information belonging to the same object is fragmented into multiple relational tables. For example, layer data is typically stored in relational database systems like PostgreSQL or Oracle using a Post-GIS plugin, organized as GIS layers rather than abstracting the real world in an object-oriented manner. From an intuitive perspective, a GIS layer is simply data divided into several files based on certain attributes, such as railways, highways, urban roads, and rural roads, divided into several layers. From a development perspective, a layer corresponds to a database table, which may exist in a database or in a GIS-related file. A layer contains features; each feature corresponds to a record. During development, it is often necessary to examine the various fields of a feature during debugging. Existing methods for storing basic entity data cause inconvenience for the analysis of this data.
[0021] The present invention provides a data model construction and data processing method, apparatus and electronic device. By constructing a data model from basic entity data, it no longer expresses a certain type of attribute of the basic entity separately, but abstracts the real world in an object-oriented manner, avoiding fragmentation and realizing the connection between data records and entities, making it more convenient to analyze basic entity data.
[0022] Figure 1 This is a flowchart illustrating a data model construction method provided in an embodiment of the present invention. This method can be executed by a data model construction device provided in this embodiment, which can be implemented in software and / or hardware. In a specific embodiment, the device can be integrated into an electronic device, such as a computer or server. The following embodiments will illustrate this using the integration of the device into an electronic device as an example. (Reference) Figure 1 The method may specifically include the following steps:
[0023] Step 101: Based on the association relationship between the associated basic entity data and each basic entity data in the multiple basic entity data, generate a node index structure for each basic entity data. The node index structure is used to locally index the associated basic entity data of the corresponding basic entity data, which facilitates the subsequent construction of the data model using the node index structure, and implements the indexing of each basic entity data node to the directly associated nodes within the data model.
[0024] Specifically, the aforementioned basic entity data includes basic natural resource entity data, specifically including data on natural resource entities such as arable land, forest land, grassland, houses, roads, and rivers.
[0025] Specifically, the aforementioned basic entity data also includes socio-economic entities, management entities, and natural person entities involved in natural resource-related businesses.
[0026] Optionally, the node index structure described above can be generated by referencing the node structure in a doubly linked list. Specifically, pointers to the associated underlying data can be stored in the node index structure.
[0027] Optionally, the relationships between the aforementioned basic entity data can include multiple types of relationships, such as spatial adjacency, administrative division affiliation, time sequence of changes, business execution status change, and management affiliation. In this way, an index can be performed based on the node index structure of the same type of relationship among the multiple related basic entity data to obtain a basic entity data chain.
[0028] Specifically, based on spatial adjacency, one can obtain basic entity data of a natural resource and several adjacent data points. For example, first, a piece of land in a village is identified. Based on spatial adjacency, basic entity data of other adjacent locations of this land can be obtained sequentially from near to far, until the basic entity data of the entire village is obtained, and these basic entity data can form a data chain.
[0029] Optionally, the above node index structure can adopt a fixed byte size, such as a 20-byte structure, to improve the addressing efficiency within the data model.
[0030] Step 102: Determine the node attribute structure of each basic entity data based on the attribute data of each basic entity data. The node attribute structure with a large amount of data is designed independently to avoid affecting the index addressing between the node structures of the basic entity when updating the attributes of the basic entity data, and to ensure the integrity of the attribute data of each basic entity data within the data model.
[0031] Specifically, the independent design of the attribute structure, node structure, and index structure of the basic entity data ensures that when updating data attributes, such as adding, deleting, or replacing content, only the content in the data attribute structure is updated, without affecting the content of the node structure and index structure, thus making the updating of data attributes more comprehensive.
[0032] Optionally, the attribute data of each basic entity data can be stored in the node attribute structure of each basic entity data. In this way, if the node attribute structure is accessed, the attribute data of the corresponding basic entity data can be obtained, which facilitates further analysis of the attribute data.
[0033] Optionally, the attribute data of the corresponding basic entity data can be stored in dynamic character storage and dynamic array storage using the above node attribute structure. Since dynamic records are also composed of record linked lists with fixed record sizes, large strings and large arrays will occupy multiple dynamic records.
[0034] Specifically, the node attribute structure described above can use a fixed byte size. When the attribute data storage space is small, the attribute data is directly stored in the node attribute structure; when the attribute data storage space is large, it can be stored separately in dynamic character storage and dynamic array storage. Since dynamic records are also composed of record linked lists with fixed record sizes, large strings and large arrays will occupy multiple dynamic records.
[0035] Step 103: Generate the node structure of each basic entity data based on the node index structure and node attribute structure of each basic entity data. The node structure is used to address the node index structure and node attribute structure of the corresponding basic entity data, which is beneficial for subsequent construction of the data model using the node structure. Within the data model, the corresponding node index structure and node attribute structure can be obtained by addressing based on the node structure of each basic entity data.
[0036] In an optional specific embodiment of the present invention, the process of generating the node structure of each basic entity data based on the node index structure and node attribute structure of each basic entity data includes: generating the node structure of each basic entity data based on the node index structure, node attribute structure, and corresponding map patch hierarchical classification identifier of each basic entity data.
[0037] Optionally, pointers to the corresponding node index structure and node attribute structure can be stored in the node structure of each basic entity data. This makes it possible to obtain the attribute data of the entity data based on the node structure and pointers to the node attribute structure of each basic entity data, and to obtain the associated basic entity data based on the pointers to the node attribute structure and through the node index structure of the basic entity data.
[0038] Optionally, pointers to the corresponding node index structure and node attribute structure, as well as corresponding map patch hierarchical classification identifiers, can be stored in the node structure of each of the above basic entity data.
[0039] Based on empirical data, when analyzing basic entity data, it is often necessary to filter the basic entity data according to the hierarchical classification identifiers of the basic entities. Therefore, storing the hierarchical classification identifiers of the basic entities in the node structure of the corresponding basic entity data, rather than in the node attribute structure, can improve the efficiency of data analysis.
[0040] Optionally, the above node structure uses a fixed byte size, such as an 8-byte structure, to improve the addressing efficiency of the second-level wave within the model.
[0041] Step 104: Construct a data model for the aforementioned basic image recognition data using the node index structure, node attribute structure, and node structure.
[0042] The data model constructed in this embodiment of the invention can, after determining the node structure of a basic entity data, obtain the node index structure and node attribute structure of the basic entity data by addressing and further perform local indexing on the associated basic entity data of the basic entity data according to the node index structure to obtain the attribute data of the associated basic entity. In this way, all the basic entity data required for data processing can be obtained simply and quickly, and data processing can be performed.
[0043] The data model construction method in another specific embodiment is further described below, such as Figure 2 As shown, it includes the following steps:
[0044] Step 201: Generate an incremental code for each node structure, each node index structure, and each node attribute structure to obtain the node structure code, node index structure code, and node attribute structure code for each basic entity data.
[0045] Optionally, the snowflake algorithm is used to generate a global identifier for each basic entity data, and the global identifier for each basic entity data and the node structure code are mapped and stored in a hash table.
[0046] Specifically, the snowflake algorithm dynamically generates a globally unique ID for each basic entity data as a globally unique identifier for each basic image data. An incremental node code ID is generated for the structural node corresponding to each basic entity data. The globally unique ID and the node code ID of each basic image data are hashed and stored in a hash table.
[0047] When external systems need to perform data analysis using a data model based on the globally unique ID of predetermined basic entity data, they can quickly obtain the node structure encoding of the predetermined basic entity data within the data model, thereby facilitating the acquisition of the attribute data of the predetermined basic entity data and its associated basic entity data. In addition, generating a globally unique ID for each basic entity data can facilitate the use of the Geohash algorithm for spatial indexing, enabling the precise location of the basic entity data, such as locating the precise location of a field.
[0048] Step 202: Store the node structure encoding and node index structure encoding of the associated basic entity data in the node index structure.
[0049] Optionally, the above-mentioned association relationship includes multiple association relationship types. The process of generating the node index structure of each basic entity data based on the association relationship between the associated basic entity data and each basic entity data that is directly associated with each basic entity data includes: storing the classification identifier of each association relationship type of each basic entity data, as well as the node structure code and node index structure code of the corresponding associated basic entity data, to obtain multiple classification node index structures of each basic entity data.
[0050] Specifically, the aforementioned associated basic entity data includes the basic entity data of the previous node and the basic entity data of the next node in the basic entity data chain where each basic entity data currently resides. The node index structure is as follows: Figure 3 As shown.
[0051] Specifically, the aforementioned relationship can be a temporal sequence. For example, the basic entity data of a piece of land, according to the chronological order, shows changes in land use data as forest, grassland, arable land, factory, road, and building, totaling six basic entity data. Then, using a node index structure with time-based classification identifiers, after obtaining one of the six basic entity data, the other five basic entity data can be obtained sequentially according to the direct relationship, i.e., the chronological sequence of changes.
[0052] The data model in this embodiment of the invention can support reflecting the historical changes of natural resource entities.
[0053] This makes it easy to index a basic entity data chain based on the node index structure with the same classification identifier of multiple related basic entity data, thus facilitating data analysis of the basic entity data chain.
[0054] Step 203: Store the attribute data of each basic entity data in the node attribute structure.
[0055] Specifically, when the attribute data storage space is small, the attribute data is directly stored in the node attribute structure.
[0056] Step 204: Store the node index structure encoding and node attribute structure encoding of each basic entity data in the node structure.
[0057] Optionally, the aforementioned process of generating the node structure for each basic entity data based on its node index structure and node attribute structure includes: storing in the node structure the hierarchical classification identifier for each basic entity data patch, the node index structure encoding of the node index structure, and the node attribute structure encoding of the node attribute structure. The node structure is as follows: Figure 4 As shown.
[0058] Based on empirical data, when analyzing basic entity data, it is often necessary to filter the basic entity data according to the hierarchical classification identifiers of the basic entities. Therefore, storing the hierarchical classification identifiers of the basic entities in the node structure of the corresponding basic entity data, rather than in the node attribute structure, can improve the efficiency of data analysis.
[0059] Step 205: Construct a data model for the aforementioned basic image recognition data using the node index structure, node attribute structure, and node structure.
[0060] In an optional specific embodiment of the invention, the node index structure, node attribute structure, and node structure of each basic entity data are all of fixed byte size to improve the addressing efficiency when addressing within the model.
[0061] This invention, through the construction of a unified data model management unit, supports the rapid location, retrieval, and association of basic entities such as natural resource entities, reflects the historical changes of natural resource entities, can quickly determine the content of basic natural resource entities, facilitates natural resource business management and socio-economic data analysis and processing, and can dynamically update and improve the attribute information of entities, thereby achieving dynamic expansion in response to business changes.
[0062] In this embodiment of the invention, within the data model of multiple basic image recognition data, direct addressing is performed through ID pointers based on the fixed-byte node index structure, node attribute structure, and node structure. This reduces the complexity of traditional global indexing from O(logN) to O(1), greatly improving the addressing efficiency within the data model and thus enhancing the efficiency of subsequent data analysis.
[0063] Figure 5 This is a schematic flowchart of a data processing method provided in an embodiment of the present invention. The embodiment of the present invention utilizes a data model provided in any embodiment of the present invention for data processing, including:
[0064] Step 501: Obtain the node structure of any basic entity data required for data processing as the starting node structure; Step 502: Obtain the node index structure and node attribute structure of any basic entity data based on the starting node structure, and use the node index structure of any basic entity data as the starting node index structure; Step 503: Based on the starting node index structure, obtain the node structure, node index structure, and node attribute structure of the associated basic entity data directly related to any basic entity data, and use the node structure and node index structure of the associated basic entity data as the new starting node structure and the new starting node index structure respectively; until the node attribute structure of all basic entity data required for data processing is obtained.
[0065] In the data processing embodiments of the present invention, only the node structure of any required basic entity data is needed, and the data model will efficiently provide all the related basic entity data required for data analysis according to its internal logic, thereby improving the efficiency of data processing.
[0066] The data processing method in another specific embodiment is further described below, including the following steps:
[0067] Obtain the global identifier code of any basic entity data required for data processing; find the node structure code of any basic entity data from the hash table based on the global identifier code of the basic entity data; obtain the node structure of any basic entity data as the starting node structure based on the node structure code of the basic entity data; obtain the node index structure and node attribute structure of any basic entity data based on the node index structure code and node attribute structure code of any basic entity data stored in the starting node structure, and use the node index structure of any basic entity data as the starting node index structure; obtain the node structure, node index structure, and node attribute structure of the associated basic entity data directly associated with any basic entity data based on the node structure code and node index structure code of the associated basic entity data stored in the starting node index structure, and use the node structure and node index structure of the associated basic entity data as the new starting node structure and the new starting node index structure respectively; until the node attribute structure of all basic entity data required for data processing is obtained.
[0068] In an optional specific embodiment of the present invention, the node index structure, node attribute structure and node structure of each basic entity data are all of fixed byte size in order to improve the addressing efficiency when addressing within the model.
[0069] In this embodiment of the invention, direct addressing can be performed within the data model using ID pointers based on a fixed-byte node index structure, node attribute structure, and node structure. Since the query time is independent of the overall global scale and is only proportional to the interval between the starting node structure and the target node structure, the complexity of the traditional global index can be reduced from O(logN) to O(1), which can greatly improve the addressing efficiency within the data model and thus improve the efficiency of subsequent data analysis.
[0070] Figure 6 This is a structural diagram of a data model building apparatus provided in an embodiment of the present invention. This apparatus is suitable for executing the data model building method provided in an embodiment of the present invention. Figure 6 As shown, the device may specifically include:
[0071] The index structure acquisition module 601 is used to generate a node index structure for each basic entity data based on the association relationship between the associated basic entity data and each basic entity data in multiple basic entity data. The node index structure is used to perform local indexing of the associated basic entity data of the corresponding basic entity data, which facilitates the subsequent construction of the data model using the node index structure, and implements the indexing of each basic entity data node to the directly associated nodes within the data model.
[0072] The attribute structure acquisition module 602 is used to determine the node attribute structure of each basic entity data based on the attribute data of each basic entity data; it can avoid affecting the index addressing between the node structures of the basic entity when updating the attributes of the basic entity data, and ensure the integrity of the attribute data of each basic entity data within the data model.
[0073] Specifically, the independent design of the attribute structure, node structure, and index structure of the basic entity data ensures that when updating data attributes, such as adding, deleting, or replacing content, only the content in the data attribute structure is updated, without affecting the content of the node structure and index structure, thus making the updating of data attributes more comprehensive.
[0074] The node structure acquisition module 603 is used to generate the node structure of each basic entity data according to the node index structure and node attribute structure of each basic entity data. The node structure is used to address the node index structure and node attribute structure of the corresponding basic entity data, which is conducive to the subsequent construction of the data model using the node structure. Within the data model, the corresponding node index structure and node attribute structure can be obtained by addressing the node structure of each basic entity data.
[0075] Model building module 604 is used to build a data model of multiple basic entity data using node index structure, node attribute structure and node structure.
[0076] The data model constructed using the embodiments of this invention enables the retrieval of the node index structure and attribute structure of a basic entity data after determining its node structure. Furthermore, it allows for the local indexing of associated basic entity data based on the node's index structure to obtain the attribute data of the associated basic entities. This provides a simple and quick way to obtain all the basic entity data required for data processing and perform the necessary data processing.
[0077] Figure 7 This is a structural diagram of a data processing apparatus provided in an embodiment of the present invention, which is suitable for executing the data processing method provided in an embodiment of the present invention. Figure 7 As shown, the device may specifically include:
[0078] The first data acquisition module 701 is used to acquire the node structure of any basic entity data required for data processing as the starting node structure; the second data acquisition module 702 is used to acquire the node index structure and node attribute structure of any basic entity data according to the starting node structure, and use the node index structure of any basic entity data as the starting node index structure; and the third data acquisition module 703 is used to acquire the node structure, node index structure and node attribute structure of associated basic entity data directly related to any basic entity data according to the starting node index structure, and use the node structure and node index structure of the associated basic entity data as the new starting node structure and the new starting node index structure respectively; until the node attribute structure of all basic entity data required for data processing is obtained.
[0079] In the data processing embodiments of the present invention, only the node structure of any required basic entity data is needed, and the data model will efficiently provide all the related basic entity data required for data analysis according to its internal logic, thereby improving the efficiency of data processing.
[0080] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is merely an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0081] This invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the data model construction method or data processing method provided in any of the above embodiments.
[0082] This invention also provides a computer-readable medium storing a computer program thereon, which, when executed by a processor, implements the data model construction method or data processing method provided in any of the above embodiments.
[0083] The following is for reference. Figure 8 It shows a schematic diagram of the structure of a computer system 800 suitable for implementing an electronic device according to embodiments of the present invention. Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0084] like Figure 8As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 802 or programs loaded from storage section 808 into random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the system 800. The CPU 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0085] The following components are connected to I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 810 as needed so that computer programs read from it can be installed into storage section 808 as needed.
[0086] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by central processing unit (CPU) 801, it performs the functions defined above in the system of this invention.
[0087] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0088] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0089] The modules and / or units described in the embodiments of this invention can be implemented in software or hardware. The described modules and / or units can also be housed in a processor. For example, a processor may be described as including an index structure acquisition module, an attribute structure acquisition module, a node structure acquisition module, and a model building module; or, a processor may be described as including a first data acquisition module, a second data acquisition module, and a third data acquisition module. The names of these modules do not necessarily limit the module itself.
[0090] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist alone and not assembled into the device.
[0091] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A data model construction method, characterized by, Comprise: According to the association relationship between the associated basic entity data directly associated with each of the plurality of basic entity data and each of the plurality of basic entity data, generate the node index structure of each of the plurality of basic entity data, the node index structure is used for locally indexing the associated basic entity data of the corresponding basic entity data; wherein the associated basic entity data includes the basic entity data of the previous node and the basic entity data of the next node of the basic entity data chain in which each basic entity data is currently located; According to the attribute data of each of the plurality of basic entity data, determine the node attribute structure of each of the plurality of basic entity data; According to the node index structure and the node attribute structure of each of the plurality of basic entity data, generate the node structure of each of the plurality of basic entity data, the node structure is used for addressing the node index structure and the node attribute structure of the corresponding basic entity data; and Using the node index structure, the node attribute structure and the node structure, construct the data model of the plurality of basic entity data; Wherein, the method further comprises: Respectively, for each node structure, each node index structure and each node attribute structure, generate an incremental code to obtain the node structure code, the node index structure code and the node attribute structure code of each of the plurality of basic entity data; Using the snowflake algorithm to generate the global identification code of each of the plurality of basic entity data, and mapping and storing the global identification code of each of the plurality of basic entity data and the node structure code into the hash table; Wherein, the process of generating the node index structure of each of the plurality of basic entity data according to the association relationship between the associated basic entity data directly associated with each of the plurality of basic entity data and each of the plurality of basic entity data comprises: storing the node structure code and the node index structure code of the associated basic entity data in the node index structure; The process of determining the node attribute structure of each of the plurality of basic entity data according to the attribute data of each of the plurality of basic entity data comprises: storing the attribute data of each of the plurality of basic entity data in the node attribute structure; or, using the node attribute structure to store the attribute data of the basic entity data in the dynamic character storage and the dynamic array storage; The process of generating the node structure of each of the plurality of basic entity data according to the node index structure and the node attribute structure of each of the plurality of basic entity data comprises: storing the node index structure code and the node attribute structure code of each of the plurality of basic entity data in the node structure.
2. The data model construction method of claim 1, wherein, The association relationship includes a plurality of association relationship categories; The process of generating the node index structure of each of the plurality of basic entity data according to the association relationship between the associated basic entity data directly associated with each of the plurality of basic entity data and each of the plurality of basic entity data comprises: The classification identifier of each association relationship type of each basic entity data, and the node structure code and the node index structure code of the corresponding associated basic entity data are stored, obtaining a plurality of classification node index structures of each basic entity data.
3. The data model construction method of claim 1, wherein, The node index structure, the node attribute structure, and the node structure of each basic entity data are fixed byte sizes.
4. The data model construction method of claim 1, wherein, The process of generating the node structure of each basic entity data according to the node index structure and the node attribute structure of each basic entity data includes: Generating the node structure of each basic entity data according to the node index structure, the node attribute structure, and the corresponding plot hierarchical classification identifier of each basic entity data.
5. A data processing method, using the data model according to any one of claims 1-4 to process data, characterized in that, Including: Obtaining the node structure of any basic entity data required for data processing as a starting node structure; According to the starting node structure, obtaining the node index structure and the node attribute structure of the any basic entity data, and taking the node index structure of the any basic entity data as a starting node index structure; And According to the starting node index structure, obtaining the node structure, node index structure, and node attribute structure of the associated basic entity data directly associated with the any basic entity data, and taking the node structure and the node index structure of the associated basic entity data as new starting node structure and new starting node index structure, respectively; Until the node attribute structure of all basic entity data required for the data processing is obtained.
6. A data model construction apparatus characterized by comprising: Including: An index structure acquisition module for generating a node index structure of each basic entity data according to the association relationship between the associated basic entity data directly associated with each basic entity data and the each basic entity data, the node index structure being used for locally indexing the associated basic entity data of the corresponding basic entity data; wherein the associated basic entity data includes the basic entity data of the previous node and the basic entity data of the next node of the basic entity data chain in which the each basic entity data is currently located; An attribute structure acquisition module for determining a node attribute structure of each basic entity data according to attribute data of the each basic entity data; A node structure acquisition module for generating a node structure of each basic entity data according to the node index structure and the node attribute structure of the each basic entity data, the node structure being used for addressing the node index structure and the node attribute structure of the corresponding basic entity data; and A model construction module for constructing a data model of the plurality of basic entity data by using the node index structure, the node attribute structure, and the node structure; Wherein, the device is further used for: generate an incremental code for each node structure, each node index structure and each node attribute structure of each basic entity data, to obtain a node structure code, a node index structure code and a node attribute structure code of each basic entity data; generate a global identification code for each basic entity data by using a snowflake algorithm, and store the global identification code and the node structure code of each basic entity data in a hash table; The index structure acquisition module is further configured to store the node structure code and the node index structure code of the associated basic entity data in the node index structure. The attribute structure acquisition module is further configured to store the attribute data of each basic entity data in the node attribute structure, or store the attribute data of the basic entity data in dynamic character storage and dynamic array storage by using the node attribute structure. The node structure acquisition module is further configured to store the node index structure code and the node attribute structure code of each basic entity data in the node structure.
7. A data processing apparatus for processing data using the data model according to any one of claims 1 to 4, characterized in that, comprising: a first data acquisition module configured to acquire a node structure of any basic entity data required for data processing as a starting node structure; a second data acquisition module configured to acquire a node index structure and a node attribute structure of the any basic entity data according to the starting node structure, and to acquire the node index structure of the any basic entity data as a starting node index structure; and a third data acquisition module configured to acquire a node structure, a node index structure and a node attribute structure of an associated basic entity data directly associated with the any basic entity data according to the starting node index structure, and to acquire the node structure and the node index structure of the associated basic entity data as a new starting node structure and a new starting node index structure, respectively; until the node attribute structures of all basic entity data required for the data processing are obtained.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the data model construction method of any one of claims 1 to 4 or the data processing method of claim 5 when executing the program.