Data query performance detection method and device, computer equipment and storage medium
By obtaining the start and end time of data query, calculating the target query time and rating, the problem of inaccurate performance detection of the main site in traditional technology of cloud-edge collaborative metrology automation is solved, and an objective and accurate performance evaluation method is provided.
Patent Information
- Application Number
- CN202411557189.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-01-03
AI Technical Summary
In traditional technology, cloud-edge collaborative implementation of metering automation main site performance detection has strong artificial subjectivity, resulting in unobjective and inaccurate performance detection.
Provide a data query performance detection method. By obtaining the query start time and end time of the data to be detected, the target query time is determined according to the data type, and the query performance score is calculated based on the target time and standard time, which improves the accuracy and objective detection. sex.
It realizes accurate and objective evaluation of data query performance, provides standardized query performance evaluation standards, and improves the accuracy and reliability of detection results.
Smart Images

Figure CN119248827A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data query performance detection method, device, computer equipment and storage medium. Background Art
[0002] At present, with the development of cloud computing, big data, artificial intelligence and other technologies, the construction of digital capabilities of metering automation systems has become a future trend. The metering automation system with cloud-edge collaboration generally includes the collection and monitoring domain and the data analysis domain. Among them, the data analysis domain is deployed in the cloud, and the collection and monitoring domain is deployed in the edge cluster. Through cloud-edge collaboration, the collection capability and data analysis capability of the metering automation master station are improved.
[0003] In traditional technology, the performance of the cloud-edge collaborative metering automation master station is usually tested by organizing experts to conduct manual evaluation, but human subjectivity is too strong, and there are problems such as non-objective and inaccurate performance testing. Summary of the invention
[0004] Based on this, it is necessary to provide a data query performance detection method, device, computer equipment and storage medium that can accurately determine data query performance in response to the above technical problems.
[0005] In a first aspect, the present application provides a data query performance detection method, comprising:
[0006] According to the data type of the data to be detected, the query start time and the query end time of the data to be detected are obtained; the data type of the data to be detected includes user power data and non-user power data;
[0007] For the data to be detected of different data types, the target query duration of the data to be detected is determined according to the query start time of the data to be detected and the corresponding query end time;
[0008] The query performance score of the data to be tested is determined based on the target query duration and the standard duration.
[0009] In one embodiment, obtaining the query start time and query end time of the data to be detected according to the data type of the data to be detected includes:
[0010] If the data type of the data to be detected is user power data, obtaining a query start time and a query end time of the user power data corresponding to at least one user;
[0011] If the data type of the data to be detected is non-user power data, the query start time and the query end time of the non-user power data are obtained.
[0012] In one embodiment, obtaining the query start time and query end time of user power data corresponding to at least one user includes:
[0013] In the case where the user power data is user table code data, obtaining a query start time and a query end time of the user table code data corresponding to at least one user;
[0014] In the case where the user power data is user voltage data, a target user is found from among the users according to a user tag of at least one user, and a query start time and a query end time of the user voltage data corresponding to the target user are obtained.
[0015] In one embodiment, obtaining the query start time and query end time of the user table code data corresponding to at least one user includes:
[0016] From the user table code data corresponding to each user, the query start time and query end time of the user table code data corresponding to users of different user types are obtained.
[0017] In one embodiment, for the to-be-detected data of different data types, the target query duration of the to-be-detected data is determined according to the query start time and query end time of the to-be-detected data, including:
[0018] For non-user power data, the difference between the query start time and the query end time is used as the target query duration of the non-user power data.
[0019] For data type user power data, the user query duration of the user power data corresponding to the corresponding user is determined based on the query start time and query end time of the user power data corresponding to at least one user, and the target query duration of the user power data is determined based on the user query duration of the user power data corresponding to at least one user.
[0020] In one of the embodiments, determining a target query duration of user power data according to a user query duration of user power data corresponding to at least one user includes:
[0021] Determine an average value of the user query duration according to the user query duration of the user power data corresponding to at least one user;
[0022] The average value is used as the target query duration for user power data.
[0023] In a second aspect, the present application also provides a data query performance detection device, comprising:
[0024] A time acquisition module, used for acquiring the query start time and query end time of the data to be detected according to the data type of the data to be detected; the data type of the data to be detected includes user power data and non-user power data;
[0025] A duration determination module is used to determine the target query duration of the data to be detected according to the query start time and the corresponding query end time of the data to be detected for different data types;
[0026] The score determination module is used to determine the query performance score of the data to be detected based on the target query duration and the standard duration.
[0027] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0028] According to the data type of the data to be detected, the query start time and the query end time of the data to be detected are obtained; the data type of the data to be detected includes user power data and non-user power data;
[0029] For the data to be detected of different data types, the target query duration of the data to be detected is determined according to the query start time of the data to be detected and the corresponding query end time;
[0030] The query performance score of the data to be tested is determined based on the target query duration and the standard duration.
[0031] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0032] According to the data type of the data to be detected, the query start time and the query end time of the data to be detected are obtained; the data type of the data to be detected includes user power data and non-user power data;
[0033] For the data to be detected of different data types, the target query duration of the data to be detected is determined according to the query start time of the data to be detected and the corresponding query end time;
[0034] The query performance score of the data to be tested is determined based on the target query duration and the standard duration.
[0035] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0036] According to the data type of the data to be detected, the query start time and the query end time of the data to be detected are obtained; the data type of the data to be detected includes user power data and non-user power data;
[0037] For the data to be detected of different data types, the target query duration of the data to be detected is determined according to the query start time of the data to be detected and the corresponding query end time;
[0038] The query performance score of the data to be tested is determined based on the target query duration and the standard duration.
[0039] The above-mentioned data query performance detection method, device, computer equipment and storage medium obtain the query start time and query end time of the data to be detected according to the data type of the data to be detected; the data type of the data to be detected includes user power data and non-user power data; for the data to be detected of different data types, the target query duration of the data to be detected is determined according to the query start time of the data to be detected and the corresponding query end time; the query performance score of the data to be detected is determined according to the target query duration and the standard duration. This embodiment proposes a standardized query performance evaluation standard, which improves the accuracy and objectivity of determining the query performance score. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] FIG1 is an application environment diagram of a data query performance detection method provided by this embodiment;
[0042] FIG2 is a schematic diagram of a flow chart of a first data query performance detection method provided by this embodiment;
[0043] FIG3 is a schematic diagram of a flow chart of a second data query performance detection method provided in this embodiment;
[0044] FIG4 is a structural block diagram of a data query performance detection device provided by this embodiment;
[0045] FIG5 is an internal structure diagram of a first computer device provided in this embodiment;
[0046] FIG6 is a diagram showing the internal structure of a second type of computer device provided in this embodiment. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0048] The data query performance detection method provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The computer device obtains the query start time and query end time of the data to be detected according to the data type of the data to be detected; the data type of the data to be detected includes user power data and non-user power data; for the data to be detected of different data types, according to the query start time of the data to be detected and the corresponding query end time, the target query duration of the data to be detected is determined; according to the target query duration and the standard duration, the query performance score of the data to be detected is determined. Among them, the computer device can be both a terminal 102 and a server 104. The terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0049] In an exemplary embodiment, as shown in FIG2 , a data query performance detection method is provided, which is described by taking the method applied to the computer device in FIG1 as an example, and includes the following steps 201 to 203. Among them:
[0050] Step 201 : acquiring the query start time and query end time of the data to be detected according to the data type of the data to be detected.
[0051] The data types of the data to be detected include user power data and non-user power data. User power data may include: user meter code data and user voltage data. Non-user power data includes: industry daily power data and substation line loss data.
[0052] The query start time may be the start time of querying the data to be detected, and the query end time may be the end time of completing the query of the data to be detected.
[0053] Specifically, the client sends a query performance detection request to the computer device through the network; the computer device determines the data to be detected according to the query performance detection request; and obtains the query start time and query end time of the data to be detected according to the data type of the data to be detected.
[0054] Step 202 , for the to-be-detected data of different data types, a target query duration of the to-be-detected data is determined according to the query start time and the corresponding query end time of the to-be-detected data.
[0055] Exemplarily, for to-be-detected data of different data types, the difference between the query start time of the to-be-detected data and the corresponding query end time is used as the target query duration of the to-be-detected data.
[0056] In one embodiment, for data to be detected of different data types, a target query duration of the data to be detected is determined based on the query start time and the query end time of the data to be detected, including: for data types that are non-user power data, the difference between the query start time and the query end time is used as the target query duration of the non-user power data; for data types that are user power data, a user query duration of user power data corresponding to a corresponding user is determined based on the query start time and the query end time of user power data corresponding to at least one user, and the target query duration of user power data is determined based on the user query duration of user power data corresponding to at least one user.
[0057] Step 203: Determine the query performance score of the data to be detected according to the target query duration and the standard duration.
[0058] Specifically, if the target query duration is not greater than the standard duration, the query performance score of the data to be tested is determined to be full score; if the target query duration is greater than the standard duration, the query performance score of the data to be tested is determined to be zero. The computer device sends the query performance score back to the client, and the client generates an evaluation report.
[0059] The above data query performance detection method obtains the query start time and query end time of the data to be detected according to the data type of the data to be detected; the data type of the data to be detected includes user power data and non-user power data; for the data to be detected of different data types, the target query duration of the data to be detected is determined according to the query start time of the data to be detected and the corresponding query end time; the query performance score of the data to be detected is determined according to the target query duration and the standard duration. This embodiment proposes a standardized query performance evaluation standard, which improves the accuracy and objectivity of determining the query performance score.
[0060] In one embodiment, based on the data type of the data to be detected, the query start time and the query end time of the data to be detected are obtained, including: if the data type of the data to be detected is user power data, then the query start time and the query end time of the user power data corresponding to at least one user are obtained; if the data type of the data to be detected is non-user power data, then the query start time and the query end time of the non-user power data are obtained.
[0061] In one embodiment, obtaining a query start time and a query end time of user power data corresponding to at least one user includes: when the user power data is user table code data, obtaining a query start time and a query end time of the user table code data corresponding to at least one user; when the user power data is user voltage data, finding a target user from each user based on a user tag of at least one user, and obtaining the query start time and the query end time of the user voltage data corresponding to the target user.
[0062] In one embodiment, obtaining the query start time and query end time of user table code data corresponding to at least one user includes: obtaining the query start time and query end time of user table code data corresponding to users of different user types from the user table code data corresponding to each user.
[0063] In this embodiment, if the data type of the data to be detected is user power data, the query start time and query end time of the user power data corresponding to at least one user are obtained; if the data type of the data to be detected is non-user power data, the query start time and query end time of the non-user power data are obtained. This embodiment can accurately determine the query start time and query end time of different types of users.
[0064] In one embodiment, a target query duration of user power data is determined based on a user query duration of user power data corresponding to at least one user, including: determining an average user query duration based on a user query duration of user power data corresponding to at least one user; and using the average value as the target query duration of user power data.
[0065] Specifically, for each user, the average value of the user query durations of the user's corresponding user power data is determined, and the average value is used as the target query duration of the user's power data. In a specific implementation, the target query duration can be determined by the following formula (1-1).
[0066] (1-1)
[0067] Among them, Δt represents the target query duration, Δt i Indicates the query duration of user i.
[0068] In this embodiment, the average user query duration is determined based on the user query duration of user power data corresponding to at least one user; the average value is used as the target query duration of the user power data, so that the target query duration of the user power data can be accurately determined.
[0069] In one embodiment, this embodiment provides an optional method for data query performance detection, and takes the method applied to a server as an example for explanation. As shown in FIG3 , the method includes the following steps:
[0070] Step 301 : acquiring the query start time and query end time of the data to be detected according to the data type of the data to be detected.
[0071] Exemplarily, it is assumed that the data to be detected may include: user meter code data of at least one user, voltage data of low-voltage key users, daily power consumption data of the industry, and line loss data of the substation area.
[0072] Exemplarily, for the user code data of at least one user, the user code data of at least one user tag (such as 3 special transformer users and 3 low-voltage users) is found from the local database of the computer device; a query statement is executed to obtain the user code data, the statement start time is used to determine the query start time of the user code data, and the statement end time is used as the query end time of the user code data. For the voltage data of low-voltage key users, the low-voltage key users are found from each user, and a query statement is executed to obtain the user voltage data of the low-voltage key users, the statement start time is used to determine the query start time of the user voltage data, and the statement end time is used as the query end time of the user voltage data. For the industry daily electricity data, a provincial company management unit is selected, and a query statement is executed to obtain the industry daily electricity data of the management unit, the statement start time is used to determine the query start time of the industry daily electricity data, and the statement end time is used as the query end time of the industry daily electricity data. For the substation line loss data, select any substation, execute the query statement to obtain the substation line loss data of the substation, use the statement start time to determine the query start time of the substation line loss data, and use the statement end time as the query end time of the substation line loss data.
[0073] Step 302 : for the to-be-detected data of different data types, the target query duration of the to-be-detected data is determined according to the query start time and the corresponding query end time of the to-be-detected data.
[0074] Exemplarily, for user table code data of at least one user, the difference between the query start time and the query end time of the user table code data is used as the user query duration of the user table code data; the average value between the user query durations of all users is used as the target query duration of the user table code data. For voltage data of low-voltage key users, the difference between the query start time and the query end time of the voltage data of low-voltage key users is used as the user query duration of the voltage data of low-voltage key users; the average value between the user query durations of all low-voltage key users is used as the target query duration of the voltage data of low-voltage key users. For industry daily electricity data, the difference between the query start time and the query end time of the industry daily electricity data is used as the target query duration of the industry daily electricity data. For substation line loss data, the difference between the query start time and the query end time of the substation line loss data is used as the target query duration of the substation line loss data.
[0075] Step 303: if the target query duration is not greater than the standard duration, the query performance score of the data to be detected is determined to be full marks; if the target query duration is greater than the standard duration, the query performance score of the data to be detected is determined to be zero.
[0076] It should be noted that if the data to be tested is daily frozen data, the collection performance of the data to be tested can also be determined through the above-mentioned implementation method, including: obtaining the main station processing start time and warehousing completion time of the daily frozen table code data in the most recent cycle, taking the main station processing start time as the start time, and the warehousing completion time as the end time; for each daily frozen data, determining the difference between the start time and the end time of the daily frozen data as the target collection time of the data to be tested; determining the average duration corresponding to the target collection time of all data to be tested; if the average is less than or equal to the standard duration, determining that the collection performance score of the data to be tested is full marks; if the average is greater than the standard duration, determining that the collection performance score of the data to be tested is zero.
[0077] It should be noted that if the data to be tested is industry daily electricity data, the computing performance of the data to be tested can also be determined through the above-mentioned implementation method, including: obtaining the start time and end time of the electricity calculation of the industry daily electricity data in the most recent period; for each industry daily electricity data, determining the difference between the start time and the end time of the industry daily electricity data as the target calculation time for the data to be tested; if the target calculation time is less than or equal to the standard time, determining that the computing performance score of the data to be tested is full marks; if the target calculation time is greater than the standard time, determining that the collection performance score of the data to be tested is zero.
[0078] It should be noted that if the data to be detected is a power outage event, the power outage assessment performance of the data to be detected can also be determined through the above-mentioned implementation method, including: obtaining the power outage events in the most recent period (such as 30 days), determining the start time of receiving and the end time of saving the power outage event, using the start time of receiving as the start time of assessment, and the end time of saving as the end time of assessment; for each power outage event, determining the difference between the assessment start time and the assessment end time of the power outage event as the target assessment duration of the power outage event; determining the average assessment duration corresponding to the target assessment duration of all power outage events; if the average assessment duration is less than or equal to the standard duration, determining that the power outage assessment performance score of the data to be detected is full marks; if the average assessment duration is greater than the standard duration, determining that the power outage assessment performance score of the data to be detected is zero.
[0079] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0080] Based on the same inventive concept, the embodiment of the present application also provides a data query performance detection device for implementing the data query performance detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data query performance detection device embodiments provided below can refer to the limitations of the data query performance detection method above, and will not be repeated here.
[0081] In an exemplary embodiment, as shown in FIG4 , a data query performance detection device is provided, comprising: a time acquisition module 10, a duration determination module 11 and a score determination module 12, wherein:
[0082] The time acquisition module 10 is used to acquire the query start time and the query end time of the data to be detected according to the data type of the data to be detected; the data type of the data to be detected includes user power data and non-user power data;
[0083] The duration determination module 11 is used to determine the target query duration of the data to be detected according to the query start time and the corresponding query end time of the data to be detected for different data types;
[0084] The score determination module 12 is used to determine the query performance score of the data to be detected according to the target query duration and the standard duration.
[0085] In one embodiment, the time acquisition module 10 in Figure 4 is also used to obtain the query start time and query end time of the user power data corresponding to at least one user if the data type of the data to be detected is user power data; if the data type of the data to be detected is non-user power data, then the query start time and query end time of the non-user power data are obtained.
[0086] In one embodiment, the time acquisition module 10 in Figure 4 is also used to obtain the query start time and query end time of the user table code data corresponding to at least one user when the user power data is user table code data; when the user power data is user voltage data, according to the user tag of at least one user, the target user is found from each user, and the query start time and query end time of the user voltage data corresponding to the target user are obtained.
[0087] In one embodiment, the time acquisition module 10 in FIG. 4 is further used to acquire the query start time and query end time of the user table code data corresponding to users of different user types from the user table code data corresponding to each user.
[0088] In one embodiment, the duration determination module 11 in Figure 4 is also used to use the difference between the query start time and the query end time as the target query duration of the non-user power data when the data type is non-user power data; for the data type is user power data, the user query duration of the user power data corresponding to the corresponding user is determined based on the query start time and the query end time of the user power data corresponding to at least one user, and the target query duration of the user power data is determined based on the user query duration of the user power data corresponding to at least one user.
[0089] In one embodiment, the duration determination module 11 in FIG. 4 is further used to determine an average user query duration based on a user query duration of user power data corresponding to at least one user; and use the average value as a target query duration for user power data.
[0090] Each module in the above-mentioned data query performance detection device can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0091] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG5. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data query performance detection method is implemented.
[0092] In an exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG6. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a data query performance detection method is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0093] Those skilled in the art will understand that the structures shown in FIGS. 5 and 6 are merely block diagrams of partial structures related to the scheme of the present application, and do not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than those shown in the figures, or combine certain components, or have a different arrangement of components.
[0094] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0095] According to the data type of the data to be detected, the query start time and the query end time of the data to be detected are obtained; the data type of the data to be detected includes user power data and non-user power data;
[0096] For the data to be detected of different data types, the target query duration of the data to be detected is determined according to the query start time of the data to be detected and the corresponding query end time;
[0097] The query performance score of the data to be tested is determined based on the target query duration and the standard duration.
[0098] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0099] If the data type of the data to be detected is user power data, obtaining a query start time and a query end time of the user power data corresponding to at least one user;
[0100] If the data type of the data to be detected is non-user power data, the query start time and the query end time of the non-user power data are obtained.
[0101] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0102] In the case where the user power data is user table code data, obtaining a query start time and a query end time of the user table code data corresponding to at least one user;
[0103] In the case where the user power data is user voltage data, a target user is found from among the users according to a user tag of at least one user, and a query start time and a query end time of the user voltage data corresponding to the target user are obtained.
[0104] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0105] From the user table code data corresponding to each user, the query start time and query end time of the user table code data corresponding to users of different user types are obtained.
[0106] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0107] For non-user power data, the difference between the query start time and the query end time is used as the target query duration of the non-user power data.
[0108] For data type user power data, the user query duration of the user power data corresponding to the corresponding user is determined based on the query start time and query end time of the user power data corresponding to at least one user, and the target query duration of the user power data is determined based on the user query duration of the user power data corresponding to at least one user.
[0109] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0110] Determine an average value of the user query duration according to the user query duration of the user power data corresponding to at least one user;
[0111] The average value is used as the target query duration for user power data.
[0112] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0113] According to the data type of the data to be detected, the query start time and the query end time of the data to be detected are obtained; the data type of the data to be detected includes user power data and non-user power data;
[0114] For the data to be detected of different data types, the target query duration of the data to be detected is determined according to the query start time of the data to be detected and the corresponding query end time;
[0115] The query performance score of the data to be tested is determined based on the target query duration and the standard duration.
[0116] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0117] If the data type of the data to be detected is user power data, obtaining a query start time and a query end time of the user power data corresponding to at least one user;
[0118] If the data type of the data to be detected is non-user power data, the query start time and the query end time of the non-user power data are obtained.
[0119] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0120] In the case where the user power data is user table code data, obtaining a query start time and a query end time of the user table code data corresponding to at least one user;
[0121] In the case where the user power data is user voltage data, a target user is found from among the users according to a user tag of at least one user, and a query start time and a query end time of the user voltage data corresponding to the target user are obtained.
[0122] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0123] From the user table code data corresponding to each user, the query start time and query end time of the user table code data corresponding to users of different user types are obtained.
[0124] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0125] For non-user power data, the difference between the query start time and the query end time is used as the target query duration of the non-user power data.
[0126] For data type user power data, the user query duration of the user power data corresponding to the corresponding user is determined based on the query start time and query end time of the user power data corresponding to at least one user, and the target query duration of the user power data is determined based on the user query duration of the user power data corresponding to at least one user.
[0127] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0128] Determine an average value of the user query duration according to the user query duration of the user power data corresponding to at least one user;
[0129] The average value is used as the target query duration for user power data.
[0130] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0131] According to the data type of the data to be detected, the query start time and the query end time of the data to be detected are obtained; the data type of the data to be detected includes user power data and non-user power data;
[0132] For the data to be detected of different data types, the target query duration of the data to be detected is determined according to the query start time of the data to be detected and the corresponding query end time;
[0133] The query performance score of the data to be tested is determined based on the target query duration and the standard duration.
[0134] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0135] If the data type of the data to be detected is user power data, obtaining a query start time and a query end time of the user power data corresponding to at least one user;
[0136] If the data type of the data to be detected is non-user power data, the query start time and the query end time of the non-user power data are obtained.
[0137] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0138] In the case where the user power data is user table code data, obtaining a query start time and a query end time of the user table code data corresponding to at least one user;
[0139] In the case where the user power data is user voltage data, a target user is found from among the users according to a user tag of at least one user, and a query start time and a query end time of the user voltage data corresponding to the target user are obtained.
[0140] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0141] From the user table code data corresponding to each user, the query start time and query end time of the user table code data corresponding to users of different user types are obtained.
[0142] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0143] For non-user power data, the difference between the query start time and the query end time is used as the target query duration of the non-user power data.
[0144] For data type user power data, the user query duration of the user power data corresponding to the corresponding user is determined based on the query start time and query end time of the user power data corresponding to at least one user, and the target query duration of the user power data is determined based on the user query duration of the user power data corresponding to at least one user.
[0145] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0146] Determine an average value of the user query duration according to the user query duration of the user power data corresponding to at least one user;
[0147] The average value is used as the target query duration for user power data.
[0148] It should be noted that the data involved in this application (including but not limited to data used for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0149] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0150] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0151] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A data query performance detection method, characterized in that: The method comprises: According to the data type of the data to be detected, the query start time and the query end time of the data to be detected are obtained; the data type of the data to be detected includes user power data and non-user power data; For the data to be detected of different data types, the target query duration of the data to be detected is determined according to the query start time of the data to be detected and the corresponding query end time; A query performance score of the data to be detected is determined according to the target query duration and the standard duration.
2. The method according to claim 1, characterized in that The step of obtaining the query start time and query end time of the data to be detected according to the data type of the data to be detected includes: If the data type of the data to be detected is user power data, obtaining a query start time and a query end time of the user power data corresponding to at least one user; If the data type of the to-be-detected data is non-user power data, a query start time and a query end time of the non-user power data are acquired.
3. The method according to claim 2, characterized in that Obtaining the query start time and query end time of user power data corresponding to at least one user, including: In the case where the user power data is user table code data, obtaining a query start time and a query end time of the user table code data corresponding to at least one user; In the case that the user power data is user voltage data, a target user is found from among the users according to a user tag of at least one user, and a query start time and a query end time of the user voltage data corresponding to the target user are obtained.
4. The method according to claim 3, characterized in that Obtaining the query start time and query end time of the user table code data corresponding to at least one user, including: From the user table code data corresponding to each user, the query start time and query end time of the user table code data corresponding to users of different user types are obtained.
5. The method according to any one of claims 1 to 4, characterized in that: For the data to be detected of different data types, determining the target query duration of the data to be detected according to the query start time and the query end time of the data to be detected includes: For data type that is non-user power data, the difference between the query start time and the query end time is used as the target query duration of the non-user power data; For data type user power data, the user query duration of the user power data corresponding to the corresponding user is determined based on the query start time and query end time of the user power data corresponding to at least one user, and the target query duration of the user power data is determined based on the user query duration of the user power data corresponding to at least one user.
6. The method according to claim 5, characterized in that Determining a target query duration of user power data according to a user query duration of user power data corresponding to at least one user includes: Determine an average value of the user query duration according to the user query duration of the user power data corresponding to the at least one user; The average value is used as the target query duration of the user power data.
7. A data query performance detection device, characterized in that: The device comprises: A time acquisition module, used for acquiring a query start time and a query end time of the data to be detected according to the data type of the data to be detected; the data type of the data to be detected includes user power data and non-user power data; A duration determination module, for determining, for different data types of to-be-detected data, a target query duration of the to-be-detected data according to a query start time and a corresponding query end time of the to-be-detected data; The score determination module is used to determine the query performance score of the data to be detected according to the target query duration and the standard duration.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
