CN116204533B - Metadata model-based field index mapping method, device and storage medium - Google Patents

Metadata model-based field index mapping method, device and storage medium Download PDF

Info

Publication number
CN116204533B
CN116204533B CN202310501742.1A CN202310501742A CN116204533B CN 116204533 B CN116204533 B CN 116204533B CN 202310501742 A CN202310501742 A CN 202310501742A CN 116204533 B CN116204533 B CN 116204533B
Authority
CN
China
Prior art keywords
index
determining
data
field
primary key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310501742.1A
Other languages
Chinese (zh)
Other versions
CN116204533A (en
Inventor
连志强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hecom Beijing Technology Co ltd
Original Assignee
Hecom Beijing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hecom Beijing Technology Co ltd filed Critical Hecom Beijing Technology Co ltd
Priority to CN202310501742.1A priority Critical patent/CN116204533B/en
Publication of CN116204533A publication Critical patent/CN116204533A/en
Application granted granted Critical
Publication of CN116204533B publication Critical patent/CN116204533B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the specification provides a field index mapping method, a device and a storage medium based on a metadata model, wherein the method comprises the following steps: receiving service data; determining a data format of the service data; detecting whether a main key group is matched with the data format in preset index format information; when the primary key group does not exist, creating a new primary key according to the data format; constructing the main key group according to the new main key and the main key in the index format information; and creating index information of the service data according to the main key group and the data format. The technical scheme that this application provided is used for solving the lower problem of prior art data query efficiency.

Description

Metadata model-based field index mapping method, device and storage medium
Technical Field
The present document relates to the field of software development technologies, and in particular, to a field index mapping method, device and storage medium based on a metadata model.
Background
In the prior art, when the metadata model is utilized to perform the architecture design of the software service, enough field databases of different types need to be preset to ensure that each service data has the corresponding field.
However, the fields corresponding to different service data are different from each other, and when millions of service data exist, it is necessary to set fields of the order of millions.
Under the condition, when searching or screening the service data, the data is often queried slowly due to large data quantity, and the data query efficiency is reduced.
Disclosure of Invention
In view of the above analysis, the present application aims to propose a field index mapping method, device and storage medium based on a metadata model, so as to improve the efficiency of service data query.
In a first aspect, one or more embodiments of the present disclosure provide a field index mapping method based on a metadata model, including:
receiving service data;
determining a data format of the service data;
detecting whether a main key group is matched with the data format in preset index format information;
when the primary key group does not exist, creating a new primary key according to the data format;
constructing the main key group according to the new main key and the main key in the index format information;
and creating index information of the service data according to the main key group and the data format.
Further, the data format includes a plurality of fields of different field types;
the index format information includes a plurality of primary keys;
the detecting whether the primary key group in the preset index format information is matched with the data format comprises the following steps:
creating a target field group according to the field type of each field;
determining whether the target primary key group corresponding to the target field group can be created by utilizing a primary key in the index format information;
when the fact that the target main key group can be created by using the main key in the index format information is determined, determining that the main key group in the detection preset index format information is matched with the data format;
and when determining that the target primary key group cannot be created by utilizing the primary key in the index format information, determining that the primary key group does not exist in the detection preset index format information and is matched with the data format.
Further, the determining whether the target primary key group can be created using the primary key in the index format information includes:
determining each field type contained in the service data and a first number of fields corresponding to each field type;
determining a second number of primary keys corresponding to each field type respectively;
and when the first quantity is smaller than the corresponding second quantity, determining that all fields corresponding to the field types exist in the index information.
Further, when the primary key group does not exist, creating a new primary key according to the data format, including:
determining the type of a new primary key according to the field type of the data format;
determining the number of new primary keys according to the difference between the first number and the second number;
and creating the new main key according to the type of the new main key and the number of the new main keys.
Further, the creating the index information of the service data includes:
and filling the data corresponding to each field in the service data in the corresponding storage space of the corresponding field in the index information according to the corresponding relation between the field type and the primary key.
In a second aspect, an embodiment of the present application provides a field index mapping device based on a metadata model, including: the device comprises a receiving module, a determining module, a detecting module and a data processing module;
the receiving module is used for receiving service data;
the determining module is used for determining the data format of the service data;
the detection module is used for detecting whether a main key group is matched with the data format in the preset index format information;
the data processing module is used for creating a new primary key according to the data format when the primary key group does not exist; constructing the main key group according to the new main key and the main key in the index format information; and creating index information of the service data according to the main key group and the data format.
Further, the data format includes a plurality of fields of different field types;
the index format information includes a plurality of primary keys;
the detection module is used for creating a target field group according to the field type of each field; determining whether the target primary key group corresponding to the target field group can be created by utilizing a primary key in the index format information; when the fact that the target main key group can be created by using the main key in the index format information is determined, determining that the main key group in the detection preset index format information is matched with the data format; and when determining that the target primary key group cannot be created by utilizing the primary key in the index format information, determining that the primary key group does not exist in the detection preset index format information and is matched with the data format.
Further, the detection module is configured to determine each field type included in the service data and a first number of fields corresponding to each field type; determining a second number of primary keys corresponding to each field type respectively; and when the first quantity is smaller than the corresponding second quantity, determining that all fields corresponding to the field types exist in the index information.
Further, the data processing module is used for determining the type of the new primary key according to the field type of the data format; determining the number of new primary keys according to the difference between the first number and the second number; and creating the new main key according to the type of the new main key and the number of the new main keys.
In a third aspect, embodiments of the present application provide a storage medium, including:
for storing computer-executable instructions which, when executed, implement the method of any of the first aspects.
Compared with the prior art, the application can at least realize the following technical effects:
different data formats for business data from different sources typically exist, e.g., different companies may contract in different formats, thus resulting in different data formats for contract data. Based on the characteristics of the metadata model, the index table based on the metadata model can establish index information of business data in various data formats by adjusting the primary key in the index format information in real time. Meanwhile, the service data of each data format is sorted to one index table by using a limited primary key, so that the combination of the data formats is realized, the number of fields involved in the query is reduced, and the data query efficiency is further improved.
Drawings
For a clearer description of one or more embodiments of the present description or of the solutions of the prior art, the drawings that are necessary for the description of the embodiments or of the prior art will be briefly described, it being apparent that the drawings in the description that follow are only some of the embodiments described in the description, from which, for a person skilled in the art, other drawings can be obtained without inventive faculty.
FIG. 1 is a flow diagram of a metadata model-based field index mapping method provided by one or more embodiments of the present disclosure;
FIG. 2 is a schematic diagram of creating index information provided by one or more embodiments of the present disclosure.
Detailed Description
In order to enable a person skilled in the art to better understand the technical solutions in one or more embodiments of the present specification, the technical solutions in one or more embodiments of the present specification will be clearly and completely described below with reference to the drawings in one or more embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one or more embodiments of the present disclosure without inventive faculty, are intended to be within the scope of the present disclosure.
The data formats of the business data of different companies are different, for example, company a needs to purchase 3 types of commodities, each type of commodity is calculated according to ton, and the data format of the business data corresponding to the purchase contract of company a is:
commodity 1 identification, commodity 1 quantity/ton; commodity 2 identification, commodity 2 quantity/ton; commodity 3 identifies, commodity 3 quantity/ton.
And (3) purchasing 4 types of commodities by the company B, wherein each type of commodity is calculated according to the piece, and the data format of business data corresponding to the purchasing contract of the company B is as follows:
the commodity A mark, commodity A quantity/piece; the commodity B identification, commodity B quantity/piece; the commodity C identification, the commodity C quantity/piece; commodity D identifies, commodity D quantity/piece.
Because the commodity category, commodity category number and commodity number of company a and company B are different, two index tables are generated for company a and company B respectively in the prior art so as to record the respective business data respectively. In addition, the data formats of the business data generated by different departments of the same company are also different, for example, the business data generated by the production department and the business data generated by the market department are different. Thus, the prior art also builds an index table for each department.
Obviously, in the above manner, in order to meet the needs of numerous enterprises, an index table of millions of magnitude needs to be established, which reduces the query efficiency of service data.
In order to solve the above technical problems, an embodiment of the present application provides a field index mapping method based on a metadata model, including the following steps:
and step 1, receiving service data.
In the embodiment of the present application, the business data is various data generated by the enterprise in daily activities, for example, signing of various contracts, expenditure, income, and the like.
And 2, determining the data format of the service data.
In the embodiment of the present application, in order to facilitate description of service data, a plurality of fields are used to describe corresponding service data. And these fields constitute the data format. For example, for a contract, it may be necessary to describe with the following fields: company name 1, company name 2, unit price, quantity, total amount, text details. While the above fields constitute the data format of the corresponding contract.
And step 3, detecting whether the primary key group in the preset index format information is matched with the data format, if so, executing the step 6, otherwise, executing the step 4.
In this embodiment of the present application, when storing index information, it is also necessary to describe corresponding index information by using a plurality of primary keys. Thus, the index format information refers to information expressed by a combination of primary keys. It can be seen that the index format information includes a plurality of primary keys. The primary key type may be, but is not limited to: text fields, numeric fields, address fields, node fields, and object fields. The text field corresponds to an execution subject or topic of the business data, such as contract name, contract number, company name. The value field corresponds to a value in the business data, e.g., price, quantity. The address field corresponds to location information in the business data, such as company address, latitude and longitude coordinates, and the like. The node field corresponds to a node in an organization architecture, e.g., a primary unit, a secondary company, etc. The object field corresponds to a specific literal description in the business data, e.g., a specific description of the relevant terms in the contract.
As previously described, the data format contains a plurality of fields of different field types. Therefore, the specific process of step 3 is:
a1, creating a target field group according to the field type of each field.
In this application example, it is assumed that one service data may be described by field 1, field 2, … …, and field n, and then the target field set is: [ field 1, field 2, … …, field n ].
A2, determining whether a target main key group corresponding to the target field group can be created by using the main key in the index format information.
In the embodiment of the present application, the primary key is generally a generic concept of a field with respect to a field in service data. Thus, if the target field set corresponds to the target primary key set, this means that the elements in the target field set correspond one-to-one with the elements in the target primary key set. For example, if there are unit price, number and sum in the target field, the target primary key group corresponding to the unit price, number 2 and number 3 is the number 1. The upper concepts corresponding to the unit price, the number and the sum are numerical values, and are distinguished by numbers.
Specifically, determining each field type contained in service data and a first number of fields corresponding to each field type; determining the second number of the primary keys corresponding to the field types respectively; when the first quantity is smaller than the corresponding second quantity, all fields corresponding to the field types are determined to exist in the index information.
A3, if yes, determining that the main key group in the preset index format information is detected to be matched with the data format.
And A4, if not, determining that the primary key group is not matched with the data format in the detection preset index format information.
And 4, creating a new primary key according to the data format.
In the embodiment of the application, determining the type of the new primary key according to the field type of the data format; determining the number of new primary keys according to the difference between the first number and the second number; and creating the new main key according to the type of the new main key and the number of the new main keys. For example, the data format is unit price, number and sum, while the primary key has only the values 1 and 2. First, the unit price, the number and the sum corresponding to the data price are all the upper bits as the numerical value, so the new primary key is the numerical value. Then, the number of fields corresponding to the data format is 1 more than the number of primary keys, so that one primary key "value 3" needs to be added.
And 5, constructing a main key group according to the new main key and the main key in the index format information.
In the embodiment of the application, after adding the primary key, the primary key group is constructed according to the new primary key and the primary key in the index format information so as to generate the index information of the corresponding service data.
And 6, creating index information of the service data according to the main key group and the data format.
In the embodiment of the application, the data corresponding to each field in the service data is filled in the corresponding storage space of the corresponding field in the index information according to the corresponding relation between the field type and the primary key. For example, as shown in fig. 2, when the service data a is data-synchronized with the index table, the data corresponding to the fields AT1, AT2, AG1, and AP1 are directly mapped to the tables corresponding to the primary keys T1, T2, G1, and P1 of the index table. When the service data B performs data synchronization on the index table, the data corresponding to the fields BT1, BG2 and BO1 are directly mapped to the tables corresponding to the main keys T1, G2 and O1 of the index table. When the service data C synchronizes data to the index table, the data corresponding to the fields CT1, CN2 and CO1 are directly mapped to the tables corresponding to the main keys T1, N2 and O1 of the index table.
The embodiment of the application provides a field index mapping device based on a metadata model, which comprises the following components: the device comprises a receiving module, a determining module, a detecting module and a data processing module;
the receiving module is used for receiving service data;
the determining module is used for determining the data format of the service data;
the detection module is used for detecting whether a main key group is matched with the data format in the preset index format information;
the data processing module is used for creating a new primary key according to the data format when the primary key group does not exist; constructing the main key group according to the new main key and the main key in the index format information; and creating index information of the service data according to the main key group and the data format.
In an embodiment of the present application, the data format includes a plurality of fields of different field types;
the index format information includes a plurality of primary keys;
the detection module is used for creating a target field group according to the field type of each field; determining whether the target primary key group corresponding to the target field group can be created by utilizing a primary key in the index format information; when the fact that the target main key group can be created by using the main key in the index format information is determined, determining that the main key group in the detection preset index format information is matched with the data format; and when determining that the target primary key group cannot be created by utilizing the primary key in the index format information, determining that the primary key group does not exist in the detection preset index format information and is matched with the data format.
In this embodiment of the present application, the detection module is configured to determine each field type included in the service data and a first number of fields corresponding to each field type; determining a second number of primary keys corresponding to each field type respectively; and when the first quantity is smaller than the corresponding second quantity, determining that all fields corresponding to the field types exist in the index information.
In this embodiment of the present application, the data processing module is configured to determine a type of a new primary key according to a field type of the data format; determining the number of new primary keys according to the difference between the first number and the second number; and creating the new main key according to the type of the new main key and the number of the new main keys.
An embodiment of the present application provides a storage medium, including:
for storing computer-executable instructions that when executed implement the following flow:
the foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In the 30 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each unit may be implemented in the same piece or pieces of software and/or hardware when implementing the embodiments of the present specification.
One skilled in the relevant art will recognize that one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present description is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the specification. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
One or more embodiments of the present specification may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is by way of example only and is not intended to limit the present disclosure. Various modifications and changes may occur to those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. that fall within the spirit and principles of the present document are intended to be included within the scope of the claims of the present document.

Claims (3)

1. A metadata model-based field index mapping method, comprising:
receiving service data;
determining a data format of the service data;
detecting whether a main key group is matched with the data format in preset index format information;
when the primary key group does not exist, creating a new primary key according to the data format;
constructing the main key group according to the new main key and the main key in the index format information;
creating index information of the service data according to the main key group and the data format so as to store the service data with different data formats into the same index table;
the data format includes a plurality of fields of different field types;
the index format information includes a plurality of primary keys;
the detecting whether the primary key group in the preset index format information is matched with the data format comprises the following steps:
creating a target field group according to the field type of each field;
determining whether a target primary key group corresponding to the target field group can be created by utilizing a primary key in the index format information;
when the fact that the target main key group can be created by using the main key in the index format information is determined, determining that the main key group in the detection preset index format information is matched with the data format;
when determining that the target primary key group cannot be created by utilizing the primary key in the index format information, determining that the primary key group is not matched with the data format in the detection preset index format information;
the determining whether the target primary key group corresponding to the target field group can be created by utilizing the primary key in the index format information includes:
determining each field type contained in the service data and a first number of fields corresponding to each field type;
determining a second number of primary keys corresponding to each field type respectively;
when the first quantity is smaller than the corresponding second quantity, determining that all fields corresponding to the field types exist in the index information;
and when the primary key group does not exist, creating a new primary key according to the data format, wherein the method comprises the following steps:
determining the type of a new primary key according to the field type of the data format;
determining the number of new primary keys according to the difference between the first number and the second number;
creating the new main key according to the type of the new main key and the number of the new main keys;
the creating the index information of the service data includes:
and filling the data corresponding to each field in the service data in the corresponding storage space of the corresponding field in the index information according to the corresponding relation between the field type and the primary key.
2. A metadata model-based field index mapping apparatus, comprising: the device comprises a receiving module, a determining module, a detecting module and a data processing module;
the receiving module is used for receiving service data;
the determining module is used for determining the data format of the service data;
the detection module is used for detecting whether a main key group is matched with the data format in the preset index format information;
the data processing module is used for creating a new primary key according to the data format when the primary key group does not exist; constructing the main key group according to the new main key and the main key in the index format information; creating index information of the service data according to the main key group and the data format;
the data format includes a plurality of fields of different field types;
the index format information includes a plurality of primary keys;
the detection module is used for creating a target field group according to the field type of each field; determining whether a target primary key group corresponding to the target field group can be created by utilizing a primary key in the index format information; when the fact that the target main key group can be created by using the main key in the index format information is determined, determining that the main key group in the detection preset index format information is matched with the data format; when determining that the target primary key group cannot be created by utilizing the primary key in the index format information, determining that the primary key group is not matched with the data format in the detection preset index format information;
the detection module is used for determining each field type contained in the service data and the first number of fields corresponding to each field type; determining a second number of primary keys corresponding to each field type respectively; when the first quantity is smaller than the corresponding second quantity, determining that all fields corresponding to the field types exist in the index information;
the data processing module is used for determining the type of a new primary key according to the field type of the data format; determining the number of new primary keys according to the difference between the first number and the second number; and creating the new main key according to the type of the new main key and the number of the new main keys.
3. A storage medium, comprising:
for storing computer-executable instructions which, when executed, implement the method of claim 1.
CN202310501742.1A 2023-05-06 2023-05-06 Metadata model-based field index mapping method, device and storage medium Active CN116204533B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310501742.1A CN116204533B (en) 2023-05-06 2023-05-06 Metadata model-based field index mapping method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310501742.1A CN116204533B (en) 2023-05-06 2023-05-06 Metadata model-based field index mapping method, device and storage medium

Publications (2)

Publication Number Publication Date
CN116204533A CN116204533A (en) 2023-06-02
CN116204533B true CN116204533B (en) 2024-01-26

Family

ID=86515106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310501742.1A Active CN116204533B (en) 2023-05-06 2023-05-06 Metadata model-based field index mapping method, device and storage medium

Country Status (1)

Country Link
CN (1) CN116204533B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984653A (en) * 2020-08-31 2020-11-24 政采云有限公司 Data query method, system, equipment and readable storage medium
CN113886399A (en) * 2021-10-25 2022-01-04 支付宝(杭州)信息技术有限公司 Index database updating method and device and index database-based retrieval method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090012948A1 (en) * 2007-06-08 2009-01-08 Wolfgang Koch System and method for translating and executing queries

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984653A (en) * 2020-08-31 2020-11-24 政采云有限公司 Data query method, system, equipment and readable storage medium
CN113886399A (en) * 2021-10-25 2022-01-04 支付宝(杭州)信息技术有限公司 Index database updating method and device and index database-based retrieval method and device

Also Published As

Publication number Publication date
CN116204533A (en) 2023-06-02

Similar Documents

Publication Publication Date Title
CN110134668B (en) Data migration method, device and equipment applied to blockchain
CN107391537B (en) Method, device and equipment for generating data relation model
CN107622080B (en) Data processing method and equipment
CN112015739A (en) Data verification and data query method and device
CN110263050B (en) Data processing method, device, equipment and storage medium
CN111461775B (en) Method and device for determining influence of event on traffic
CN108255471B (en) System configuration item configuration device, method and equipment based on configuration suite
CN115774552A (en) Configurated algorithm design method and device, electronic equipment and readable storage medium
CN110046052B (en) Service calling method and device
CN111158650A (en) Report template, report template and report generation method and device
CN116303625B (en) Data query method and device, storage medium and electronic equipment
CN116204533B (en) Metadata model-based field index mapping method, device and storage medium
CN109597695B (en) Data processing method, device and equipment
TWI721422B (en) Cross-border transaction declaration method and device
CN112183181A (en) Information display method
CN112231531A (en) Data display method, equipment and medium based on openstb
CN111339117B (en) Data processing method, device and equipment
CN115391426A (en) Data query method and device, storage medium and electronic equipment
CN109903165B (en) Model merging method and device
CN111581357B (en) Processing method, device, equipment and medium based on special auxiliary accounting
CN111596946A (en) Recommendation method, device and medium for intelligent contracts of block chains
CN112434486B (en) Automatic paging method, device, equipment and medium for device in PCB design
CN115952859B (en) Data processing method, device and equipment
CN111651450B (en) Block copy method, device, equipment and medium based on block chain
CN113377804B (en) Data processing method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant