Query item generation method and system of query form and data model generation method

By using a query form generation method and system, and leveraging reverse lookups and hierarchical menus to construct query paths for data models, the problems of high difficulty and performance bottlenecks in traditional data querying are solved, enabling fast and accurate data tracing and querying.

CN121901243APending Publication Date: 2026-04-21SUZHOU MEGAROBO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SUZHOU MEGAROBO TECH CO LTD
Filing Date
2025-12-29
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Traditional data query and tracing methods suffer from query difficulties and performance bottlenecks in information management systems, especially in fields such as biomedicine and chemical experiments, where users find it difficult to intuitively and efficiently trace the lineage of data scattered across different data models.

Method used

This paper provides a method and system for generating query items in a query form. The method determines the data model that has a reverse reference relationship with the starting data model through reverse query, constructs the query path based on the user's selection operation, and generates query items using hierarchical menus and instance mapping relationships.

Benefits of technology

It enables the rapid and accurate construction of query paths, reduces the difficulty of user operation, and improves the efficiency and intuitiveness of data query. In particular, when users do not know the reference relationship between data models, it can flexibly query the data model that can reference the starting data model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121901243A_ABST
    Figure CN121901243A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a query item generation method and system for a query form and a data model generation method. The query item generation method of the query form comprises the following steps: determining an initial data model in a plurality of data models, and creating the query form for the initial data model; a first reference data model is determined in a reverse query mode, identification information of the first reference data model is displayed, and the first reference data model is a data model having a reverse reference relation with the initial data model; in response to a second selection operation of the user for the identification information of the first reference data model, determining a first target data model in the first reference data model, and determining a first query path according to the initial data model and the first target data model; and in response to the query item generation instruction, generating a query item on the query form based on the first query path. According to the scheme, the reference relationship direction between the user data models can be prompted, and the user is guided to gradually construct a query path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information management, specifically to a method and system for generating query items in a query form, a method and system for generating a data model, an electronic device, and a storage medium. Background Technology

[0002] In information management systems, especially in scientific research and production fields such as biomedicine, chemical experiments, and materials development, Electronic Lab Notebooks (ELNs) or Laboratory Information Management Systems (LIMS) are commonly used to manage experimental processes and data. The core of these systems is data modeling, which abstracts entities in the experiment (such as samples, reagents, consumables, equipment, projects, and experimental operations) into different data models. Each data model can establish referencing relationships with other data models through specific referencing fields (such as foreign keys) to perform data traceability or lineage analysis, i.e., to view all relevant data (such as the reagents, equipment, and consumables used) for a specific instance (such as an experimental sample).

[0003] Traditional data query and tracing methods suffer from high query difficulty and performance bottlenecks. Typically, tracing queries require repeated jumping and navigation between multiple data models. Even if the required data is finally found, when there are many query results belonging to different data models, the results are scattered across different pages, making it difficult for users to intuitively and efficiently trace the data lineage scattered across different data models. Summary of the Invention

[0004] The present invention was proposed in view of the above-mentioned problems. The present invention provides a method and system for generating query items in a query form, a method and system for generating a data model, an electronic device, and a storage medium.

[0005] According to one aspect of the present invention, a method for generating query items in a query form is provided. The method includes: responding to a user's first selection operation for multiple created data models, determining a starting data model among the multiple data models, and creating a query form for the starting data model; responding to a user's reverse query operation, determining a first referencing data model using a reverse query method, and displaying identification information of the first referencing data model, wherein the first referencing data model is a data model with a reverse referencing relationship with the starting data model, the reverse referencing relationship indicating that other data models can unidirectionally reference the current data model; responding to a user's second selection operation for the identification information of the first referencing data model, determining a first target data model among the first referencing data models, and determining a first query path based on the starting data model and the first target data model; responding to a query item generation instruction, generating query items on the query form based on the first query path; wherein the first query path includes a starting data model, at least one target data model, and a target field of the last target data model connected sequentially, the at least one target data model including the first target data model, and a preset referencing relationship between every two adjacent data models in the query path, the preset referencing relationship including a reverse referencing relationship.

[0006] Optionally, the method further includes: controlling the display window to output and display the identification information of the starting data model and the identification information of the first reference data model in a hierarchical menu; in the hierarchical menu, the identification information of the starting data model is the parent menu of the identification information of the first reference data model; the selection operation is an operation of selecting from the menu in the hierarchical menu.

[0007] Optionally, the preset referencing relationship also includes a positive referencing relationship, and the method further includes: in response to a user's positive query operation, determining a second reference data model using a positive query method and displaying the identification information of the second reference data model, wherein the second reference data model is a data model that has a positive referencing relationship with the starting data model, and the positive referencing relationship indicates that the current data model can unidirectionally reference other data models; in response to a user's third selection operation on the identification information of the second reference data model, determining a second target data model in the second reference data model, and determining a second query path based on the starting data model and the second target data model; in response to a query item generation instruction, generating query items on the query form based on the second query path; wherein the second query path includes a starting data model, at least one target data model, and a target field of the last target data model connected in sequence, wherein at least one target data model includes the second target data model, and there is a preset referencing relationship between every two adjacent data models in the second query path.

[0008] Optionally, a forward query method is used to determine the second reference data model, including: determining one or more second reference data models based on one or more reference fields of the initial data model, wherein the second reference data model is a data model that includes at least some of the reference fields of one or more reference fields in multiple data models; and displaying the identification information of the second reference data model in the target directory at the level corresponding to the second reference data model in the hierarchical menu, wherein the target directory is the reference fields contained in the second reference data model.

[0009] Optionally, creating a query form for the initial data model includes: receiving a query form generation instruction, which instructs the generation of a query form for the initial data model; and generating a query form according to a preset query form framework in response to the query form generation instruction.

[0010] Optionally, the multiple data models include one or more instances, which are used to represent experimental data. After generating a query item on the query form based on the first query path in response to the query item generation instruction, the method further includes: determining the query instance of the starting data model; and using the query item and the instance mapping relationship between the instance in each data model on the first query path and the instance in the adjacent data model, determining the field value corresponding to the target field of the target instance, wherein the target instance is the instance in the last data model on the first query path that has an instance mapping relationship with the query instance.

[0011] Optionally, the method further includes: when the first target data model is not the last data model of the first query path, determining the first query path based on the starting data model and the first target data model, including: taking the first target data model as the current target data model, and performing the following model determination operation: determining one or more third reference data models that have a preset reference relationship with the current target data model based on the current target data model, and displaying the identification information of each of the one or more third reference data models; responding to the user's selection operation on the identification information of the one or more third reference data models, determining the third target data model among the one or more third reference data models; taking the third target data model as the new current target data model, and returning to perform the model determination operation until the last data model of the first query path is determined.

[0012] According to another aspect of the present invention, a query form query item generation system is also provided, comprising: a first determining module, configured to, in response to a user's first selection operation on a plurality of created data models, determine a starting data model among the plurality of data models and create a query form for the starting data model; a display module, configured to, in response to a user's reverse query operation, determine a first referencing data model using a reverse query method and display the identification information of the first referencing data model, wherein the first referencing data model is a data model with a reverse referencing relationship with the starting data model, the reverse referencing relationship indicating that other data models can unidirectionally reference the current data model; and a second determining module, configured to, in response to a user's first selection operation on a plurality of created data models, determine a starting data model among the plurality of data models and create a query form for the starting data model; a first determining module, configured to, in response to a user's first selection operation on a plurality of created data models, determine a starting data model among the plurality of data models and create a query form for the starting data model; a second determining module, configured to, in response to a user's first selection operation on a plurality of created data models, determine a starting data model among the plurality of created data models and create a query form for the starting data model; a first determining module, configured to, in response to a user's first selection operation on a plurality of created data models, determine a starting data model among the plurality of created data models and create a query form for the starting data model; and a second determining module, configured to, in response to a user's first selection operation on a plurality of created data models, determine a starting data model using a reverse query method and display the identification information of the first referencing data model, wherein the first referencing data model is a data model with a reverse referencing relationship with the starting data model, and the first referencing data model is a data model with a reverse referencing relationship indicating that other data models can unidirectionally reference the current data model; and a third determining module, configured to, in response to a user's first selection operation on a plurality of created data models, determine a starting data model among the plurality of created data models and create a query form for the starting data model; and a fourth A second selection operation for the identification information of a reference data model, determining a first target data model in the first reference data model, and determining a first query path based on the starting data model and the first target data model; a generation module, used to generate query items on the query form based on the first query path in response to a query item generation instruction; wherein, the first query path includes the starting data model, at least one target data model and the target field of the last target data model connected in sequence, the at least one target data model includes the first target data model, and there is a preset reference relationship between every two adjacent data models in the first query path, the preset reference relationship including the reverse reference relationship.

[0013] According to another aspect of the present invention, a data model generation method is also provided for creating a data model as described above. The method includes: creating a plurality of data models, each of the plurality of data models including at least one instance, each instance of the at least one instance representing experimental data; for each of the plurality of data models, creating a preset reference relationship between the data model and one or more other data models; for every two data models having the preset reference relationship, creating an instance mapping relationship between each instance of at least a portion of the instances of one data model and at least a portion of the instances of the other data model, wherein the data models in the query path are at least a portion of the plurality of data models.

[0014] According to another aspect of the present invention, a data model generation system is also provided for creating data models as described above. The system includes: a first creation module for creating a plurality of data models, each of the plurality of data models including at least one instance, each instance of the at least one instance representing experimental data; a second creation module for creating a preset reference relationship between each of the plurality of data models and one or more other data models; and a third creation module for creating an instance mapping relationship between each instance of at least a portion of the instances of one data model and at least a portion of the instances of the other data model for every two data models having a preset reference relationship, wherein the data models in the query path are at least a portion of the plurality of data models.

[0015] According to another aspect of the present invention, an electronic device is also provided, comprising: a processor and a memory, wherein the memory stores computer program instructions, which, when executed by the processor, are used to perform the query item generation method and / or data model generation method of the above-mentioned query form.

[0016] According to another aspect of the present invention, a storage medium is also provided, on which program instructions are stored, which, when executed, are used to perform the query item generation method and / or data model generation method of the query form described above.

[0017] The above technical solution identifies and displays data models that have a reverse reference relationship with the starting data model through a reverse query method. It can intuitively show users all data models that can reference the starting data model, which helps users to quickly and accurately construct query paths. In particular, the reverse query can find data models that can reference the starting data model when the user does not know the reference relationship between data models. This query method is highly flexible. In addition, by constructing the query path based on the user's selection operation of the first referencing data model, this interactive method is simple and easy to understand, which helps to significantly reduce the difficulty of user operation.

[0018] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0019] The above and other objects, features, and advantages of the present invention will become more apparent from the more detailed description of the embodiments of the invention in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same parts or steps.

[0020] Figure 1 A schematic flowchart of a query item generation method for a query form according to an embodiment of the present invention is shown;

[0021] Figure 2 A schematic diagram of a hierarchical menu according to an embodiment of the present invention is shown;

[0022] Figure 3 A schematic diagram of the input interface for a query form generation instruction according to an embodiment of the present invention is shown;

[0023] Figure 4 A schematic diagram of a query form according to an embodiment of the present invention is shown.

[0024] Figure 5 A schematic block diagram of a query item generation system for a query form according to an embodiment of the present invention is shown;

[0025] Figure 6 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of the present invention more apparent, exemplary embodiments according to the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely a part of the embodiments of the present invention, and not all of the embodiments of the present invention. It should be understood that the present invention is not limited to the exemplary embodiments described herein. Based on the embodiments of the present invention described herein, all other embodiments obtained by those skilled in the art without inventive effort should fall within the protection scope of the present invention.

[0027] To at least partially solve the aforementioned technical problems, embodiments of the present invention provide a method and system for generating query items in a query form, a method and system for generating a data model, an electronic device, and a storage medium. This solution can indicate the direction of the reference relationships between data models and guide the user to gradually construct the query path. It is easy to operate and can obtain query items that can be queried within the same form.

[0028] Please see Figure 1The diagram shown is a schematic flowchart of a query item generation method for a query form according to an embodiment of the present invention. According to one aspect of the present invention, a query item generation method for a query form is provided, the method comprising: steps S110 to S140.

[0029] In step S110, in response to the user's first selection operation for multiple created data models, the starting data model is determined among the multiple data models, and a query form for the starting data model is created.

[0030] For example, prior to step S110, multiple data models have been pre-built. Each data model may have corresponding identification information (e.g., data model name, code, ID, etc.). When executing step S110, the identification information of each data model can be output and displayed, allowing the user to perform a first selection operation based on the identification information of each data model. The data model corresponding to the selected identification information can then be used as the starting data model. It can be understood that the starting data model can be any data model among the already created data models.

[0031] For example, a query form can perform structured queries based on user-inputted information using query items. The query form may have elements such as input boxes, drop-down menus, and buttons (for operations like insert, reset, and query). This embodiment of the invention does not specifically limit the structure and style of the query form. Query items can output query results based on the input information and a first query path. In some embodiments, before determining the initial data model, a general query form can be generated in response to relevant user operations. In this case, the query form may have a functional area for specifying the initial data model. The user can specify the initial data model in the functional area. After determining the initial data model, the query form can be updated to a form for querying relevant data based on the initial data model. In other embodiments, after determining the initial data model, a query form for the initial data model can be directly generated in response to relevant user instructions. This approach will be described in detail below and will not be repeated here.

[0032] In step S120, in response to the user's reverse query operation, the first reference data model is determined by the reverse query method, and the identification information of the first reference data model is displayed. The first reference data model is a data model that has a reverse reference relationship with the starting data model. The reverse reference relationship means that other data models can unidirectionally reference the current data model.

[0033] For example, prior to step S120, a pre-established reference relationship between data models has been pre-built. Those skilled in the art will understand that this pre-established reference relationship can be built by setting the primary key and foreign key of the data models. For any given data model, there can be one or more data models with a pre-established reference relationship. The pre-established reference relationship can include forward references and reverse references. For any given data model, if it can be unidirectionally referenced by another data model, then that other data model is a data model with a reverse reference relationship with it. For example, for a pair of data models with a pre-established reference relationship, including data model A and data model B, if the direction of the pre-established reference relationship between the pair of data models is data model A pointing to data model B, then data model A can unidirectionally reference data model B. When data model B is the current data model, the data model with a reverse reference relationship with data model B includes data model A; when data model A is the current data model, the data model with a forward reference relationship with data model A includes data model B. It is understood that for any data model, a reverse lookup can retrieve data models that have a reverse reference relationship with that data model. Specifically, in step S120, the user can perform a reverse lookup operation on the starting data model. In response to the reverse lookup operation, the starting data model can be used as the current data model. The reverse lookup method is then used to retrieve data models that have a reverse reference relationship with the starting data model from among the created data models, i.e., the first referencing data models. Here, the first referencing data models that have a reverse reference relationship with the starting data model can be one or more data models. For example, each data model can have corresponding identification information, which is used to indicate the corresponding data model. The identification information of the first referencing data models can be output and displayed by the display device for the user to view.

[0034] In step S130, in response to the user's second selection operation on the identification information of the first reference data model, a first target data model is determined in the first reference data model, and a first query path is determined based on the starting data model and the first target data model.

[0035] For example, a user can perform a second selection operation on the identification information of the first reference data model using an interactive device (e.g., mouse, keyboard, etc.). The data model indicated by the identification information of the selection operation is the first target data model. The second selection operation selects one data model from the first reference data models determined in step S120 as the first target data model. The starting data model and the first target data model belong to the first two data models on the first query path. The user can also optionally perform a selection operation on the identification information of data models that have a preset reference relationship with the first target data model to select the next target data model on the first query path. For each target data model, the user can perform a selection operation on data models that have a preset reference relationship with that target data model to select the next target data model on the first query path until the last target data model is determined. Therefore, every two adjacent data models on the first query path have a preset reference relationship. It can be understood that the first query path can at least include the starting data model and the first target data model, and can also optionally include other data models besides the starting data model and the first target data model.

[0036] In step S140, in response to the query item generation instruction, a query item is generated on the query form based on the first query path.

[0037] For example, there can be one or more query item generation instructions, and correspondingly, there can be one or more query items created. Each query item generation instruction is used to encapsulate the corresponding query path into an interactive control on the query form. The query item is used to query information that is related to the input information along the corresponding query path, thereby outputting the corresponding query results.

[0038] For example, the first query path includes a starting data model, at least one target data model, and a target field of the last target data model connected in sequence. The at least one target data model includes a first target data model. There is a preset reference relationship between every two adjacent data models in the first query path, and the preset reference relationship includes a back reference relationship.

[0039] For example, the process of determining each data model on the first query path can be found in the foregoing embodiments, and will not be repeated here. Each data model may have one or more fields, which can represent data attributes. Specifically, each data model may include one or more instances, and each instance may have a field value corresponding to each field. For example, a sample data model may include fields such as sample ID, creation time, and OD value. Wherein, if the field value corresponding to the creation time field of a sample instance is T0, it can indicate that the creation time of the sample corresponding to that sample instance is T0. It can be understood that the field values ​​corresponding to different fields of each instance can represent the data of different data attributes of that instance. The target field can be any field of the last target data model, which can be a default field or a field specified by the user.

[0040] The above technical solution identifies and displays data models that have a reverse reference relationship with the starting data model through a reverse query method. It can intuitively show users all data models that can reference the starting data model, which helps users quickly and accurately construct the first query path. In particular, the reverse query can find data models that can reference the starting data model when the user does not know the reference relationship between data models. This query method is highly flexible. In addition, the first query path is constructed based on the user's selection operation of the first reference data model. This interactive method is simple and easy to understand, which helps to significantly reduce the difficulty of user operation.

[0041] Optionally, the method further includes: controlling the display window to output and display the identification information of the starting data model and the identification information of the first reference data model in a hierarchical menu; in the hierarchical menu, the identification information of the starting data model is the parent menu of the identification information of the first reference data model; the selection operation is an operation of selecting from the menu in the hierarchical menu.

[0042] For example, a hierarchical menu is a menu with a "parent-child hierarchy" structure. The identifier of the starting data model can be the parent menu, and the identifier of the first referencing data model can be the child menu. The parent menu is the parent menu of the child menu. Please refer to [link / reference]. Figure 2 As shown, it is a schematic diagram of a hierarchical menu according to an embodiment of the present invention. Figure 2In the illustrated embodiment, the identifier of the starting data model is "sample_test_one". The user can enter a reverse query command by clicking the "Reverse Query" option. The reverse query command is used to instruct the determination of the first reference data model through a reverse query. In this embodiment, the first reference data models of the starting data model include: a data model with identifier "testyan1", a data model with identifier "sample_test_one", and a data model with identifier "sample_test_two". The identifiers of these first reference data models are sub-menus of the identifier "sample_test_one" of the starting data model in the hierarchical menu.

[0043] This approach can present the reference relationships between abstract data models to users through a visual hierarchical structure. This can intuitively reflect the hierarchical reference relationships between data models and help users distinguish between the starting data model and the first reference data model to be selected.

[0044] Optionally, the preset referencing relationship also includes a forward referencing relationship, and the method further includes: in response to a user's forward query operation, determining a second reference data model using a forward query method and displaying the identification information of the second reference data model, wherein the second reference data model is a data model that has a forward referencing relationship with the starting data model, and the forward referencing relationship indicates that the current data model can unidirectionally refer to other data models; in response to a user's third selection operation on the identification information of the second reference data model, determining a second target data model in the second reference data model, and determining a second query path based on the starting data model and the second target data model; in response to a query item generation instruction, generating query items on the query form based on the second query path; wherein the second query path includes a starting data model, at least one target data model, and a target field of the last target data model connected in sequence, wherein at least one target data model includes the second target data model, and there is a preset referencing relationship between every two adjacent data models in the second query path.

[0045] For example, a forward query approach can determine the data model that the initial data model can reference unidirectionally. The query item generation method of this embodiment can not only construct a first query path containing backreference logic, but also a second query path containing forward reference logic. Users can flexibly construct query paths according to their data query direction requirements. For example, the process of constructing the second query path can refer to the aforementioned process of constructing the first query path, and will not be repeated here.

[0046] Optionally, a forward query method is used to determine the second reference data model, including: determining one or more second reference data models based on one or more reference fields of the initial data model, wherein the second reference data model is a data model that includes at least some of the reference fields of one or more reference fields in multiple data models; and displaying the identification information of the second reference data model in the target directory at the level corresponding to the second reference data model in the hierarchical menu, wherein the target directory is the reference fields contained in the second reference data model.

[0047] For example, the initial data model can be a data model holding a foreign key, where the foreign key is a field that can point to the primary key of one or more other data models. These one or more data models are the second referencing data models that have a positive reference relationship with the initial data model, and the foreign key is the referencing field. For instance, the sample data model can have a "Associated Device ID" field, which can point to a device data model that has a "Device ID" field as its primary key. After establishing a positive reference relationship between the device data model and the sample data model using the primary key and foreign key, for a pair of device instances and sample instances that need to have an instance mapping relationship established, the field value corresponding to the "Associated Device ID" field of the sample instance can be set to the field value corresponding to the "Device ID" field of the device instance. It should be noted that for each second referencing data model that has a positive reference relationship with the initial data model, the referencing field (i.e., the primary key) of this second referencing data model must satisfy the following condition: the field value corresponding to the referencing field of each instance of this second referencing data model is unique within the model. It is understandable that, since there can be one or more second reference data models with a positive reference relationship to the starting data model, the starting data model can also have one or more reference fields. There is a situation where two or more second reference data models can share a single reference field. For example, if two second reference data models are both sample-type data models and both have a "Sample ID" field, then the field values ​​corresponding to the Sample ID for all sample instances in the two second reference data models will be different. In the hierarchical menu, for second reference data models with a positive reference relationship to the starting data model, the corresponding hierarchy can display a target directory. The target directory can include the reference fields contained in all second reference data models with a positive reference relationship to the starting data model. The identification information of the second reference data model can be displayed under the corresponding reference field. Users can select a reference field in the target directory and then select the second target data model from the second reference data models under that reference field.

[0048] In the above technical solution, by displaying the identification information of the second referenced data model under the corresponding referenced field, the second query path is more intuitive and predictable when the user constructs it. Since a forward query can determine the second referenced data model of the defined referenced field from the initial data model, the user can directly start from the referenced field of the initial data model. The user can predict the referenced data model by seeing the referenced field. This greatly reduces the difficulty for users to understand the reference relationships between data models.

[0049] Optionally, there may be multiple referenced fields, and these referenced fields may be different from each other.

[0050] For example, the initial data model can hold multiple different reference fields, each of which can point to one or more second reference data models. When there are many second reference data models that have positive references to the initial data model, it is more efficient and convenient for users to find the second target data model by following the target directory compared to traversing the second reference data models.

[0051] Optionally, creating a query form for the initial data model includes: receiving a query form generation instruction, which instructs the generation of a query form for the initial data model; and generating a query form according to a preset query form framework in response to the query form generation instruction.

[0052] For example, a user can input query form generation instructions via an interactive device. The query form generation instructions may include insertion instructions for inserting a query form onto the display interface based on the selected initial data model. See also... Figure 3 The diagram shown is a schematic representation of the input interface for a query form generation instruction according to an embodiment of the present invention. Figure 3 In the illustrated embodiment, the data models can be categorized, including sample data models, reagent data models, consumable data models, equipment data models, project data models, experimental record data models, and catalog data models. Users can first select the category of the data model they wish to query, and then select a specific data model within that category as the starting data model. Figure 3 In the illustrated embodiment, the currently selected data model is a sample-type data model. Correspondingly, the names of each data model categorized as a sample-type data model are selected so that the user can determine the starting data model among these models. When the user clicks the "Insert" button, the processor receives a query form generation instruction. See also... Figure 4 As shown, it is a schematic diagram of a query form according to an embodiment of the present invention. Figure 4In the illustrated embodiment, the user selects a starting data model named "sample_test_one". This approach can quickly generate a corresponding query form based on the user's query requirements to retrieve relevant data from instances in the starting data model using a query form.

[0053] Optionally, the multiple data models include one or more instances, which are used to represent experimental data. After generating a query item on the query form based on the first query path in response to the query item generation instruction, the method further includes: determining the query instance of the starting data model; and using the query item and the instance mapping relationship between the instance in each data model on the first query path and the instance in the adjacent data model, determining the field value corresponding to the target field of the target instance, wherein the target instance is the instance in the last data model on the first query path that has an instance mapping relationship with the query instance.

[0054] For example, the instance to be queried is one or more instances selected by the user in the initial data model according to the query requirements. For each pair of adjacent data models on the first query path, an instance in one data model may have a pre-built instance mapping relationship with an instance in the other data model. After determining the instance to be queried, instances in the first target data model on the first query path that have an instance mapping relationship with the instance to be queried can be determined. If the first target data model is not the last data model, instances with an instance mapping relationship with the instances determined in the first target data model can be determined in the next target data model of the first target data model, and so on, until the target instance in the last target data model is determined, thereby determining the field value corresponding to the target field of the target instance. The instance in this embodiment of the invention can represent experimental data, which may include, but is not limited to, sample data, reagent data, consumable data, equipment data, project data, experimental record data, catalog data, etc. This embodiment of the invention does not specifically limit the type of experimental data; any experimental data that can be represented by instances in the data model is acceptable.

[0055] The above technical solution utilizes the instance mapping relationship between instances of adjacent data models on the first query path of the query item to determine the query result for the instance to be queried. It can automatically and efficiently determine the data that the user wants to query. Especially when there are multiple data models on the first query path, this solution can automatically find the target instance with the instance mapping relationship with the instance to be queried along the first query path across multiple data models, and can automatically determine the field value corresponding to the target field of the target instance. This can greatly simplify the user's query operation and eliminate the need for the user to jump between multiple data models to search.

[0056] Optionally, the method further includes: when the first target data model is not the last data model of the first query path, determining the first query path based on the starting data model and the first target data model, including: taking the first target data model as the current target data model, and performing the following model determination operation: determining one or more third reference data models that have a preset reference relationship with the current target data model based on the current target data model, and displaying the identification information of each of the one or more third reference data models; responding to the user's selection operation on the identification information of the one or more third reference data models, determining the third target data model among the one or more third reference data models; taking the third target data model as the new current target data model, and returning to perform the model determination operation until the last data model of the first query path is determined.

[0057] For example, after determining the target data model on the first query path each time, the user can select the next target data model on the first query path according to the query requirements. Specifically, after determining the first target data model, it can be used as the current target data model. The preset multiple data models can include one or more third-party reference data models that have a preset reference relationship with the current target data model. The preset reference relationship can be a forward reference relationship or a reverse reference relationship. Based on the current target data model, the third-party reference data models of the current target data model can be determined, and the identification information of each determined third-party reference data model can be output and displayed. The user can select an identifier from the identifier information of the third-party reference data models of the current target data model; the data model indicated by this identifier is the third target data model. The determined third target data model can be used as the new current data model, and the user can continue to perform model determination operations for the new current data model until the last data model of the first query path is determined. The first query path can include a starting data model, a first target data model, and at least one third target data model connected sequentially.

[0058] The above technical solution determines the target data model through hierarchical interaction with the user, which can decompose the complex process of constructing the first query path across multiple data models into a simple single-step selection operation, thus reducing the difficulty for users to construct complex first query paths. By providing users with optional reference data models at the next level based on preset reference relationships, it helps users to correctly construct the complete first query path from the starting data model to the last target data model, which helps ensure that valid query items are generated in the end.

[0059] Please see Figure 5The diagram shown is a schematic block diagram of a query item generation system 500 for a query form according to an embodiment of the present invention. According to another aspect of the present invention, a query item generation system for a query form is also provided, the system 500 comprising:

[0060] The first determination module 510 is used to determine the starting data model among the multiple data models in response to the user's first selection operation for multiple created data models and to create a query form for the starting data model.

[0061] Display module 520 is used to respond to the user's reverse query operation, determine the first reference data model using the reverse query method, and display the identification information of the first reference data model. The first reference data model is a data model that has a reverse reference relationship with the starting data model. The reverse reference relationship means that other data models can unidirectionally reference the current data model.

[0062] The second determining module 530, in response to the user's second selection operation on the identification information of the first reference data model, determines the first target data model in the first reference data model, and determines the first query path based on the starting data model and the first target data model;

[0063] The generation module 540 is used to generate query items on the query form based on the query path in response to the query item generation instruction; wherein, the first query path includes a starting data model, at least one target data model and a target field of the last target data model connected in sequence, the at least one target data model includes the first target data model, and there is a preset reference relationship between every two adjacent data models in the query path, the preset reference relationship includes a back reference relationship.

[0064] According to another aspect of the present invention, a data model generation method is also provided for creating a data model as described above. The method includes: creating a plurality of data models, each of the plurality of data models including at least one instance, each instance of the at least one instance representing experimental data; for each of the plurality of data models, creating a preset reference relationship between the data model and one or more other data models; for every two data models having the preset reference relationship, creating an instance mapping relationship between each instance of at least a portion of the instances of one data model and at least a portion of the instances of the other data model, wherein the data models in the query path are at least a portion of the plurality of data models.

[0065] For example, the data model has a predefined data structure. For instance, the data structure can be a table consisting of rows and columns, each table having a name, and each column having fields. By responding to user operations such as inserting, deleting, and updating data, a data model containing one or more instances can be created. For example, predefined reference relationships between data models can be established using primary and foreign keys. For data models requiring predefined reference relationships, a specific field (e.g., sample ID) can be defined as the primary key in one data model, and a foreign key pointing to the primary key can be set in another data model (usually a field related to the aforementioned specific field, such as "associated sample ID"). For example, for every two data models with established predefined reference relationships, if it is necessary to establish an instance mapping relationship between the instances contained in each of the two data models, the foreign key field corresponding to the instance requiring the instance mapping relationship can be filled into the field value corresponding to the primary key of the corresponding instance in the other data model in the data model with the foreign key.

[0066] According to another aspect of the present invention, a data model generation system is also provided for creating a data model as described above, the system comprising:

[0067] The first creation module is used to create multiple data models, each of which includes at least one instance, and each instance of the at least one instance is used to represent experimental data.

[0068] The second creation module is used to create a preset reference relationship between each of the multiple data models and one or more other data models besides that data model;

[0069] The third creation module is used to create an instance mapping relationship between each instance of at least a portion of the instances of one data model and at least a portion of the instances of the other data model for every two data models with a preset reference relationship, wherein the data models in the query path are at least a portion of the multiple data models.

[0070] Please see Figure 6 As shown, it is a schematic block diagram of an electronic device 600 according to an embodiment of the present invention. According to another aspect of the present invention, an electronic device is also provided, including: a processor 610 and a memory 6420, wherein the memory 620 stores computer program instructions, which are executed by the processor 610 to perform the query item generation method and / or data model generation method of the above-mentioned query form.

[0071] According to another aspect of the present invention, a storage medium is also provided, on which program instructions are stored. When the program instructions are executed by a computer or processor, the computer or processor performs corresponding steps of the query item generation method and / or data model generation method of the query form described in the embodiments of the present invention, and is used to implement corresponding modules in the query item generation system and / or data model generation system of the query form according to the embodiments of the present invention, or corresponding modules in the query item generation system and / or data model generation system for the query form. The storage medium may, for example, include a memory card of a smartphone, a storage component of a tablet computer, a hard disk of a personal computer, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disc read-only memory (CD-ROM), a USB memory, or any combination of the above storage media. A computer-readable storage medium may be any combination of one or more computer-readable storage media.

[0072] According to another aspect of the present invention, a computer program product is also provided, including computer program instructions, which, when executed, are used to perform a query item generation method and / or a data model generation method for a query form as described above.

[0073] Those skilled in the art can understand the specific implementation and beneficial effects of the query item generation system, data model generation method and system, electronic device, storage medium and computer program product by reading the above detailed description of the query form query item generation method and / or data model generation method. For the sake of brevity, they will not be described in detail here.

[0074] Although exemplary embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above exemplary embodiments are merely illustrative and are not intended to limit the scope of the invention thereto. Various changes and modifications can be made therein by those skilled in the art without departing from the scope and spirit of the invention. All such changes and modifications are intended to be included within the scope of the invention as claimed in the appended claims.

[0075] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0076] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed.

[0077] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some embodiments, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0078] Similarly, it should be understood that, in order to streamline the invention and aid in understanding one or more of the various aspects of the invention, features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the description of exemplary embodiments of the invention. However, this approach should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the corresponding claims, its inventive point lies in solving the corresponding technical problem with fewer features than all of those in a single disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the invention.

[0079] Those skilled in the art will understand that, apart from the mutual exclusion of features, all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or apparatus so disclosed can be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0080] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments can be used in any combination.

[0081] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some modules in the query item generation system and / or data model generation system for query forms according to embodiments of the present invention. The present invention can also be implemented as an apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such programs implementing the present invention can be stored on a computer-readable medium or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

[0082] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.

[0083] The above are merely specific embodiments or descriptions of the present invention, and the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. The scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for generating query items in a query form, characterized in that, The method includes: In response to a user's first selection operation for multiple created data models, a starting data model is determined among the multiple data models, and a query form is created for the starting data model. In response to the user's reverse query operation, the first reference data model is determined by the reverse query method, and the identification information of the first reference data model is displayed. The first reference data model is a data model that has a reverse reference relationship with the starting data model. The reverse reference relationship means that other data models can unidirectionally reference the current data model. In response to a user's second selection operation on the identification information of the first reference data model, a first target data model is determined in the first reference data model, and a first query path is determined based on the starting data model and the first target data model; In response to the query item generation instruction, a query item is generated on the query form based on the first query path; The first query path includes the target fields of the starting data model, at least one target data model, and the last target data model connected in sequence. The at least one target data model includes the first target data model. There is a preset reference relationship between every two adjacent data models in the query path. The preset reference relationship includes the reverse reference relationship.

2. The method according to claim 1, characterized in that, The method further includes: The control display window displays the identification information of the starting data model and the identification information of the first reference data model through a hierarchical menu. In the hierarchical menu, the identification information of the starting data model is the parent menu of the identification information of the first reference data model; The selection operation refers to the operation of selecting a menu item from the hierarchical menu.

3. The method according to claim 1 or 2, characterized in that, The preset reference relationship also includes a positive reference relationship, and the method further includes: In response to a user's forward query operation, a second reference data model is determined using a forward query method, and the identification information of the second reference data model is displayed. The second reference data model is a data model that has a forward reference relationship with the starting data model. The forward reference relationship indicates that the current data model can unidirectionally reference other data models. In response to a user's third selection operation regarding the identification information of the second reference data model, a second target data model is determined in the second reference data model, and a second query path is determined based on the starting data model and the second target data model; In response to the query item generation instruction, a query item is generated on the query form based on the second query path; The second query path includes the starting data model, at least one target data model, and the target field of the last target data model connected in sequence. The at least one target data model includes the second target data model. There is a preset reference relationship between each two adjacent data models in the second query path.

4. The method according to claim 3 of claim 2, characterized in that, The step of determining the second reference data model using a forward query method includes: One or more second reference data models are determined based on one or more reference fields of the initial data model, wherein the second reference data model is a data model that includes at least some of the reference fields of the one or more reference fields in the plurality of data models; In the hierarchy menu corresponding to the second reference data model, the identification information of the second reference data model is displayed in the target directory, which is the reference field contained in the second reference data model.

5. The method according to claim 1 or 2, characterized in that, Creating a query form for the initial data model includes: Receive a query form generation instruction, the query form generation instruction being used to instruct the generation of a query form for the initial data model; In response to the query form generation instruction, the query form is generated according to the preset query form framework.

6. The method according to claim 1 or 2, characterized in that, The plurality of data models includes one or more instances, the instances being used to represent experimental data. After generating a query item on the query form based on the first query path in response to the query item generation instruction, the method further includes: Determine the query instance of the initial data model; Using the query item and the instance mapping relationship between instances in each data model on the first query path and instances in adjacent data models, the field value corresponding to the target field of the target instance is determined. The target instance is the instance in the last data model on the first query path that has an instance mapping relationship with the instance to be queried.

7. The method according to claim 1 or 2, characterized in that, The method further includes: when the first target data model is not the last data model of the first query path, determining the first query path based on the starting data model and the first target data model includes: Using the first target data model as the current target data model, perform the following model determination operation: Based on the current target data model, determine one or more third reference data models that have a preset reference relationship with the current target data model, and display the identification information of each of the one or more third reference data models; In response to a user's selection operation for the identification information of the one or more third reference data models, a third target data model is determined from the one or more third reference data models; The third target data model is used as the new current target data model, and the model determination operation is performed again until the last data model of the first query path is determined.

8. A query item generation system for a query form, characterized in that, The system includes: The first determining module is used to determine the starting data model among the multiple data models in response to a user's first selection operation for multiple created data models, and to create a query form for the starting data model. The display module is used to respond to the user's reverse query operation, determine the first reference data model using the reverse query method, and display the identification information of the first reference data model. The first reference data model is a data model that has a reverse reference relationship with the starting data model. The reverse reference relationship indicates that other data models can unidirectionally reference the current data model. The second determining module is used to respond to a user's second selection operation on the identification information of the first reference data model, determine a first target data model in the first reference data model, and determine a first query path based on the starting data model and the first target data model; The generation module is used to generate query items on the query form based on the first query path in response to the query item generation instruction; The first query path includes the starting data model, at least one target data model, and the target field of the last target data model connected in sequence. The at least one target data model includes the first target data model. There is a preset reference relationship between every two adjacent data models in the first query path, and the preset reference relationship includes the reverse reference relationship.

9. A data model generation method, characterized in that, The system for creating a data model as described in any one of claims 1-7 comprises: Create multiple data models, each of which includes at least one instance, and each instance of the at least one instance is used to represent experimental data; For each of the plurality of data models, a preset reference relationship is created between that data model and one or more other data models besides that data model; For every two data models with a preset reference relationship, an instance mapping relationship is created between each instance of at least a portion of the instances of one data model and at least a portion of the instances of the other data model, wherein the data models in the query path are at least a portion of the multiple data models.

10. A data model generation system, characterized in that, The system for creating a data model as described in any one of claims 1-7 comprises: The first creation module is used to create multiple data models, each of which includes at least one instance, and each instance of the at least one instance is used to represent experimental data. The second creation module is used to create a preset reference relationship between each of the multiple data models and one or more other data models besides that data model; The third creation module is used to create an instance mapping relationship between each instance of at least a portion of the instances of one data model and at least a portion of the instances of the other data model for every two data models with a preset reference relationship, wherein the data models in the query path are at least a portion of the multiple data models.

11. An electronic device comprising a processor and a memory, characterized in that, The memory stores computer program instructions, which, when executed by the processor, are used to perform the query item generation method of the query form as described in any one of claims 1-7 and / or the data model generation method as described in claim 9.

12. A storage medium on which program instructions are stored, characterized in that, The program instructions, when executed, are used to perform the query item generation method of the query form as described in any one of claims 1-7 and / or the data model generation method as described in claim 9.