A method, apparatus, electronic device, and storage medium for managing a master index based on a dynamic storage model.

By dynamically selecting and managing storage sources, the problems of insufficient resource utilization and difficult storage mode to adapt to changes in hospital volume in the existing technology are solved, and the flexibility of maximum resource utilization and data storage is achieved.

CN119293043BActive Publication Date: 2025-02-25CHENGDU MEDICAL STAR TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411806293.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-02-25
Estimated Expiration
2044-12-10

AI Technical Summary

Technical Problem

The prior art is difficult to dynamically adjust the storage model of the main index business system according to the size of the hospital and the hardware and software resources, resulting in waste or shortage of resources, and it is difficult to meet the needs of the hospital's use at various stages.

Method used

Provide a main index management method based on dynamic storage mode. By creating multiple storage source connections, verifying the effectiveness of storage source, and dynamically selecting the default storage source according to the size and resource conditions of the hospital, and using full or incremental extraction of data to form Main index and stored in the default storage source.

Benefits of technology

It maximizes resource utilization, avoids resource waste, and can dynamically switch storage sources when the hospital volume changes, meets the usage needs at different stages, and improves the flexibility of medical data storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293043B_ABST
    Figure CN119293043B_ABST
Patent Text Reader

Abstract

The present invention provides a main index management method, device, electronic device and storage medium based on a dynamic storage mode, which relates to medical data processing technology in the field of computer software. The method includes: creating multiple storage source connections; verifying the validity of the storage source; enabling one of the storage sources as the default storage source; extracting the full amount when the main index business system goes online and extracts data for the first time, and when the default storage source is not modified, subsequent data extractions all use incremental extractions; when the default storage source is modified, the first data extraction after the modification uses full extraction, and before the default storage source is modified next time, subsequent data extractions all use incremental extractions; the main index business system processes the corresponding business logic according to the stored main index. The present invention can dynamically select the storage mode of the main index business system according to the volume of the hospital and the hardware and software resources, and has strong practicality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer software, specifically to primary index storage technology, and in particular to a primary index management method, device, electronic device and storage medium based on a dynamic storage mode. Background Art

[0002] As the hospital's information level increases, the number of hospital business systems increases, and the demand for hardware resources increases. For the main index business system, when the hospital's size and hardware and software resources are different, if its storage mode is launched in each hospital according to a unified technical standard, it may lead to resource waste or resource shortage; and the size of the hospital changes at any time, and a single storage mode is difficult to meet the hospital's usage needs at all stages, and the conventional storage mode is more troublesome to modify, requiring the redevelopment of programs and external index interfaces. Summary of the invention

[0003] In order to solve the above-mentioned defects of the related prior art, the present application provides a main index management method, device, electronic device and storage medium based on a dynamic storage mode, which can dynamically select the storage mode of the main index business system according to the size of the hospital and the hardware and software resources, and has strong practicality.

[0004] In order to achieve the above object, the present invention adopts the following technologies:

[0005] A primary index management method based on a dynamic storage mode, comprising:

[0006] Create multiple storage source connections, including selecting the supported type of the storage source and entering the storage source connection information, including the storage source ID, address, user name, and password;

[0007] Verify the validity of the storage source;

[0008] Enable one of the storage sources as the default storage source;

[0009] When the primary index business system goes online and extracts data for the first time, the entire amount of data is extracted to form the primary index and stored in the current default storage source. If the default storage source is not modified, subsequent data extractions are all incremental, and the primary index formed by the extracted data is stored in the current default storage source. When the default storage source is modified, the first data extraction after the modification is full extraction, and the primary index formed by the extracted data is stored in the current default storage source. Before the default storage source is modified next time, subsequent data extractions are all incremental, and the primary index formed by the extracted data is stored in the current default storage source.

[0010] The corresponding business logic is processed according to the stored primary index, and the external retrieval interface of the primary index is unified.

[0011] Furthermore, when the formed primary index is stored in the default storage source:

[0012] Load the information of the default storage source and obtain the supported type and connection information of the default storage source;

[0013] Initialize the connection according to the connection information of the default storage source;

[0014] According to the support type of the default storage source, obtain the corresponding strategy implementation class through the factory + strategy mode;

[0015] Obtain the preset data processing logic according to the strategy implementation class;

[0016] Processing the formed primary index according to the preset data processing logic to obtain a processed primary index;

[0017] Process storage logic according to the processed primary index;

[0018] The storage result returns a unified identifier.

[0019] Furthermore, before the main index business system extracts data, it is determined whether it is the first extraction:

[0020] If it is the first extraction, all data is extracted to form the primary index, and the primary index is stored in the current default storage source;

[0021] If it is not the first extraction, determine whether the default storage source when extracting data last time is the same as the current default storage source; if it is the same storage source, extract data incrementally to form a primary index, and store the primary index in the current default storage source; if it is not the same storage source, extract data in full to form a primary index, and store the primary index in the current default storage source.

[0022] Furthermore, when the connection is initialized, it is determined whether the primary index formed is the primary index formed by the first extraction:

[0023] If it is the first time to extract the primary index, initialize the connection pool through the connection information, and add the ID of the current default storage source and the connection pool to the cache;

[0024] If it is not the primary index formed by the first extraction, query whether the ID of the current default storage source exists in the cache; if it exists, directly return the connection pool object that matches the ID; if it does not exist, initialize the connection pool through the connection information, and add the ID of the current default storage source and the connection pool to the cache.

[0025] A main index management device based on a dynamic storage mode includes a connection creation module, a connection verification module, a storage source activation module, a full extraction module, an incremental extraction module, a main index storage module, and a business logic module:

[0026] The connection creation module is used to create multiple storage source connections, including selecting the supported type of the storage source and inputting the connection information of the storage source, the connection information includes the storage source ID, address, user name, and password;

[0027] The connection verification module is used to verify the validity of the storage source;

[0028] The storage source control module is used to enable one of the storage sources as a default storage source;

[0029] When the main index business system goes online and extracts data for the first time, the full extraction module is used to extract the full amount of data to form the main index, the main index storage module is used to store the main index formed by the full extraction when the data is extracted for the first time in the current default storage source, the incremental extraction module is used to perform incremental extraction on subsequent data extraction when the default storage source is not modified, and the main index storage module is also used to store the main index formed by the subsequent incremental extraction in the current default storage source when the default storage source is not modified; the storage source control module is also used to modify the default storage source, when the default storage source is modified, the full extraction module is also used to use the full extraction for the first data extraction after the modification, the main index storage module is also used to store the main index formed by the full extraction when the data is extracted for the first time after the default storage source is modified in the current default storage source, the incremental extraction module is also used to use incremental extraction for subsequent data extraction before the default storage source is modified next time, and the main index storage module is also used to store the main index formed by the subsequent incremental extraction in the current default storage source before the default storage source is modified next time;

[0030] The business logic module is used to process the corresponding business logic according to the stored main index, and the main index has a unified external retrieval interface.

[0031] Furthermore, the main index storage module includes an information loading module, an initialization connection module, a policy factory module, a policy implementation module, a data processing module, a storage logic module, and a storage result return module:

[0032] The information loading module is used to load the information of the default storage source and obtain the support type and connection information of the default storage source;

[0033] The initialization connection module is used to initialize the connection according to the connection information of the default storage source;

[0034] The strategy factory module is used to obtain the corresponding strategy implementation class through the factory + strategy mode according to the type of the default storage source;

[0035] The strategy implementation module is used to obtain the preset data processing logic according to the strategy implementation class;

[0036] The data processing module is used to process the formed primary index according to the preset data processing logic to obtain the processed primary index;

[0037] The storage logic module is used to process the storage logic according to the processed main index;

[0038] The storage result return module is used to return the storage result with a unified identifier.

[0039] Furthermore, it also includes an extraction judgment module and a storage source judgment module:

[0040] The extraction judgment module is used to judge whether it is the first extraction before the main index business system extracts data;

[0041] The full amount extraction module is further used to fully extract the data to form a primary index when the extraction judgment module determines that it is the first extraction, and the primary index storage module is further used to store the primary index formed by the full amount of extracted data into the current default storage source when the extraction judgment module determines that it is the first extraction;

[0042] The storage source judgment module is used to judge whether the default storage source when extracting data last time is the same storage source as the current default storage source when the extraction judgment module judges that it is not the first extraction; the incremental extraction module is also used to incrementally extract data to form a main index when the storage source judgment module judges that it is the same storage source, and the main index storage module is also used to store the main index formed by the incrementally extracted data in the current default storage source when the storage source judgment module judges that it is the same storage source; the full extraction module is also used to extract the full data to form a main index when the storage source judgment module judges that it is not the same storage source, and the main index storage module is also used to store the main index formed by the full extracted data in the current default storage source when the storage source judgment module judges that it is not the same storage source.

[0043] Furthermore, the initialization connection module includes a primary index determination module, a connection pool module, and a cache query module;

[0044] The primary index judgment module is used to judge whether the formed primary index is the primary index formed by the first extraction;

[0045] The connection pool module is used to initialize the connection pool through the connection information when the primary index judgment module determines that the primary index is extracted for the first time, and add the ID of the current default storage source and the initialized connection pool to the cache;

[0046] The cache query module is used to query whether the ID of the current default storage source exists in the cache when the main index judgment module determines that it is not the first extraction of the main index; and when the query is found to exist, directly return the connection pool object matching the ID; the connection pool module is also used to initialize the connection pool through connection information when the cache query module queries that it does not exist, and add the ID of the current default storage source and the initialized connection pool to the cache.

[0047] An electronic device comprises: at least one processor and a memory; wherein the memory stores computer-executable instructions; the computer-executable instructions stored in the memory are executed by the at least one processor, so that the at least one processor executes the primary index management method based on the dynamic storage mode.

[0048] A computer-readable storage medium stores a computer program, which, when executed by a processor, controls a device where the storage medium is located to execute the primary index management method based on a dynamic storage mode.

[0049] The beneficial effects of the present invention are:

[0050] 1. Based on the size of the hospital and the different hardware and software resources, when the main index system goes online, the appropriate storage source is dynamically selected to maximize resource utilization and avoid resource waste.

[0051] 2. When the size of the hospital changes, the storage source that meets the current needs can be dynamically switched. The storage space is easy to expand and there is no need to redevelop programs and external index interfaces, thus achieving flexibility in medical data storage. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a flow chart of the main index management method based on the dynamic storage mode according to an embodiment of the present application.

[0053] Figure 2 It is a schematic diagram of the process of storing the main index in the default storage source in an embodiment of the present application.

[0054] Figure 3 It is a flowchart of data extraction in an embodiment of the present application.

[0055] Figure 4 It is a schematic diagram of the process of initializing connection in an embodiment of the present application.

[0056] Figure 5 It is a schematic diagram of the workflow of the main index management device based on the dynamic storage mode in an embodiment of the present application.

[0057] Figure 6 It is a schematic diagram of the working process of the storage source judgment module and the extraction judgment module of the embodiment of the present application. DETAILED DESCRIPTION

[0058] To make the objectives, technical solutions and advantages of the embodiments of the present invention more clear, the implementation modes of the present invention are described in detail below with reference to the accompanying drawings. However, the embodiments described in the present invention are only part of the embodiments of the present invention, rather than all the embodiments.

[0059] like Figure 1 As shown, one aspect of an embodiment of the present application provides a primary index management method based on a dynamic storage mode, including:

[0060] S100. Create multiple storage source connections, including: S101. Select the supported type of storage source. Currently, MySQL, SQLServer, ES, Doris, DAMO, Jincang, etc. are supported; S102. Enter the connection information of the storage source. The connection information includes the storage source ID, address, user name, and password.

[0061] S200, verifying the validity of the storage source, that is, after the storage source connection is created, verifying the validity of the storage source through the connection information connection test set by the storage source.

[0062] S300. Based on the size of the hospital and the hardware and software resources of the hospital, enable one of the storage sources as the default storage source. For example, for a small hospital, there is less patient information, and a storage source that supports relational database types is sufficient. If a storage source that supports distributed component types is used, it will cause a waste of resources. For a large hospital, there is more patient information. If a storage source that supports relational database types is used, the main index merge and retrieval are very slow and not easy to expand. In this case, it is better to use a storage source that supports ES type or doris type and has big data processing capabilities.

[0063] S400, the main index business system is online, extracting data to form a main index and storing it in the current default storage source. This step can be broken down into:

[0064] The first data extraction after the main index business system goes online uses S401 to fully extract data to form a main index and store it in the current default storage source.

[0065] When the default storage source is not modified, subsequent data extraction adopts S402, incrementally extracting data to form a primary index and storing it in the current default storage source.

[0066] As the size of the hospital increases, the amount of patient information will also increase. The currently set default storage source type may not meet the current usage requirements. At this time, S403 can be performed to modify the default storage source, and the default storage source can be modified to a storage source that meets the current usage requirements. The first data extraction after the modification uses S401, fully extracts data to form a primary index and stores it in the current default storage source; before the next modification of the default storage source, subsequent data extractions all use S402, incrementally extracts data to form a primary index and stores it in the current default storage source.

[0067] S500, processing corresponding business logic according to the stored main index, that is, performing retrieval and other services according to the stored main index; and the external retrieval interface of the main index is unified, and the external service interface will not be changed due to the modification of the default storage source.

[0068] With this design, the main index business system can dynamically select a storage source that meets current usage needs when it goes online, and when the hospital size increases after going online, it can dynamically modify the storage source to adapt to the usage needs of the current stage, thus achieving flexibility in medical data storage.

[0069] Preferably, Figure 2 As shown, the process of storing the formed primary index in S400 to the default storage source can be implemented by the following preferred solution:

[0070] S411. Load the information of the default storage source, and obtain the support type and connection information of the default storage source.

[0071] S412: Initialize the connection according to the connection information of the default storage source.

[0072] S413. According to the support type of the default storage source, obtain the policy implementation class corresponding to the support type through the factory+policy mode.

[0073] S414. According to the obtained policy implementation class, obtain the preset data processing logic, the data processing logic is used to process the main index formed by the extracted data, so that the main index can adapt to the support type of the current default storage source and store it in the current default storage source.

[0074] S415 . Process the formed primary index according to a preset data processing logic to obtain a processed primary index.

[0075] S416. Process the storage logic according to the processed primary index, where the storage logic is used to store the primary index into the current default storage source.

[0076] S417: The storage result returns a unified identifier, which is used to help the main index business system process subsequent business logic.

[0077] Preferably, Figure 3 As shown, the data extraction in S400 can be implemented by adopting the following preferred solutions:

[0078] S421. Before the main index business system extracts data, determine whether it is the first extraction:

[0079] If it is the first extraction, then S422 is performed to extract all data to form a primary index, and the primary index is stored in the current default storage source.

[0080] If it is not the first extraction, perform S423 and determine whether the default storage source when extracting data last time is the same as the current default storage source; if it is the same storage source, perform S424 and extract data incrementally to form a primary index, and store the primary index in the current default storage source; if it is not the same storage source, perform S422 and extract data in full to form a primary index, and store the primary index in the current default storage source.

[0081] Preferably, Figure 4 As shown, the initialization connection in S412 can be implemented by adopting the following preferred solution:

[0082] S431, when initializing the connection, determine whether the primary index formed is the primary index formed by the first extraction:

[0083] If it is the first time to extract the primary index, then proceed to S432, initialize the connection pool through the connection information, and add the ID of the current default storage source and the connection pool to the cache.

[0084] If it is not the primary index formed by the first extraction, perform S433 to query whether the ID of the current default storage source exists in the cache; if it does, perform S434 to directly return the connection pool object that matches the ID; if it does not exist, perform S432 to initialize the connection pool through the connection information, and add the ID of the current default storage source and the connection pool to the cache.

[0085] With this design, when the default storage source remains unchanged, there is no need to initialize the connection pool every time the primary index is stored; and when the default storage source changes, the primary index business system can recognize the change in the default storage source and reinitialize the connection pool.

[0086] like Figure 5 As shown, on the other hand, an embodiment of the present application provides a main index management device based on a dynamic storage mode, including a connection creation module, a connection verification module, a storage source enabling module, a full extraction module, an incremental extraction module, a main index storage module, and a business logic module.

[0087] The connection creation module is used to create multiple storage source connections, including selecting the supported type of the storage source and inputting the connection information of the storage source. The connection information includes the storage source ID, address, user name, and password.

[0088] The connection verification module is used to verify the validity of the storage source.

[0089] The storage source control module is used to enable one of the storage sources as a default storage source.

[0090] When the main index business system goes online and extracts data for the first time, the full extraction module is used to extract the full data to form the main index, the main index storage module is used to store the main index formed by the full extraction when the data is extracted for the first time in the current default storage source, the incremental extraction module is used to perform incremental extraction on subsequent data extraction when the default storage source is not modified, and the main index storage module is also used to store the main index formed by the subsequent incremental extraction in the current default storage source when the default storage source is not modified; the storage source control module is also used to modify the default storage source, when the default storage source is modified, the full extraction module is also used to use full extraction for the first data extraction after the modification, the main index storage module is also used to store the main index formed by the full extraction when the data is extracted for the first time after the default storage source is modified in the current default storage source, the incremental extraction module is also used to use incremental extraction for subsequent data extraction before the default storage source is modified next time, and the main index storage module is also used to store the main index formed by the subsequent incremental extraction in the current default storage source before the default storage source is modified next time.

[0091] The business logic module is used to process the corresponding business logic according to the stored main index, and the main index has a unified external retrieval interface.

[0092] When working, multiple storage source connections are created through the connection creation module, and the validity of each storage source connection is verified through the connection verification module; the storage source control module enables one of the storage sources as the default storage source, and after the main index business system is online, the full extraction module performs the first full extraction, and the formed main index is stored in the current default storage source through the main index storage module; when the storage source control module has not modified the default storage source, it switches to the incremental extraction module to continue data extraction, and the main index formed by each extraction is stored in the current default storage source through the main index storage module; when the storage source control module modifies the default storage source, the first modified data extraction is executed by the full extraction module, and subsequent data extraction is continuously executed by the incremental extraction module until the storage source control module modifies the default storage source next time; the business logic module processes the corresponding business logic according to the main index in the current default storage source.

[0093] Preferably, Figure 5As shown, the main index storage module includes an information loading module, an initialization connection module, a policy factory module, a policy implementation module, a data processing module, a storage logic module, and a storage result return module.

[0094] The information loading module is used to load the information of the default storage source and obtain the support type and connection information of the default storage source;

[0095] The initialization connection module is used to initialize the connection according to the connection information of the default storage source.

[0096] The strategy factory module is used to obtain the corresponding strategy implementation class through the factory + strategy mode according to the type of the default storage source.

[0097] The strategy implementation module is used to obtain the preset data processing logic according to the strategy implementation class.

[0098] The data processing module is used to process the formed primary index according to the preset data processing logic to obtain the processed primary index.

[0099] The storage logic module is used to process the storage logic according to the processed primary index.

[0100] The storage result return module is used to return the storage result with a unified identifier.

[0101] Preferably, Figure 6 As shown, the device also includes an extraction judgment module and a storage source judgment module.

[0102] The extraction judgment module is used to judge whether it is the first extraction before the main index business system extracts data.

[0103] The full extraction module is also used to fully extract the data to form a primary index when the extraction judgment module determines that it is the first extraction. The primary index storage module is also used to store the primary index formed by the full extraction data into the current default storage source when the extraction judgment module determines that it is the first extraction.

[0104] The storage source judgment module is used to judge whether the default storage source when extracting data last time is the same storage source as the current default storage source when the extraction judgment module judges that it is not the first extraction; the incremental extraction module is also used to incrementally extract data to form a main index when the storage source judgment module judges that it is the same storage source, and the main index storage module is also used to store the main index formed by the incrementally extracted data in the current default storage source when the storage source judgment module judges that it is the same storage source; the full extraction module is also used to extract the full data to form a main index when the storage source judgment module judges that it is not the same storage source, and the main index storage module is also used to store the main index formed by the full extracted data in the current default storage source when the storage source judgment module judges that it is not the same storage source.

[0105] Preferably, Figure 5 As shown, the initialization connection module includes a primary index judgment module, a connection pool module, and a cache query module.

[0106] The primary index determination module is used to determine whether the formed primary index is the primary index formed by the first extraction.

[0107] The connection pool module is used to initialize the connection pool through connection information when the primary index judgment module determines that the primary index is extracted for the first time, and add the ID of the current default storage source and the initialized connection pool to the cache.

[0108] The cache query module is used to query whether the ID of the current default storage source exists in the cache when the main index judgment module determines that it is not the first extraction of the main index; and when the query is found to exist, directly return the connection pool object matching the ID; the connection pool module is also used to initialize the connection pool through connection information when the cache query module queries that it does not exist, and add the ID of the current default storage source and the initialized connection pool to the cache.

[0109] According to another aspect of the embodiments of the present application, an electronic device is provided, comprising: at least one processor and a memory; wherein the memory stores computer execution instructions; the computer execution instructions stored in the memory are executed by the at least one processor, so that the at least one processor executes the primary index management method based on the dynamic storage mode described in the previous embodiments.

[0110] In another aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the device where the storage medium is located is controlled to execute the primary index management method based on the dynamic storage mode as described in any one of the above embodiments.

[0111] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application.

Claims

1. A primary index management method based on a dynamic storage mode, characterized in that: include: Create multiple storage source connections, including selecting the supported type of the storage source and entering the storage source connection information, including the storage source ID, address, user name, and password; Verify the validity of the storage source; Enable one of the storage sources as the default storage source; When the primary index business system goes online and extracts data for the first time, all data is extracted to form the primary index and stored in the current default storage source. If the default storage source is not modified, subsequent data extraction uses incremental extraction, and the primary index formed by the extracted data is stored in the current default storage source. When the default storage source is modified, the first data extraction after the modification adopts full extraction, and the primary index formed by the extracted data is stored in the current default storage source. Before the default storage source is modified next time, subsequent data extraction adopts incremental extraction, and the primary index formed by the extracted data is stored in the current default storage source; The corresponding business logic is processed according to the stored primary index, and the external retrieval interface of the primary index is unified.

2. The main index management method based on dynamic storage mode according to claim 1 is characterized in that: When the formed primary index is stored in the default storage source: Load the information of the default storage source and obtain the supported type and connection information of the default storage source; Initialize the connection according to the connection information of the default storage source; According to the support type of the default storage source, obtain the corresponding strategy implementation class through the factory + strategy mode; Obtain the preset data processing logic according to the strategy implementation class; Processing the formed primary index according to the preset data processing logic to obtain a processed primary index; Process the storage logic according to the processed primary index; The storage result returns a unified identifier.

3. The main index management method based on dynamic storage mode according to claim 1 is characterized in that: Before extracting data in the main index business system, determine whether it is the first extraction: If it is the first extraction, all data is extracted to form the primary index, and the primary index is stored in the current default storage source; If it is not the first extraction, determine whether the default storage source when extracting data last time is the same as the current default storage source; If it is the same storage source, data is incrementally extracted to form a primary index, and the primary index is stored in the current default storage source; if it is not the same storage source, data is fully extracted to form a primary index, and the primary index is stored in the current default storage source.

4. The main index management method based on dynamic storage mode according to claim 2 is characterized in that: When initializing the connection, determine whether the primary index formed is the primary index formed by the first extraction: If it is the first time to extract the primary index, initialize the connection pool through the connection information, and add the ID of the current default storage source and the connection pool to the cache; If it is not the primary index formed by the first extraction, query whether the ID of the current default storage source exists in the cache; if it exists, directly return the connection pool object that matches the ID; if it does not exist, initialize the connection pool through the connection information, and add the ID of the current default storage source and the connection pool to the cache.

5. A main index management device based on a dynamic storage mode, characterized in that: Including connection creation module, connection verification module, storage source control module, full extraction module, incremental extraction module, main index storage module, business logic module: The connection creation module is used to create multiple storage source connections, including selecting the supported type of the storage source and inputting the connection information of the storage source, the connection information includes the storage source ID, address, user name, and password; The connection verification module is used to verify the validity of the storage source; The storage source control module is used to enable one of the storage sources as a default storage source; When the main index business system goes online and extracts data for the first time, the full extraction module is used to extract the full amount of data to form the main index, the main index storage module is used to store the main index formed by the full extraction when the data is extracted for the first time in the current default storage source, the incremental extraction module is used to perform incremental extraction on subsequent data extractions when the default storage source is not modified, and the main index storage module is also used to store the main index formed by subsequent incremental extractions in the current default storage source when the default storage source is not modified; The storage source control module is also used to modify the default storage source. When the default storage source is modified, the full extraction module is also used to adopt full extraction for the first data extraction after the modification. The main index storage module is also used to store the main index formed by the full extraction when the data is extracted for the first time after the default storage source is modified into the current default storage source. The incremental extraction module is also used to adopt incremental extraction for subsequent data extraction before the default storage source is modified next time. The main index storage module is also used to store the main index formed by subsequent incremental extraction into the current default storage source before the default storage source is modified next time. The business logic module is used to process the corresponding business logic according to the stored main index, and the main index has a unified external retrieval interface.

6. The main index management device based on dynamic storage mode according to claim 5, characterized in that: The main index storage module includes information loading module, initialization connection module, strategy factory module, strategy implementation module, data processing module, storage logic module, and storage result return module: The information loading module is used to load the information of the default storage source and obtain the support type and connection information of the default storage source; The initialization connection module is used to initialize the connection according to the connection information of the default storage source; The strategy factory module is used to obtain the corresponding strategy implementation class through the factory + strategy mode according to the type of the default storage source; The strategy implementation module is used to obtain the preset data processing logic according to the strategy implementation class; The data processing module is used to process the formed primary index according to the preset data processing logic to obtain the processed primary index; The storage logic module is used to process the storage logic according to the processed main index; The storage result return module is used to return the storage result with a unified identifier.

7. The main index management device based on dynamic storage mode according to claim 5, characterized in that: It also includes an extraction judgment module and a storage source judgment module: The extraction judgment module is used to judge whether it is the first extraction before the main index business system extracts data; The full amount extraction module is further used to fully extract the data to form a primary index when the extraction judgment module determines that it is the first extraction, and the primary index storage module is further used to store the primary index formed by the full amount of extracted data into the current default storage source when the extraction judgment module determines that it is the first extraction; The storage source judgment module is used to judge whether the default storage source when extracting data last time is the same storage source as the current default storage source when the extraction judgment module judges that it is not the first extraction; the incremental extraction module is also used to incrementally extract data to form a main index when the storage source judgment module judges that it is the same storage source, and the main index storage module is also used to store the main index formed by the incrementally extracted data in the current default storage source when the storage source judgment module judges that it is the same storage source; the full extraction module is also used to extract the full data to form a main index when the storage source judgment module judges that it is not the same storage source, and the main index storage module is also used to store the main index formed by the full extracted data in the current default storage source when the storage source judgment module judges that it is not the same storage source.

8. The main index management device based on dynamic storage mode according to claim 6, characterized in that: The initialization connection module includes a primary index judgment module, a connection pool module, and a cache query module; The primary index judgment module is used to judge whether the formed primary index is the primary index formed by the first extraction; The connection pool module is used to initialize the connection pool through the connection information when the primary index judgment module determines that the primary index is extracted for the first time, and add the ID of the current default storage source and the initialized connection pool to the cache; The cache query module is used to query whether the ID of the current default storage source exists in the cache when the main index judgment module determines that it is not the first extraction of the main index; and when the query is found to exist, directly return the connection pool object matching the ID; the connection pool module is also used to initialize the connection pool through connection information when the cache query module queries that it does not exist, and add the ID of the current default storage source and the initialized connection pool to the cache.

9. An electronic device, comprising: At least one processor and a memory; wherein the memory stores computer-executable instructions; characterized in that the at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the primary index management method based on the dynamic storage mode as described in any one of claims 1 to 4.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, the device where the storage medium is located is controlled to execute the main index management method based on the dynamic storage mode as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Standardized clinical big data center system

    CN110875095A

  • System and Process for Record Duplication Analysis

    US20110004626A1