Retrieval method, device and equipment and storage medium
By disassembling and reorganizing the medical data retrieval condition tree, sub-retrieval forms are generated, efficient retrieval of medical data is achieved, the problem of unintuitive search results in the existing technology is solved, and the search efficiency and practicality are improved.
Patent Information
- Application Number
- CN202510863866.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-07-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Under the multi-condition and multi-level composite search tree architecture, the existing medical data search system is difficult to intuitively display the specific number of hits of each search condition and the hit results after the cross-acting of the two conditions of each search condition, making it difficult for users to analyze the data relationship in depth, limiting the practicality of the search function in complex scenarios.
By determining the target search formula, traversing the search condition tree, disassembling and reorganizing it, several sub-retrieval formulas are obtained, and medical data is retrieved using the target search formula and/or sub-retrieval formula to generate search results including combinations of different search conditions.
It improves the efficiency and practicality of medical data retrieval, enables users to intuitively understand the dynamic changes of data, flexibly optimizes search conditions, and improves the accuracy and user experience of search results.
Smart Images

Figure CN120371869A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical information technology, and particularly to a retrieval method, device, equipment and storage medium. Background Art
[0002] Most of the currently commonly used medical data retrieval systems adopt a multi-condition and multi-level composite retrieval tree architecture. When a user is in a retrieval inclusion and exclusion scenario, there is often an urgent need to know the specific number of hits for each retrieval condition when configuring the conditions, as well as the number of hits after the interaction of two conditions. Unfortunately, traditional retrieval only feedbacks the total number of hits after the combined operation of multiple conditions. The lack of intermediate data, and most of them require jumping to the result page to view relevant data, making it difficult for users to deeply analyze the data relationship, greatly limiting the practicality of the retrieval function in complex scenarios and unable to meet the diverse needs in actual work.
[0003] Therefore, how to improve the practicality of medical data retrieval is a problem to be solved in this field. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a retrieval method, device, equipment and storage medium, which can retrieve medical data by combining a target retrieval formula and each sub-retrieval formula, and the obtained retrieval results can include the retrieval situations of different combinations of retrieval conditions, so as to intuitively understand the dynamic changes of medical data and improve the retrieval efficiency and practicality. The specific solutions are as follows: In the first aspect, the present application provides a retrieval method, including: Determine a target retrieval formula for retrieving medical data; Traverse the retrieval condition tree corresponding to the target retrieval formula to determine the leaf nodes of the retrieval condition tree; According to a preset disassembling principle and the leaf nodes, perform disassembling and recombining operations on the retrieval condition tree to obtain several sub-retrieval formulas corresponding to the target retrieval formula; the preset disassembling principle is a principle for disassembling a condition tree into several sub-trees constructed based on the relationship between leaf nodes and logical operator nodes in the condition tree; Based on the retrieval operation instruction corresponding to the target retrieval formula, use the target retrieval formula and / or several sub-retrieval formulas to perform a retrieval operation on the medical data to obtain a corresponding data retrieval result.
[0005] Optionally, the determining a target retrieval formula for retrieving medical data includes: Obtain a retrieval formula editing instruction through a preset retrieval formula editing window, and update the retrieval formula based on the retrieval formula editing instruction to obtain the current retrieval formula; If a command indicating the start of a retrieval operation is obtained, the current retrieval formula is determined as the target retrieval formula for retrieving medical data.
[0006] Optionally, traversing the retrieval condition tree corresponding to the target retrieval formula to determine the leaf nodes of the retrieval condition tree includes: Converting the target retrieval formula into a tree structure to obtain a retrieval condition tree; Using a preset search algorithm to traverse the retrieval condition tree layer by layer and identifying the information of each node in the retrieval condition tree to determine the corresponding leaf nodes.
[0007] Optionally, disassembling and reorganizing the retrieval condition tree according to the preset disassembling principle and the leaf nodes to obtain several sub-retrieval formulas corresponding to the target retrieval formula includes: Performing a disassembling operation on the retrieval condition tree based on the preset disassembling principle to obtain several logical operator nodes and several of the leaf nodes; Determining any one of the logical operator nodes as the current root node and intercepting the complete subtree below the current root node in the retrieval condition tree to obtain the sub-condition tree corresponding to the retrieval condition tree; Converting the sub-condition tree into a corresponding retrieval formula to obtain several sub-retrieval formulas corresponding to the target retrieval formula; Among them, converting the sub-condition tree into a corresponding retrieval formula includes: Filtering out the current sub-condition tree from the storage space based on the globally unique identifier corresponding to the sub-condition tree and converting the current sub-condition tree into a corresponding retrieval formula; Among them, each sub-condition tree constructs a key-value pair based on the assigned globally unique identifier and registers the sub-condition tree in the hash map in the form of a key-value pair to store all the sub-condition trees corresponding to the retrieval condition tree using the storage space.
[0008] Optionally, using the target retrieval formula and / or several sub-retrieval formulas to perform a retrieval operation on the medical data to obtain a corresponding data retrieval result includes: Using the target retrieval formula and / or several sub-retrieval formulas to perform a retrieval operation on the medical data to obtain the corresponding data hit situation; Generating a corresponding data retrieval result according to the relationship between the data hit situation and the globally unique identifiers in the hash map.
[0009] Optionally, based on the retrieval operation instruction corresponding to the target retrieval formula, using the target retrieval formula and / or several sub-retrieval formulas to perform a retrieval operation on the medical data includes: Obtain a retrieval operation instruction for the target retrieval formula through a preset interaction interface; If the retrieval operation instruction is a first - type instruction, perform a retrieval operation on the medical data based on the target retrieval formula; If the retrieval operation instruction is a second - type instruction, asynchronously call relevant retrieval interfaces based on several of the sub - retrieval formulas to perform retrieval operations on the medical data respectively; If the retrieval operation instruction is a third - type instruction, asynchronously call relevant retrieval interfaces based on the target retrieval formula and several of the sub - retrieval formulas to perform retrieval operations on the medical data respectively.
[0010] Optionally, if the retrieval operation instruction is a second - type instruction or a third - type instruction, obtaining the corresponding data retrieval result includes: Determine all the retrieval results fed back by the asynchronously called retrieval interfaces as the data retrieval result corresponding to the target retrieval formula.
[0011] In a second aspect, the present application provides a retrieval device, including: A retrieval formula determination module, configured to determine a target retrieval formula for retrieving medical data; A retrieval condition tree traversal module, configured to traverse the retrieval condition tree corresponding to the target retrieval formula to determine the leaf nodes of the retrieval condition tree; A condition tree processing module, configured to disassemble and reorganize the retrieval condition tree according to a preset disassembly principle and the leaf nodes to obtain several sub - retrieval formulas corresponding to the target retrieval formula; the preset disassembly principle is a principle for disassembling a condition tree into several sub - trees constructed based on the relationship between the leaf nodes and the logical operator nodes in the condition tree; A retrieval module, configured to perform a retrieval operation on the medical data based on the retrieval operation instruction corresponding to the target retrieval formula, using the target retrieval formula and / or several of the sub - retrieval formulas to obtain the corresponding data retrieval result.
[0012] In a third aspect, the present application provides an electronic device, including: A memory, configured to store a computer program; A processor, configured to execute the computer program to implement the retrieval method as described above.
[0013] In a fourth aspect, the present application provides a computer - readable storage medium, configured to store a computer program, and when the computer program is executed by a processor, it implements the retrieval method as described above.
[0014] It can be seen that the present application first determines a target retrieval formula for retrieving medical data; then traverses the retrieval condition tree corresponding to the target retrieval formula to determine the leaf nodes of the retrieval condition tree; and then disassembles and reorganizes the retrieval condition tree according to a preset disassembly principle and the leaf nodes to obtain several sub-retrieval formulas corresponding to the target retrieval formula; the preset disassembly principle is a principle for disassembling a condition tree into several sub-trees constructed based on the relationship between the leaf nodes and the logical operator nodes in the condition tree; afterwards, based on the retrieval operation instruction corresponding to the target retrieval formula, the medical data can be retrieved using the target retrieval formula and / or several of the sub-retrieval formulas to obtain corresponding data retrieval results. In this way, the present application can disassemble and reorganize the target retrieval formula for retrieving medical data to obtain each sub-retrieval formula, and then retrieve the medical data in combination with the target retrieval formula and each sub-retrieval formula; the retrieval results obtained in this way include the retrieval situations under different combinations of retrieval conditions, which can intuitively understand the dynamic changes of medical data and improve the retrieval efficiency and practicality of medical data. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings according to the provided drawings without creative efforts.
[0016] Figure 1 It is a flowchart of a retrieval method disclosed in the present application; Figure 2 It is a flowchart of a specific retrieval method disclosed in the present application; Figure 3 It is a schematic diagram of a specific retrieval situation disclosed in the present application; Figure 4 It is a schematic diagram of another specific retrieval situation disclosed in the present application; Figure 5 It is a schematic diagram of the structure of a retrieval device disclosed in the present application; Figure 6 It is a structural diagram of an electronic device disclosed in the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0017] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than 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 efforts shall fall within the protection scope of the present invention.
[0018] See Figure 1 As shown, an embodiment of the present invention discloses a retrieval method, including: Step S11: Determine a target retrieval formula for retrieving medical data.
[0019] In a specific embodiment, the determination of the target retrieval formula for retrieving medical data may include: obtaining a retrieval formula editing instruction through a preset retrieval formula editing window, and updating the retrieval formula based on the retrieval formula editing instruction to obtain the current retrieval formula; if a command indicating the start of a retrieval operation is obtained, then determine the current retrieval formula as the target retrieval formula for retrieving medical data. Specifically, the retrieval formula editing instruction input by the user can be obtained through a pre-set retrieval formula editing window; when the user edits the retrieval formula, it may be adjusted multiple times to obtain the current retrieval formula required by the user; the current retrieval formula obtained here does not directly trigger the retrieval operation, but waits for the user to issue a command indicating the start of the retrieval operation, and then determines the updated current retrieval formula as the target retrieval formula for subsequent retrieval. In some embodiments, the function of viewing the hit situation corresponding to the retrieval formula can be set to be actively triggered by the user to avoid frequently calling the retrieval interface and affecting the efficiency.
[0020] Step S12: Traverse the retrieval condition tree corresponding to the target retrieval formula, and determine the leaf nodes of the retrieval condition tree.
[0021] In this application, the target retrieval formula for retrieving medical data is determined through the above steps, and subsequent data retrieval needs to be based on this target retrieval formula; among them, first, the target retrieval formula needs to be processed to convert the target retrieval formula into a corresponding retrieval condition tree; further determine the leaf nodes of the retrieval condition tree; it can be understood that in order to facilitate the user to view the retrieval situation corresponding to each retrieval node during the retrieval process, each subtree of the condition tree corresponding to the retrieval formula needs to be used for retrieval, so as to facilitate the user to understand the relationship between the retrieval result and the retrieval formula.
[0022] In a specific embodiment, traversing the retrieval condition tree corresponding to the target retrieval formula to determine the leaf nodes of the retrieval condition tree may include: converting the target retrieval formula into a tree structure to obtain a retrieval condition tree; using a preset search algorithm to traverse the retrieval condition tree layer by layer and identifying the information of each node in the retrieval condition tree to determine the corresponding leaf nodes. Specifically, in the process of processing the current retrieval formula, it is first necessary to convert the conventional retrieval formula into a tree structure to obtain the corresponding retrieval condition tree. It can be understood that the retrieval condition tree includes nodes representing retrieval conditions and logical operator nodes representing conditional relationships. The retrieval condition tree can be traversed through some search algorithms (such as breadth-first search algorithm) to dynamically identify the two types of nodes in the condition tree. In this way, the leaf nodes of the retrieval condition tree can be traversed. The leaf nodes represent non-divisible retrieval conditions, and the condition tree can be decomposed based on the leaf nodes subsequently.
[0023] Step S13: According to the preset disassembling principle and the leaf nodes, perform disassembling and recombination operations on the retrieval condition tree to obtain a number of sub-retrieval formulas corresponding to the target retrieval formula; the preset disassembling principle is a principle for disassembling the condition tree into a number of sub-trees constructed based on the relationship between the leaf nodes and logical operator nodes in the condition tree.
[0024] In this embodiment, the leaf nodes of the retrieval condition tree corresponding to the target retrieval formula can be obtained through the above steps. Then, based on the leaf nodes and the set disassembling principle, disassembling and recombination operations can be performed on the retrieval condition tree, and the retrieval condition tree can be divided into a number of sub-condition trees. It can be understood that the retrieval condition tree includes atomic condition nodes (leaf nodes) and logical operator nodes, and the retrieval condition tree can be recombined based on the relationship between the leaf nodes and logical operator nodes to obtain each sub-retrieval formula corresponding to the target retrieval formula.
[0025] In a specific embodiment, the disassembling and reorganizing operation on the retrieval condition tree according to the preset disassembling principle and the leaf nodes to obtain several sub-retrieval expressions corresponding to the target retrieval expression may include: disassembling the retrieval condition tree based on the preset disassembling principle to obtain several logical operator nodes and several leaf nodes; determining any one logical operator node as the current root node, and intercepting the complete subtree below the current root node in the retrieval condition tree to obtain the sub-condition tree corresponding to the retrieval condition tree; converting the sub-condition tree into a corresponding retrieval expression to obtain several sub-retrieval expressions corresponding to the target retrieval expression; wherein, the converting the sub-condition tree into a corresponding retrieval expression may include: screening out the current sub-condition tree from the storage space based on the globally unique identifier corresponding to the sub-condition tree, and converting the current sub-condition tree into a corresponding retrieval expression; wherein, each sub-condition tree constructs a key-value pair based on the assigned globally unique identifier, and registers the sub-condition tree in the hash map in the form of a key-value pair to store all the sub-condition trees corresponding to the retrieval condition tree in the storage space. Specifically, the retrieval condition tree can be disassembled into each leaf node and each logical operator node based on the disassembling principle; it can be understood that a single logical operator node is connected to several leaf nodes and / or connected to other logical operator nodes; in other words, each node representing the logical relationship between conditions is bound to its subsequent nodes and can be divided into the same subtree. In this way, any logical operator node can be determined as the root node of a subtree; then, the complete subtree below the root node is intercepted in the retrieval condition tree, that is, the sub-condition tree corresponding to the root node is obtained. Further, it is necessary to convert the sub-condition tree into a corresponding retrieval expression to obtain the sub-retrieval expression corresponding to the target retrieval expression. In some embodiments, after obtaining the sub-condition tree, a globally unique ID (Identity Document, globally unique identifier, using the unique ID of the current root node of the original retrieval condition tree) can be assigned to each sub-condition tree, and registered in the hash map in the form of <ID, sub-condition tree> key-value pair to support fast retrieval and update with O(1) complexity. Correspondingly, when it is necessary to convert the sub-condition tree into a corresponding retrieval expression, the corresponding current sub-condition tree is found using the globally unique identifier corresponding to the sub-condition tree, and the current sub-condition tree is converted into a corresponding retrieval expression.
[0026] Step S14, based on the retrieval operation instruction corresponding to the target retrieval expression, perform a retrieval operation on the medical data using the target retrieval expression and / or several sub-retrieval expressions to obtain a corresponding data retrieval result.
[0027] In this embodiment, the target search formula can be disassembled and recombined through the above steps to obtain several corresponding sub-search formulas; then, the target search formula, or the sub-search formulas, or both can be used to search the medical data, and this process needs to refer to the search operation instructions corresponding to the target search formula given by the user; which search formulas to use for the search is determined according to the search operation instructions.
[0028] In a specific embodiment, the step of using the target search formula and / or several of the sub-search formulas to perform a search operation on the medical data to obtain a corresponding data search result may include: using the target search formula and / or several of the sub-search formulas to perform a search operation on the medical data to obtain a corresponding data hit situation; generating a corresponding data search result according to the relationship between the data hit situation and the global unique identifiers in the hash mapping table. Specifically, after using the target search formula and / or the sub-search formulas to search the relevant medical data to obtain a corresponding data hit situation, it is necessary to consider the relationship between the data hit situation and the search formulas corresponding to the global unique identifiers in the hash mapping table to generate a clear data search result.
[0029] In another specific embodiment, the step of using the target search formula and / or several of the sub-search formulas to perform a search operation on the medical data based on the search operation instructions corresponding to the target search formula may include: obtaining the search operation instructions for the target search formula through a preset interaction interface; if the search operation instructions are of the first type, performing a search operation on the medical data based on the target search formula; if the search operation instructions are of the second type, asynchronously invoking relevant search interfaces based on several of the sub-search formulas to perform search operations on the medical data respectively; if the search operation instructions are of the third type, asynchronously invoking relevant search interfaces based on the target search formula and several of the sub-search formulas to perform search operations on the medical data respectively. Specifically, during the search operation process, different search operations are triggered according to different search operation instructions; among them, if the search operation instructions are of the first type corresponding to the target search formula, the target search formula can be directly used for the search operation; correspondingly, if the search operation instructions are of the second type corresponding only to several sub-search formulas, it is necessary to asynchronously invoke relevant search interfaces and use the relevant sub-search formulas for the search operation respectively; further, for the search operation instructions of the third type corresponding to both the target search formula and several sub-search formulas, it is also necessary to asynchronously invoke relevant search interfaces and use these search formulas for the search operation respectively. The above steps can flexibly adapt to the actual search requirements and improve the search effect.
[0030] In yet another specific implementation, if the retrieval operation instruction is a second type of instruction or a third type of instruction, obtaining the corresponding data retrieval result may include: determining all the retrieval results fed back by each of the asynchronously called retrieval interfaces as the data retrieval result corresponding to the target retrieval formula. Specifically, if a retrieval operation is directly performed using the target retrieval formula, the corresponding retrieval result can be directly obtained; while when the retrieval operation instruction is a second type of instruction or a third type of instruction, since different retrieval interfaces are asynchronously called, several feedback results need to be further integrated and processed. It can be understood that when asynchronously calling the backend retrieval interface, multi-threaded parallel calls can be used to ensure that the retrieval requests corresponding to each sub-condition tree do not block each other; afterwards, it is necessary to ensure that the hit situation of each sub-condition tree is strongly associated with its globally unique identifier, integrate the retrieval results corresponding to each retrieval request, ensure the real-time synchronization of data and views, and render the relevant retrieval situation to the interactive page for the user to intuitively understand the retrieval situation.
[0031] In a specific embodiment, after obtaining several sub-retrieval formulas corresponding to the target retrieval formula through the steps in the above embodiment, the medical data can be automatically retrieved using each retrieval formula (the target retrieval formula and the sub-retrieval formulas), and the corresponding retrieval results can be obtained in real time; and the obtained retrieval results are respectively displayed in real time on the interactive page for the user to view; this can efficiently display the retrieval results corresponding to each retrieval formula, shorten the waiting time in the medical data retrieval process, and improve the user experience.
[0032] Thus, it can be seen that the present application can disassemble and reorganize the target retrieval formula for retrieving medical data to obtain each sub-retrieval formula, and then retrieve the medical data according to the retrieval operation instruction issued by the user, combining the target retrieval formula and each sub-retrieval formula; the obtained retrieval results include the retrieval situations under different combinations of retrieval conditions, which is convenient for the user to intuitively understand the dynamic changes between the retrieval situation of medical data and the retrieval formula. The user can flexibly optimize the retrieval conditions according to the real-time feedback, screen the medical data that meets the requirements, and improve the retrieval efficiency and practicability of medical data.
[0033] As Figure 2 shown, the embodiment of the present application discloses a retrieval method, which specifically includes: In this embodiment, during the process of a user editing a medical data search formula, considering that frequent calls to page interfaces may cause negative effects such as system lag and resource waste, a trigger mechanism is adopted here. Specifically, in the normal process of editing conditions, the system does not automatically trigger an interface query. Instead, the function of viewing the number of patients who meet the criteria (the search operation instruction in the above embodiment) is set to be enabled or disabled by the user actively clicking a button. Then, when the search button is clicked, it jumps to the search page. In this way, it not only ensures that users can obtain detailed data as needed but also avoids the drawback that the system operation efficiency is greatly reduced due to excessive and frequent interface calls, making the entire search process more stable and efficient.
[0034] Specifically, when the user normally edits the search conditions and clicks the button for the number of patients who meet the criteria, the system will lock the search operation, that is, disable related functions such as editing and deleting to prevent the conditions from being modified during the process of searching for the number of patients who meet the criteria, resulting in inconsistent search results with the conditions. Then, the target search formula submitted by the user can be converted into a corresponding search condition tree, and then breadth-first traversal and node classification are performed on this search condition tree. Specifically, the breadth-first search algorithm (BFS) can be used to traverse the condition tree structure layer by layer and dynamically identify two types of core nodes. The two types of core nodes include logical operator nodes and atomic condition nodes. Among them, logical operator nodes contain AND / OR operators, which are used to define the logical relationship between sub-conditions. Atomic condition nodes, that is, leaf nodes, represent search conditions that cannot be further divided (such as age > 50). Further, during the process of dynamically generating a sub-condition tree based on the search condition tree corresponding to the target search formula, it includes three parts: root node extraction, hierarchical structure retention, and unique identifier mapping. Among them, for root node extraction, specifically, each logical operator node and atomic condition node can be used as the root node of an independent sub-condition tree. Hierarchical structure retention is to take the current node as the root and intercept its complete subtree downward (including all sub-nodes and associated logic) to generate a logically closed sub-condition tree unit. Unique identifier mapping is to assign a globally unique identifier to each sub-condition tree and register it in the hash mapping table in the form of key-value pairs to support fast retrieval and update.
[0035] Further, the processed condition tree needs to be converted into a standard search formula data structure. Specifically, the split sub-condition tree can be converted into a standardized JSON (JavaScript Object Notation, a lightweight data exchange format) structure to achieve serialization of the sub-condition tree.
[0036] After the condition tree is disassembled, the sub-condition tree can asynchronously call the backend search interface according to the search operation instruction to obtain the corresponding number of hit patients; specifically, Promise (an asynchronous programming solution used to replace traditional callback functions and event listeners) technology can be used to implement multi-threaded parallel calls to ensure that the search requests of each sub-condition tree do not block each other; accordingly, the backend interface can be designed based on the RESTful (client- and server-based architecture) architecture, receive the query parameters of the sub-condition tree, and return the number of hits. It should be pointed out that the independent hit number of each sub-condition tree needs to be strongly associated with the global unique identifier in the hash map to achieve real-time synchronization of data and view.
[0037] In a specific embodiment, when editing a search formula for medical data, the user clicks on the number of patients to trigger the disassembly and reassembly of the search formula and view the number of patients that match the condition in real time. This allows the user to understand the effect of condition screening in advance and, combined with real-time feedback, determine whether the search condition needs to be adjusted. In this process, to ensure the consistency between the search formula and the search results, operations related to the search formula are disabled. Furthermore, the hit number button can be clicked again to cancel the display of the hit number and restore the condition editing function. Figure 3 and Figure 4 The following table shows the search results of the search condition tree before and after clicking "Number of hits", where "and" is a logical operator node; the following "gender name", "patient type", etc. are all leaf nodes, that is, indivisible search conditions. After clicking "Number of hits", the corresponding number of patient hits is displayed before the search condition.
[0038] It can be seen that this application can be based on the traversal and reorganization technology of the tree structure, and the search condition tree corresponding to the search formula for medical patient data issued by the user can be split into several sub-condition trees, that is, the conditions are decomposed into independent subtrees to realize independent data retrieval of each node; and the back-end interface can be called to obtain the patient number data, and displayed on the page in time, so that users can intuitively understand the dynamic changes of medical data with the adjustment of the search formula. Furthermore, in the retrieval process, in order to reduce the market for users to wait for page responses, when searching the several sub-condition trees after the splitting separately, asynchronous calls can be used to initiate calls to multiple interfaces separately; after the feedback structures of all interfaces are returned, the data will be uniformly rendered to the page for display, which improves the retrieval efficiency and practicality of medical data.
[0039] like Figure 5 As shown, the embodiment of the present application discloses a retrieval device, including: A search formula determination module 11, used to determine a target search formula for retrieving medical data; A search condition tree traversal module 12, used to traverse the search condition tree corresponding to the target search formula to determine the leaf nodes of the search condition tree; A conditional tree processing module 13 is configured to disassemble and reorganize the retrieval conditional tree according to a preset disassembling principle and the leaf nodes, so as to obtain a plurality of sub-retrieval expressions corresponding to the target retrieval expression; the preset disassembling principle is a principle for disassembling a conditional tree into a plurality of sub-trees based on the relationship between leaf nodes and logical operator nodes in the conditional tree; A retrieval module 14 is configured to perform a retrieval operation on the medical data by using the target retrieval expression and / or a plurality of the sub-retrieval expressions based on a retrieval operation instruction corresponding to the target retrieval expression, so as to obtain a corresponding data retrieval result.
[0040] It can be seen that the present application can disassemble and reorganize a target retrieval expression for retrieving medical data to obtain each sub-retrieval expression, and then combine the target retrieval expression and each sub-retrieval expression to retrieve the medical data; the retrieval result obtained in this way includes retrieval situations under different retrieval condition combinations, and can intuitively understand the dynamic changes of medical data, improving the retrieval efficiency and practicability of medical data.
[0041] In a specific embodiment, the retrieval expression determination module 11 may include: A retrieval expression editing unit is configured to obtain a retrieval expression editing instruction through a preset retrieval expression editing window, and update the retrieval expression based on the retrieval expression editing instruction to obtain a current retrieval expression; A retrieval expression determination unit is configured to determine the current retrieval expression as a target retrieval expression for retrieving medical data when a command indicating the start of a retrieval operation is obtained.
[0042] In a specific embodiment, the retrieval conditional tree traversal module 12 may include: A conditional tree conversion unit is configured to convert the target retrieval expression into a tree structure to obtain a retrieval conditional tree; A retrieval conditional tree traversal unit is configured to perform a layer-by-layer traversal on the retrieval conditional tree by using a preset search algorithm, and identify information of each node in the retrieval conditional tree to determine corresponding leaf nodes.
[0043] In a specific embodiment, the conditional tree processing module 13 may include: A conditional tree disassembly unit is configured to perform a disassembly operation on the retrieval conditional tree based on a preset disassembly principle to obtain a plurality of logical operator nodes and a plurality of the leaf nodes; A sub-tree intercepting unit is configured to determine any one logical operator node as a current root node, and intercept a complete sub-tree below the current root node in the retrieval conditional tree to obtain a sub-conditional tree corresponding to the retrieval conditional tree; A retrieval expression conversion sub-module is configured to convert the sub-conditional tree into a corresponding retrieval expression to obtain a plurality of sub-retrieval expressions corresponding to the target retrieval expression; Among them, the retrieval formula conversion sub-module may include: A retrieval formula conversion unit, configured to screen out the current sub-condition tree from the storage space based on the globally unique identifier corresponding to the sub-condition tree, and convert the current sub-condition tree into a corresponding retrieval formula; Among them, each sub-condition tree constructs key-value pairs based on the assigned globally unique identifier, and registers the sub-condition tree in the hash map in the form of key-value pairs, so as to store all the sub-condition trees corresponding to the retrieval condition tree in the storage space.
[0044] In another specific embodiment, the retrieval module 14 may include: A retrieval sub-module, configured to perform a retrieval operation on the medical data by using the target retrieval formula and / or several sub-retrieval formulas, and obtain the corresponding data hit situation; A retrieval result generation unit, configured to generate a corresponding data retrieval result according to the relationship between the data hit situation and the globally unique identifiers in the hash map.
[0045] In a specific embodiment, the retrieval module 14 may include: A retrieval operation instruction acquisition unit, configured to acquire a retrieval operation instruction for the target retrieval formula through a preset interaction interface; A first retrieval unit, configured to perform a retrieval operation on the medical data based on the target retrieval formula when the retrieval operation instruction is a first type of instruction; A second retrieval unit, configured to asynchronously call relevant retrieval interfaces based on several sub-retrieval formulas to perform retrieval operations on the medical data respectively when the retrieval operation instruction is a second type of instruction; A third retrieval unit, configured to asynchronously call relevant retrieval interfaces based on the target retrieval formula and several sub-retrieval formulas to perform retrieval operations on the medical data respectively when the retrieval operation instruction is a third type of instruction.
[0046] In another specific embodiment, the device may include: A retrieval result determination unit, configured to determine all the retrieval results fed back by the asynchronously called retrieval interfaces as the data retrieval result corresponding to the target retrieval formula.
[0047] Furthermore, an embodiment of the present application also discloses an electronic device, Figure 6 It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment, and the content in the figure cannot be considered as any limitation to the scope of use of the present application.
[0048] Figure 6Schematic diagram of the structure of an electronic device 20 provided by an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the retrieval method disclosed in any of the foregoing embodiments. Additionally, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0049] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of the present application, and specific limitations are not imposed here; the input / output interface 25 is used to obtain external input data or output data to the outside, and its specific interface type can be selected according to specific application requirements, and no specific limitations are made here.
[0050] In addition, as a carrier for resource storage, the memory 22 can be a read-only memory, a random access memory, a magnetic disk, or an optical disc, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be short-term storage or permanent storage.
[0051] Among them, the operating system 221 is used to manage and control each hardware device on the electronic device 20 and the computer program 222, and it can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the retrieval method executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program that can be used to complete other specific tasks.
[0052] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the retrieval method disclosed above is implemented. For the specific steps of this method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details are not repeated here.
[0053] In this specification, the various embodiments are described in a progressive manner, and the key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0054] Those skilled in the art may further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner 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 implementation should not be considered to exceed the scope of this application.
[0055] The steps of the methods or algorithms described in combination with the embodiments disclosed herein can be directly implemented by hardware, software modules executed by a processor, or a combination of the two. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.
[0056] Finally, it should also be noted that in this document, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.
[0057] The technical solutions provided in this application have been introduced in detail above. Specific examples have been used herein to elaborate on the principles and implementation manners of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to this application.
Claims
1. A retrieval method, characterized in that, Including: Determine a target retrieval formula for retrieving medical data; Traverse the retrieval condition tree corresponding to the target retrieval formula to determine the leaf nodes of the retrieval condition tree; According to a preset disassembling principle and the leaf nodes, perform disassembling and recombination operations on the retrieval condition tree to obtain several sub-retrieval formulas corresponding to the target retrieval formula; the preset disassembling principle is a principle for disassembling a condition tree into several sub-trees constructed based on the relationship between leaf nodes and logical operator nodes in the condition tree; Based on the retrieval operation instruction corresponding to the target retrieval formula, use the target retrieval formula and / or several of the sub-retrieval formulas to perform a retrieval operation on the medical data to obtain a corresponding data retrieval result.
2. The retrieval method according to claim 1, wherein The determination of the target retrieval formula for retrieving medical data includes: Obtain a retrieval formula editing instruction through a preset retrieval formula editing window, and update the retrieval formula based on the retrieval formula editing instruction to obtain the current retrieval formula; If a command indicating the start of a retrieval operation is obtained, determine the current retrieval formula as the target retrieval formula for retrieving medical data.
3. The retrieval method according to claim 1, wherein The traversing of the retrieval condition tree corresponding to the target retrieval formula to determine the leaf nodes of the retrieval condition tree includes: Convert the target retrieval formula into a tree structure to obtain a retrieval condition tree; Use a preset search algorithm to traverse the retrieval condition tree layer by layer, and identify the information of each node in the retrieval condition tree to determine the corresponding leaf nodes.
4. The retrieval method according to claim 1, wherein The performing of disassembling and recombination operations on the retrieval condition tree according to the preset disassembling principle and the leaf nodes to obtain several sub-retrieval formulas corresponding to the target retrieval formula includes: Perform a disassembling operation on the retrieval condition tree based on the preset disassembling principle to obtain several logical operator nodes and several of the leaf nodes; Determine any one of the logical operator nodes as the current root node, and intercept the complete sub-tree below the current root node in the retrieval condition tree to obtain a sub-condition tree corresponding to the retrieval condition tree; Convert the sub-condition tree into a corresponding retrieval formula to obtain several sub-retrieval formulas corresponding to the target retrieval formula; Among them, the conversion of the sub-condition tree into a corresponding retrieval formula includes: Screen out the current sub-condition tree from the storage space based on the globally unique identifier corresponding to the sub-condition tree, and convert the current sub-condition tree into a corresponding retrieval formula; Among them, each sub-condition tree constructs a key-value pair based on the globally unique identifier assigned to it, and registers the sub-condition tree in the hash map in the form of the key-value pair to store all the sub-condition trees corresponding to the retrieval condition tree in the storage space.
5. The retrieval method according to claim 4, characterized in that, The performing of a retrieval operation on the medical data using the target retrieval formula and / or several of the sub-retrieval formulas to obtain a corresponding data retrieval result includes: Use the target retrieval formula and / or several of the sub-retrieval formulas to perform a retrieval operation on the medical data to obtain a corresponding data hit situation; Generate a corresponding data retrieval result according to the relationship between the data hit situation and the globally unique identifiers in the hash map.
6. The retrieval method according to any one of claims 1 to 5, characterized in that Performing a retrieval operation on the medical data by using the retrieval operation instruction corresponding to the target retrieval formula, including using the target retrieval formula and / or several of the sub-retrieval formulas, includes: Obtaining a retrieval operation instruction for the target retrieval formula through a preset interaction interface; If the retrieval operation instruction is a first type of instruction, performing a retrieval operation on the medical data based on the target retrieval formula; If the retrieval operation instruction is a second type of instruction, asynchronously invoking relevant retrieval interfaces based on several of the sub-retrieval formulas to perform retrieval operations on the medical data respectively; If the retrieval operation instruction is a third type of instruction, asynchronously invoking relevant retrieval interfaces based on the target retrieval formula and several of the sub-retrieval formulas to perform retrieval operations on the medical data respectively.
7. The retrieval method according to claim 6, wherein If the retrieval operation instruction is a second type of instruction or a third type of instruction, obtaining the corresponding data retrieval result, including: Determining all the retrieval results fed back by the asynchronously invoked retrieval interfaces as the data retrieval result corresponding to the target retrieval formula.
8. A retrieval device, characterized in that, Includes: A retrieval formula determination module, configured to determine a target retrieval formula for retrieving medical data; A retrieval condition tree traversal module, configured to traverse the retrieval condition tree corresponding to the target retrieval formula to determine the leaf nodes of the retrieval condition tree; A condition tree processing module, configured to disassemble and reorganize the retrieval condition tree according to a preset disassembling principle and the leaf nodes to obtain several sub-retrieval formulas corresponding to the target retrieval formula; the preset disassembling principle is a principle for disassembling a condition tree into several sub-trees constructed based on the relationship between the leaf nodes and the logical operator nodes in the condition tree; A retrieval module, configured to perform a retrieval operation on the medical data by using the retrieval operation instruction corresponding to the target retrieval formula, using the target retrieval formula and / or several of the sub-retrieval formulas, to obtain the corresponding data retrieval result.
9. An electronic device, characterized in that, Includes: A memory, configured to store a computer program; A processor, configured to execute the computer program to implement the retrieval method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, For storing a computer program, the computer program, when executed by a processor, implements the retrieval method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Big-data processing method capable of supporting multi-condition retrieval and real-time analysis
CN107122437A
Cache data searching method and device
CN111625564A
Patent retrieval type coding method and device and storage medium
CN113434625A
Method and device for acquiring retrieval condition tree corresponding to medical data, equipment and medium
CN115458178A
Text novelty detection method and device, electronic equipment and readable storage medium
CN115879441A