CN111143405A - Method for drawing trend graph of water pump high-voltage motor temperature acquisition based on optimized search - Google Patents

Method for drawing trend graph of water pump high-voltage motor temperature acquisition based on optimized search Download PDF

Info

Publication number
CN111143405A
CN111143405A CN201911334762.4A CN201911334762A CN111143405A CN 111143405 A CN111143405 A CN 111143405A CN 201911334762 A CN201911334762 A CN 201911334762A CN 111143405 A CN111143405 A CN 111143405A
Authority
CN
China
Prior art keywords
time
trend
data
time span
water pump
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
CN201911334762.4A
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.)
Jiangsu Yuanpu Control Equipment Co Ltd
Original Assignee
Jiangsu Yuanpu Control Equipment 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 Jiangsu Yuanpu Control Equipment Co Ltd filed Critical Jiangsu Yuanpu Control Equipment Co Ltd
Priority to CN201911334762.4A priority Critical patent/CN111143405A/en
Publication of CN111143405A publication Critical patent/CN111143405A/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/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2477Temporal data queries
    • 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/248Presentation of query results
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Tests Of Circuit Breakers, Generators, And Electric Motors (AREA)

Abstract

The invention provides a trend graph drawing method for water pump high-voltage motor temperature collection based on optimization searching, which comprises the steps of calculating the starting time and the ending time of a trend graph, calculating the time interval of a trend which needs to be read by a user, judging whether the time interval is greater than Tmin or not, if the time interval is greater than the set time interval, dividing the current time interval Tmx by the set data quantity Dn, calculating the data to be inquired in MySQL according to how many data recording time intervals Tn are needed, and if the time interval is less than Tmin, inquiring the data in sequence according to the default time, and finally drawing the trend graph. The method can optimize the query process, shorten the query drawing time and improve the working efficiency.

Description

Method for drawing trend graph of water pump high-voltage motor temperature acquisition based on optimized search
Technical Field
The invention relates to the technical field of data processing, in particular to a trend graph drawing method for water pump high-voltage motor temperature acquisition based on optimized searching, which is used for a temperature measurement system of a water pump room high-voltage motor.
Background
The blast furnace water pump room is provided with 35 high-voltage motors for circulating water for slag flushing of the blast furnace, if the water circulation stops, the blast furnace must stop ironmaking, the re-opening of the blast furnace will wait for a large amount of time, the yield will be seriously lost, so the importance of the high-voltage motors can be thought of; in the prior production process, 5 parts of the high-voltage motor are respectively subjected to temperature measurement by a temperature measurement gun through manpower and then recorded in a case, 4200 data are required to be recorded every day as the data are recorded once every hour, the workload is large, the temperature between an integral point and an integral point cannot be recorded, and the running condition of the high-voltage motor cannot be monitored in real time. Therefore, a set of system is designed, the temperature of the high-voltage motor is acquired by the PLC, the temperature is displayed on a computer picture in real time, and meanwhile, the temperature data of the longest latest 3 months can be inquired, which is very necessary.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: in order to overcome the defects in the prior art, the invention provides a trend graph drawing method for water pump high-voltage motor temperature acquisition based on optimization searching.
In order to more clearly express the data optimization searching method of the present invention, the following terms are defined.
And the historical trend graph refers to a trend graph drawn when the software is closed last time.
Historical trend time span Ts: the time span corresponding to a trend graph drawn when the software is closed last time is indicated;
default trend time span Tm: the software gives an initial query reference time span.
Current trend time span T: and the time length corresponding to the current expected drawn trend graph.
Prescribed time Tmin: the reference time for optimizing searching set at the bottom layer is referred to, and fixed point taking and interval searching are carried out when the reference time is longer than the reference time.
The technical scheme adopted for solving the technical problems is as follows: a trend graph drawing method for water pump high-voltage motor temperature collection based on optimization searching stores temperature data of a water pump high-voltage motor collected by a temperature sensor in a MySQL database, and adopts Phoenix Visu + software to read data in the MySQL database to draw a water pump high-voltage motor temperature trend graph, which specifically comprises the following steps:
s1: reading a starting time t1 and an ending time t2 of a historical trend graph in Visu + software, and calculating a historical trend time span Ts according to the starting time t1 and the ending time t2, wherein Ts is t2-t 1;
s2: comparing the calculated historical trend time span Ts with a default trend time span Tm, and if the historical trend time span Ts is not the default trend time span Tm, setting the current trend time span as the default trend time span Tm;
s3: calculating the total data N required to be inquired by the temperature trend graph required to be drawn currently, judging whether the time span T occupied by the total data N is greater than the bottom-layer set time Tmin, when the T is less than or equal to the Tmin, directly inquiring the MySQL data according to the default trend time span Tm, and then entering the step S6; when T > Tmin, the flow proceeds to step S4;
s4: resetting the total amount of data Nx needing to be inquired, wherein Nx is less than N, and calculating a cyclic search time interval Tx according to the current trend time span T and the set total amount of data Nx needing to be inquired, wherein Tx is T/Nx;
s5: calculating the time point of the required data according to the calculated cyclic search time interval Tx, and sending a data query statement to MySQL according to the calculated time point to perform data query;
s6: and returning the inquired data, and drawing a temperature trend graph according to the returned data.
Further, to prevent the data left over from the last search from causing data overflow to this search, the trend variable is initialized before the data is read in step S1. The trend variables comprise a data type kid to be searched, an attribute clng corresponding to the data type, and the maximum and minimum range, Vmax and Vmin of the data.
Further, the method for setting the current trend time span as the default trend time span Tm is as follows: and reading the current time Tn of the system, setting the time point corresponding to the (Tn-Tm) as the starting time of the current trend time span, and setting Tn as the ending time of the current trend time span.
Calculating the time interval of the trend required to be read by a user by calculating the starting time and the ending time of the trend graph, then judging whether the time interval is greater than Tmin or not, if so, dividing the current time interval Tmx by the set data quantity Dn, calculating the data to be queried in MySQL according to the data recording time interval Tn, and if the time interval is less than Tmin, next querying the data according to the default time, and finally drawing the trend graph.
Finally, through testing, data of more than one day is loaded, and the trend graph can be drawn only in a dozen seconds at most, so that the working efficiency is greatly improved.
The invention has the beneficial effects that: the method for drawing the trend graph of the water pump high-voltage motor temperature acquisition based on the optimized search can optimize the query process, shorten the query drawing time and improve the working efficiency.
Drawings
The invention is further illustrated by the following figures and examples.
FIG. 1 is a schematic structural diagram of the preferred embodiment of the present invention.
FIG. 2 is a schematic diagram of a trend search sample truncation in accordance with the present invention.
FIG. 3 is a schematic interception diagram of a trend finding sample two of the present invention.
Detailed Description
The present invention will now be described in detail with reference to the accompanying drawings. This figure is a simplified schematic diagram, and only illustrates the basic structure of the present invention in a schematic manner, and therefore it only shows the components related to the present invention.
In the upper computer program of the temperature measuring system of the high-voltage motor of the water pump room, a large amount of data needs to be recorded so as to inquire relevant data at any time to analyze the situation. The data searching program is installed in Phoenix Visu + software based on a Windows operating system, and then the open database software MySQL of a third party is used. And storing a large amount of data in MySQL, asking for data from MySQL by a program when needed, and finally drawing the data in a trend graph.
As shown in fig. 1, the method for drawing the trend chart of the water pump high-voltage motor temperature acquisition based on the optimized search specifically includes the following steps:
s1: reading a starting time t1 and an ending time t2 of a historical trend graph in Visu + software, and calculating a historical trend time span Ts according to the starting time t1 and the ending time t2, wherein Ts is t2-t 1;
s2: comparing the calculated historical trend time span Ts with a default trend time span Tm, and if the historical trend time span Ts is not the default trend time span Tm, setting the current trend time span as the default trend time span Tm;
s3: calculating the total data N required to be inquired by the temperature trend graph required to be drawn currently, judging whether the time span T occupied by the total data N is greater than the bottom-layer set time Tmin or not, directly inquiring the MySQL data according to the default trend time span Tm when the T is less than or equal to the Tmin, and then entering the step S6; if T > Tmin, proceed to step S4;
s4: resetting the total amount of data Nx needing to be inquired as N, wherein Nx is less than N, and calculating a cyclic search time interval Tx according to the current trend time span T and the set total amount of data Nx needing to be inquired, wherein Tx is T/Nx;
s5: calculating the time point of the required data according to the calculated cyclic search time interval Tx, and sending a data query statement to MySQL according to the calculated time point to perform data query;
s6: and returning the inquired data, and drawing a temperature trend graph according to the returned data.
Further, to prevent the data left over from the last search from causing data overflow to this search, the trend variable is initialized before the data is read in step S1. The trend variables comprise a data type kid to be searched, an attribute clng corresponding to the data type, and the maximum and minimum range, Vmax and Vmin of the data.
Further, the method for setting the current trend time span as the default trend time span Tm is as follows: and reading the current time Tn of the system, setting the time point corresponding to the (Tn-Tm) as the starting time of the current trend time span, and setting Tn as the ending time of the current trend time span.
Calculating the time interval of the trend required to be read by a user by calculating the starting time and the ending time of the trend graph, then judging whether the time interval is greater than Tmin or not, if so, dividing the current time interval Tmx by the set data quantity Dn, calculating the data to be queried in MySQL according to the data recording time interval Tn, and if the time interval is less than Tmin, next querying the data according to the default time, and finally drawing the trend graph.
The method is verified by actual experimental data, in the embodiment, 5 parts of the high-voltage motor are respectively subjected to temperature measurement and then recorded in a case, as shown in table 1, the shortest period of data recording is 1 time recorded every 1 second, when data exceeding 1 day needs to be inquired, at least 86400 parts exist in each part, the speed is reduced when a trend is drawn, and the data drawing time of loading for one day is 45 seconds through measurement and calculation, so that the working efficiency is greatly reduced.
Table 1 data stored in MySQL database for 1 day
Figure BDA0002330649910000051
Figure BDA0002330649910000061
As shown in fig. 2, for the trend finding sample intercept, it can be seen that the trend variable change time is once a second, which illustrates taking data once per second.
In this embodiment, the default trend time span Tm is set to 1 day, the current trend time span T is set to 1 day, and the specified time Tmin is 1800S, that is, half an hour. As shown in Table 2, according to the method of the present invention, if the user adjusts the current time span T to within 30min, the trend takes a total of 1800 data of 00:00:00 to 00:29:59 as shown in Table 1; when looking up for the previous time span T24 h, the program calculates Tmx Tn Tm 23:59:59 minus 00:00: 86400S Tmin 1800S, if Dn 43200, then Tmx 43200 Tn 2S, as shown in table 2, the data will be taken every two seconds, reducing the data query amount by half.
TABLE 2 data stored in MySQL database for 1 day
Figure BDA0002330649910000062
As shown in fig. 3, for the example interception of trend finding, it can be seen that the time of change of the trend variable is once every two seconds, which shows that the trend finding is already optimized, and the data amount is reduced by half by taking data every two seconds.
The query method provided by the invention optimizes the query process, shortens the query drawing time and improves the working efficiency.
In light of the foregoing description of preferred embodiments in accordance with the invention, it is to be understood that numerous changes and modifications may be made by those skilled in the art without departing from the scope of the invention. The technical scope of the present invention is not limited to the content of the specification, and must be determined according to the scope of the claims.

Claims (3)

1. A trend graph drawing method for water pump high-voltage motor temperature acquisition based on optimization searching is characterized by comprising the following steps: storing temperature data of the water pump high-voltage motor acquired by a temperature sensor in a MySQL database, reading data in the MySQL database by adopting Visu + upper computer software of Phoenix to draw a temperature trend graph of the water pump high-voltage motor, and specifically comprising the following steps of:
s1: reading a starting time t1 and an ending time t2 of a historical trend graph in Visu + software, and calculating a historical trend time span Ts according to the starting time t1 and the ending time t2, wherein Ts is t2-t 1;
s2: comparing the calculated historical trend time span Ts with a default trend time span Tm, and if the historical trend time span Ts is not the default trend time span Tm, setting the current trend time span as the default trend time span Tm;
s3: calculating the total data N required to be inquired by the temperature trend graph required to be drawn currently, judging whether the time span T occupied by the total data N is greater than the bottom-layer set time Tmin, directly inquiring MySQL data according to the default trend time span Tm when T is less than or equal to Tmin, and then entering the step S6; when T > Tmin, the flow proceeds to step S4;
s4: resetting the total amount of data Nx needing to be inquired, wherein Nx is less than N, and calculating a cyclic search time interval Tx according to the current trend time span T and the set total amount of data Nx needing to be inquired, wherein Tx is T/Nx;
s5: calculating the time point of the required data according to the calculated cyclic search time interval Tx, and sending a data query statement to MySQL according to the calculated time point to perform data query;
s6: and returning the inquired data, and drawing a temperature trend graph according to the returned data.
2. The method for drawing the trend graph of the temperature acquisition of the water pump high-voltage motor based on the optimization search as claimed in claim 1, characterized in that: before reading the data in step S1, the trend variables are initialized.
3. The method for drawing the trend graph of the temperature acquisition of the water pump high-voltage motor based on the optimization search as claimed in claim 1, characterized in that: the method for setting the current trend time span as the default trend time span Tm is as follows: and reading the current time Tn of the system, setting the time point corresponding to the (Tn-Tm) as the starting time of the current trend time span, and setting Tn as the ending time of the current trend time span.
CN201911334762.4A 2019-12-23 2019-12-23 Method for drawing trend graph of water pump high-voltage motor temperature acquisition based on optimized search Pending CN111143405A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911334762.4A CN111143405A (en) 2019-12-23 2019-12-23 Method for drawing trend graph of water pump high-voltage motor temperature acquisition based on optimized search

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911334762.4A CN111143405A (en) 2019-12-23 2019-12-23 Method for drawing trend graph of water pump high-voltage motor temperature acquisition based on optimized search

Publications (1)

Publication Number Publication Date
CN111143405A true CN111143405A (en) 2020-05-12

Family

ID=70519369

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911334762.4A Pending CN111143405A (en) 2019-12-23 2019-12-23 Method for drawing trend graph of water pump high-voltage motor temperature acquisition based on optimized search

Country Status (1)

Country Link
CN (1) CN111143405A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112528097A (en) * 2020-12-17 2021-03-19 浙江全世科技有限公司 Historical trend query method and device for monitoring data of online equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101982820A (en) * 2010-11-22 2011-03-02 北京航空航天大学 Curve display and inquiry method for large data quantity
CN102118264A (en) * 2010-12-20 2011-07-06 大唐移动通信设备有限公司 Method and device for generating performance report
CN110109970A (en) * 2019-04-17 2019-08-09 北京奇安信科技有限公司 A kind of data query processing method and processing device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101982820A (en) * 2010-11-22 2011-03-02 北京航空航天大学 Curve display and inquiry method for large data quantity
CN102118264A (en) * 2010-12-20 2011-07-06 大唐移动通信设备有限公司 Method and device for generating performance report
CN110109970A (en) * 2019-04-17 2019-08-09 北京奇安信科技有限公司 A kind of data query processing method and processing device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112528097A (en) * 2020-12-17 2021-03-19 浙江全世科技有限公司 Historical trend query method and device for monitoring data of online equipment

Similar Documents

Publication Publication Date Title
US10229129B2 (en) Method and apparatus for managing time series database
US11403303B2 (en) Method and device for generating ranking model
CN105426411A (en) Access trend prediction based time series database cache management method
EP2270689A1 (en) Method and system for time dependent search
JPWO2012020456A1 (en) Time-series data processing apparatus and method
CN111143405A (en) Method for drawing trend graph of water pump high-voltage motor temperature acquisition based on optimized search
CN114061559A (en) Compensation method and system for zero offset drift of fiber-optic gyroscope and computer storage medium
CN114400056B (en) Energy metering method and system based on natural gas component
CN117162428A (en) Cooling control method and system for plastic injection mold
CN113326985A (en) Short-term load prediction method and device
CN107066564B (en) Data processing method and device based on android list
CN113312579A (en) Method and device for determining cooling intensity and detecting temperature change trend
CN110580253B (en) Time sequence data set loading method and device, storage medium and electronic equipment
JP2016018230A (en) Control parameter adaptation method and control parameter adaptation assist device
CN113656437B (en) Model construction method for predicting execution cost stability of reference
CN115391355A (en) Data processing method, device, equipment and storage medium
CN115220404A (en) Intelligent diagnosis method, device, equipment and storage medium for processing equipment
CN110968640B (en) Oil well data processing method and device and oil well control system
CN111221894B (en) Time sequence database storage method, device and server based on configuration
WO2021031091A1 (en) Method and apparatus for detecting operating status of device, and computer readable medium
US20180096011A1 (en) Storing data records
CN110986430B (en) Effective oil return control method and device and air conditioning unit
CN117556386B (en) Temperature data monitoring method in furnace refining process
CN113254475B (en) Historical data query and acquisition method for branch line monitoring terminal
US20230384744A1 (en) Remote-control apparatus, local-control apparatus, learning processing apparatus, method, and recording medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200512