Sample result query method, sample analyzer and storage medium
By splitting the database data table into multiple data subtables in parallel query, the inefficiency of query and page switching delay when the database data is large is solved, and efficient data query and instant page display are achieved.
Patent Information
- Application Number
- CN202311836747.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2025-07-01
AI Technical Summary
In the case where the database data volume is large, data query efficiency is inefficient and the page switching is extended.
By splitting the database data table into multiple data subtables, forming a data subtable collection, and using sample query conditions to filter out the target data subtables from the data subtable collection, performing parallel query processing, and the results are stored in the cache space and displayed after the query operation is completed.
It greatly improves the efficiency of data query, avoids delays during switching of different pages, and improves user experience.
Smart Images

Figure CN120234340A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and particularly to a method for querying results of samples, a sample analyzer, and a storage medium. Background Art
[0002] Data query refers to extracting specified field values from a large amount of data and using the specified field values as the query results of the data query. Currently, the following two methods are generally adopted for data query of web pages:
[0003] The first method is to query all data in the database during the initialization of the query program, and then add all the data to the cache space. When the user performs a result query, the corresponding data can be directly obtained from the cache space, and then the obtained data is paged, and the paged result is returned to the front-end interface for display to the user.
[0004] The second method is that when the user performs a result query, only the data of the current page is queried in the database, and then the result of the current page is returned to the front-end interface for display to the user. When querying the results of the previous page or the next page, it is necessary to query again in the database.
[0005] In the case of a large amount of data in the database, the first method requires the relevant query software to query all the data in the database during initialization, resulting in a long query time and low query efficiency. The second method requires re-querying when switching between different pages, resulting in a large delay. Summary of the Invention
[0006] This application provides a method for querying results of samples, a sample analyzer, and a storage medium, which can solve or partially solve the problems of low efficiency of data query and obvious delay in the process of switching between different pages in the related art when the amount of data in the database is large.
[0007] In the first aspect of this application, a method for querying results of samples is provided, which is characterized in that it is applied to a sample analyzer, and the sample analyzer includes a database and a cache space. The database includes a set of data sub-tables, including:
[0008] Obtain the sample query conditions input by the user in the data query interface, and generate a data query task using the sample query conditions;
[0009] Send the data query task to the database, and obtain the target data sub-table corresponding to the sample query conditions from the set of data sub-tables;
[0010] Perform a query operation on each of the target data sub-tables according to the sample query conditions until the query operation is completed, obtain a target query result, and store the target query result in the cache space;
[0011] Display the target query result in the cache space on the data query interface.
[0012] In one embodiment, obtaining the target data sub-table corresponding to the sample query condition from the set of data sub-tables includes:
[0013] Use the data sub-table in the set of data sub-tables that corresponds to the sample query condition as the target data sub-table;
[0014] Wherein, the set of data sub-tables is a set including several data sub-tables, and each of the data sub-tables is arranged according to preset arrangement information.
[0015] In one embodiment, performing a query operation on each of the target data sub-tables according to the sample query conditions until the query operation is completed, obtaining a target query result, and storing the target query result in the cache space includes:
[0016] Perform a query operation on each of the target data sub-tables, and screen out the sub-table results that match the sample query conditions from each of the target data sub-tables until the query operation is completed;
[0017] Integrate the sub-table results of each of the target data sub-tables to obtain the target query result, and store the target query result in the cache space.
[0018] In one embodiment, integrating the sub-table results of each of the target data sub-tables to obtain the target query result, and storing the target query result in the cache space includes:
[0019] Sort the sub-table results of each of the target data sub-tables according to a preset sorting strategy to obtain the result serial numbers of each of the sub-table results;
[0020] Use the result serial numbers to merge each of the sub-table results, use the merged sub-table results as the target query result, and store it in the cache space.
[0021] In one embodiment, the data query interface includes a scroll bar control, and displaying the target query result in the cache space on the data query interface includes:
[0022] Respond to the sliding operation performed by the user on the scroll bar control to obtain the first-page display quantity of the data query interface;
[0023] Determine the first-page query range using the first-page display quantity and the result serial number, sequentially extract the target query results within the first-page query range from the cache space, and display the target query results on the data query interface.
[0024] In one embodiment, the cache space further includes a display list. After determining the first-page query range using the first-page display quantity and the result serial number, sequentially extracting the target query results within the first-page query range from the cache space, and displaying the target query results on the data query interface, it further includes:
[0025] Fill the remaining target query results and the result serial numbers of the remaining target query results into the display list;
[0026] In response to the paging operation performed by the user on the data query interface, calculate the query quantity corresponding to the paging operation;
[0027] Sequentially extract the target query results matching the query quantity from the display list, and display the target query results on the data query interface.
[0028] In one embodiment, the data integration of the sub-table results of each of the target data sub-tables to obtain the target query results and store the target query results in the cache space includes:
[0029] Group the sub-table results of each of the target data sub-tables using preset grouping information to obtain several groups of query result groupings and the page numbers corresponding to the query result groupings;
[0030] Merge each of the query result groupings using the page numbers, and use the merged query result groupings as the target query results and store them in the cache space.
[0031] In one embodiment, the preset grouping information includes the page display quantity. The grouping of the sub-table results of each of the target data sub-tables using the preset grouping information to obtain several groups of query result groupings and the page numbers corresponding to the query result groupings includes:
[0032] Obtain the quantity of the sub-table results from the cache space;
[0033] Group the sub-table results of each of the target data sub-tables using the page display quantity and the quantity of the sub-table results to generate the query result groupings;
[0034] Number the grouped query results in the chronological order of generation of the query result groups to obtain the page numbers of the query result groups;
[0035] Wherein, the number of results per page is the number of results on each page displayed on the data query interface.
[0036] In one embodiment, the step of displaying the target query results in the cache space on the data query interface includes:
[0037] In response to a user operation performed by the user on the data query interface, obtain the page code corresponding to the user operation;
[0038] Read the grouped query results associated with the page code from the cache space, use the sub-table results in the grouped query results as the target query results, and display them on the data query interface.
[0039] In one embodiment, the data query task includes a single query task, and the method further includes:
[0040] After the single query task is executed, mark the target query results as historical query data, and periodically clean the historical query data.
[0041] In one embodiment, the data query task includes multiple query tasks, and the multiple query tasks include the current query task and the previous query task of the current query task. The method further includes:
[0042] After the current query task is executed, mark the target query results of the previous query task as historical query data, and clean the historical query data in real time.
[0043] A second aspect of the present application provides a sample analyzer, which includes a database and a cache space. The database includes a data sub-table set, including:
[0044] A query task generation module, configured to obtain sample query conditions input by a user on the data query interface, and generate a data query task using the sample query conditions;
[0045] A target data sub-table acquisition module, configured to send a data query task to the database, and acquire a target data sub-table corresponding to the sample query conditions from the data sub-table set;
[0046] A target query result acquisition module, configured to perform a query operation on each of the target data sub-tables according to the sample query condition until the query operation is completed, obtain a target query result, and store the target query result in the cache space;
[0047] A query result display module, configured to display the target query result in the cache space on the data query interface
[0048] A third aspect of the present application provides a computer-readable storage medium, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor is caused to execute the method as described above.
[0049] The technical solution provided by the present application may include the following beneficial effects:
[0050] In an embodiment of the present application, it is applied to a sample analyzer. The sample analyzer includes a database and a cache space. The database includes a set of data sub-tables. Obtain a sample query condition input by a user on a data query interface, generate a data query task using the sample query condition, send the data query task to the database, obtain a target data sub-table corresponding to the sample query condition from the set of data sub-tables, perform a query operation on each target data sub-table according to the sample query condition until the query operation is completed, obtain a target query result, and store the target query result in the cache space, and display the target query result in the cache space on the data query interface. The technical solution provided by the present application can, when the amount of data in the database is large, by splitting the data table into multiple data sub-tables to form a set of data sub-tables, control the amount of data in each data sub-table, screen out the target data sub-table from the set of data sub-tables by using the sample query condition, further reduce the scope of data query, and at the same time perform parallel query processing on each target data sub-table according to the query condition, so as to reduce the query time of multiple target data sub-tables to the query time of one target data sub-table, greatly improving the data query efficiency, and after parallel querying all the query results, directly display the target query result in the cache space on the data query interface, avoiding the problem of time delay in the switching process of different pages.
[0051] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] By describing the exemplary embodiments of the present application in more detail in conjunction with the drawings, the above and other objects, features and advantages of the present application will become more obvious. Among them, in the exemplary embodiments of the present application, the same reference numerals generally represent the same components.
[0053] Figure 1It is a schematic flowchart of a method for querying the results of a sample shown in an embodiment of the present application;
[0054] Figure 2 It is another schematic flowchart of a method for querying the results of a sample shown in an embodiment of the present application;
[0055] Figure 3 It is a schematic flowchart of a method for querying data in parallel shown in an embodiment of the present application;
[0056] Figure 4 It is a schematic structural diagram of a sample analyzer shown in an embodiment of the present application;
[0057] Figure 5 It is another schematic structural diagram of a sample analyzer shown in an embodiment of the present application. Detailed implementation manners
[0058] Hereinafter, the embodiments of the present application will be described in more detail with reference to the accompanying drawings. Although the embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0059] The terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0060] It should be understood that although the terms "first", "second", "third", etc. may be used in the present application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present application, "a plurality" means two or more unless otherwise specifically defined.
[0061] In the current query technology, when the amount of data in the database is large, the relevant query software needs to consume a large amount of query time, resulting in low data query efficiency, and there is an obvious time delay during the process of switching from the current page to the previous page or the next page.
[0062] In view of the above problems, an embodiment of the present application provides a method for querying the results of samples, which can greatly improve the data query efficiency when the amount of data in the database is large, and avoid the obvious time delay during the switching process between different pages.
[0063] The technical solutions of the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0064] Figure 1 is a schematic flowchart of a method for querying the results of samples shown in an embodiment of the present application. Refer to Figure 1 , which is applied to a sample analyzer. The sample analyzer includes a database and a cache space. The database includes a set of data sub-tables. The method at least includes the following steps:
[0065] Step 101, obtain the sample query conditions input by the user on the data query interface, and generate a data query task using the sample query conditions;
[0066] In an embodiment of the present application, the sample analyzer can obtain the sample query conditions input by the user on the data query interface, and generate a data query task using the sample query conditions.
[0067] Among them, the sample analyzer is equipped with a database and a cache space. In the present application, the control computer that actually processes data in the sample analyzer can be integrated with the sample analyzer body, or can be separated from the sample analyzer body.
[0068] The database can be a local database in the sample analyzer, or a remote database configured in the cloud. The database includes multiple sets of data sub-tables. A set of data sub-tables refers to a set including several data sub-tables. For example, set A of data sub-tables includes data sub-table ①, data sub-table ②, and data sub-table ③.
[0069] The cache space can be a physical cache or a virtual cache. For example, the cache of the database, the memory cache, the processor cache, etc. And the cache space also includes a display list, and several query results are filled in the display list. The present application does not limit the type of the cache space.
[0070] Optionally, the data query interface can be a function interface provided by the display screen configured in the sample analyzer. Generally, various interactive controls or text input boxes are set in the data query interface. For example, a scroll bar control, a selection control for clicking the previous page or the next page, etc.
[0071] The sample query conditions can be information related to the sample input by the user on the data query interface. For example, the query conditions required for querying the results of the sample and the query time of the sample.
[0072] As an example, the query condition can be the information entered by the user in the data query interface provided by the relevant query software, which is mainly used to filter out matching results from the database. Assuming the query condition is: search for content containing "light excitation", the relevant query software can traverse all data from the database according to the query condition, and extract the content associated with "light excitation", and store the content associated with "light excitation" as the query result in the preset cache space. The query time can be the date or time interval entered by the user in the data query interface, such as the query time can be a detailed date such as July 3, 2023, July 4, 2023, etc., or it can be a time interval such as July 3, 2023 to July 10, 2023.
[0073] The data query task may be a task generated according to the sample query condition when the sample analyzer receives a query operation performed by the user on the data query interface.
[0074] Step 102, sending a data query task to the database, and obtaining a target data sub-table corresponding to the sample query condition from the data sub-table set;
[0075] In an embodiment of the present application, the sample analyzer may send a data query task to the database, and then obtain a target data sub-table corresponding to the sample query condition from the data sub-table set.
[0076] Optionally, the target data sub-table may be a sub-table selected by the sample analyzer from a plurality of data sub-tables according to a sample query condition.
[0077] Step 103, performing a query operation on each target data sub-table according to the sample query condition until the query operation is completed, obtaining a target query result, and storing the target query result in a cache space;
[0078] In the embodiment of the present application, after the sample analyzer determines the target data sub-table, it can perform query operations on each target data sub-table according to the sample query conditions until the query operation is completed, obtain the target query result, and store the target query result in the cache space.
[0079] Step 104: Display the target query result of the cache space on the data query interface.
[0080] In an embodiment of the present application, the sample analyzer may display the target query results in the cache space on the data query interface. For example, the target query results of the first page may be displayed on the data query interface.
[0081] The technical solution provided by the above-mentioned embodiments of the present application can, when the amount of data in the database is large, control the amount of data in each data sub-table by splitting the data table into multiple data sub-tables to form a data sub-table set, and further reduce the scope of data query by screening out the target data sub-table from the data sub-table set by adopting sample query conditions, and at the same time perform parallel query processing on each target data sub-table according to the query conditions, so as to reduce the query time of multiple target data sub-tables to the query time of one target data sub-table, thereby greatly improving the data query efficiency, and after all query results are queried in parallel, directly display the target query results in the cache space to the data query interface, thereby avoiding the problem of delay in the switching process of different pages.
[0082] Figure 2 It is another flowchart of a sample result query method shown in an embodiment of the present application. Figure 2 relatively Figure 1 The technical solution of the embodiment of the present application is described in more detail. The method may include the following steps:
[0083] Step 201, obtaining a sample query condition input by a user in a data query interface, and generating a data query task using the sample query condition;
[0084] In an embodiment of the present application, the sample analyzer is installed with relevant query software, which has the function of parallel query. Parallel query can query multiple target data sub-tables at the same time, thereby shortening the query time of multiple target data sub-tables to the query time of one data sub-table.
[0085] For example, if three target data sub-tables are obtained from the data sub-table set, the parallel query processing can simultaneously perform data queries on the three target data sub-tables according to the query conditions to obtain target query results corresponding to several pages.
[0086] Step 202, sending a data query task to the database, and obtaining a target data sub-table corresponding to the sample query condition from the data sub-table set;
[0087] In the embodiment of the present application, in addition to the data sub-table, the database also stores various data associated with the sample, such as the sample ID (Identity Document, code), test results, and other instrument operation data.
[0088] The data sub-table set includes several data sub-tables, and each data sub-table is arranged according to preset arrangement information. The relevant query software can use the data sub-table in the data sub-table set that matches the sample query condition as the target data sub-table.
[0089] Optionally, the preset arrangement information may be an arrangement strategy set in advance, for example, arrangement according to a preset time interval.
[0090] As an example, the data are arranged according to a set time interval. If the set time interval is 7 days, the data table can be split into a data sub-table every 7 days to obtain several data sub-tables, and the several data sub-tables are grouped into a set in chronological order.
[0091] Optionally, the display screen of the sample analyzer may provide a data query interface, which may include an input area for inputting a query time or a selection area for selecting a query time. The user may determine the query time in the input area or selection area of the data query interface.
[0092] As an example, the data sub-table set includes data sub-table ①, data sub-table ② and data sub-table ③, and the time of data sub-table ① is from June 3, 2023 to June 9, 2023, the time of data sub-table ② is from June 10, 2023 to June 16, 2023, and the time of data sub-table ③ is from June 17, 2023 to June 23, 2023. If the query time entered by the user in the input area of the data query interface is from June 1, 2023 to June 30, 2023, then data sub-table ① can be used as target data sub-table 1, data sub-table ② can be used as target data sub-table 2, and data sub-table ③ can be used as target data sub-table 3 respectively.
[0093] As another example, if the user does not determine the query time in the input area or the selection area, the relevant query software uses today's date as the query time by default.
[0094] Step 203, performing a query operation on each target data sub-table, and screening sub-table results matching the sample query condition from each target data sub-table, until the query operation is completed;
[0095] In an embodiment of the present application, parallel query operations can be performed on each target data sub-table, and sub-table results that match the sample query conditions can be screened from each target data sub-table until the query operation is completed, thereby accurately selecting the target data sub-table that needs to be queried through the sample query conditions, and performing parallel queries on each data sub-table to ensure the effectiveness of the data query and further improve the efficiency of the data query.
[0096] Among them, the sub-table results can be the results that match the query conditions extracted from each target data sub-table. For example, according to the query time, N data sub-tables are determined from the data sub-table set, namely target data sub-table 1, target data sub-table 2...target data sub-table N. After parallel query processing is performed on target data sub-table 1, target data sub-table 2...target data sub-table N using the query conditions, sub-table result 1 corresponding to target data sub-table 1, sub-table result 2 corresponding to target data sub-table 2...sub-table result N corresponding to target data sub-table N are screened out.
[0097] Step 204, integrating the sub-table results of each target data sub-table to obtain the target query result, and storing the target query result in the cache space;
[0098] In the embodiment of the present application, it is necessary to perform data integration on the sub-table results of each target data sub-table to obtain the target query result, and store the target query result in the cache space.
[0099] In actual applications, data integration can be done in the following two ways:
[0100] (1) Arrange the sub-table results of each target data sub-table according to a preset sorting strategy, obtain the result sequence number of each sub-table result, merge the results of each sub-table using the result sequence number, use the merged sub-table results as the target query result, and store them in the cache space.
[0101] Among them, the preset sorting strategy can be a pre-set strategy for sorting and numbering each query result, such as arranging them in sequence according to the detection time of the sample or the sample ID (Identity Document, code), and numbering them one by one. This application does not limit the actual sorting and numbering methods.
[0102] (ii) using preset grouping information to group the sub-table results of each target data sub-table, obtaining several groups of query result groups and page numbers corresponding to the query result groups, merging the query result groups using the page numbers, using the merged query result groups as the target query results, and storing them in the cache space, so that the sub-table results can be displayed in the data query interface in the form of "per page".
[0103] Among them, the preset grouping information can be information set in advance for paging the sub-table results, which at least includes the number of page displays. The number of page displays is the number of results displayed on each page of the data query interface. Assuming the number of page displays is 20, it means that the number of results displayed on each page is 20.
[0104] In one embodiment, the sub-table results include the number of sub-table results. The relevant query software can obtain the number of sub-table results of the sub-table results from the cache space, group the sub-table results of each target data sub-table using the page display number and the number of sub-table results, generate query result groups, and number the query result groups in sequence according to the chronological order of generating the query result groups to obtain page numbers of the query result groups.
[0105] As an example, assuming that the number of items displayed on a page is 20, and after parallel query of each target data sub-table, 100 sub-table results matching the query conditions are obtained, the relevant query software divides the sub-table results into 5 groups according to the standard of 20 items per page, and then encodes them according to the generation time of the result groups, and each number corresponds to one page.
[0106] Step 205: Display the target query result of the cache space on the data query interface.
[0107] In an embodiment of the present application, the sample analyzer can display the target query results of the cache space on the data query interface, and can select a corresponding method for extracting the query results according to the data format of the target query results, such as independent sub-table results or query result groups.
[0108] If the target query results are stored in the cache space in the form of independent sub-table results, the sample analyzer can obtain the first page display quantity of the data query interface in response to the user's sliding operation on the scroll bar control, use the first page display quantity and the result sequence number to determine the first page query range, extract the target query results within the first page query range from the cache space in sequence, and display the target query results on the data query interface.
[0109] Furthermore, after using the first page display quantity and result serial number to determine the first page query range, extracting the target query results located in the first page query range from the cache space in sequence, and displaying the target query results on the data query interface, the remaining target query results and the result serial numbers of the remaining target query results can also be filled into the display list. When responding to the page turning operation performed by the user on the data query interface, the query quantity corresponding to the page turning operation can be calculated, and then the target query results matching the query quantity can be extracted from the display list in sequence, and the target query results can be displayed on the data query interface.
[0110] The first page display quantity may display the number of results on the first page of the data query interface.
[0111] If the target query result is stored in the cache space in the form of a query result group, the sample analyzer can respond to the user operation performed by the user in the data query interface, obtain the page code corresponding to the user operation, read the query result group associated with the page code from the cache space, use the sub-table results in the query result group as the target query result, and display them on the data query interface.
[0112] For example, assuming that the user operation is a page turning operation, the page turning operation performed by the user is often associated with the page code. For example, the data query interface displays the query results of the third page, and the user touches the "Next Page" control in the interface to perform the page turning operation. Then, after responding to the page turning operation, the relevant query software can obtain the page code corresponding to the page turning operation as the fourth page, read the target query result of the fourth page from the cache space, and return the target query result to the data query interface.
[0113] As an example, after the data query of the target data sub-table is completed, 5 pages containing the target query results are obtained. By default, the target query results of the first page are displayed on the data query interface first. When the user wants to browse the second page, the page turning operation can be implemented by selecting the next page control in the data query interface, and the page code corresponding to the page turning operation is obtained. The target query result corresponding to the page code is read from the cache space, and the target query result is displayed in the data query interface, so that when switching different pages, there is no obvious delay in the display process of different pages, but it is an instant display process.
[0114] In one implementation, the data query task includes a single query task. After the single query task is executed, the target query result is marked as historical query data, and then the historical query data is cleaned up irregularly.
[0115] In one embodiment, the data query task includes multiple query tasks, and the multiple query tasks include the current query task and the previous query task of the current query task. After the current query task is executed, the target query result of the previous query task is marked as historical query data, and the historical query data is cleaned up in real time. For example, if three query tasks need to be executed, the first data can be cleaned up immediately when the second query task is executed, and the second data can be cleaned up immediately when the third query task is executed.
[0116] By automatically cleaning up data, you can avoid abnormal problems caused by excessive memory in terminal devices (such as computers), such as slow system operation, software crashes, file corruption, file loss, computer blue screens, and computer freezes, thereby improving system stability and reliability.
[0117] Reference Figure 3, Figure 3 This is a schematic diagram of a parallel query data process shown in an embodiment of the present application, which may include the following steps:
[0118] S31, when a user performs a data query on a database with a large amount of data through the relevant query software, the relevant query software can receive a data query task, and the data query task includes not only the query conditions and query time input by the user in the data query interface.
[0119] S32, obtaining N target data sub-tables corresponding to the query time from the data sub-table set of the database according to the query time, and then arranging them in the order of target data sub-table 1, target data sub-table 2, ... target data sub-table N.
[0120] S33, performing parallel query processing on the N target data sub-tables, and extracting sub-table results matching the query conditions from the N target data sub-tables, thereby greatly improving the efficiency of data query.
[0121] S34, returning the sub-table results of target data sub-table 1, target data sub-table 2, ... target data sub-table N to the background cache in turn, merging the sub-table results in the background cache, obtaining M result groups or several numbered sub-table results, and using the result groups or sub-table results as the target query results.
[0122] S35, if the user performs a sliding operation or a page turning operation on the data query interface, the target query result corresponding to the sliding operation or the page turning operation is extracted from the background cache, and the target query result is displayed on the data query interface, so that when clicking the previous page or the next page, the result data is directly read from the background cache, and the delay when switching pages is small, thereby improving the user experience.
[0123] It should be noted that the embodiments of the present invention include but are not limited to the above examples. It is understandable that under the guidance of the ideas of the embodiments of the present invention, those skilled in the art can make settings according to actual conditions, and the present invention is not limited to this.
[0124] In the embodiment provided above of the present application, it is applied to a sample analyzer, which includes a database and a cache space. The database includes a set of data sub-tables. The sample query conditions entered by the user in the data query interface are obtained, and a data query task is generated using the sample query conditions. The data query task is sent to the database, and a target data sub-table corresponding to the sample query conditions is obtained from the set of data sub-tables. A query operation is performed on each target data sub-table according to the sample query conditions until the query operation is completed, and a target query result is obtained, and the target query result is stored in the cache space, and the target query result of the cache space is displayed on the data query interface. The technical solution provided by the present application can, when the amount of data in the database is large, control the amount of data in each data sub-table by splitting the data table into multiple data sub-tables to form a data sub-table set, and further reduce the scope of data query by screening out the target data sub-table from the data sub-table set by adopting sample query conditions, and at the same time perform parallel query processing on each target data sub-table according to the query conditions, so as to reduce the query time of multiple target data sub-tables to the query time of one target data sub-table, thereby greatly improving the data query efficiency, and after all query results are queried in parallel, directly display the target query results in the cache space to the data query interface, thereby avoiding the problem of delay in the switching process of different pages.
[0125] Corresponding to the aforementioned application function realization method embodiment, the present application also provides an embodiment of a sample analyzer.
[0126] Figure 4 is a schematic diagram of the structure of a sample analyzer shown in an embodiment of the present application. Figure 4 The sample analyzer is equipped with a database and a cache space. The database includes a set of data sub-tables. The device includes at least the following modules:
[0127] The query task generation module 401 is used to obtain the sample query conditions input by the user in the data query interface and generate a data query task using the sample query conditions;
[0128] The target data sub-table acquisition module 402 is used to send a data query task to the database and acquire a target data sub-table corresponding to the sample query condition from the data sub-table set;
[0129] The target query result acquisition module 403 is used to perform a query operation on each target data sub-table according to the sample query condition until the query operation is completed, obtain the target query result, and store the target query result in the cache space;
[0130] The query result display module 404 is used to display the target query result of the cache space on the data query interface.
[0131] In one embodiment, the target data sub-table acquisition module 402 is configured to:
[0132] Use the data sub-tables in the data sub-table set that correspond to the sample query conditions as the target data sub-tables;
[0133] Wherein, the data sub-table set is a set including several data sub-tables, and each data sub-table is arranged according to preset arrangement information.
[0134] In one embodiment, the target query result acquisition module 403 includes:
[0135] A sub-table result screening sub-module, configured to perform query operations on each target data sub-table, and screen out the sub-table results that match the sample query conditions from each target data sub-table until the query operations are completed;
[0136] A data integration sub-module, configured to integrate the sub-table results of each target data sub-table to obtain a target query result, and store the target query result in a cache space.
[0137] In one embodiment, the data integration sub-module is configured to:
[0138] Sort the sub-table results of each target data sub-table according to a preset sorting strategy to obtain the result serial numbers of each sub-table result;
[0139] Merge each sub-table result using the result serial number, use the merged sub-table result as the target query result, and store it in the cache space.
[0140] In one embodiment, the data query interface includes a scroll bar control, and the query result display module 404 is configured to:
[0141] Respond to the sliding operation performed by the user on the scroll bar control to obtain the display quantity of the first page of the data query interface;
[0142] Use the display quantity of the first page and the result serial number to determine the query range of the first page, sequentially extract the target query results within the query range of the first page from the cache space, and display the target query results on the data query interface.
[0143] In one embodiment, the cache space further includes a display list, and the query result display module 404 is further configured to:
[0144] Fill the remaining target query results and the result serial numbers of the remaining target query results into the display list;
[0145] Respond to the paging operation performed by the user on the data query interface, and calculate the query quantity corresponding to the paging operation;
[0146] Extract target query results that match the query quantity from the display list in sequence, and display the target query results on the data query interface.
[0147] In one implementation, the data integration sub-module is used for:
[0148] Group the sub-table results of each target data sub-table using preset grouping information to obtain several groups of query result groupings and the page numbers corresponding to the query result groupings;
[0149] Merge the query result groupings using the page numbers, use the merged query result groupings as the target query results, and store them in the cache space.
[0150] In one implementation, the preset grouping information includes the page display quantity, and the data integration sub-module is further used for:
[0151] Obtain the sub-table result quantity of the sub-table results from the cache space;
[0152] Group the sub-table results of each target data sub-table using the page display quantity and the sub-table result quantity to generate query result groupings;
[0153] Number the query result groupings in sequence according to the time sequence of generating the query result groupings to obtain the page numbers of the query result groupings;
[0154] Among them, the page display quantity is the result quantity of each page displayed on the data query interface.
[0155] In one implementation, the query result display module 404 is further used for:
[0156] Respond to the user operation performed by the user on the data query interface, and obtain the page code corresponding to the user operation;
[0157] Read the query result grouping associated with the page code from the cache space, use the sub-table results in the query result grouping as the target query results, and display them on the data query interface.
[0158] In one implementation, the data query task includes a single query task, and also includes:
[0159] The first data cleaning module is used for, after the execution of the single query task ends, marking the target query results as historical query data, and periodically cleaning the historical query data.
[0160] In one implementation, the data query task includes multiple query tasks, the multiple query tasks include the current query task and the previous query task of the current query task, and also includes:
[0161] The second data cleaning module is used to mark the target query result of the previous query task as historical query data after the execution of the current query task ends, and perform data cleaning on the historical query data in real time.
[0162] Figure 5 It is another structural schematic diagram of a sample analyzer shown in an embodiment of the present application.
[0163] See Figure 5 , the sample analyzer 500 includes a memory 510 and a processor 520.
[0164] The processor 520 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0165] The memory 510 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, the ROM may store static data or instructions required by the processor 520 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even when the computer is powered off. In some embodiments, the permanent storage device employs a mass storage device (such as a magnetic or optical disk, flash memory) as the permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as dynamic random access memory. The system memory may store some or all of the instructions and data required by the processor during operation. In addition, the memory 510 may include any combination of computer-readable storage media, including various types of semiconductor storage chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and magnetic disks and / or optical disks may also be used. In some embodiments, the memory 510 may include a removable storage device that is readable and / or writable, such as a compact disc (CD), read-only digital versatile disc (such as DVD-ROM, dual-layer DVD-ROM), read-only Blu-ray disc, super density disc, flash memory card (such as SD card, min SD card, Micro-SD card, etc.), magnetic floppy disk, etc. Computer-readable storage media do not include carrier waves and instantaneous electronic signals transmitted wirelessly or by wire.
[0166] Executable code is stored on the memory 510, and when the executable code is processed by the processor 520, it can cause the processor 520 to execute some or all of the methods described above.
[0167] In addition, the method according to the present application may also be implemented as a computer program or computer program product, which includes computer program code instructions for executing some or all of the steps of the above method of the present application.
[0168] Alternatively, the present application may also be implemented as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium), on which executable code (or computer program or computer instruction code) is stored. When the executable code (or computer program or computer instruction code) is executed by a processor of an electronic device (or server, etc.), it causes the processor to execute some or all of the steps of the above method according to the present application.
[0169] The embodiments of the present application have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations are obvious to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, the practical application, or the improvement of technologies in the market, or to enable other ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for querying the result of a sample, characterized in that, Applied to a sample analyzer, the sample analyzer is provided with a database and a cache space, the database includes a set of data sub-tables, including: Obtain the sample query conditions input by the user on the data query interface, and generate a data query task using the sample query conditions; Send the data query task to the database, and obtain the target data sub-table corresponding to the sample query conditions from the set of data sub-tables; Perform a query operation on each of the target data sub-tables according to the sample query conditions until the query operation is completed, obtain the target query result, and store the target query result in the cache space; Display the target query result in the cache space on the data query interface.
2. The method according to claim 1, wherein The obtaining the target data sub-table corresponding to the sample query conditions from the set of data sub-tables includes: Regarding the data sub-table corresponding to the sample query conditions in the set of data sub-tables as the target data sub-table; Wherein, the set of data sub-tables is a set including several data sub-tables, and each of the data sub-tables is arranged according to the preset arrangement information.
3. The method according to claim 1, characterized in that The performing a query operation on each of the target data sub-tables according to the sample query conditions until the query operation is completed, obtaining the target query result, and storing the target query result in the cache space includes: Perform a query operation on each of the target data sub-tables, and filter out the sub-table results that match the sample query conditions from each of the target data sub-tables until the query operation is completed; Integrate the sub-table results of each of the target data sub-tables to obtain the target query result, and store the target query result in the cache space.
4. The method according to claim 3, wherein The integrating the sub-table results of each of the target data sub-tables to obtain the target query result, and storing the target query result in the cache space includes: Sort the sub-table results of each of the target data sub-tables according to the preset sorting strategy to obtain the result serial numbers of each of the sub-table results; Merge each of the sub-table results using the result serial numbers, regard the merged sub-table result as the target query result, and store it in the cache space.
5. The method according to claim 4, characterized in that, The data query interface includes a scroll bar control, and the displaying the target query result in the cache space on the data query interface includes: Respond to the sliding operation performed by the user on the scroll bar control to obtain the first-page display quantity of the data query interface; Determine the first-page query range using the first-page display quantity and the result serial numbers, sequentially extract the target query results within the first-page query range from the cache space, and display the target query results on the data query interface.
6. The method according to claim 5, characterized in that, The cache space further includes a display list. After determining the first-page query range using the first-page display quantity and the result serial numbers, sequentially extracting the target query results within the first-page query range from the cache space, and displaying the target query results on the data query interface, it further includes: Fill the remaining target query results and the result serial numbers of the remaining target query results into the display list; In response to the paging operation performed by the user on the data query interface, calculate the query quantity corresponding to the paging operation; Sequentially extract target query results matching the query quantity from the display list, and display the target query results on the data query interface.
7. The method according to claim 3, characterized in that, The data integration of the sub-table results of each of the target data sub-tables to obtain the target query results and store the target query results in the cache space includes: Group the sub-table results of each of the target data sub-tables using preset grouping information to obtain several groups of query result groups and the page numbers corresponding to the query result groups; Merge each of the query result groups using the page numbers, and use the merged query result groups as the target query results and store them in the cache space.
8. The method according to claim 7, characterized in that, The preset grouping information includes the page display quantity. The grouping of the sub-table results of each of the target data sub-tables using the preset grouping information to obtain several groups of query result groups and the page numbers corresponding to the query result groups includes: Obtain the quantity of the sub-table results from the cache space; Group the sub-table results of each of the target data sub-tables using the page display quantity and the sub-table result quantity to generate the query result groups; Number the query result groups in sequence according to the chronological order of generating the query result groups to obtain the page numbers of the query result groups; Wherein, the page display quantity is the quantity of results on each page displayed on the data query interface.
9. A sample analyzer, characterized in that, The sample analyzer is provided with a database and a cache space. The database includes a data sub-table set, including: A query task generation module, configured to obtain the sample query conditions input by the user on the data query interface and generate a data query task using the sample query conditions; A target data sub-table acquisition module, configured to send the data query task to the database and obtain the target data sub-tables corresponding to the sample query conditions from the data sub-table set; A target query result acquisition module, configured to perform query operations on each of the target data sub-tables according to the sample query conditions until the query operations are completed, obtain the target query results, and store the target query results in the cache space; A query result display module, configured to display the target query results in the cache space on the data query interface.
10. A computer-readable storage medium, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor is caused to execute the method according to any one of claims 1-8.
Citation Information
Patent Citations
Data query device and method of querying data
CN106649435A
A response method and device of a query operation
CN109947827A
Data query method and device, computer equipment and storage medium
CN116450669A