Frequency domain graph auxiliary analysis method based on ECharts

Through the frequency domain graph-assisted analysis method based on ECharts, the frequency doubling analysis function of the frequency domain analysis tool is realized, solving the problems of single functions and complex operation of existing tools in frequency doubling analysis, and improving the intuitiveness and accuracy of the analysis.

CN119537825APending Publication Date: 2025-02-28BEIJING AEROSPACE ZHIKONG MONITORING TECH INST
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411427073.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The existing frequency domain analysis tools have single functions and complex operations in frequency doubling analysis, and the horizontal axis coordinate lengths of the frequency domain graph are different, so it is impossible to accurately judge the positions of 1, 2, and 10 times.

Method used

Using the frequency domain graph-assisted analysis method based on ECharts, the frequency domain analysis frequency multiplication analysis tool for signal is realized through ECharts' data visualization capabilities and custom extension functions. This method includes user input data to generate a frequency domain spectrum line graph, adding toolbox tool components, calling the spectrum line algorithm, drawing the spectrum line, and dynamically switching the base frequency position by dragging the base frequency line, and updating the frequency multiplication analysis results in real time.

Benefits of technology

It improves the intuitiveness and convenience of data analysis, solves the problem of inaccurate positioning of 1-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-10-

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537825A_ABST
    Figure CN119537825A_ABST
Patent Text Reader

Abstract

The invention provides an ECharts-based frequency domain graph auxiliary analysis method, which combines a frequency domain spectral line and an Echarts official configuration item to draw an auxiliary tool multiple frequency spectral line for a frequency domain graph, and can obviously solve the problems that when the frequency domain graph is manually analyzed, the positioning of 1-10 frequency multiplication is inaccurate and not rapid, and the like. A user can select a specific fundamental frequency, and the tool automatically calculates and displays the frequency multiplication component of the fundamental frequency. The frequency multiplication analysis function supports dynamic adjustment of a fundamental frequency value and updates a frequency multiplication analysis result in real time, so that a user can conveniently carry out detailed analysis and comparison, and the intuition and the convenience of data analysis are improved. According to the method, the high performance of JavaScript is utilized, an ECharts internal method is ingeniously processed, it is guaranteed that in the drawing and dragging process of the multiple frequency spectrum line, real-time performance, smoothness and accuracy are always kept, influences of the data size of a frequency domain graph are avoided, during first rendering and subsequent dragging operation on the fundamental frequency line, an algorithm is called in real time for re-drawing, and the efficiency is improved. And data accuracy is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electrical digital data processing, and in particular to a frequency domain diagram auxiliary analysis method based on ECharts. Background Art

[0002] With the continuous development of industrial Internet technology, more companies have begun to realize the importance of machine equipment health monitoring. Equipment health monitoring helps companies better manage and maintain equipment, improve production efficiency and reduce production costs through real-time data collection.

[0003] Through real-time data collection and frequency domain analysis, the data and information obtained during the operation of the equipment are used to evaluate the current operating status of the equipment and predict possible problems in the future.

[0004] Frequency domain analysis requires more manual work to determine possible faults. When performing frequency domain analysis, more auxiliary tools are needed, including but not limited to: zooming, segmentation, sidebands, and multiples of the spectrum. One of the important analysis tools is multiples analysis. However, the frequency domain analysis tools currently on the market still have problems such as single function and complex operation in multiples analysis. The length of the horizontal axis coordinate (frequency) of the frequency domain graph is different, and it is impossible to accurately determine the positions of 1 multiple, 2 multiples, and so on to 10 multiples by naked eyes. Therefore, in some scenarios, it is impossible to more accurately determine the type of fault.

[0005] Therefore, a frequency multiplication analysis tool is needed that can realize signal frequency domain analysis. Summary of the invention

[0006] The present invention aims to solve the problem that the 1-fold to 10-fold frequency position cannot be quickly and accurately located during spectrum analysis. A frequency domain diagram-assisted analysis method based on ECharts is provided. By combining the powerful data visualization capability and custom extension function of ECharts, a frequency domain analysis tool for signal multiplication analysis is implemented, thereby improving the intuitiveness and convenience of data analysis.

[0007] The present invention provides a frequency domain diagram auxiliary analysis method based on ECharts, comprising the following steps:

[0008] S1. The user inputs the data required to draw the frequency domain spectrum line graph into ECharts and obtains the frequency domain spectrum line graph, and then adds the toolbox tool component to the front end of ECharts to load the double spectrum line raw data generation module, double spectrum line algorithm module, base frequency drag module, drag algorithm module and front end display module;

[0009] S2. Click the toolbox tool component, the spectrum line raw data generation module generates spectrum line frequency doubling raw data, the frequency doubling line algorithm module calls the encapsulated frequency doubling line algorithm and draws the frequency doubling line on the frequency domain spectrum line diagram according to the spectrum line frequency doubling raw data, the front-end display module displays the frequency doubling line on the frequency domain spectrum line diagram, the frequency doubling line includes at least two spectrum lines with the same interval, and the frequency doubling line is perpendicular to the x-axis of the frequency domain spectrum line diagram;

[0010] S3. When the user drags the first line of the octave spectrum line, the baseband dragging module identifies the user's dragging action and outputs a dragging signal to the dragging algorithm module according to the user's operation. The dragging algorithm module uses the dragging algorithm to obtain the octave spectrum line data after dragging in real time and outputs it to the octave spectrum line algorithm. The octave spectrum line algorithm draws the octave spectrum line after dragging. The front-end display module displays the octave spectrum line after dragging in real time on the frequency domain spectrum line graph. A frequency domain graph-assisted analysis method based on ECharts is completed.

[0011] The frequency domain diagram auxiliary analysis method based on ECharts described in the present invention, as a preferred embodiment, step S2 includes:

[0012] S21, click the toolbox tool component, the spectrum line raw data generation module obtains the fundamental frequency according to the frequency domain spectrum line data, and enters step S22 when the data used for calculating the fundamental frequency is not obtained, and enters step S23 after the data used for calculating the fundamental frequency is obtained and the fundamental frequency is calculated;

[0013] S22, setting the fundamental frequency to the middle of the frequency domain spectrum line graph, and proceeding to step S23;

[0014] S23, the spectrum line raw data generation module defines a list array for storing the original data of the spectrum line, the list array is: [[x1, y1], [x2, y2], ..., [xn, yn]], n is a positive integer greater than or equal to 2, wherein y1, y2, ..., yn are the maximum values ​​of the vertical coordinates of the frequency domain spectrum line graph, x1 is 1 times the fundamental frequency, x2 is 2 times the fundamental frequency, and xn is n times the fundamental frequency;

[0015] S24, traverse the ist array, define the variables in the traversal body as X1, X2, ..., Xn, Y1, Y2, ..., Yn, V1, V2, ..., Vn, where X1 is the pixel coordinate value of x1, X2 is the pixel coordinate value of x2, ..., Xn is the pixel coordinate value of xn; Y1 is the pixel coordinate value of y1, Y2 is the pixel coordinate value of y2, and Yn is the pixel coordinate value of yn; V1 is the amplitude pixel coordinate value corresponding to the octave coordinate x1 on the frequency domain spectrum, V2 is the amplitude pixel coordinate value corresponding to the octave coordinate x2 on the frequency domain spectrum, and Vn is the amplitude pixel coordinate value corresponding to the octave coordinate xn on the frequency domain spectrum;

[0016] Use ECcharts internal method to convert the coordinate point of the currently traversed list array into pixel coordinate value, and get pixel coordinate [[X1,Y1],[X2,Y2],...,[Xn,Yn]];

[0017] S25, the spectrum line raw data generation module searches for the frequency domain spectrum line graph data, and assigns the corresponding amplitudes of x1, x2, ..., xn on the frequency domain spectrum line graph to V1, V2, ..., Vn respectively; otherwise, the V value is empty;

[0018] S26, the octave spectrum algorithm module draws the octave spectrum line through the ECharts custom graphic tool graphic, each octave spectrum line includes: a vertical line perpendicular to the x-axis, a display text and an amplitude of the intersection with the frequency domain spectrum line graph; the horizontal coordinates of the vertical lines are X1, X2, ..., Xn, the vertical coordinates are Y1, Y2, ..., Yn, and the amplitudes of the intersections with the frequency domain spectrum line graph are V1, V2, ..., Vn;

[0019] S27. After the traversal is completed, the front-end display module displays the double spectrum lines on the frequency domain spectrum line diagram.

[0020] The frequency domain diagram auxiliary analysis method based on ECharts described in the present invention is, as a preferred embodiment, in step S21, the data used to calculate the fundamental frequency is the rotation speed, and the calculation method of the fundamental frequency is: the rotation speed is divided by 60;

[0021] In step S22, the x-axis start point data and the x-axis end point data displayed in the frequency domain spectrum line graph are obtained from the frequency domain spectrum line graph data, and the fundamental frequency is obtained by taking the average value of the x-axis start point data and the x-axis end point data and rounding it.

[0022] The frequency domain diagram auxiliary analysis method based on ECharts described in the present invention is, as a preferred embodiment, in step S23, n is 10.

[0023] The frequency domain diagram auxiliary analysis method based on ECharts described in the present invention is, as a preferred mode, in step S24, when the amplitude of the double spectrum line and the frequency domain spectrum line intersect, the amplitude of the intersection point is marked on the frequency domain spectrum line; convertToPixel is used to convert the currently traversed coordinate point into a pixel coordinate value;

[0024] In step S26, the spectrum lines also include the intersection points and the intersection amplitudes of the double spectrum lines and the frequency domain spectrum lines.

[0025] The frequency domain diagram auxiliary analysis method based on ECharts described in the present invention is, as a preferred embodiment, in step S26, the first double frequency spectrum line is the fundamental frequency line, and the double frequency spectrum line also includes: a drag handle located on one side of the fundamental frequency line and a horizontal coordinate value of the fundamental frequency line; when the user needs to drag and switch the fundamental frequency position, the user operates the mouse to interactively drag the drag handle;

[0026] The amplitude of the intersection of the octave spectrum line and the frequency domain spectrum line graph is highlighted.

[0027] The frequency domain diagram auxiliary analysis method based on ECharts described in the present invention is, as a preferred embodiment, in step S3, the dragging algorithm includes the following steps: obtaining the lateral offset sx of the mouse event during the dragging process, converting the lateral offset sx into a point sx' on the logical coordinate system, so that x1 in step S23 is 1 times the sum of the fundamental frequency and the lateral offset sx', x2 is 2 times the sum of the fundamental frequency and the lateral offset sx', and xn is n times the sum of the fundamental frequency and the lateral offset sx'; entering steps S24 to S27, traversing the list array, and recalculating the horizontal coordinate points of the octave spectrum line until the traversal is completed to obtain the octave spectrum line data after dragging and output it to the octave spectrum line algorithm.

[0028] The ECharts-based frequency domain diagram auxiliary analysis method described in the present invention is, as a preferred embodiment, in step S3, the dragging algorithm calls the ECcharts internal method convertFromPixel to convert the lateral offset sx into a point sx' on the logical coordinate system.

[0029] The present invention is a method for drawing a frequency domain graph octave analysis tool based on ECharts, aiming to provide an efficient, flexible and user-friendly frequency domain graph octave analysis tool for performing frequency domain analysis and octave analysis on signals, thereby improving the accuracy and efficiency of data analysis.

[0030] A method for drawing a frequency domain diagram auxiliary analysis tool based on ECharts, using the following steps:

[0031] Step 1: Based on the frequency domain spectrum chart drawn by ECcharts, add the toolbox tool component to the system front end;

[0032] Step 2: Click the tool component, and the system front end calls the packaged double frequency spectrum line algorithm to generate double frequency analysis spectrum lines on the frequency domain diagram;

[0033] Step 3: Drag the fundamental frequency of the frequency analysis line, i.e. the first line, through the system front end to dynamically switch the fundamental frequency position on the frequency domain diagram. Other frequency spectrum lines are dynamically calculated based on the fundamental frequency line, and the corresponding spectrum lines are drawn in real time;

[0034] Adding toolbox tool components to the system front end is the ECharts built-in component toolbox toolset, adding custom tool components to the toolset.

[0035] The steps of the spectral line algorithm are as follows:

[0036] S21, calculating the fundamental frequency of the frequency domain graph, the fundamental frequency calculation method is: the rotation speed divided by 60;

[0037] S22. If the rotation speed is not obtained, the fundamental frequency line is placed in the middle of the entire graph. The calculation method is: obtain the starting point data and the ending point data of the x-axis displayed by the current frequency domain graph, and the fundamental frequency is equal to the sum of the starting point data of the horizontal axis and the ending point data of the horizontal axis, divided by 2 and rounded;

[0038] S23, define a list array of collections storing the double spectrum line data,

[0039] The format is [[x0,y0],[x1,y1],...],

[0040] Add the coordinates of 10 octave spectrum lines to the list, where each coordinate y is the vertical height of the current frequency domain analysis spectrum; each coordinate x is calculated by multiplying the fundamental frequency by 1 to 10, and add 10 sets of coordinates in total;

[0041] S24, traverse the list array, and define the variables in the traversal body: x (the value of the pixel coordinate x where the octave spectrum line to be drawn is located), y (the value of the pixel coordinate y where the octave spectrum line to be drawn is located), and value (the actual data on the frequency domain graph corresponding to the octave coordinate currently traversed); the function of value is to mark the intersection of the octave spectrum line and the amplitude point on the frequency domain graph on the spectrum; in the traversal body, use the internal method convertToPixel of ECcharts to convert the coordinate point currently traversed into a pixel coordinate value to obtain the pixel coordinate [x, y];

[0042] S25, search for frequency domain graph data, try to find the actual data on the frequency domain graph that is equal to the currently traversed coordinate x, if found, assign the value to value, otherwise value is empty; when x is greater than the maximum value of the horizontal coordinate of the frequency domain spectrum line, x is empty;

[0043] S26. After the above x, y, and value are assigned, the ECharts custom graphic tool graphic is used to start drawing the octave spectrum line. Each octave spectrum line includes: a vertical line, display text, and a point of intersection with the frequency domain spectrum line; the fundamental frequency line, i.e., the first line, also includes: a drag handle and the actual value of the fundamental frequency; the vertical line is the [x, y] pixel coordinate value calculated in S307; the display text and the point of intersection are the value calculated in S308;

[0044] S27. According to the description of S208 above, the graphic type is group, that is, the concept of "group" in ECharts custom graphics;

[0045] The vertical line is the vertical spectrum line actually drawn by the current double spectrum line;

[0046] The displayed text is that when the current octave spectrum line and the frequency domain spectrum line intersect, the data points of the frequency domain spectrum line of the intersection are displayed, that is, the amplitude data at the intersection;

[0047] The intersection point is when the current octave spectrum line and the frequency domain spectrum line intersect, and the intersection point is marked with a highlighted point;

[0048] The drag handle of the first line is a controller for interactively dragging the mouse by the user when the base frequency position needs to be switched by dragging;

[0049] The value of the fundamental frequency is the specific coordinate value of the current fundamental frequency line in the rectangular coordinate system.

[0050] The above logic operation is performed until the traversal is completed, and finally the custom graph to be drawn, that is, the octave spectrum line, is obtained;

[0051] When dragging the drag handle of the fundamental frequency line, the dragging algorithm is executed;

[0052] The drag algorithm steps are as follows:

[0053] Get the horizontal offset sx in the mouse event during the dragging process, and call the ECcharts internal method convertFromPixel to convert it to a point on the logical coordinate system according to the offset sx; traverse the variable list and recalculate the horizontal coordinate point of the octave spectrum line; the calculation method is: add 1 to the subscript during the traversal process, and then multiply it by the offset sx; perform the above logical operations until the traversal is completed, and finally obtain the original data to be redrawn of the octave spectrum line; according to the new original data of the octave spectrum line, re-call the octave spectrum line algorithm to generate a new octave analysis spectrum line on the frequency domain diagram.

[0054] An analysis system based on the frequency domain diagram auxiliary analysis method of ECharts includes: an algorithm module for generating raw data of doubled spectrum lines, for generating raw data of doubled spectrum lines;

[0055] A spectral line algorithm module for drawing spectral lines on a frequency domain graph;

[0056] The drag algorithm module is used to redraw the base frequency in real time when dragging it;

[0057] A front-end display module is used to calculate and generate the octave spectrum lines for display;

[0058] The baseband drag module is used to identify the user's dragging action, send a signal to the data drag algorithm module according to the user's operation, and redraw the double frequency spectrum line.

[0059] The present invention provides an efficient, flexible and user-friendly frequency domain graph multiple frequency analysis tool, which is used to perform frequency domain analysis and multiple frequency analysis on signals, and improve the accuracy and efficiency of data analysis. The system front end generates a complete frequency domain analysis line graph and an auxiliary analysis tool for drawing the frequency domain graph. The user uses the tool of the present invention when analyzing the frequency domain graph. The auxiliary tool is drawn on the frequency domain graph, and the multiple frequency spectrum lines can be quickly generated. The fundamental frequency position can be switched by dragging the fundamental frequency line. Other multiple frequency spectrum lines follow the calculation in real time according to the position change of the fundamental frequency line. The present invention can generate a frequency domain graph auxiliary multiple frequency analysis tool. After the auxiliary tool is drawn and generated, the fundamental frequency line is dragged to dynamically switch the fundamental frequency. Other multiple frequency spectrum lines are dynamically calculated during the switching process. Each zooming and dragging action of the frequency domain graph will call the algorithm to ensure that the multiple frequency auxiliary tool follows the display range of the frequency domain graph in real time.

[0060] The present invention has the following advantages:

[0061] (1) The present invention combines frequency domain spectra and Echarts official configuration items to realize the frequency domain graph drawing auxiliary tool octave spectrum line, which can obviously solve the problems of inaccurate and slow positioning of 1-10 octaves when manually analyzing frequency domain graphs; users can select a specific base frequency, and the tool automatically calculates and displays the octave components of the base frequency. The octave analysis function supports dynamic adjustment of the base frequency value and real-time update of the octave analysis results, which is convenient for users to conduct detailed analysis and comparison, and improves the intuitiveness and convenience of data analysis.

[0062] (2) The present invention utilizes the high performance of JavaScript to cleverly process the internal methods of ECharts, ensuring that the double frequency line always maintains real-time, smoothness, and accuracy during the drawing and dragging process, regardless of the amount of data in the frequency domain graph. During the first rendering and subsequent dragging operations on the base frequency line, the algorithm is called in real time to redraw the line to ensure data accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 It is a flow chart of the frequency domain diagram auxiliary analysis method based on ECharts;

[0064] Figure 2 A schematic diagram of the frequency spectrum line of a frequency domain diagram-assisted analysis method based on ECharts;

[0065] Figure 3 It is a frequency domain diagram-assisted analysis method based on ECharts, and then drags the double spectrum line flow chart. DETAILED DESCRIPTION

[0066] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0067] Example 1

[0068] like Figure 1 As shown in the figure, a frequency domain diagram-assisted analysis method based on ECharts is used. In this example, the frequency domain diagram is generated by collecting real-time data from the "Intelligent Operation and Maintenance Big Data Cloud Platform" of Aerospace Intelligent Control Monitoring Technology Co., Ltd.; based on the drawn frequency domain spectrum line diagram, the system front end adds a toolbox tool component; click the tool component, the system front end calls the encapsulated double frequency spectrum line algorithm to generate double frequency analysis spectrum lines on the frequency domain diagram; through the system front end, the fundamental frequency of the double frequency analysis line, that is, the first line, is dragged, and the fundamental frequency position can be dynamically switched on the frequency domain diagram, and other double frequency spectrum lines are dynamically calculated according to the fundamental frequency line, and the corresponding spectrum lines are drawn in real time;

[0069] The frequency domain diagram-assisted analysis method based on ECharts adopts the following steps:

[0070] Add the ECharts built-in toolbox tool set to the system front end, and add custom tool components to the tool set;

[0071] Click the tool component, and the system front end calls the packaged double frequency spectrum line algorithm to generate double frequency analysis spectrum lines on the frequency domain graph;

[0072] The algorithm steps of the double spectrum line are as follows: calculate the fundamental frequency of the frequency domain graph, and the fundamental frequency is calculated by dividing the rotation speed by 60;

[0073] If the speed is not obtained, the fundamental frequency line is placed in the middle of the entire graph. The calculation method is: obtain the starting point data and the ending point data of the x-axis displayed in the current frequency domain graph, and the fundamental frequency is equal to the sum of the starting point data and the ending point data of the horizontal axis, divided by 2 and rounded;

[0074] Define a list array for storing double spectrum line data in the format of [[x0,y0],[x1,y1],...], add 10 double spectrum line coordinates to the list, where each coordinate y is the vertical height of the current frequency domain analysis spectrum; each coordinate x is calculated by multiplying the fundamental frequency by 1 to 10, and add 10 sets of coordinates in total;

[0075] Traverse the list array, and in the traversal body, define the variables: x (the value of the pixel coordinate x where the octave spectrum line is currently drawn), y (the value of the pixel coordinate y where the octave spectrum line is currently drawn), and value (the actual data on the frequency domain graph corresponding to the octave coordinate currently traversed); the role of value is to mark the intersection of the octave spectrum line and the amplitude point on the frequency domain graph on the spectrum;

[0076] In the traversal body, use the ECcharts internal method convertToPixel to convert the coordinate point of the current traversal into a pixel coordinate value to obtain the pixel coordinate [x, y];

[0077] Find the frequency domain graph data and try to find the actual data on the frequency domain graph that is equal to the currently traversed coordinate x. If found, assign the value to value, otherwise value is empty.

[0078] After the assignment of x, y, and value is completed, the ECharts custom graphic tool graphic is used to start drawing the octave spectrum line. Each octave spectrum line includes: a vertical line, display text, and the point of intersection with the frequency domain spectrum line; the fundamental frequency line, i.e. the first line, also includes: a drag handle and the actual value of the fundamental frequency; the vertical line, i.e. the [x, y] pixel coordinate value; the display text and the point of intersection, i.e. the value;

[0079] The graphic type is group, which is the concept of "group" in ECharts custom graphics;

[0080] The vertical line is the vertical spectrum line actually drawn by the current double spectrum line;

[0081] The displayed text is that when the current octave spectrum line and the frequency domain spectrum line intersect, the data points of the frequency domain spectrum line of the intersection are displayed, that is, the amplitude data at the intersection;

[0082] The intersection point is when the current double spectrum line and the frequency domain spectrum line intersect, and the intersection is marked with a highlighted point; Figure 2 As shown;

[0083] like Figure 3 As shown, the drag handle of the first line is a controller for interactively dragging the mouse by the user when the base frequency position needs to be switched by dragging;

[0084] The value of the fundamental frequency is the specific coordinate value of the current fundamental frequency line in the rectangular coordinate system;

[0085] The above logic operation is performed until the traversal is completed, and finally the custom graph to be drawn, that is, the octave spectrum line, is obtained;

[0086] From the above description, it can be known that a complete frequency domain analysis line graph is generated through the system front end, and an auxiliary analysis tool is drawn on the frequency domain graph through the system front end. When the user uses the tool of the present invention to analyze the frequency domain graph, the auxiliary tool is drawn on the frequency domain graph, and the double frequency spectrum line can be quickly generated. The baseband line can be dragged to switch the baseband position. Other double frequency spectrum lines follow the calculation in real time according to the position change of the baseband line. The present invention can generate a frequency domain graph auxiliary analysis double frequency tool through an algorithm. After the auxiliary tool is drawn and generated, the baseband line can be dragged to dynamically switch the baseband. Other double frequency spectrum lines are dynamically calculated during the switching process. Every zooming and dragging action of the frequency domain graph will adjust the algorithm of the tool to ensure that the double frequency auxiliary tool follows the display range of the frequency domain graph in real time.

[0087] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A frequency domain diagram auxiliary analysis method based on ECharts, characterized by: The following steps are involved: S1. The user inputs the data required to draw the frequency domain spectrum line graph into ECharts and obtains the frequency domain spectrum line graph, and then adds the toolbox tool component to the front end of ECharts to load the double spectrum line raw data generation module, double spectrum line algorithm module, base frequency drag module, drag algorithm module and front end display module; S2, click the toolbox tool component, the spectrum line raw data generation module generates spectrum line frequency doubling raw data, the frequency doubling line algorithm module calls the packaged frequency doubling line algorithm and draws the frequency doubling line on the frequency domain spectrum line diagram according to the spectrum line frequency doubling raw data, the front-end display module displays the frequency doubling line on the frequency domain spectrum line diagram, the frequency doubling line includes at least two spectrum lines with the same interval, and the frequency doubling line is perpendicular to the x-axis of the frequency domain spectrum line diagram; S3. When the user drags the first line of the octave spectrum line, the baseband dragging module distinguishes the user's dragging action and outputs a dragging signal to the dragging algorithm module according to the user operation, the dragging algorithm module uses the dragging algorithm to obtain the octave spectrum line data after dragging in real time and outputs it to the octave spectrum line algorithm, the octave spectrum line algorithm draws the octave spectrum line after dragging, and the front-end display module displays the octave spectrum line after dragging in real time on the frequency domain spectrum line graph, and a frequency domain graph auxiliary analysis method based on ECharts is completed.

2. The frequency domain diagram auxiliary analysis method based on ECharts according to claim 1, characterized in that: Step S2 includes: S21, click the toolbox tool component, the spectrum line raw data generation module obtains the fundamental frequency according to the frequency domain spectrum line diagram data, and enters step S22 when the data used for calculating the fundamental frequency is not obtained, and enters step S23 after the data used for calculating the fundamental frequency is obtained and the fundamental frequency is calculated; S22, setting the fundamental frequency to the middle of the frequency domain spectrum line graph, and proceeding to step S23; S23, the spectrum line raw data generation module defines a list array for storing the original data of the frequency spectrum lines, the list array is: [[x1, y1], [x2, y2], ..., [xn, yn]], n is a positive integer greater than or equal to 2, wherein y1, y2, ..., yn are all the maximum values ​​of the vertical coordinates of the frequency domain spectrum line diagram, x1 is 1 times the fundamental frequency, x2 is 2 times the fundamental frequency, and xn is n times the fundamental frequency; S24, traverse the ist array, define the variables in the traversal body as X1, X2, ..., Xn, Y1, Y2, ..., Yn, V1, V2, ..., Vn, wherein X1 is the pixel coordinate value of x1, X2 is the pixel coordinate value of x2, ..., Xn is the pixel coordinate value of xn; Y1 is the pixel coordinate value of y1, Y2 is the pixel coordinate value of y2, and Yn is the pixel coordinate value of yn; V1 is the amplitude pixel coordinate value corresponding to the octave coordinate x1 on the frequency domain spectrum, V2 is the amplitude pixel coordinate value corresponding to the octave coordinate x2 on the frequency domain spectrum, and Vn is the amplitude pixel coordinate value corresponding to the octave coordinate xn on the frequency domain spectrum; Use ECcharts internal method to convert the coordinate point of the list array currently traversed into pixel coordinate value to obtain pixel coordinate [[X1, Y1], [X2, Y2], ..., [Xn, Yn]]; S25, the spectrum line original data generation module searches for the frequency domain spectrum line graph data, and assigns the amplitudes corresponding to x1, x2, ..., xn on the frequency domain spectrum line graph to V1, V2, ..., Vn respectively; otherwise, the V value is empty; S26, the octave spectrum algorithm module draws the octave spectrum line through the ECharts custom graphic tool graphic, each octave spectrum line includes: a vertical line perpendicular to the x-axis, a display text and an amplitude of an intersection with the frequency domain spectrum line diagram; the horizontal coordinates of the vertical lines are respectively X1, X2, ..., Xn, the vertical coordinates are respectively Y1, Y2, ..., Yn, and the amplitudes of the intersections with the frequency domain spectrum line diagram are respectively V1, V2, ..., Vn; S27. After the traversal is completed, the front-end display module displays the double spectrum lines on the frequency domain spectrum line diagram.

3. The frequency domain diagram auxiliary analysis method based on ECharts according to claim 2, characterized in that: In step S21, the data used to calculate the fundamental frequency is the rotation speed, and the fundamental frequency is calculated by dividing the rotation speed by 60; In step S22, the x-axis starting point data and the x-axis ending point data displayed by the frequency domain spectrum are obtained from the frequency domain spectrum data, and the fundamental frequency is obtained by taking the average value of the x-axis starting point data and the x-axis ending point data and rounding it.

4. The frequency domain diagram auxiliary analysis method based on ECharts according to claim 2, characterized in that: In step S23, n is 10.

5. The frequency domain diagram auxiliary analysis method based on ECharts according to claim 2, characterized in that: In step S24, when the amplitudes of the double spectrum line and the frequency domain spectrum line intersect, the amplitude of the intersection point is marked on the frequency domain spectrum line; convertToPixel is used to convert the currently traversed coordinate point into a pixel coordinate value; In step S26, the spectrum line also includes the intersection point and the intersection amplitude of the double spectrum line and the frequency domain spectrum line.

6. The frequency domain diagram auxiliary analysis method based on ECharts according to claim 2, characterized in that: In step S26, the first double frequency spectrum line is a baseband line, and the double frequency spectrum line further includes: a drag handle located on one side of the baseband line and a horizontal coordinate value of the baseband line; when the user needs to drag to switch the baseband position, the user operates the mouse to interactively drag the drag handle; The amplitude of the intersection point of the double spectrum line and the frequency domain spectrum line diagram is highlighted.

7. The frequency domain diagram auxiliary analysis method based on ECharts according to claim 2, characterized in that: In step S3, the dragging algorithm includes the following steps: obtaining the lateral offset sx of the mouse event during the dragging process, converting the lateral offset sx into a point sx' on the logical coordinate system, so that x1 in step S23 is 1 times the sum of the base frequency and the lateral offset sx', x2 is 2 times the sum of the base frequency and the lateral offset sx', and xn is n times the sum of the base frequency and the lateral offset sx'; entering steps S24 to S27, traversing the list array, and recalculating the horizontal coordinate points of the octave spectrum line, until the traversal is completed to obtain the octave spectrum line data after dragging and output it to the octave spectrum line algorithm.

8. The frequency domain diagram auxiliary analysis method based on ECharts according to claim 7, characterized in that: In step S3, the dragging algorithm calls the ECcharts internal method convertFromPixel to convert the horizontal offset sx into a point sx' on the logical coordinate system.

Citation Information

Patent Citations

  • Automatic accompaniment for vocal melodies

    CN101796587A

  • Parameter setting method and device for spectrum analyzer

    CN102466762A

  • Method and device for dragging audio file to retrieve audio file information

    CN104077336A

  • Mobile platform-based gesture spectral analysis method and system

    CN107506035A

  • Echarts-based mass data rendering processing method and system

    CN115562790A