CN116303573A - Data query method, device, computer equipment and storage medium - Google Patents

Data query method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116303573A
CN116303573A CN202310247953.7A CN202310247953A CN116303573A CN 116303573 A CN116303573 A CN 116303573A CN 202310247953 A CN202310247953 A CN 202310247953A CN 116303573 A CN116303573 A CN 116303573A
Authority
CN
China
Prior art keywords
task
target
query
data
instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310247953.7A
Other languages
Chinese (zh)
Inventor
张春和
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202310247953.7A priority Critical patent/CN116303573A/en
Publication of CN116303573A publication Critical patent/CN116303573A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application discloses a data query method, a data query device, computer equipment and a storage medium, wherein the data query method, the data query device, the computer equipment and the storage medium are used for receiving a data query instruction aiming at a target system; acquiring a current query task list to be processed of a target system, and determining the task quantity of the task to be queried in the query task list; if the task quantity is smaller than or equal to a preset task quantity threshold, adding a target query task corresponding to the data query instruction into a query task list, so that when the target system traverses the target query task in the query task list, executing the target query task, and querying target task data corresponding to the target query task in a preset database; if the task quantity is greater than the task threshold, a dynamic cache function is added for the process to which the target query task belongs, so that the target system queries target task data corresponding to the target task from a cache space when executing the target query task, and resource consumption generated by the operation of the monitoring system when controlling the cache function is avoided.

Description

Data query method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of data query technologies, and in particular, to a data query method, a data query device, a computer device, and a storage medium.
Background
With the development of society, people have higher requirements on data processing capability of a system, for example, when data is queried through a network service system, data needed by a user needs to be queried efficiently, but in the prior art, in order to improve efficiency, a cache system is generally configured for the network service system so as to query corresponding data in a cache directly through caching the data, so that the efficiency of data query is improved.
In the prior art, the operation of the system is generally required to be continuously monitored, so that the corresponding cache function is started and controlled at a proper time, and a great amount of resources are consumed in the aspect of monitoring the operation of the system.
Disclosure of Invention
The embodiment of the application provides a data query method, a data query device, computer equipment and a storage medium which can be used in the fields of financial science and technology or other related fields, and can avoid resource consumption generated by the operation of a monitoring system when a cache function is controlled.
The embodiment of the application provides a data query method, which comprises the following steps:
receiving a data query instruction aiming at a target system;
acquiring a current query task list to be processed of the target system, and determining the task quantity of the query task to be processed in the query task list to be processed;
If the task quantity is smaller than or equal to a preset task quantity threshold, adding a target query task corresponding to the data query instruction into the query task list to be processed, so that when the target system traverses the target query task in the query task list to be processed, executing the target query task, and querying target task data corresponding to the target query task in a preset database;
and if the task quantity is larger than the task threshold, adding a dynamic cache function for a process to which a target query task corresponding to the data query instruction belongs, so that the target system queries target task data corresponding to the target task from a preset cache space when executing the target query task.
Correspondingly, the embodiment of the application also provides a data query device, which comprises:
the instruction receiving module is used for receiving a data query instruction aiming at the target system;
the list acquisition module is used for acquiring a current query task list to be processed of the target system and determining the task quantity of the query task to be processed in the query task list to be processed;
the task adding module is used for adding a target query task corresponding to the data query instruction into the query task list to be processed if the task quantity is smaller than or equal to a preset task quantity threshold value, so that when the target system traverses the target query task in the query task list to be processed, the target query task is executed, and target task data corresponding to the target query task is queried in a preset database;
And the buffer adding module is used for adding a dynamic buffer function to the process of the target query task corresponding to the data query instruction if the task quantity is larger than the task threshold value, so that the target system queries target task data corresponding to the target task from a preset buffer space when executing the target query task.
Accordingly, the embodiment of the application also provides a computer device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the data query method provided by any one of the embodiments of the application.
Correspondingly, the embodiment of the application also provides a storage medium, wherein the storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the data query method.
The method comprises the steps of receiving a data query instruction aiming at a target system; acquiring a current query task list to be processed of the target system, and determining the task quantity of the query task to be processed in the query task list to be processed; if the task quantity is smaller than or equal to a preset task quantity threshold, adding a target query task corresponding to the data query instruction into the query task list to be processed, so that when the target system traverses the target query task in the query task list to be processed, executing the target query task, and querying target task data corresponding to the target query task in a preset database; if the task quantity is larger than the task threshold, adding a dynamic cache function for a process to which a target query task corresponding to the data query instruction belongs, so that the target system queries target task data corresponding to the target task from a preset cache space when executing the target query task, and resource consumption generated by operation of a monitoring system when controlling the cache function is avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a data query method according to an embodiment of the present application.
Fig. 2 is a block diagram of a data query device according to an embodiment of the present application.
Fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The embodiment of the application provides a data query method, a data query device, a storage medium and computer equipment. Specifically, the data query method in the embodiment of the present application may be executed by a computer device, where the computer device may be a server or a device such as a terminal. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligent platforms. The terminal may be, but is not limited to, a smart phone, a desktop computer, a notebook computer, a tablet computer, etc. The terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited herein.
For example, the computer device may be a terminal that may receive a data query instruction for a target system; acquiring a current query task list to be processed of the target system, and determining the task quantity of the query task to be processed in the query task list to be processed; if the task quantity is smaller than or equal to a preset task quantity threshold, adding a target query task corresponding to the data query instruction into the query task list to be processed, so that when the target system traverses the target query task in the query task list to be processed, executing the target query task, and querying target task data corresponding to the target query task in a preset database; and if the task quantity is larger than the task threshold, adding a dynamic cache function for a process to which a target query task corresponding to the data query instruction belongs, so that the target system queries target task data corresponding to the target task from a preset cache space when executing the target query task.
Based on the above problems, embodiments of the present application provide a data query method, a device, a computer device, and a storage medium, which can avoid resource consumption generated by operation of a monitoring system when controlling a cache function.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
The embodiment of the application provides a data query method, which can be executed by a terminal or a server, and the embodiment of the application is described by taking the data query method executed by the terminal as an example.
Referring to fig. 1, fig. 1 is a flow chart of a data query method according to an embodiment of the present application. The specific flow of the data query method can be as follows:
101. a data query instruction is received for a target system.
The data query instruction is an instruction for executing a task to query task data corresponding to the task, and correspondingly, the data query instruction for the target system is an instruction for prompting the target system to execute a query task carried in the data query instruction to query task data corresponding to the task. The data query instruction comprises task information for indicating a task to be queried, so that a query task corresponding to the data query instruction can be obtained according to the task information in the data query instruction and can be recorded as a target query task.
In this embodiment, by receiving a data query instruction for the target system, the terminal is prompted to learn that a new query task is currently added, so as to trigger a task judging mechanism of the terminal, thereby determining whether a dynamic cache function needs to be added, so that the target system can be prompted to efficiently process the query task to be processed currently, and resources consumed for continuously monitoring the operation of the target system are avoided.
102. Acquiring a current query task list to be processed of the target system, and determining the task quantity of the query task to be processed in the query task list to be processed.
The task to be queried stored in the task list to be queried is a task which is not currently executed by the target system, so that the task quantity required to be executed by the current target system can be obtained through the task list to be queried, wherein the task comprises, but is not limited to, the number of tasks required to be processed, the task time required to be spent, the system resources required to be consumed and the like.
In this embodiment, the terminal obtains the query task list to be processed to determine the task amount of the query task in the query task list to be processed, so that the system running state of the current target system can be determined based on the task amount of the query task, and the system running state is used as a data base for judging after the task judging mechanism of the trigger terminal.
It may be appreciated that the task to be queried in the above list of query tasks to be processed may be at least one. In addition, since the target system may have already completed processing the task to be queried, the task to be queried in the task list to be queried may also be zero, and accordingly, if the task to be queried is zero, the task amount of the task to be queried in the task list to be queried is also zero.
103. If the task quantity is smaller than or equal to a preset task quantity threshold, adding a target query task corresponding to the data query instruction into the query task list to be processed, so that when the target system traverses the target query task in the query task list to be processed, executing the target query task, and querying target task data corresponding to the target query task in a preset database.
In this embodiment, if the task amount is less than or equal to the preset task amount threshold, it is indicated that the current system processes fewer tasks to be queried, so that resources are not required to be consumed to add a dynamic cache function, and only the system is required to process the tasks to be queried by itself. The target inquiry task corresponding to the data inquiry instruction is added into the inquiry task list to be processed, namely the target inquiry task corresponding to the data inquiry instruction is added into a task sequence, so that when the target system traverses to the target inquiry task in the inquiry task list to be processed, namely the target system traverses and executes each of the tasks to be inquired in sequence according to the task sequence until the target inquiry task is traversed, the terminal executes the target inquiry task, and target task data corresponding to the target inquiry task is inquired in a preset database.
104. And if the task quantity is larger than the task threshold, adding a dynamic cache function for a process to which a target query task corresponding to the data query instruction belongs, so that the target system queries target task data corresponding to the target task from a preset cache space when executing the target query task.
In this embodiment, if the task amount is greater than the task threshold, it is indicated that the current system processes more tasks to be queried, so that a certain resource is consumed to add a dynamic cache function, so that the data query efficiency of the target system is provided by the dynamic cache function. By adding the dynamic cache function to the process to which the target query task corresponding to the data query instruction belongs, task data corresponding to the target query task can be queried from the cache space, even if the target system queries target task data corresponding to the target task from a preset cache space when executing the target query task, and the data query efficiency is improved.
It can be understood that in the prior art, the existing system sometimes does not have a cache function, so in order to improve the data query efficiency of the system without the cache, the cache function is dynamically added to the process of the query task in the system, so as to achieve the purposes of caching the data into the cache space and querying the data from the space cached when the data is cached.
In some embodiments, the terminal may be implemented by using JavaAgent technology to add a dynamic cache function to the process. Specifically, the terminal may be connected to a process, i.e., a process to which the target query task belongs, through a Java native VirtualMachine. When connected to a process, a VirtualMachine object may be obtained. Then, the loadAgent method in the virtual machine object is called, and the parameter with the cache function can be dynamically added into the process, and the code corresponding to the parameter is called a part of the process, wherein the parameter with the cache function can be an independent Jar packet, and the Jar packet has the cache function, for example, a "JavaAgent cache control" function. In addition, while dynamically adding, the Java Instrumentation object can be obtained through the parameters, so that the Java Instrumentation object is used for modifying the byte codes in the process, and thus functions of reading, writing, modifying and the like of the cache are added.
The space address of the cache space may be specified by a Java Instrumentation object.
In some embodiments, if the task amount is greater than the task threshold, adding a dynamic cache function to a process to which the target query task corresponding to the data query instruction belongs may include: if the task quantity is larger than the task threshold value, the current process of dynamically adding the cache function is described, and a dynamic cache instruction is generated. And the terminal acquires the process number of the process to which the target query task corresponding to the data query instruction belongs, so that the target process corresponding to the process number is searched based on the dynamic cache instruction, and a preset dynamic cache function is added into the target process, so that the dynamic cache function is triggered to be added on the target process through the dynamic cache instruction.
In some embodiments, before querying the target task data corresponding to the target task from the preset cache space, the method may further include: based on the dynamic caching function, the terminal needs to dynamically cache task data corresponding to the target query task into the cache space, so that the target system can conveniently perform data query from the cache space to obtain target task data corresponding to the target task.
In some embodiments, since a certain resource consumption is also required to cache the data into the cache space, and sometimes the data does not need to be cached into the cache space, for example, when the task is less, the system only needs to directly query the data from the database, so after querying the target task data corresponding to the target task from the preset cache space, the method may further include: the terminal can acquire the cache stop instruction and control the process of the target inquiry task to stop the dynamic cache function based on the cache stop instruction, so that the resource consumption is avoided.
The buffer stop instruction may be an instruction generated after the terminal monitors that the target system executes the target task, or may be an instruction generated after the server monitors that the target system executes the target task, and sends the instruction to the terminal, or may be an instruction automatically generated after the target system executes the target task, and sends the instruction to the terminal, which may be specifically set according to a user requirement, and is not limited herein.
In some embodiments, since some processes have added a dynamic cache function, before adding the dynamic cache function to the process to which the target query task corresponding to the data query instruction belongs, the method may further include: the terminal detects a process related function of a process to which the target query task belongs to judge whether a dynamic cache function exists in the process related function, if the process related function exists in the dynamic cache function, a cache enabling instruction is generated to control the process to which the target query task belongs to enable the dynamic cache function based on the cache enabling instruction, so that dynamic cache of data is realized, and corresponding task data is queried from a cache space.
In some embodiments, the determining the task amount of the task to be queried in the task to be queried list may include: the terminal may calculate a task duration required for executing at least one query in the query task list to be processed, and determine the task duration as the task quantity. Accordingly, if the task amount is greater than the task threshold, adding a dynamic cache function to a process to which the target query task corresponding to the data query instruction belongs may include: if the task time length is greater than the preset task time length threshold, adding a dynamic cache function for the process of the target query task corresponding to the data query instruction.
In some embodiments, the determining the task amount of the task to be queried in the task to be queried list may include: and determining the task number of the task to be queried in the task list to be processed, and determining the task number as the task number. Accordingly, if the task amount is greater than the task threshold, adding a dynamic cache function to a process to which the target query task corresponding to the data query instruction belongs may include: if the number of the tasks is greater than a preset task number threshold, adding a dynamic cache function to a process to which the target query task corresponding to the data query instruction belongs.
The embodiment of the application discloses a data query method, which comprises the following steps: receiving a data query instruction aiming at a target system; acquiring a current query task list to be processed of the target system, and determining the task quantity of the query task to be processed in the query task list to be processed; if the task quantity is smaller than or equal to a preset task quantity threshold, adding a target query task corresponding to the data query instruction into the query task list to be processed, so that when the target system traverses the target query task in the query task list to be processed, executing the target query task, and querying target task data corresponding to the target query task in a preset database; if the task quantity is greater than the task threshold, adding a dynamic cache function to a process to which a target query task corresponding to the data query instruction belongs, so that the target system queries target task data corresponding to the target task from a preset cache space when executing the target query task, and resource consumption generated by the operation of the monitoring system when controlling the cache function can be avoided.
In order to facilitate better implementation of the data query method provided by the embodiment of the application, the embodiment of the application also provides a data query device based on the data query method. Wherein the meaning of nouns is the same as that in the data query method, and specific implementation details can refer to the description in the method embodiment.
Referring to fig. 2, fig. 2 is a block diagram of a data query device according to an embodiment of the present application, where the device includes:
an instruction receiving module 201, configured to receive a data query instruction for a target system;
a list obtaining module 202, configured to obtain a current query task list to be processed by the target system, and determine a task amount of a task to be queried in the query task list to be processed;
the task adding module 203 is configured to add a target query task corresponding to the data query instruction to the query task list to be processed if the task amount is less than or equal to a preset task amount threshold, so that when the target system traverses the target query task in the query task list to be processed, execute the target query task, and query target task data corresponding to the target query task in a preset database;
And the buffer adding module 204 is configured to add a dynamic buffer function to a process to which the target query task corresponding to the data query instruction belongs if the task amount is greater than the task threshold, so that the target system queries target task data corresponding to the target task from a preset buffer space when executing the target query task.
In some embodiments, the data query device further includes:
and the module is used for dynamically caching the task data corresponding to the target query task into the cache space based on the dynamic caching function.
In some embodiments, the cache adding module 204 includes:
the unit is used for generating a dynamic cache instruction if the task quantity is larger than the task threshold value;
acquiring a process number of a process to which the target query task corresponding to the data query instruction belongs;
and searching a target process corresponding to the process number based on the dynamic cache instruction, and adding a preset dynamic cache function into the target process.
In some embodiments, the data query device further includes:
the module is used for acquiring a cache stop instruction;
and controlling the process to which the target query task belongs to stop the dynamic cache function based on the cache stop instruction.
In some embodiments, the data query device further includes:
the module is used for detecting the process correlation function of the process to which the target query task belongs;
if the process related function has the dynamic cache function, generating a cache enabling instruction;
and controlling the process to which the target inquiry task belongs to start the dynamic caching function based on the caching start instruction.
In some embodiments, the list acquisition module 202 includes:
calculating the task duration required by executing the task to be queried in the task list to be processed, and determining the task duration as the task quantity;
the cache adding module 204 further includes:
if the task time length is greater than the preset task time length threshold, adding a dynamic cache function for the process of the target query task corresponding to the data query instruction.
In some embodiments, the list acquisition module 202 includes:
determining the task number of the task to be queried in the query task list to be processed, and determining the task number as the task number;
the cache adding module 204 further includes:
if the number of the tasks is greater than a preset task number threshold, adding a dynamic cache function to a process to which the target query task corresponding to the data query instruction belongs.
The embodiment of the application discloses a data query device, which is used for receiving a data query instruction aiming at a target system through an instruction receiving module 201; a list obtaining module 202, configured to obtain a current query task list to be processed by the target system, and determine a task amount of a task to be queried in the query task list to be processed; the task adding module 203 is configured to add a target query task corresponding to the data query instruction to the query task list to be processed if the task amount is less than or equal to a preset task amount threshold, so that when the target system traverses the target query task in the query task list to be processed, execute the target query task, and query target task data corresponding to the target query task in a preset database; and the buffer adding module 204 is configured to add a dynamic buffer function to a process to which the target query task corresponding to the data query instruction belongs if the task amount is greater than the task threshold, so that the target system queries target task data corresponding to the target task from a preset buffer space when executing the target query task. Therefore, resource consumption generated by the operation of the monitoring system when the cache function is controlled is avoided.
Correspondingly, the embodiment of the application also provides computer equipment, which can be a terminal. As shown in fig. 3, fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application. The computer device 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more computer readable storage media, and a computer program stored on the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. It will be appreciated by those skilled in the art that the computer device structure shown in the figures is not limiting of the computer device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
Processor 301 is a control center of computer device 300 and utilizes various interfaces and lines to connect various portions of the overall computer device 300, and to perform various functions of computer device 300 and process data by running or loading software programs and/or modules stored in memory 302 and invoking data stored in memory 302, thereby performing overall monitoring of computer device 300.
In the embodiment of the present application, the processor 301 in the computer device 300 loads the instructions corresponding to the processes of one or more application programs into the memory 302 according to the following steps, and the processor 301 executes the application programs stored in the memory 302, so as to implement various functions:
receiving a data query instruction aiming at a target system;
acquiring a current query task list to be processed of the target system, and determining the task quantity of the query task to be processed in the query task list to be processed;
if the task quantity is smaller than or equal to a preset task quantity threshold, adding a target query task corresponding to the data query instruction into the query task list to be processed, so that when the target system traverses the target query task in the query task list to be processed, executing the target query task, and querying target task data corresponding to the target query task in a preset database;
and if the task quantity is larger than the task threshold, adding a dynamic cache function for a process to which a target query task corresponding to the data query instruction belongs, so that the target system queries target task data corresponding to the target task from a preset cache space when executing the target query task.
In some embodiments, before querying target task data corresponding to the target task from a preset cache space, the method further includes:
and dynamically caching task data corresponding to the target query task into the cache space based on the dynamic caching function.
In some embodiments, if the task amount is greater than the task threshold, adding a dynamic cache function to a process to which the target query task corresponding to the data query instruction belongs, includes:
if the task quantity is larger than the task threshold value, generating a dynamic cache instruction;
acquiring a process number of a process to which the target query task corresponding to the data query instruction belongs;
and searching a target process corresponding to the process number based on the dynamic cache instruction, and adding a preset dynamic cache function into the target process.
In some embodiments, after querying target task data corresponding to the target task from a preset cache space, the method further includes:
obtaining a cache stop instruction;
and controlling the process to which the target query task belongs to stop the dynamic cache function based on the cache stop instruction.
In some embodiments, before adding the dynamic cache function to the process to which the target query task corresponding to the data query instruction belongs, the method further includes:
Detecting a process association function of a process to which the target query task belongs;
if the process related function has the dynamic cache function, generating a cache enabling instruction;
and controlling the process to which the target inquiry task belongs to start the dynamic caching function based on the caching start instruction.
In some embodiments, the determining the task amount of the task to be queried in the task to be queried list includes:
calculating the task duration required by executing the task to be queried in the task list to be processed, and determining the task duration as the task quantity;
and if the task amount is greater than the task threshold, adding a dynamic cache function to a process to which a target query task corresponding to the data query instruction belongs, including:
if the task time length is greater than the preset task time length threshold, adding a dynamic cache function for the process of the target query task corresponding to the data query instruction.
In some embodiments, the determining the task amount of the task to be queried in the task to be queried list includes:
determining the task number of the task to be queried in the query task list to be processed, and determining the task number as the task number;
And if the task amount is greater than the task threshold, adding a dynamic cache function to a process to which a target query task corresponding to the data query instruction belongs, including:
if the number of the tasks is greater than a preset task number threshold, adding a dynamic cache function to a process to which the target query task corresponding to the data query instruction belongs.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Optionally, as shown in fig. 3, the computer device 300 further includes: a touch display 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the touch display 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307, respectively. Those skilled in the art will appreciate that the computer device structure shown in FIG. 3 is not limiting of the computer device and may include more or fewer components than shown, or may be combined with certain components, or a different arrangement of components.
The touch display 303 may be used to display a graphical user interface and receive operation instructions generated by a user acting on the graphical user interface. The touch display 303 may include a display panel and a touch panel. Wherein the display panel may be used to display messages entered by a user or provided to a user as well as various graphical user interfaces of a computer device, which may be composed of graphics, text, icons, video, and any combination thereof. Alternatively, the display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light Emitting Diode (OLED), or the like. The touch panel may be used to collect touch operations on or near the user (such as operations on or near the touch panel by the user using any suitable object or accessory such as a finger, stylus, etc.), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Alternatively, the touch panel may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives a touch message from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 301, and can receive commands from the processor 301 and execute them. The touch panel may overlay the display panel, and upon detection of a touch operation thereon or thereabout, the touch panel is passed to the processor 301 to determine the type of touch event, and the processor 301 then provides a corresponding visual output on the display panel in accordance with the type of touch event. In the embodiment of the present application, the touch panel and the display panel may be integrated into the touch display screen 303 to implement the input and output functions. In some embodiments, however, the touch panel and the touch panel may be implemented as two separate components to perform the input and output functions. I.e. the touch-sensitive display 303 may also implement an input function as part of the input unit 306.
The radio frequency circuitry 304 may be used to transceive radio frequency signals to establish wireless communications with a network device or other computer device via wireless communications.
The audio circuit 305 may be used to provide an audio interface between a user and a computer device through a speaker, microphone. The audio circuit 305 may transmit the received electrical signal after audio data conversion to a speaker, and convert the electrical signal into a sound signal for output by the speaker; on the other hand, the microphone converts the collected sound signals into electrical signals, which are received by the audio circuit 305 and converted into audio data, which are processed by the audio data output processor 301 for transmission to, for example, another computer device via the radio frequency circuit 304, or which are output to the memory 302 for further processing. The audio circuit 305 may also include an ear bud jack to provide communication of the peripheral ear bud with the computer device.
The input unit 306 may be used to receive input numbers, character messages or user characteristic messages (e.g., fingerprints, irises, facial messages, etc.), and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
The power supply 307 is used to power the various components of the computer device 300. Alternatively, the power supply 307 may be logically connected to the processor 301 through a power management system, so as to perform functions of managing charging, discharging, and power consumption management through the power management system. The power supply 307 may also include one or more of any components, such as a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown in fig. 3, the computer device 300 may further include a camera, a sensor, a wireless fidelity module, a bluetooth module, etc., which are not described herein.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
As can be seen from the above, the computer device provided in this embodiment receives a data query instruction for a target system; acquiring a current query task list to be processed of the target system, and determining the task quantity of the query task to be processed in the query task list to be processed; if the task quantity is smaller than or equal to a preset task quantity threshold, adding a target query task corresponding to the data query instruction into the query task list to be processed, so that when the target system traverses the target query task in the query task list to be processed, executing the target query task, and querying target task data corresponding to the target query task in a preset database; and if the task quantity is larger than the task threshold, adding a dynamic cache function for a process to which a target query task corresponding to the data query instruction belongs, so that the target system queries target task data corresponding to the target task from a preset cache space when executing the target query task.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer readable storage medium having stored therein a plurality of computer programs that can be loaded by a processor to perform steps in any of the data query methods provided by embodiments of the present application. For example, the computer program may perform the steps of:
receiving a data query instruction aiming at a target system;
acquiring a current query task list to be processed of the target system, and determining the task quantity of the query task to be processed in the query task list to be processed;
if the task quantity is smaller than or equal to a preset task quantity threshold, adding a target query task corresponding to the data query instruction into the query task list to be processed, so that when the target system traverses the target query task in the query task list to be processed, executing the target query task, and querying target task data corresponding to the target query task in a preset database;
And if the task quantity is larger than the task threshold, adding a dynamic cache function for a process to which a target query task corresponding to the data query instruction belongs, so that the target system queries target task data corresponding to the target task from a preset cache space when executing the target query task.
In some embodiments, before querying target task data corresponding to the target task from a preset cache space, the method further includes:
and dynamically caching task data corresponding to the target query task into the cache space based on the dynamic caching function.
In some embodiments, if the task amount is greater than the task threshold, adding a dynamic cache function to a process to which the target query task corresponding to the data query instruction belongs, includes:
if the task quantity is larger than the task threshold value, generating a dynamic cache instruction;
acquiring a process number of a process to which the target query task corresponding to the data query instruction belongs;
and searching a target process corresponding to the process number based on the dynamic cache instruction, and adding a preset dynamic cache function into the target process.
In some embodiments, after querying target task data corresponding to the target task from a preset cache space, the method further includes:
obtaining a cache stop instruction;
and controlling the process to which the target query task belongs to stop the dynamic cache function based on the cache stop instruction.
In some embodiments, before adding the dynamic cache function to the process to which the target query task corresponding to the data query instruction belongs, the method further includes:
detecting a process association function of a process to which the target query task belongs;
if the process related function has the dynamic cache function, generating a cache enabling instruction;
and controlling the process to which the target inquiry task belongs to start the dynamic caching function based on the caching start instruction.
In some embodiments, the determining the task amount of the task to be queried in the task to be queried list includes:
calculating the task duration required by executing the task to be queried in the task list to be processed, and determining the task duration as the task quantity;
and if the task amount is greater than the task threshold, adding a dynamic cache function to a process to which a target query task corresponding to the data query instruction belongs, including:
If the task time length is greater than the preset task time length threshold, adding a dynamic cache function for the process of the target query task corresponding to the data query instruction.
In some embodiments, the determining the task amount of the task to be queried in the task to be queried list includes:
determining the task number of the task to be queried in the query task list to be processed, and determining the task number as the task number;
and if the task amount is greater than the task threshold, adding a dynamic cache function to a process to which a target query task corresponding to the data query instruction belongs, including:
if the number of the tasks is greater than a preset task number threshold, adding a dynamic cache function to a process to which the target query task corresponding to the data query instruction belongs.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the storage medium may include: a Read Only Memory (ROM), a random access Memory (R client account M, R client account from client account access Memory), a magnetic disk or an optical disk, and the like.
The steps in any data query method provided in the embodiments of the present application may be executed by the computer program stored in the storage medium, so that the beneficial effects that any data query method provided in the embodiments of the present application may be achieved, which are detailed in the previous embodiments and are not repeated herein.
The foregoing has described in detail the methods, apparatuses, computer devices and storage medium for data query provided by the embodiments of the present application, and specific examples have been applied to illustrate the principles and embodiments of the present application, where the foregoing examples are provided to assist in understanding the methods and core ideas of the present application; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. A method of querying data, the method comprising:
receiving a data query instruction aiming at a target system;
acquiring a current query task list to be processed of the target system, and determining the task quantity of the query task to be processed in the query task list to be processed;
if the task quantity is smaller than or equal to a preset task quantity threshold, adding a target query task corresponding to the data query instruction into the query task list to be processed, so that when the target system traverses the target query task in the query task list to be processed, executing the target query task, and querying target task data corresponding to the target query task in a preset database;
And if the task quantity is greater than the task threshold, adding a dynamic cache function for a process to which a target query task corresponding to the data query instruction belongs, so that the target system queries target task data corresponding to the target task from a preset cache space when executing the target query task.
2. The method of claim 1, further comprising, prior to querying target task data corresponding to the target task from a preset cache space:
and dynamically caching task data corresponding to the target query task into the cache space based on the dynamic caching function.
3. The method of claim 1, wherein adding a dynamic cache function to a process to which the target query task corresponding to the data query instruction belongs if the task amount is greater than the task threshold comprises:
if the task quantity is larger than the task threshold value, generating a dynamic cache instruction;
acquiring a process number of a process to which the target query task corresponding to the data query instruction belongs;
and searching a target process corresponding to the process number based on the dynamic cache instruction, and adding a preset dynamic cache function into the target process.
4. The method according to claim 1, further comprising, after querying target task data corresponding to the target task from a preset cache space:
obtaining a cache stop instruction;
and controlling the process to which the target query task belongs to stop the dynamic cache function based on the cache stop instruction.
5. The method of claim 1, further comprising, prior to adding a dynamic cache function to a process to which a target query task corresponding to the data query instruction belongs:
detecting a process association function of a process to which the target query task belongs;
if the dynamic cache function exists in the process association function, a cache enabling instruction is generated;
and controlling the process to which the target query task belongs to start the dynamic cache function based on the cache start instruction.
6. The method of claim 1, wherein the determining the task amount of the task to be queried in the list of query tasks to be processed comprises:
calculating the task duration required by executing the task to be queried in the task list to be processed, and determining the task duration as the task quantity;
And if the task quantity is greater than the task threshold, adding a dynamic cache function to a process to which a target query task corresponding to the data query instruction belongs, including:
and if the task time length is greater than a preset task time length threshold, adding a dynamic cache function for a process to which the target query task corresponding to the data query instruction belongs.
7. The method according to any one of claims 1 to 6, wherein determining the task amount of the task to be queried in the task list to be queried comprises:
determining the task number of the task to be queried in the task list to be processed, and determining the task number as the task number;
and if the task quantity is greater than the task threshold, adding a dynamic cache function to a process to which a target query task corresponding to the data query instruction belongs, including:
and if the number of the tasks is larger than a preset task number threshold, adding a dynamic cache function for a process to which the target query task corresponding to the data query instruction belongs.
8. A data querying device, the device comprising:
the instruction receiving module is used for receiving a data query instruction aiming at the target system;
The list acquisition module is used for acquiring a current query task list to be processed of the target system and determining the task quantity of the query task to be processed in the query task list to be processed;
the task adding module is used for adding a target query task corresponding to the data query instruction into the query task list to be processed if the task quantity is smaller than or equal to a preset task quantity threshold value, so that when the target system traverses the target query task in the query task list to be processed, the target query task is executed, and target task data corresponding to the target query task is queried in a preset database;
and the cache adding module is used for adding a dynamic cache function to a process to which a target query task corresponding to the data query instruction belongs if the task quantity is greater than the task threshold value, so that the target system queries target task data corresponding to the target task from a preset cache space when executing the target query task.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements the data query method of any of claims 1 to 7 when the program is executed by the processor.
10. A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the data querying method of any of claims 1 to 7.
CN202310247953.7A 2023-03-07 2023-03-07 Data query method, device, computer equipment and storage medium Pending CN116303573A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310247953.7A CN116303573A (en) 2023-03-07 2023-03-07 Data query method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310247953.7A CN116303573A (en) 2023-03-07 2023-03-07 Data query method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116303573A true CN116303573A (en) 2023-06-23

Family

ID=86823669

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310247953.7A Pending CN116303573A (en) 2023-03-07 2023-03-07 Data query method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116303573A (en)

Similar Documents

Publication Publication Date Title
CN105471931B (en) Method, device and system for inquiring service data
CN113420051B (en) Data query method and device, electronic equipment and storage medium
CN108809805B (en) Information interaction method and system and public account client
CN108984374B (en) Method and system for testing database performance
CN115987852A (en) Interface service state detection method and device, computer equipment and storage medium
CN111273955A (en) Thermal restoration plug-in optimization method and device, storage medium and electronic equipment
CN114327087A (en) Input event processing method and device, electronic equipment and storage medium
CN114115895A (en) Code query method and device, electronic equipment and storage medium
CN116303573A (en) Data query method, device, computer equipment and storage medium
CN113065083A (en) Page processing method and device, electronic equipment and storage medium
CN112035180A (en) Automatic instance loading method and device, electronic equipment and storage medium
CN106681845B (en) Method and device for managing communication messages
CN114710501B (en) Service request processing method, device, server and computer readable storage medium
CN117234137B (en) MCU clock frequency switching circuit, MCU and electronic equipment
CN114189436B (en) Multi-cluster configuration deployment method and device, electronic equipment and storage medium
CN116382800A (en) Data processing method, device, electronic equipment and storage medium
CN115858652A (en) Data conversion method and device, computer equipment and storage medium
CN107920010B (en) Method and system for realizing temporary session
CN115794915A (en) Data calling method and device, computer equipment and storage medium
CN115373865A (en) Concurrent thread management method, device, electronic equipment and storage medium
CN117412278A (en) Bluetooth equipment scanning control method and device, electronic equipment and storage medium
CN115809269A (en) Method and device for inquiring service data, computer equipment and storage medium
CN112316416A (en) Data searching method and device, computer equipment and storage medium
CN116962332A (en) Message searching method, device and computer readable storage medium
CN115757506A (en) Data processing method, device, medium and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination