CN106846433B - Signal change diagram drawing method and device and electronic equipment - Google Patents

Signal change diagram drawing method and device and electronic equipment Download PDF

Info

Publication number
CN106846433B
CN106846433B CN201710016476.8A CN201710016476A CN106846433B CN 106846433 B CN106846433 B CN 106846433B CN 201710016476 A CN201710016476 A CN 201710016476A CN 106846433 B CN106846433 B CN 106846433B
Authority
CN
China
Prior art keywords
signal
drawn
amplitude
signals
change
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.)
Active
Application number
CN201710016476.8A
Other languages
Chinese (zh)
Other versions
CN106846433A (en
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.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology 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 Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN201710016476.8A priority Critical patent/CN106846433B/en
Publication of CN106846433A publication Critical patent/CN106846433A/en
Application granted granted Critical
Publication of CN106846433B publication Critical patent/CN106846433B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The application provides a signal change diagram drawing method, belongs to the technical field of computers, and is used for solving the problem that a signal change diagram drawing method in the prior art cannot visually display violent change signals. The method comprises the following steps: acquiring signals to be drawn which are arranged according to the collection time sequence, wherein the signals to be drawn comprise amplitude values; judging whether the amplitude of the signal to be drawn meets a preset amplitude change condition or not; and if the amplitude of the signal to be drawn meets a preset amplitude change condition, drawing a signal change graph of the signal to be drawn by adopting a first coordinate mode, otherwise, drawing the signal change graph of the signal to be drawn by adopting a second coordinate mode. The method disclosed by the application adopts different coordinate modes to draw the signal change diagram for the signals acquired in the time period with severe signal change and the signals acquired in the time period with stable signal change, so that the signals with smaller amplitude and the signals with larger amplitude can be displayed simultaneously, and the general trend of signal change can be conveniently and visually mastered.

Description

Signal change diagram drawing method and device and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for drawing a signal variation graph, and an electronic device.
Background
The detected signals are displayed by drawing a signal change diagram, so that the change trend of the signals can be visually represented, for example: oscilloscope, signal analysis appearance. In the prior art, when a signal change diagram is drawn, the acquisition time of a signal or the number of a signal point is generally used as an abscissa, and the amplitude of the signal is used as an ordinate. When a signal change graph is drawn by using a method in the prior art, when a signal change amplitude is large, in order to present all signal amplitudes, a value range of a vertical coordinate is generally continuously enlarged, and correspondingly, an amplitude value represented between two adjacent coordinate scales of the vertical coordinate is also increased, so that a change trend of a signal with small signal amplitude change is drawn to be close to a straight line. If a signal with a small amplitude is intuitively displayed, a signal with a large amplitude cannot be displayed. Namely, the signal change diagram drawing method in the prior art cannot simultaneously and intuitively display the defects of the signal with smaller signal amplitude and the signal with larger signal amplitude.
Therefore, the signal change diagram drawing method in the prior art has at least the following defects that the sharply changed signals cannot be visually displayed.
Disclosure of Invention
The application provides a signal change diagram drawing method, which solves the problem that a signal change diagram drawing method in the prior art cannot visually display violent change signals.
In order to solve the above problem, in a first aspect, an embodiment of the present application provides a signal variation graph plotting method, including:
acquiring signals to be drawn which are arranged according to the collection time sequence, wherein the signals to be drawn comprise amplitude values;
judging whether the amplitude of the signal to be drawn meets a preset amplitude change condition or not;
and if the amplitude of the signal to be drawn meets a preset amplitude change condition, drawing a signal change graph of the signal to be drawn by adopting a first coordinate mode, otherwise, drawing the signal change graph of the signal to be drawn by adopting a second coordinate mode.
In a second aspect, an embodiment of the present application provides a signal variation mapping apparatus, including:
the system comprises a signal to be drawn acquisition module, a signal to be drawn acquisition module and a signal to be drawn acquisition module, wherein the signal to be drawn acquisition module is used for acquiring signals to be drawn which are arranged according to the collection time sequence, and the signals to be drawn comprise amplitude values;
the judging module is used for judging whether the amplitude of the signal to be drawn meets a preset amplitude change condition or not;
and the selection drawing module is used for drawing a signal change diagram of the signal to be drawn by adopting a first coordinate mode if the amplitude of the signal to be drawn meets a preset amplitude change condition, and otherwise, drawing the signal change diagram of the signal to be drawn by adopting a second coordinate mode.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the signal variation mapping method disclosed in the embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the signal variation mapping method disclosed in the present application.
The signal change diagram drawing method disclosed by the embodiment of the application obtains signals to be drawn which are arranged according to the sequence of the acquisition time, wherein the signals to be drawn comprise amplitude values and acquisition time; and then, judging whether the amplitude of the signal to be drawn meets a preset amplitude change condition or not, and selecting a corresponding coordinate mode of the signal change diagram according to a judgment result, so that the problem that the signal change diagram drawing method in the prior art cannot visually display the violent change signal is solved. The signal change diagram is drawn by adopting different coordinate modes for the signals collected in the time period with severe signal change and the signals collected in the time period with stable signal change, so that the signals with smaller amplitude and the signals with larger amplitude can be displayed simultaneously under the condition of severe signal change, and the general trend of signal change can be conveniently and intuitively mastered.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a flow chart of a signal variation graph plotting method according to an embodiment of the present application;
FIG. 2 is a flow chart of a second signal variation graph plotting method according to the embodiment of the present application;
FIG. 3 is a diagram of signal variation corresponding to a time period in the second embodiment of the present application;
FIG. 4 is a graph of signal change plotted for the time period of FIG. 3 using prior art techniques;
FIG. 5 is a graph of signal variation corresponding to another time period in the second embodiment of the present application;
fig. 6 is a schematic structural diagram of a signal variation graph drawing apparatus in the third embodiment of the present application;
fig. 7 is a second schematic structural diagram of a signal variation graph drawing apparatus in the third embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Example one
As shown in fig. 1, a method for drawing a signal variation graph includes: step 100 to step 120.
And step 100, obtaining signals to be drawn which are arranged according to the collection time sequence, wherein the signals to be drawn comprise amplitude values.
In the signal detection process, a certain number of signal values of the signal to be detected are collected, and then a signal change diagram of the signal to be detected is drawn according to the collected signal values of the signal to be detected, so as to visually judge the change condition of the signal to be detected. In specific implementation, the signal value of the acquired signal to be detected is the signal amplitude, and the acquired signal of the signal to be detected also has the acquisition time attribute. In specific implementation, the collected signals to be detected are arranged according to the sequence of the collection time to obtain an amplitude sequence of the signals to be detected, the sequence number of the signals to be detected in the amplitude sequence is the collection time information of the signals to be detected, and the amplitude of the signals to be detected with the collection time being earlier is arranged in front of the sequence. Typically, signal acquisition is performed at a sampling rate, and therefore, the interval between the acquisition times of signals corresponding to two adjacent amplitudes in the amplitude sequence is also determined. And calculating the acquisition time corresponding to each amplitude according to the sampling frequency and the sequence number of the amplitude of the signal in the amplitude sequence. In specific implementation, the sampling frequency of the signal to be detected is determined according to the change frequency of the signal to be detected and the drawing requirement of the signal change diagram.
The specific implementation of obtaining the signals to be drawn arranged according to the collection time sequence is referred to in the prior art, and details are not repeated in this embodiment.
And step 110, judging whether the amplitude of the signal to be drawn meets a preset amplitude change condition.
After the signals to be drawn which are arranged according to the sequence of the acquisition time are acquired, the amplitude change condition of the signals to be drawn is further judged. The obtained signal to be drawn generally comprises signal amplitudes of a plurality of acquisition time points, more signal amplitudes can be acquired by tens of thousands of acquisition time points, and less signal amplitudes can be acquired by hundreds of acquisition time points. In specific implementation, the amplitude of the signal to be drawn is traversed, and whether the amplitude change of the signal to be drawn is violent or not is judged. When the amplitude of the signal to be drawn changes very little, drawing the obtained signal change diagram of the signal to be drawn by adopting a drawing mode (namely a second coordinate mode) of a signal change diagram in the prior art; when the amplitude of the signal to be plotted is changed greatly, a first coordinate mode is adopted to plot an acquired signal change graph of the signal to be plotted.
During specific implementation, whether the signal to be drawn meets a preset amplitude change condition is determined according to the obtained maximum value, the obtained minimum value, the difference value proportion between the maximum value and the minimum value of the amplitude of the signal to be drawn, the number proportion of the signals with smaller amplitudes and the like. And when the signal to be drawn meets a preset amplitude change condition, indicating that the amplitude change of the signal to be drawn is severe, and drawing the acquired signal change diagram of the signal to be drawn by adopting a first coordinate mode. And when the signal to be drawn does not meet the preset amplitude change condition, the amplitude change of the signal to be drawn is stable, and the obtained signal change graph of the signal to be drawn is drawn by adopting a conventional coordinate mode (namely a second coordinate mode) in the prior art.
In specific implementation, the key difference between the conventional coordinate mode (i.e., the second coordinate mode) in the prior art for drawing the signal change diagram and the first coordinate mode for drawing the signal change diagram is that the ordinate is different.
And 120, if the amplitude of the signal to be drawn meets a preset condition, drawing a signal change diagram of the signal to be drawn by adopting a first coordinate mode, otherwise, drawing the signal change diagram of the signal to be drawn by adopting a second coordinate mode.
If the amplitude of the signal to be drawn meets a preset condition, which indicates that the amplitude of the signal to be drawn changes violently, drawing a signal change graph of the signal to be drawn by adopting a first coordinate mode; and if the amplitude of the signal to be drawn does not meet the preset condition, indicating that the amplitude change of the signal to be drawn is stable, drawing a signal change graph of the signal to be drawn by adopting a second coordinate mode.
The signal change diagram drawing method disclosed by the embodiment of the application obtains signals to be drawn which are arranged according to the sequence of the acquisition time, wherein the signals to be drawn comprise amplitude values and acquisition time; and then, judging whether the amplitude of the signal to be drawn meets a preset amplitude change condition or not, and selecting a corresponding coordinate mode of the signal change diagram according to a judgment result, so that the problem that the signal change diagram drawing method in the prior art cannot visually display the violent change signal is solved. The signal change diagram is drawn by adopting different coordinate modes for the signals collected in the time period with severe signal change or the signals collected in the time period with stable signal change, so that the signals with smaller amplitude and the signals with larger amplitude can be displayed simultaneously under the condition of severe signal change, and the general trend of signal change can be conveniently and intuitively mastered.
Example two
As shown in fig. 2, a method for drawing a signal variation graph disclosed in an embodiment of the present application includes: step 200 to step 250.
Step 200, collecting a signal to be drawn.
The signal of waiting to draw of this application can be voltage signal, current signal, consumption signal isoelectrical signal. In this embodiment, only the collected signal to be plotted is taken as a current signal as an example for explanation. The signal to be drawn in the present application may be an electrical signal collected from any electronic device, such as a PC, a mobile terminal, a personal digital assistant, a tablet computer, a television, an electronic door lock, and the like. The signal change frequencies of different electronic devices are different, so that before the signals are collected, corresponding sampling frequencies are set according to the signal change frequency of the electronic device to be detected, and sampling is carried out at the set sampling frequencies. In this embodiment, a specific implementation of the signal change diagram drawing method will be described in detail by taking the detection of the point stream signal of the electronic door lock as an example.
The working state of the electronic door lock includes a sleep state and a working state (i.e. an unlock state), the current of the electronic door lock in the sleep state and the working state changes very sharply, and the change time is very short, usually within a few seconds, and in order to accurately and comprehensively draw the current signal change diagram of the electronic door lock, the frequency adopted in the present embodiment is set to be 1000 points/second. In specific implementation, the current signal of the electronic door lock is collected according to the sampling frequency of 1000 points/second.
The specific implementation of acquiring the signal to be rendered refers to the prior art, and details are not repeated in this embodiment. After a period of signal acquisition, for example, 1 hour, the amplitude values of 3600000 signals to be plotted, which are arranged in the order of acquisition time, are obtained, and the signals to be plotted include the amplitude values and the acquisition time. The amplitude of a signal is a sampled current value, and the unit can be microampere. The acquisition time of a certain signal is the time offset from the beginning of acquiring the current signal (the time offset is recorded as 0) to the current signal, and can be calculated by the acquisition sequence number and the sampling frequency of the current signal, and the unit can be millisecond.
Step 210, determining signals to be drawn, which are acquired at a preset number of acquisition time points.
For the electric signal with longer acquisition time, a signal change graph of the electric signal can be drawn in a segmented mode. In this embodiment, the number of the signal amplitudes acquired in 1 hour is 3600000, and in the specific implementation, 20000 signal amplitudes may be taken as a group, that is, 20000 signal amplitudes acquired at the acquisition time points to be plotted are taken as signal information of a time period, and a signal change diagram of the time period is plotted. In specific implementation, the preset number is determined according to the sampling frequency, and the preset number is usually selected to be larger than the number of signals acquired in a time period of two signal change periods. In this embodiment, the signal change period of the electronic door lock is usually 10 seconds, and then 20 seconds may be taken as a time period to draw a signal change diagram of a signal to be drawn, which is collected within 20 seconds.
And step 220, obtaining signals to be drawn which are arranged according to the collection time sequence, wherein the signals to be drawn comprise amplitude values.
In this embodiment, the 3600000 collected current signal amplitudes may be divided into current signal amplitudes corresponding to 180 collection time periods, the current signal amplitude corresponding to each time period is sequentially taken, and a signal variation graph of the current signal in the time period is drawn. Namely, the amplitude of 20000 signals to be plotted acquired at 20000 adjacent acquisition time points is used as the signal amplitude of a time period, and the signal change diagram of the signals to be plotted at the 20000 acquisition time points is plotted.
Step 230, determining whether the amplitude of the signal to be plotted meets a preset amplitude variation condition, if the amplitude of the signal to be plotted meets the preset condition, executing step 240, otherwise, executing step 250.
The preset amplitude variation condition comprises: max-min>T1Min and T2*NUMmin>NUMT; wherein max and min are respectively the maximum amplitude and the minimum amplitude of the signal to be plotted; NUMMin is less than (max-min)/T3The number of signal amplitudes of; NUMT is the total number of the amplitude values of the signal to be drawn; t is1The first scale parameter is a positive integer with the value larger than 1; t is2Is a second proportional parameter, T2>(sampling duration of amplitude values of NUMBotal signals to be drawn lasting/presetting duration of minimum amplitude values of the signals to be drawn lasting); t is3Is a third proportional parameter, and takes a positive integer greater than 1.
In specific implementation, the second proportion parameter is determined according to the requirement of actual data. Taking the drawing of a current signal change diagram of the intelligent door lock as an example: the working state of the intelligent door lock can be summarized into a dormant state (low-power-consumption state current is dozens of uA) and a working state (dozens of mA), the duration of the intelligent door lock entering one-time dormancy is fixed as x, namely the duration of the minimum current is x; when a current signal change diagram is drawn, data of a time length y are collected for drawing, NUMBotal amplitude values of the signals to be drawn are collected within the time length y, and because the current condition of a dormant state and the number of times of entering dormancy are concerned more when the current signal change diagram is drawn, NUMBin/NUMBotal is determined>x/y, i.e. T2Is a value greater than y/x. By mixing T2The ratio of the duration of the amplitude of the signals to be drawn to be greater than NUMBotal to the duration of the minimum amplitude of the preset signals to be drawn is set, and small currents with shorter duration can be collected due to interference factors during drawing.
Preferably, the first ratio parameter is equal to 10, the second ratio parameter is 100, and the third ratio parameter is 10. When judging whether the amplitude of the signal to be drawn meets the preset amplitude change condition, firstly judging whether the difference value between the maximum amplitude and the minimum amplitude in the signal to be drawn is larger than the preset proportion T of the minimum amplitude1(ii) a Then, further judging the proportion of the number of the signal amplitudes with the amplitudes smaller than the preset amplitude to the total number of the signals; if the ratio of the number of the signal amplitudes with amplitudes smaller than the preset amplitude to the total number of the signal amplitudes is larger than the preset ratio, such as 1/100, it indicates that there are more signals with smaller amplitudes in the signals to be drawn, and it is necessary to display the signals with larger amplitudes and the signals with smaller amplitudes in the signal change diagram at the same time, that is, the signals to be drawn satisfy the preset amplitude change condition, then go to step 240, and adopt the first coordinate mode to draw the signal change diagram of the signals to be drawn. In particular implementations, the predetermined magnitude may be set to 1/10 as the difference between the maximum magnitude max minus the minimum magnitude min.
If the difference value between the maximum amplitude value and the minimum amplitude value in the signal to be drawn is judged to be lower than or equal to the preset proportion T of the minimum amplitude value1If 1/10, determining that the signal to be plotted changes smoothly, and does not meet the preset amplitude change condition, then jumping to step 250, and adopting a second coordinate mode to plot a signal change diagram of the signal to be plotted. If the difference between the maximum amplitude and the minimum amplitude in the signal to be plotted is greater than the preset ratio T of the minimum amplitude1However, if the ratio of the number of signal amplitudes with amplitudes smaller than the preset amplitude to the total number of signal amplitudes is further determined to be smaller than the preset ratio, e.g. 1/100, which indicates that the signal with smaller amplitude in the signal to be plotted is smaller and the change of the signal with smaller amplitude can be ignored, so that it is determined that the signal to be plotted does not satisfy the preset amplitude change condition, the step 250 is skipped to using the second coordinateAnd (5) modeling a drawing signal change diagram of the signal to be drawn.
Taking the collected current signal of the electronic door lock as an example, a signal change diagram of the signals collected at 20000 collection time points within 20 seconds from the sleep state to the working state of the electronic door lock is currently drawn. The minimum amplitude of the current signal collected by the electronic door lock in the sleep state is min-60 uA (microampere), the maximum amplitude of the current signal collected in the working state is max-25 mA, and the first proportional parameter T is used1Equal to 10, for example, first determine whether the difference between the maximum amplitude and the minimum amplitude in the signal to be plotted is greater than a predetermined ratio T of the minimum amplitude1Since max-min is 25 × 1000-60 × 24940uA, it is much larger than 10 times the minimum amplitude 60 uA. Then, the proportion of the number of the signal amplitudes with the amplitudes smaller than the preset amplitudes in the total number of the signal amplitudes is further judged. In particular implementations, the predetermined magnitude may be set to 1/10 as the difference between the maximum magnitude max minus the minimum magnitude min. In this embodiment, after the 20000 signal amplitudes to be drawn are traversed, the number NUMmin of the determined signal amplitudes whose amplitudes are smaller than the preset amplitudes is equal to 250, and it is satisfied that 250 × 100>20000, therefore, it is determined that the 20000 signal amplitudes to be plotted satisfy the preset amplitude variation condition. Jumping to step 240, the first coordinate mode is used to plot the signal variation graphs of the 20000 signals to be plotted.
And 240, drawing a signal change graph corresponding to the signal amplitude sequence by adopting a first coordinate mode.
The method for drawing the signal change graph of the signal to be drawn by adopting the first coordinate mode comprises the following steps: and taking a logarithmic value of the amplitude of the signal to be drawn as a vertical coordinate, and drawing a signal change graph of the signal to be drawn, wherein the logarithmic value is obtained by calculating the amplitude with N as the base, and N is an integer greater than 1. Preferably, N is equal to 10. In specific implementation, the acquisition sequence number or the acquisition time of the signal to be plotted may be used as the abscissa. As shown in fig. 3, the acquisition sequence number of the signal to be mapped is as follows: 1000. 2000 and … are plotted on the abscissa by taking the logarithm to the base 10 of each signal amplitude and the logarithm to the base 10 of the signal amplitude as the ordinate, and two-dimensionally plottingSignal change diagram of (2). As shown in FIG. 3, the base-10 logarithmic value of the signal of amplitude 60uA is 1.8 (from 10)1.8Found 63), the base-10 logarithm of the 25mA amplitude signal is 4.3 (from 10)4.319952), a current signal of around 60uA and a current signal of around 25mA can be visually presented simultaneously in fig. 3. If the signal change maps of the 20000 current signals are drawn by the method in the prior art, as shown in fig. 4, the current signals of about 60uA cannot be visually represented, and only a straight line slightly larger than 0 can be seen.
And step 250, drawing a signal change graph corresponding to the signal amplitude sequence by adopting a second coordinate mode.
The drawing of the signal change diagram of the signal to be drawn by adopting the second coordinate mode comprises the following steps: and taking the amplitude of the signal to be drawn as a vertical coordinate, and drawing a signal change diagram of the signal to be drawn. In specific implementation, the acquisition sequence number or the acquisition time of the signal to be plotted may be used as the abscissa. As shown in fig. 5, when the aforementioned 20000 signals to be plotted have stable amplitude changes, a second coordinate mode, that is, a coordinate mode in the prior art, may be adopted, where the signal amplitude of the signal to be plotted is taken as a vertical coordinate, and the acquisition sequence number of the signal to be plotted is as follows: 1000. 2000, … are plotted as abscissa, signal change.
By judging the signal amplitude change condition of the signal to be drawn in each time period (such as every 20000 signal value acquisition time), the corresponding coordinate mode is adopted to draw the signal change diagram in a segmented manner according to different signal amplitude change conditions, and the display intuitiveness of the signal with violent change is greatly improved.
The signal change diagram drawing method disclosed by the embodiment of the application obtains signals to be drawn which are arranged according to the sequence of the acquisition time, wherein the signals to be drawn comprise amplitude values and acquisition time; and then, judging whether the amplitude of the signal to be drawn meets a preset amplitude change condition or not, and selecting a corresponding coordinate mode of the signal change diagram according to a judgment result, so that the problem that the signal change diagram drawing method in the prior art cannot visually display the violent change signal is solved. The signal change diagram is drawn by adopting different coordinate modes for the signals collected in the time period with severe signal change and the signals collected in the time period with stable signal change, so that the signals with smaller amplitude and the signals with larger amplitude can be displayed simultaneously under the condition of severe signal change, and the general trend of signal change can be conveniently and intuitively mastered. For the time period with violent signal change, the logarithm of the signal amplitude is used as the ordinate, so that the amplitude change condition of the signal with smaller amplitude can be clearly displayed in the coordinate system, the general trend of signal change can be conveniently and visually mastered, and the user experience is improved.
EXAMPLE III
Accordingly, the embodiment of the present application discloses a signal change diagram drawing device, as shown in fig. 6, the device includes:
a signal to be drawn acquiring module 600, configured to acquire signals to be drawn, which are arranged according to an acquisition time sequence, where the signals to be drawn include an amplitude and an acquisition time;
the judging module 610 is configured to judge whether the amplitude of the signal to be plotted meets a preset amplitude change condition;
and the selection drawing module 620 is used for drawing a signal change diagram of the signal to be drawn by adopting a first coordinate mode if the amplitude of the signal to be drawn meets a preset amplitude change condition, and otherwise, drawing the signal change diagram of the signal to be drawn by adopting a second coordinate mode.
Optionally, as shown in fig. 7, the selection drawing module 620 includes:
the first drawing unit 6201 is configured to draw a signal change map of the signal to be drawn by using a logarithmic value of the amplitude of the signal to be drawn as a vertical coordinate, where the logarithmic value is obtained by calculating the amplitude with N as a base, and N is an integer greater than 1.
Preferably, N is equal to 10.
Optionally, as shown in fig. 7, the selection drawing module 620 includes:
the second plotting unit 6202 is configured to plot a signal change diagram of the signal to be plotted, with the amplitude of the signal to be plotted as a vertical coordinate.
Optionally, the preset amplitude variation condition includes: max-min>T1Min and T2*NUMmin>NUMT; wherein max and min are respectively the maximum amplitude and the minimum amplitude of the signal to be plotted; NUMMin is less than (max-min)/T3The number of signal amplitudes of; NUMT is the total number of the amplitude values of the signal to be drawn; t is1The first scale parameter is a positive integer with the value larger than 1; t is2Is a second proportional parameter, T2>(sampling duration of amplitude values of NUMBotal signals to be drawn lasting/presetting duration of minimum amplitude values of the signals to be drawn lasting); t is3Is a third proportional parameter, and takes a positive integer greater than 1.
Preferably, the first ratio parameter is equal to 10, the second ratio parameter is 100, and the third ratio parameter is 10.
The signal change diagram drawing device disclosed by the embodiment of the application obtains signals to be drawn which are arranged according to the sequence of the acquisition time, wherein the signals to be drawn comprise amplitude values and acquisition time; and then, judging whether the amplitude of the signal to be drawn meets a preset amplitude change condition or not, and selecting a corresponding coordinate mode of the signal change diagram according to a judgment result, so that the problem that the signal change diagram drawing method in the prior art cannot visually display the violent change signal is solved. The signal change diagram is drawn by adopting different coordinate modes for the signals collected in the time period with severe signal change and the signals collected in the time period with stable signal change, so that the signals with smaller amplitude and the signals with larger amplitude can be displayed simultaneously under the condition of severe signal change, and the general trend of signal change can be conveniently and intuitively mastered. For the time period with violent signal change, the logarithm of the signal amplitude is used as the ordinate, so that the amplitude change condition of the signal with smaller amplitude can be clearly displayed in the coordinate system, the general trend of signal change can be conveniently and visually mastered, and the user experience is improved.
Correspondingly, the application also discloses an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to realize the signal change diagram drawing method according to the first embodiment and the second embodiment of the application. The electronic device can be a PC, a mobile terminal, a personal digital assistant, a tablet computer, an oscilloscope, a signal analyzer and the like.
The present application also discloses a computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the steps of the signal variation mapping method according to the first and second embodiments of the present application.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The method and the device for drawing a signal change diagram provided by the present application are described in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.

Claims (10)

1. A method for mapping a signal variation, comprising:
acquiring signals to be drawn which are arranged according to the collection time sequence, wherein the signals to be drawn comprise amplitude values;
judging whether the amplitude of the signal to be drawn meets a preset amplitude change condition or not;
if the amplitude of the signal to be drawn meets a preset amplitude change condition, drawing a signal change graph of the signal to be drawn by adopting a first coordinate mode, otherwise, drawing the signal change graph of the signal to be drawn by adopting a second coordinate mode;
the step of drawing the signal change diagram of the signal to be drawn by adopting the first coordinate mode comprises the following steps:
taking a logarithmic value of the amplitude of the signal to be drawn as a vertical coordinate, and drawing a signal change graph of the signal to be drawn, wherein the logarithmic value is obtained by calculating the amplitude with N as the base, and N is an integer greater than 1;
the preset amplitude variation condition comprises: max-min>T1Min and T2*NUMmin>NUMT; wherein max and min are respectively the maximum amplitude and the minimum amplitude of the signal to be plotted; NUMMin is less than (max-min)/T3The number of signal amplitudes of; NUMT is the total number of the amplitude values of the signal to be drawn; t is1The first scale parameter is a positive integer with the value larger than 1; t is2Is a second proportional parameter, T2>(sampling duration of amplitude values of NUMBotal signals to be drawn lasting/presetting duration of minimum amplitude values of the signals to be drawn lasting); t is3Is a third proportional parameter, and takes a positive integer greater than 1.
2. The method of claim 1, wherein the step of mapping the signal variation of the signal to be mapped using the second coordinate mode comprises:
and taking the amplitude of the signal to be drawn as a vertical coordinate, and drawing a signal change diagram of the signal to be drawn.
3. The method of claim 1, wherein the first scaling parameter is equal to 10, the second scaling parameter is 100, and the third scaling parameter is 10.
4. The method of claim 1, wherein N is equal to 10.
5. A signal change map drawing apparatus, comprising:
the system comprises a signal to be drawn acquisition module, a signal to be drawn acquisition module and a signal to be drawn acquisition module, wherein the signal to be drawn acquisition module is used for acquiring signals to be drawn which are arranged according to the collection time sequence, and the signals to be drawn comprise amplitude values;
the judging module is used for judging whether the amplitude of the signal to be drawn meets a preset amplitude change condition or not;
the selection drawing module is used for drawing a signal change diagram of the signal to be drawn by adopting a first coordinate mode if the amplitude of the signal to be drawn meets a preset amplitude change condition, and otherwise, drawing the signal change diagram of the signal to be drawn by adopting a second coordinate mode;
the selection drawing module comprises:
the first drawing unit is used for drawing a signal change diagram of the signal to be drawn by taking a logarithmic value of the amplitude of the signal to be drawn as a vertical coordinate, wherein the logarithmic value is obtained by calculating the amplitude with N as the base, and N is an integer greater than 1;
the preset amplitude variation condition comprises: max-min>T1Min and T2*NUMmin>NUMT; wherein max and min are respectively the maximum amplitude and the minimum amplitude of the signal to be plotted; NUMMin is less than (max-min)/T3The number of signal amplitudes of; NUMT is the total number of the amplitude values of the signal to be drawn; t is1The first scale parameter is a positive integer with the value larger than 1; t is2Is a second proportional parameter, T2>(sampling duration of amplitude duration of NUMBotal signals to be drawn/presetting minimum amplitude duration of signals to be drawnDuration of time); t is3Is a third proportional parameter, and takes a positive integer greater than 1.
6. The apparatus of claim 5, wherein the selection drawing module comprises:
and the second drawing unit is used for drawing a signal change diagram of the signal to be drawn by taking the amplitude of the signal to be drawn as a vertical coordinate.
7. The apparatus of claim 5, wherein the first scaling parameter is equal to 10, the second scaling parameter is 100, and the third scaling parameter is 10.
8. The apparatus of claim 5, wherein N is equal to 10.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the signal variation mapping method according to any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the steps of the signal-variation mapping method of any one of claims 1 to 4.
CN201710016476.8A 2017-01-10 2017-01-10 Signal change diagram drawing method and device and electronic equipment Active CN106846433B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710016476.8A CN106846433B (en) 2017-01-10 2017-01-10 Signal change diagram drawing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710016476.8A CN106846433B (en) 2017-01-10 2017-01-10 Signal change diagram drawing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN106846433A CN106846433A (en) 2017-06-13
CN106846433B true CN106846433B (en) 2020-10-09

Family

ID=59118436

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710016476.8A Active CN106846433B (en) 2017-01-10 2017-01-10 Signal change diagram drawing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN106846433B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112802153B (en) * 2021-01-13 2023-06-13 中铁二院工程集团有限责任公司 Digital line drawing checking method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4475166A (en) * 1981-04-02 1984-10-02 The Solartron Electronic Group Limited Digital signal processing apparatus with improved display
CN101176673A (en) * 2007-11-30 2008-05-14 深圳市蓝韵实业有限公司 Device for testing the compatibility of front end amplification channel of ultrasonic diagnostic device
CN101339216A (en) * 2008-08-11 2009-01-07 中国舰船研究设计中心 Ship electromagnetic environment characteristic analysis determination method
CN101666818A (en) * 2009-07-21 2010-03-10 秦轲 Method for detecting signal by oscilloscope

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4475166A (en) * 1981-04-02 1984-10-02 The Solartron Electronic Group Limited Digital signal processing apparatus with improved display
CN101176673A (en) * 2007-11-30 2008-05-14 深圳市蓝韵实业有限公司 Device for testing the compatibility of front end amplification channel of ultrasonic diagnostic device
CN101339216A (en) * 2008-08-11 2009-01-07 中国舰船研究设计中心 Ship electromagnetic environment characteristic analysis determination method
CN101666818A (en) * 2009-07-21 2010-03-10 秦轲 Method for detecting signal by oscilloscope

Also Published As

Publication number Publication date
CN106846433A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
US11280809B2 (en) Method and apparatus for processing oscilloscope signal and oscilloscope
EP2228660B1 (en) Frequency domain bitmaps triggering using color, density and correlation based triggering
US6791545B2 (en) Measurement icons for digital oscilloscopes
CN104181365B (en) A kind of measuring device with zooming display function
US9784765B2 (en) Graphic actuation of test and measurement triggers
EP2385379B1 (en) Signal detection and triggering using a difference bitmap
JP2011523706A (en) Signal search with 3D bitmap
CN104834597A (en) Method and system for measuring application response duration
CN104063286A (en) Method and device for testing fluency of change of displayed content
JP2001289880A (en) Oscilloscope and its operation method
CN109310354A (en) The rendering method and device of ST event in electrocardiogram
CN106846433B (en) Signal change diagram drawing method and device and electronic equipment
US20200348342A1 (en) Method and apparatus for processing oscilloscope data and oscilloscope
CN109009079A (en) User Status detection system and method, computer equipment, computer storage medium
JP2013044747A (en) Test measuring device and method and computer readable medium
CN116401524A (en) Eye pattern analysis method and device
CN108345383B (en) Human brain preference detection method and device based on brain waves
CN111710347B (en) Audio data analysis method, electronic device and storage medium
CN107315170B (en) Pulse sequence signal correlation analysis and display system and method
US10580175B2 (en) Apparatus, method and system for resolution dependent graphical representation of signals
CN109308204B (en) Chart generation method and device for responding to window clicking
CN107835056B (en) Multi-channel power measurement and display method and device
CN110584695A (en) Medical imaging equipment testing method, device, equipment and storage medium
CN107765126A (en) A kind of method, apparatus and terminal of monitoring terminal surge
CN115219971B (en) Oscillograph waveform checking method, oscillograph waveform checking device, oscillograph waveform checking equipment and oscillograph waveform checking storage 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
GR01 Patent grant
GR01 Patent grant