Data query method and device, electronic equipment and storage medium
By determining the target data storage location based on the data synchronization period and query time when receiving the data query instructions, querying the results from historical or real-time data storage nodes and uploading them to the cloud server, the dynamic optimization problem of data storage and query in traditional solutions is solved, which improves query efficiency and reduces server load.
Patent Information
- Application Number
- CN202510670618.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-08-15
AI Technical Summary
Traditional solutions store all data in a single database, resulting in too long response time during query. When multiple users download reports concurrently, the server network bandwidth and disk I/O pressure surge, affecting the normal operation of the system. The lack of a dynamic optimization mechanism for data storage and query, making it difficult to balance real-time and resource consumption.
Determine the target data storage location based on the data synchronization cycle and query time, determine the query results from the historical data storage node or real-time data storage node, and upload the results to the cloud server, balancing real-time and resource consumption through a dynamic optimization mechanism.
Improve data query efficiency, reduce local server load, and ensure the accuracy and consistency of query results.
Smart Images

Figure CN120492502A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data query method, device, electronic device and storage medium. Background Art
[0002] As time goes by, the amount of benefit analysis data of the target hospital becomes huge, and the amount of data of a single benefit analysis report can reach hundreds of megabytes. When users need to query data, they need to find the target data corresponding to the instruction from the data stored in the database.
[0003] However, traditional solutions store all data in a single database. When users query historical or real-time data, they must traverse and retrieve massive amounts of data, resulting in long response times. Furthermore, when multiple users concurrently download reports, server network bandwidth and disk I / O pressure surge, causing system lag and impacting the normal operation of other businesses. Summary of the Invention
[0004] The present invention provides a data query method, device, electronic device and storage medium, which determine the data storage location according to the data synchronization cycle and query time, and can determine the query results from different data storage locations, so as to solve the technical problems of lacking a dynamic optimization mechanism for data storage and query, and difficulty in balancing real-time performance and resource consumption, and improve data query efficiency.
[0005] According to one aspect of the present invention, a data query method is provided, comprising:
[0006] In case of receiving a data query instruction, determining a data query time corresponding to the data query instruction;
[0007] Determine a data synchronization period corresponding to a data storage node, and determine a target data storage location according to the data synchronization period and the data query time, wherein the data storage node includes a historical data storage node and a real-time data storage node;
[0008] Determine the data query result corresponding to the data query instruction based on the target data storage location, and upload the data query result to the cloud server
[0009] According to another aspect of the present invention, there is provided a data query device, comprising:
[0010] A query instruction parsing module, configured to, upon receiving a data query instruction, determine a data query time corresponding to the data query instruction;
[0011] A storage location determination module is used to determine a data synchronization period corresponding to a data storage node, and determine a target data storage location according to the data synchronization period and the data query time, wherein the data storage node includes a historical data storage node and a real-time data storage node;
[0012] A query result determination module is used to determine the data query result corresponding to the data query instruction based on the target data storage location, and upload the data query result to the cloud server
[0013] According to another aspect of the present invention, an electronic device is provided, comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the data query method described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data query method according to any embodiment of the present invention when executed.
[0018] The technical solution of an embodiment of the present invention determines the data query time corresponding to the data query instruction upon receiving the data query instruction, and then determines the data synchronization period corresponding to the data storage node. The target data storage location is determined based on the data synchronization period and the data query time. Finally, the data query result corresponding to the data query instruction is determined based on the target data storage location, and the data query result is uploaded to the cloud server. Based on the above technical solution, the data storage location is determined based on the data synchronization period and the query time, and the query result can be determined from different data storage locations. This solves the technical problem of lacking a dynamic optimization mechanism for data storage and query, making it difficult to balance real-time performance and resource consumption, and improves data query efficiency.
[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 This is a flow chart of a data query method provided by an embodiment of the present invention;
[0022] Figure 2 This is a flow chart of a data query method provided by an embodiment of the present invention;
[0023] Figure 3 This is a structural block diagram of a data query device provided by an embodiment of the present invention;
[0024] Figure 4 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0026] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] Example 1
[0028] Figure 1This is a flow chart of a data query method provided by an embodiment of the present invention. This embodiment is applicable to the case where, upon receiving a data query instruction, the data storage location is determined based on the query data and the synchronization period, and the query result is further determined based on the data storage location. This method can be executed by a data query device, which can be implemented in the form of hardware and / or software. The data query device can be configured in an electronic device, which can be a terminal device or a server. Figure 1 As shown, the method includes:
[0029] S110 : When a data query instruction is received, determine a data query time corresponding to the data query instruction.
[0030] The data query instruction may be instruction information sent when performing a data query, and the instruction information may include relevant information such as query time, query object, and query keywords. The data query time may be understood as the time when the instruction corresponding to the query instruction is generated.
[0031] Specifically, when a user needs to perform a data query, they can trigger a data query control on the data query page to send a data query instruction. Then, upon receiving the data query instruction, the data query time corresponding to the instruction can be determined by parsing the data query instruction. It should be noted that when a user needs to perform a data query, they can enter a query keyword on the data query page and trigger the data query control, thereby generating a corresponding data query instruction.
[0032] S120 : Determine a data synchronization period corresponding to the data storage node, and determine a target data storage location according to the data synchronization period and the data query time.
[0033] The data storage node may be a storage node for storing benefit analysis data corresponding to the target hospital. The data storage node may include a historical data storage node and a real-time data storage node. The data synchronization period may be understood as the synchronization period between different data nodes.
[0034] Specifically, the data synchronization log corresponding to the data storage node can be obtained, and the data synchronization period corresponding to the data storage node can be determined based on the data synchronization log, thereby determining the relationship between the data query time and the data synchronization period of the data query instruction, and then determining the target data storage location corresponding to the data query instruction based on the relationship. Exemplary, the data storage log of the historical data storage node can be obtained, and then the data synchronization status of the real-time data storage node and the historical data storage node can be determined based on the data storage log. After receiving the data to be stored, the real-time data storage node can temporarily store the data to be stored in the real-time data storage node, and synchronize the data in the real-time data storage node to the historical data storage node according to a pre-set periodic synchronization time. The periodic synchronization time can be set according to the synchronization requirements, for example, it can be 10 minutes.
[0035] Based on the above technical solution, determining the target data storage location according to the data synchronization cycle and the data query time includes: when the data query time is in the historical data synchronization cycle, determining the target data storage location as a historical data storage node.
[0036] The historical data synchronization period may be a non-current data synchronization period, or may be a previous data synchronization period.
[0037] Specifically, when the data query time is in the historical data synchronization period, it can be determined that the data corresponding to the data query instruction has been synchronized to the historical data storage node, and then the target data storage location can be determined to be the historical data storage node.
[0038] The technical solution provided by the embodiment of the present invention determines that the data storage location corresponding to the query instruction is a historical data storage node when the data query time is in the historical data synchronization cycle. Furthermore, even if the system cannot process the query instruction in a timely manner, the data storage location corresponding to the query instruction can also be correctly determined, thereby improving the accuracy of data query.
[0039] Based on the above technical solution, the target data storage location is determined according to the data synchronization cycle and the data query time, including: when the data query time is in the current data synchronization cycle, determining the cycle completion status of the current data synchronization cycle and the data synchronization status between the data storage nodes; determining the target data storage location according to the cycle completion status and the data synchronization status.
[0040] The current data synchronization cycle may be data synchronization of the data storage nodes. The cycle completion status may be status information describing whether the data synchronization cycle is completed. The data synchronization status is status information describing whether the data between the data storage nodes is correctly synchronized.
[0041] Specifically, if the data query time is within the current data synchronization cycle, the cycle completion status of the current data synchronization cycle and the data synchronization status between data storage nodes are determined, and then the target data storage location is determined based on the cycle completion status and data synchronization status. For example, if the data query time is within the current data synchronization cycle, check whether the current data synchronization cycle has been completed, that is, whether the cycle end time point has been reached. If the cycle has been completed, directly locate the historical data storage node. If the cycle has not been completed, check the synchronization progress between data storage nodes. If the data between all data storage nodes has been synchronized, select any node as the target location. If there is synchronization delay for some nodes, record the synchronization progress of the delayed node.
[0042] The technical solution provided by the embodiment of the present invention determines the target data storage location according to the cycle completion status and the data synchronization status, thereby more accurately locating the data storage location corresponding to the query instruction, thereby improving the efficiency and accuracy of data query.
[0043] On the basis of the above technical solution, the target data storage location is determined according to the cycle completion status and the data synchronization status, including: when the cycle completion status and the data synchronization status are both completed, the target data storage location is determined to be a historical data storage node; when the cycle completion status or the data synchronization status is not completed, the target data storage location is determined to be a historical data storage node and a real-time data storage node.
[0044] Specifically, when both the cycle completion status and the data synchronization status are completed, the target data storage location is determined to be a historical data storage node. When either the cycle completion status or the data synchronization status is incomplete, the target data storage location is determined to be a historical data storage node and a real-time data storage node. Exemplarily, the current data synchronization cycle has reached the planned end time, that is, the cycle completion status is completed, and the data synchronization operations of all data storage nodes have been completed. The target data storage location is determined to be a historical data storage node. At this time, all data has been stably stored, and the historical data node contains complete and consistent cycle data, which is suitable as a query target. When the current data synchronization cycle has not reached the planned end time, or the data synchronization operation of at least one data storage node is not completed, the target data storage location is determined to be a combination of the historical data storage node and the real-time data storage node.
[0045] The technical solution provided by the embodiment of the present invention jointly determines the data storage location corresponding to the query instruction through the cycle completion status and the data synchronization status, thereby ensuring the consistency between the finally extracted data and the query instruction.
[0046] S130: Determine a data query result corresponding to the data query instruction based on the target data storage location, and upload the data query result to a cloud server.
[0047] The data query result can be understood as the result information corresponding to the data query instruction. The data query result can include feedback data corresponding to the data query instruction, or the query result corresponding to the data query instruction, such as query failure and the corresponding failure reason. The cloud server can be a cloud server for storing feedback data.
[0048] Specifically, if the request time is not within the latest cycle, the synchronized data is directly extracted from the historical data storage node. If the request time is within the latest cycle, the cycle's completeness and synchronization status are further determined: If the cycle is complete and synchronization is complete, data is extracted from the historical data storage node; If the cycle is complete but synchronization is incomplete, a joint search is performed on the historical data storage node and the real-time data storage node; If the cycle is incomplete, the historical data storage node extracts historical data, and the real-time data storage node extracts the latest partial data. The query results are transmitted to the cloud server via the intranet, and users download them directly from the cloud, avoiding the use of local server resources.
[0049] The technical solution of an embodiment of the present invention determines the data query time corresponding to the data query instruction upon receiving the data query instruction, and then determines the data synchronization period corresponding to the data storage node. The target data storage location is determined based on the data synchronization period and the data query time. Finally, the data query result corresponding to the data query instruction is determined based on the target data storage location, and the data query result is uploaded to the cloud server. Based on the above technical solution, the data storage location is determined based on the data synchronization period and the query time, and the query result can be determined from different data storage locations. This solves the technical problem of lacking a dynamic optimization mechanism for data storage and query, making it difficult to balance real-time performance and resource consumption, and improves data query efficiency.
[0050] Example 2
[0051] Figure 2 This is a flow chart of a data query method provided by an embodiment of the present invention. This embodiment further illustrates the technical solution for data storage based on the above technical solution. Figure 2 As shown, the method includes:
[0052] 210. Obtain the data to be processed corresponding to the target hospital, and determine the data synchronization tag corresponding to the data to be processed.
[0053] The target hospital can be understood as a hospital that requires distributed data storage and processing. The data to be processed is the benefit analysis data generated during the target hospital's operations, such as financial statements. This benefit analysis data can be historical data or actual benefit analysis data. The data synchronization tag is used to identify the data synchronization status of the current data to be processed.
[0054] Specifically, the data to be processed can be read from the database of the target hospital, or the benefit analysis data uploaded by the user in real time can be used as the data to be processed, and the data processing label corresponding to the data to be processed can be determined. For example, for each piece of data to be processed, after the synchronization of the current data to be processed is completed, its data synchronization label can be set to synchronization completed, and then it does not need to be processed in the subsequent data synchronization process. Correspondingly, if the data processing label of the current data to be processed is changed and not synchronized, it means that the current data to be processed has not been synchronized, or the data synchronization has failed, and it is necessary to wait for the next cycle to synchronize again.
[0055] 220. Determine a data storage location corresponding to the data to be processed according to the data synchronization tag.
[0056] The data storage location may be understood as a data storage node for storing data to be processed.
[0057] Specifically, determining the data storage location corresponding to the pending data based on the data synchronization tag can include storing data with a synchronization complete tag in a historical data storage node, and storing data with a synchronization incomplete tag in a real-time data storage node. For example, if the data synchronization tag indicates synchronized, the pending data is stored in the historical data storage node; if the data synchronization tag indicates unsynchronized, the pending data is stored in the real-time data storage node.
[0058] On the basis of the above technical solution, after storing the data to be processed in the real-time data storage node, it also includes: periodically synchronizing the data stored in the real-time data storage node to the historical data storage node based on the periodic synchronization time; and / or, after detecting that the data in the historical data storage node has changed, transferring the changed data from the historical data storage node to the real-time data storage node.
[0059] The periodic synchronization time may be a pre-set time period for performing data synchronization processing between data storage nodes, for example, data synchronization may be performed every ten minutes.
[0060] Specifically, the hospital benefit analysis data is divided into synchronized data, which is stored in the historical data storage node, and unsynchronized data, which is stored in the real-time data storage node. Then, the unsynchronized data in the database is incrementally synchronized to the search engine at a periodic rate, such as 10 minutes. The synchronization period can be dynamically adjusted according to the database performance (CPU / memory usage). For example, when the database load exceeds the threshold, the synchronization interval is extended or the synchronization is suspended. If the synchronized data changes, it is marked as unsynchronized data and moved back to the database, waiting for the next cycle synchronization. It should be noted that when the CPU / memory usage of the database exceeds the first threshold, the synchronization period is extended; when the usage exceeds the second threshold, the synchronization is suspended; when the usage is lower than the third threshold, the short-cycle synchronization is resumed, wherein the first threshold, the second threshold and the third threshold can be set by the user according to needs, and the embodiments of the present invention are not limited here.
[0061] The technical solution provided by the embodiment of the present invention obtains the data to be processed corresponding to the target hospital, determines the data synchronization tag corresponding to the data to be processed, and then determines the data storage location corresponding to the data to be processed based on the data synchronization tag, thereby realizing the storage of data in the search engine and database according to the synchronization status. Combined with the periodic synchronization strategy and cloud server resource scheduling, it significantly improves the query efficiency and reduces the local server load.
[0062] Example 3
[0063] Figure 3 A schematic diagram of the structure of a data query device provided by an embodiment of the present invention. Figure 3 As shown, the device includes: a query instruction parsing module 310, a storage location determination module 320 and a query result determination module 330; wherein,
[0064] The query instruction parsing module 310 is configured to, upon receiving a data query instruction, determine a data query time corresponding to the data query instruction;
[0065] A storage location determination module 320 is configured to determine a data synchronization period corresponding to a data storage node, and determine a target data storage location based on the data synchronization period and the data query time, wherein the data storage node includes a historical data storage node and a real-time data storage node;
[0066] The query result determination module 330 is configured to determine a data query result corresponding to the data query instruction based on the target data storage location, and upload the data query result to a cloud server.
[0067] On the basis of the above technical solution, the storage location determination module is used to determine that the target data storage location is a historical data storage node when the data query time is in a historical data synchronization period.
[0068] Based on the above technical solution, the storage location determination module is used to determine the cycle completion status of the current data synchronization cycle and the data synchronization status between the data storage nodes when the data query time is in the current data synchronization cycle; and determine the target data storage location based on the cycle completion status and the data synchronization status.
[0069] Based on the above technical solution, the storage location determination module is used to determine that the target data storage location is a historical data storage node when the cycle completion status and the data synchronization status are both completed; and to determine that the target data storage location is a historical data storage node and a real-time data storage node when the cycle completion status or the data synchronization status is incomplete.
[0070] Based on the above technical solution, the device also includes: a data storage module, which is used to obtain the data to be processed corresponding to the target object before receiving the data query instruction, and determine the data synchronization tag corresponding to the data to be processed; determine the data storage location corresponding to the data to be processed according to the data synchronization tag.
[0071] Based on the above technical solution, the data storage module is used to store the data to be processed in the historical data storage node when the data synchronization tag is synchronized; and to store the data to be processed in the real-time data storage node when the data synchronization tag is not synchronized.
[0072] On the basis of the above technical solution, the data storage module is used to, after storing the data to be processed in the real-time data storage node, periodically synchronize the data stored in the real-time data storage node to the historical data storage node based on the periodic synchronization time; and / or, after detecting that the data in the historical data storage node has changed, transfer the changed data from the historical data storage node to the real-time data storage node.
[0073] The technical solution of an embodiment of the present invention determines the data query time corresponding to the data query instruction upon receiving the data query instruction, and then determines the data synchronization period corresponding to the data storage node. The target data storage location is determined based on the data synchronization period and the data query time. Finally, the data query result corresponding to the data query instruction is determined based on the target data storage location, and the data query result is uploaded to the cloud server. Based on the above technical solution, the data storage location is determined based on the data synchronization period and the query time, and the query result can be determined from different data storage locations. This solves the technical problem of lacking a dynamic optimization mechanism for data storage and query, making it difficult to balance real-time performance and resource consumption, and improves data query efficiency.
[0074] The data query device provided by the embodiment of the present invention can execute the data query method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0075] Example 4
[0076] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0077] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0078] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0079] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the data query method.
[0080] In some embodiments, the data query method can be implemented as a computer program that is tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the data query method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the data query method in any other appropriate manner (e.g., by means of firmware).
[0081] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0082] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0083] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0084] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0085] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0086] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0087] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0088] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A data query method, characterized in that: include: In case of receiving a data query instruction, determining a data query time corresponding to the data query instruction; Determine a data synchronization period corresponding to a data storage node, and determine a target data storage location according to the data synchronization period and the data query time, wherein the data storage node includes a historical data storage node and a real-time data storage node; A data query result corresponding to the data query instruction is determined based on the target data storage location, and the data query result is uploaded to a cloud server.
2. The method according to claim 1, characterized in that Determining the target data storage location according to the data synchronization period and the data query time includes: When the data query time is in a historical data synchronization period, the target data storage location is determined to be a historical data storage node.
3. The method according to claim 1, characterized in that Determining the target data storage location according to the data synchronization period and the data query time includes: In a case where the data query time is in a current data synchronization cycle, determining a cycle completion status of the current data synchronization cycle and a data synchronization status between the data storage nodes; The target data storage location is determined according to the cycle completion status and the data synchronization status.
4. The method according to claim 3, characterized in that Determining the target data storage location according to the cycle completion status and the data synchronization status includes: When both the cycle completion status and the data synchronization status are completed, determining the target data storage location as a historical data storage node; In a case where the cycle is in a completed state or the data synchronization state is incomplete, the target data storage location is determined to be a historical data storage node and a real-time data storage node.
5. The method according to claim 1, wherein Before receiving the data query instruction, it also includes: Acquire the data to be processed corresponding to the target hospital, and determine the data synchronization tag corresponding to the data to be processed; The data storage location corresponding to the data to be processed is determined according to the data synchronization tag.
6. The method according to claim 5, characterized in that Determining the data storage location corresponding to the data to be processed according to the data synchronization tag includes: When the data synchronization tag indicates that the data has been synchronized, the data to be processed is stored in the historical data storage node; When the data synchronization tag indicates that the data is not synchronized, the data to be processed is stored in the real-time data storage node.
7. The method according to claim 6, characterized in that After storing the to-be-processed data in the real-time data storage node, the method further includes: Periodically synchronizing the data stored in the real-time data storage node to the historical data storage node based on a periodic synchronization time; and / or, After detecting that the data in the historical data storage node has changed, the changed data is transferred from the historical data storage node to the real-time data storage node.
8. A data query device, characterized in that: include: A query instruction parsing module, configured to, upon receiving a data query instruction, determine a data query time corresponding to the data query instruction; A storage location determination module is used to determine a data synchronization period corresponding to a data storage node, and determine a target data storage location according to the data synchronization period and the data query time, wherein the data storage node includes a historical data storage node and a real-time data storage node; The query result determination module is used to determine a data query result corresponding to the data query instruction based on the target data storage location, and upload the data query result to the cloud server.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to execute the data query method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data query method according to any one of claims 1 to 7 when executed.
Citation Information
Patent Citations
MongoDB-based time sequence database system
CN110209651A
Data query method and device and server
CN119669244A
Real-time feature store in a database system
US20240362196A1