An index definition method, device, equipment and storage medium

By employing relational algebra operations and intermediate language translation in a medical model within a business intelligence system, the problem of coupling between indicator definition and data source structure was solved, thereby improving the reusability of indicator definitions and the efficiency of project implementation.

CN122220409APending Publication Date: 2026-06-16联通数智医疗科技有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
联通数智医疗科技有限公司
Filing Date
2026-02-12
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Existing business intelligence systems suffer from problems such as strong coupling with specific data source structures, poor reusability, and frequent cross-domain communication when defining data metrics, resulting in long implementation cycles and low efficiency, which is particularly prominent in medical application scenarios.

Method used

It uses a pre-defined medical model to perform relational algebra operations, records the operation rules, and generates the target query syntax through field mapping and intermediate language translation, thus shielding data source differences and achieving reusability and versatility of indicator definitions.

Benefits of technology

It improves the reusability and versatility of indicator definitions, reduces cross-domain communication costs, enhances project implementation efficiency, and supports seamless migration across different data environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122220409A_ABST
    Figure CN122220409A_ABST
Patent Text Reader

Abstract

The application discloses an index definition method, device and equipment and a storage medium. When a user performs a first relational algebra operation of a preset medical model by using a basic operator, an operation rule of the first relational algebra operation is automatically recorded to obtain a corresponding index definition. The medical model is irrelevant to the data structure of a specific data source, and thus the obtained index definition is irrelevant to the query syntax of the specific data source, so that the index definition can be reused. Subsequently, when a project implementation requirement is received, the data structure of a target data source corresponding to the project implementation requirement is field-mapped with the attributes of the medical model, and the index definition is translated into an intermediate language based on a preset template and then a target query syntax is generated based on the intermediate language instead of being directly translated into the target query syntax, so that the generality of the index definition is improved, and thus the project implementation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and specifically provides a method, apparatus, device, and storage medium for defining indicators. Background Technology

[0002] Commercially available business intelligence (BI) systems or modules typically operate directly on specific data sources (such as various databases) when developing data metrics. The definition of metrics is highly dependent on the specific data structure and unique query syntax of the data source. The typical implementation path is: first, determine the data source type and structure design; then, based on this structure, use the data source's specific query language to write the metric definition.

[0003] This implementation approach has the following significant drawbacks: First, the indicator definition is strongly coupled with the structure of the specific data source. For example, although hospital information systems (HIS) from different vendors may have similar functions, their underlying data structures often have subtle differences. This means that indicators defined for a particular vendor cannot be directly reused, requiring repeated adaptation for different vendors during implementation, resulting in a cumbersome workload and poor reusability. Second, the indicator definition language depends on the query syntax of the specific data source. Different data sources (such as MySQL, Oracle, Hive, etc.) have different SQL syntaxes. When it is necessary to change or migrate the data source, the original indicator definitions often need to be manually adjusted, increasing the migration and maintenance costs of the system. This problem is particularly prominent in medical application scenarios with extremely high professional requirements. Indicator development requires repeated communication between implementation personnel (technical personnel) and stakeholders (medical personnel) regarding the medical definitions and meanings of data elements, followed by the technical personnel writing the query syntax and submitting it to the medical personnel for verification of data rationality. The entire process relies heavily on frequent and inefficient cross-domain communication, resulting in long and inefficient data element definition and production cycles. Summary of the Invention

[0004] This invention provides a method, apparatus, device, and storage medium for defining indicators, which can improve the reusability and versatility of indicator definitions and increase efficiency.

[0005] In a first aspect, the present invention provides a method for defining an indicator, comprising: S1. In response to the user performing the first relational algebra operation of the preset medical model using preset basic operators, record the operation rules of the first relational algebra operation and obtain the corresponding indicator definition; S2. In response to receiving the project implementation requirements, map the data structure of the target data source corresponding to the project implementation requirements to the attributes of the medical model. S3. Translate the indicator definition into an intermediate language based on a preset template; S4. Generate the target query syntax based on the intermediate language.

[0006] Furthermore, prior to step S2, the index definition method further includes: The defined metrics are tested using a preset test data source.

[0007] Further, step S4 includes: The target data source is confirmed to be a relational database. The intermediate language is parsed into a syntax tree, and the syntax tree is adjusted according to the query syntax rules of the target data source to generate the target query syntax. Once the target data source is confirmed to be a non-relational database, the intermediate language is translated into virtual machine instructions, which are then executed by a pre-defined virtual machine.

[0008] Furthermore, the methods for defining indicators also include: In response to the user performing a second relational algebra operation on the medical model using a preset auxiliary operator, the operation rules of the second relational algebra operation are recorded to obtain the corresponding indicator definition.

[0009] Furthermore, the auxiliary operator is obtained by combining the basic operators, or the auxiliary operator is obtained based on a preset condition judgment function.

[0010] Furthermore, the first relational algebra operation and the second relational algebra operation are performed by the user in a preset operation interface.

[0011] Furthermore, the indicator definition method also includes: Determine whether all the attribute fields of the medical model can be mapped to the data structure of the target data source; If not, adjust the fields of the target data source based on the medical model.

[0012] Secondly, the present invention provides an index definition device, comprising: The indicator definition unit is used to respond to the user's use of preset basic operators to perform the first relational algebra operation of the preset medical model, record the operation rules of the first relational algebra operation, and obtain the corresponding indicator definition; The field mapping unit is used to map the data structure of the target data source corresponding to the project implementation requirements to the attributes of the medical model in response to receiving project implementation requirements. A language translation unit is used to translate the indicator definition into an intermediate language based on a preset template; The query syntax generation unit is used to generate the target query syntax based on the intermediate language.

[0013] Thirdly, the present invention also provides an index definition device, including a processor and a memory, the memory storing a computer program, which, when executed by the processor, causes the processor to perform the steps of any of the index definition methods provided in the first aspect of the present invention.

[0014] Fourthly, the present invention also provides a computer-readable storage medium comprising a computer program that, when run on an electronic device, causes the electronic device to perform the steps of any of the index definition methods provided in the first aspect of the present invention.

[0015] Beneficial effects The indicator definition method, apparatus, device, and storage medium provided by this invention automatically record the operation rules of the first relational algebra operation when the user performs basic operators on a preset medical model, thus obtaining the corresponding indicator definition. This medical model is independent of the data structure of a specific data source, and the resulting indicator definition is also independent of the query syntax of a specific data source, enabling the indicator definition to be reused. Subsequently, upon receiving project implementation requirements, the data structure of the target data source corresponding to the project implementation requirements is mapped to the attributes of the medical model. The indicator definition is then translated into an intermediate language based on a preset template, and the target query syntax is generated based on the intermediate language, rather than directly translating the indicator definition into the target query syntax. This improves the versatility of the indicator definition and thus also improves project implementation efficiency. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0017] Figure 1 A flowchart illustrating the index definition method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of the index definition device provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of the index definition device provided in the embodiment of the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0019] It should be noted that if the embodiments of the present invention involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of the components in a specific posture. If the specific posture changes, the directional indicators will also change accordingly.

[0020] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Thus, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the use of "and / or" or "and / or" throughout the text implies three parallel solutions. For example, "A and / or B" includes solution A, solution B, or a solution where both A and B are satisfied. Furthermore, the technical solutions of the various embodiments can be combined, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.

[0021] This invention discloses a method, apparatus, device, and storage medium for defining indicators. To make the technical solution, purpose, and effects of this invention clearer, the specific implementation methods of this invention are described in detail below in conjunction with specific implementation scenarios. These implementation methods are intended to further explain the technical concept of this invention, rather than to limit the scope of protection of this invention. All equivalent modifications made based on the technical solution of this invention should be included within the scope of protection of this invention.

[0022] refer to Figure 1 This invention provides an embodiment of an indicator definition method. The indicator definition method of this embodiment includes the following steps: S1. In response to the user performing first relational algebra operations on the preset medical model using preset basic operators, record the operation rules of the first relational algebra operations and obtain the corresponding indicator definitions; S2. In response to receiving project implementation requirements, map the data structure of the target data source corresponding to the project implementation requirements to the attributes of the medical model. S3. Translate the indicator definition into an intermediate language based on a preset template; S4. Generate target query syntax based on intermediate language.

[0023] For step S1, the user can be a medical professional; that is, the indicator definition phase can be implemented by a medical professional. The medical model, also known as the medical business object, is pre-established by the medical professional based on their medical expertise.

[0024] Specifically, the medical model is logically represented as a collection of data rows, specifically a two-dimensional table. Columns represent the attributes of the medical object, and rows represent a specific data record.

[0025] It is understandable that the medical model is independent of the data structure of specific data sources, and the resulting indicator definitions are also independent of the query syntax of specific data sources, allowing the indicator definitions to be reused.

[0026] It should be noted that this logical model is independent of the underlying physical storage implementation.

[0027] For example, if it is necessary to store inspection and testing information, the logical model can take the following form: Checklist: Inspection Details Form: Understandably, the "Checklist" and "Checklist Details" each represent a medical model (medical business object). From a row perspective, a row of data represents all the information of a business object; from a column perspective, a column of data represents all the values ​​of a certain attribute of the business object, such as all the values ​​of the "Patient" attribute: "Zhang San", "Li Si".

[0028] In embodiments of the present invention, the indicator definition can be viewed as an algebraic operation relating medical models. In step S1, when the user performs a first relational algebraic operation on the medical model using preset basic operators, the system responds and records the specific operation rules of the first relational algebraic operation, thereby obtaining the corresponding indicator definition.

[0029] The basic operators are also predefined and can include "selection", "projection", "filtering", "grouping", and "joining". The specific operations of each basic operator are as follows: Select: Select the specified column from the two-dimensional table.

[0030] Projection: For each row of data in a two-dimensional table, generate a new column using multiple fields (such as finding the maximum value or concatenating fields).

[0031] Filtering: Filter rows of data based on criteria.

[0032] Grouping: Grouping data according to a specified dimension to generate new two-dimensional data.

[0033] Join: Merges data from multiple two-dimensional tables based on association conditions to create a new, larger two-dimensional table.

[0034] It is understandable that a field refers to the value of a cell or attribute in a two-dimensional table.

[0035] For example, for the two medical models mentioned above ("Examination Table" and "Examination Details Table"), to query the maximum uric acid value for each patient (returning the patient name and maximum uric acid value), this can be achieved through a combination of operations such as grouping, projection, join, and selection. Specifically: 1) Group the inspection details table by inspection number (grouping operator), take the maximum value (projection operator), and retain both the inspection number and the maximum value (selection operator). 2) Connect the results and checklist from step 1) by checklist number (connection operator), and retain the patient name and maximum value (selection operator).

[0036] Understandably, the definition of an indicator can be translated into a set of actions / instructions that are easy for users to understand. These actions / instructions consist of operators and the objects of the operations, which are the operational rules of relational algebra.

[0037] Some indicator definitions require users to perform relational algebra operations using multiple basic operators sequentially. To simplify user operations, auxiliary operators are also provided in some embodiments. In this embodiment, the indicator definition method may further include: In response to the user's use of preset auxiliary operators to perform second relational algebra operations on the medical model, the operation rules of the second relational algebra operations are recorded to obtain the corresponding indicator definitions.

[0038] Auxiliary operators are obtained by combining basic operators, or by using auxiliary operators based on preset conditional judgment functions (such as text similarity comparison).

[0039] Therefore, by combining the aforementioned basic operators to obtain auxiliary operators, in certain indicator definition processes, users no longer need to repeatedly use basic operators to perform relational algebraic operations (first relational algebraic operations) on two-dimensional tables. Instead, they can directly use auxiliary operators to perform relational algebraic operations (second relational algebraic operations) on the two-dimensional tables, simplifying user operations. For example, when finding the maximum value by grouping, if basic operators are used, the user needs two steps: first grouping, and then projection. This embodiment can define a new auxiliary operator that combines the two steps of grouping and projection into one step, so that the user only needs to use this auxiliary operator to perform relational algebraic operations.

[0040] In addition, since basic operators generally only have comparison operators such as equal to, greater than, and less than, this embodiment can define an auxiliary operator that can output two texts whose text similarity is within a specific range, thus improving flexibility.

[0041] It is understandable that the index definition obtained in step S1 can be multiple index definitions obtained by recording specific operation rules during multiple relational algebra operations (including the first relational algebra operation and the second relational algebra operation).

[0042] To make the operation more convenient for users, reduce the learning cost, and improve the intuitiveness and convenience of the operation process, in some embodiments, the first relational algebra operation and the second relational algebra operation are performed by the user in a preset operation interface.

[0043] Specifically, medical professionals can use a pre-defined UI interface to combine basic or auxiliary operators from the bottom up to gradually build a complete indicator definition.

[0044] Furthermore, in some embodiments, the indicator definition method may also include: The relational algebra operation process (i.e., the operation rules) is recorded and stored as structured JSON data, that is, the indicator definition is stored as structured JSON data.

[0045] To improve the robustness of indicator definition, in some embodiments, the indicator definition method may further include: The metric definition is tested using a preset test data source.

[0046] Specifically, defined metrics can be associated with test data sources to verify whether the output results meet business expectations and are accurate, thereby effectively enhancing the robustness of metric definitions.

[0047] For step S2, when there is a specific project implementation requirement, upon receiving the project implementation requirement, the data structure of the target data source (such as a certain database) involved in the project implementation requirement is mapped to the attributes of the medical model in step S1, that is, it is determined which field of which two-dimensional table in the specific target data source corresponds to each field in the medical model.

[0048] To improve the reliability of field mapping, in some embodiments, the indicator definition method may further include: Determine whether all the attribute fields of the medical model can be mapped to the data structure of the target data source; If not, adjust the fields of the target data source based on the medical model.

[0049] Specifically, field adjustments can include field completion or normalization, enabling all fields of the medical model's attributes to be mapped to the data structure of the target data source. This improves the reliability of field mapping and allows for a more accurate and reliable adaptation from the logical model to the physical data source.

[0050] Alternatively, users can also complete field mapping within the user interface.

[0051] For step S3, after mapping the data structure of the target data source to the fields of the medical model's attributes in step S2, the internal data structure of the aforementioned indicator definition is translated into a query syntax executable by the target data source. However, in the embodiment of this invention, the indicator definition is translated into an intermediate language based on a preset template, and then the target query syntax is generated based on the intermediate language in step S4, instead of directly translating the indicator definition into the target query syntax. This improves the versatility of the indicator definition and thus also improves project implementation efficiency.

[0052] Specifically, in step S3, the embodiments of the present invention translate the internal data structure of the indicator definition into an intermediate language, such as SQL-92, that is independent of the target data source through preset template rendering.

[0053] Specifically, step S4 can translate the intermediate language generated in step S3 into the target query syntax that can be executed by the target data source, according to the query syntax rules of the target data source.

[0054] To further optimize performance and reduce development workload, the specific execution of step S4 can be adjusted according to different types of target data sources. Specifically, in some embodiments, step S4 may include: Once the target data source is confirmed to be a relational database, the intermediate language is parsed into a syntax tree, and the syntax tree is adjusted according to the query syntax rules of the target data source to generate the target query syntax.

[0055] Once the target data source is confirmed to be a non-relational database, the intermediate language is translated into virtual machine instructions, which are then executed by a pre-defined virtual machine.

[0056] Specifically, for relational databases, given that relational databases inherently support the SQL-92 specification and the number of mainstream relational databases is limited, the intermediate language (SQL-92) can be directly parsed into a syntax tree. Then, by inserting specific patch code, subtle differences in syntax or functions between databases can be smoothed out, thereby generating native query statements adapted to the target database (such as MySQL or Oracle). For non-relational databases, an embedded virtual machine approach is adopted. The intermediate language can be translated into virtual machine instructions, which are then executed by the virtual machine to retrieve data. A mature and low-cost implementation method is based on secondary development using Apache Calcite. Utilizing compiler principles, the syntax tree of the intermediate language can be transformed into a series of sequentially executed instructions (format: action / operation object 1 / operation object 2…). The virtual machine interprets and executes these instructions step by step, ultimately obtaining the query results. For example, in the practical application of this solution, Calcite is used to translate and execute SQL into a sequence of underlying instructions, thereby effectively supporting diverse non-relational data sources.

[0057] In summary, the indicator definition method provided by this invention automatically records the operation rules of the first relational algebra operation when the user performs basic operations on a preset medical model, thus obtaining the corresponding indicator definition. This medical model is independent of the data structure of a specific data source, and the resulting indicator definition is also independent of the query syntax of a specific data source, enabling the indicator definition to be reused. Subsequently, upon receiving project implementation requirements, the data structure of the target data source corresponding to the project implementation requirements is mapped to the attributes of the medical model, and the indicator definition is translated into an intermediate language based on a preset template before generating the target query syntax based on the intermediate language, rather than directly translating the indicator definition into the target query syntax. This improves the versatility of the indicator definition and thus also improves project implementation efficiency.

[0058] More specifically, this embodiment of the invention logically models business objects and query operations, abstracting metrics into internal data structures (such as relational algebra operation sequences) independent of specific data sources. This makes metric definitions no longer dependent on the specific structure or query syntax of the underlying data source, becoming a reusable and sustainable knowledge asset that supports seamless migration between different projects and data environments. At the translation and execution layer, this embodiment of the invention does not directly generate the query statement of the target data source, but first converts it into a unified intermediate language (such as SQL-92), and then interprets and executes it or performs a secondary translation through a virtual machine (such as based on Apache Calcite). This design effectively shields the differences in syntax and implementation between different data sources (whether relational or non-relational), giving the system broad adaptability and good scalability.

[0059] Furthermore, this embodiment of the invention clearly divides the complete implementation process into two stages: "logical definition" and "physical implementation." In the first stage (step S1), medical personnel independently complete the business object modeling and indicator logic definition; in the second stage (steps S2-S4), developers are responsible for data source mapping and syntax translation. The clear boundaries between the two stages greatly reduce cross-domain communication costs and improve implementation efficiency.

[0060] refer to Figure 2 The present invention also provides an embodiment of an index definition apparatus for implementing the aforementioned index definition method, comprising: The indicator definition unit 201 is used to respond to the user performing a first relational algebra operation on a preset medical model using preset basic operators, record the operation rules of the first relational algebra operation, and obtain the corresponding indicator definition. The field mapping unit 202 is used to map the data structure of the target data source corresponding to the project implementation requirements to the attributes of the medical model in response to receiving project implementation requirements. The language translation unit 203 is used to translate the indicator definition into an intermediate language based on a preset template; The query syntax generation unit 204 is used to generate the target query syntax based on the intermediate language.

[0061] like Figure 3 As shown, Figure 3This is a schematic diagram of the structure of an indicator definition device provided in an embodiment of the present invention. The indicator definition device 1100 includes a processor 1101 with one or more processing cores, a memory 1102 with one or more computer-readable storage media, and a computer program stored on the memory 1102 and executable on the processor. The processor 1101 and the memory 1102 are electrically connected. Those skilled in the art will understand that the structure of the indicator definition device shown in the figure does not constitute a limitation on the indicator definition device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0062] The processor 1101 is the control center of the indicator definition device 1100. It connects various parts of the indicator definition device 1100 via various interfaces and lines. By running or loading software programs and / or units stored in the memory 1102, and by calling data stored in the memory 1102, it executes various functions of the indicator definition device 1100 and processes data, thereby performing overall monitoring of the indicator definition device 1100. The processor 1101 can be a CPU, GPU, network processor (NP), etc., and can implement or execute the methods, steps, and logic diagrams disclosed in the embodiments of this invention.

[0063] In this embodiment of the invention, the processor 1101 in the index definition device 1100 loads the instructions corresponding to the processes of one or more applications into the memory 1102 according to the following steps, and the processor 1101 runs the applications stored in the memory 1102 to realize various functions. See the previous embodiments for details, which will not be repeated here.

[0064] Optional, such as Figure 3 As shown, the indicator definition device 1100 further includes: a touch display screen 1103, a radio frequency circuit 1104, an audio circuit 1105, an input unit 1106, and a power supply 1107. The processor 1101 is electrically connected to the touch display screen 1103, the radio frequency circuit 1104, the audio circuit 1105, the input unit 1106, and the power supply 1107. Those skilled in the art will understand that... Figure 3 The illustrated device structure does not constitute a limitation on the device, and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0065] The touch display screen 1103 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 1103 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces defining the device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 1101. It can also receive and execute commands from the processor 1101. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 1101 to determine the type of touch event. Subsequently, the processor 1101 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the touch display screen 1103 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen 1103 can be used as two independent components to achieve input and output functions. That is, the touch display screen 1103 can also be used as part of the input unit 1106 to achieve input functions.

[0066] The radio frequency circuit 1104 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other specification-defined devices via wireless communication, and to transmit and receive signals with network devices or other specification-defined devices.

[0067] Audio circuitry 1105 can be used to provide an audio interface between a user and a specification device via a speaker and a microphone. Audio circuitry 1105 can convert received audio data into electrical signals and transmit them to the speaker, where the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 1105, converted back into audio data, and then processed by processor 1101 before being transmitted via radio frequency circuitry 1104 to, for example, another specification device, or output to memory 1102 for further processing. Audio circuitry 1105 may also include an earphone jack to provide communication between peripheral headphones and the specification device.

[0068] The input unit 1106 can be used to receive input numbers, characters, or user characteristic information (such as fingerprints, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.

[0069] Power supply 1107 is used to power the various components of indicator definition device 1100. Optionally, power supply 1107 can be logically connected to processor 1101 through power management system, thereby enabling functions such as charging, discharging, and power consumption management through power management system. Power supply 1107 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0070] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0071] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0072] To this end, embodiments of the present invention provide a computer-readable storage medium storing a plurality of computer programs, which can be loaded by a processor to execute any of the index definition methods provided in the embodiments of the present invention. The computer program can execute the steps of the aforementioned index definition method, as described in the preceding embodiments, and will not be repeated here.

[0073] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0074] Since the computer program stored in the computer-readable storage medium can execute any of the index definition methods provided in the embodiments of the present invention, it can achieve the beneficial effects that any of the index definition methods provided in the embodiments of the present invention can achieve, as detailed in the preceding embodiments, and will not be repeated here.

[0075] In the above embodiments of the indicator definition device, computer-readable storage medium, indicator definition equipment, and computer program product, the descriptions of each embodiment have different focuses. Parts not described in detail in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes and beneficial effects of the indicator definition device, computer-readable storage medium, computer program product, indicator definition equipment, and their corresponding units described above can be referred to the description of the indicator definition method in the above embodiments, and will not be repeated here.

[0076] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural transformations made under the inventive concept of the present invention based on the description and drawings of the present invention, or direct / indirect applications of other related technical fields, are included within the patent protection scope of the present invention.

Claims

1. A method for defining an indicator, characterized in that, include: S1. In response to the user performing the first relational algebra operation of the preset medical model using preset basic operators, record the operation rules of the first relational algebra operation and obtain the corresponding indicator definition; S2. In response to receiving the project implementation requirements, map the data structure of the target data source corresponding to the project implementation requirements to the attributes of the medical model. S3. Translate the indicator definition into an intermediate language based on a preset template; S4. Generate the target query syntax based on the intermediate language.

2. The indicator definition method according to claim 1, characterized in that, Prior to step S2, the index definition method further includes: The defined metrics are tested using a preset test data source.

3. The indicator definition method according to claim 1, characterized in that, Step S4 includes: The target data source is confirmed to be a relational database. The intermediate language is parsed into a syntax tree, and the syntax tree is adjusted according to the query syntax rules of the target data source to generate the target query syntax. Once the target data source is confirmed to be a non-relational database, the intermediate language is translated into virtual machine instructions, which are then executed by a pre-defined virtual machine.

4. The indicator definition method according to claim 1, characterized in that, Also includes: In response to the user performing a second relational algebra operation on the medical model using a preset auxiliary operator, the operation rules of the second relational algebra operation are recorded to obtain the corresponding indicator definition.

5. The index definition method according to claim 4, characterized in that, The auxiliary operator is obtained by combining the basic operators, or the auxiliary operator is obtained based on a preset condition judgment function.

6. The index definition method according to claim 4, characterized in that, The first relational algebra operation and the second relational algebra operation are performed by the user in a preset operation interface.

7. The indicator definition method according to claim 1, characterized in that, Also includes: Determine whether all the attribute fields of the medical model can be mapped to the data structure of the target data source; If not, adjust the fields of the target data source based on the medical model.

8. An index definition device, characterized in that, include: The indicator definition unit is used to respond to the user's use of preset basic operators to perform the first relational algebra operation of the preset medical model, record the operation rules of the first relational algebra operation, and obtain the corresponding indicator definition; The field mapping unit is used to map the data structure of the target data source corresponding to the project implementation requirements to the attributes of the medical model in response to receiving project implementation requirements. A language translation unit is used to translate the indicator definition into an intermediate language based on a preset template; The query syntax generation unit is used to generate the target query syntax based on the intermediate language.

9. An index definition device, characterized in that, It includes a processor and a memory, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the index definition method of any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a computer program that, when run on an electronic device, causes the electronic device to perform the steps of the index definition method of any one of claims 1-7.