CN114998478B - Data processing method, device, equipment and computer readable storage medium - Google Patents

Data processing method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN114998478B
CN114998478B CN202210845240.6A CN202210845240A CN114998478B CN 114998478 B CN114998478 B CN 114998478B CN 202210845240 A CN202210845240 A CN 202210845240A CN 114998478 B CN114998478 B CN 114998478B
Authority
CN
China
Prior art keywords
data
coordinate data
target
coordinate
signal
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
CN202210845240.6A
Other languages
Chinese (zh)
Other versions
CN114998478A (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.)
Shenzhen Xinrun Fulian Digital Technology Co Ltd
Original Assignee
Shenzhen Xinrun Fulian Digital 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 Shenzhen Xinrun Fulian Digital Technology Co Ltd filed Critical Shenzhen Xinrun Fulian Digital Technology Co Ltd
Priority to CN202210845240.6A priority Critical patent/CN114998478B/en
Publication of CN114998478A publication Critical patent/CN114998478A/en
Application granted granted Critical
Publication of CN114998478B publication Critical patent/CN114998478B/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
    • G06T11/203Drawing of straight lines or curves
    • 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
    • G06T11/206Drawing of charts or graphs
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Emergency Alarm Devices (AREA)

Abstract

The invention discloses a data processing method, a device, equipment and a computer readable storage medium, and relates to the field of industrial confidence maps, wherein the method comprises the following steps: acquiring an upper curve array and a lower curve array corresponding to the safe envelope area and a signal array corresponding to a stamping machine tool signal; generating an upper curve in the canvas based on an upper curve array, generating a lower curve in the canvas based on a lower curve array, and generating a signal curve in the canvas based on the signal array; determining first target coordinate data based on upper curve coordinate data corresponding to the upper curve, lower curve coordinate data corresponding to the lower curve and signal coordinate data corresponding to the signal curve; generating a warning region in the canvas based on the first target coordinate data. According to the invention, the upper curve, the lower curve, the signal curve and the warning area can be generated according to the upper curve array, the lower curve array and the signal array, so that the efficiency of drawing the confidence map is improved.

Description

Data processing method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data processing method, apparatus, device, and computer readable storage medium.
Background
At present, in a digital data industrial production field, confidence map data of mechanical equipment is collected and is presented to a user after being processed by a map analysis software, and most of factory mainstream applications are desktop software based on a windows environment or confidence map tools based on a web end.
Desktop software based on windows environment is old in version and poor in computer support of modern high-version systems, a user needs to install upgraded software again when iteration is changed, appropriate software is difficult to find under an apple mac system, and the desktop software is not convenient for the user. However, the confidence maps supported by the current confidence map tools on the web side only have some common confidence maps with higher universality, no confidence map of the professional confidence map in the industrial field exists, html tags are operated by using javascript Language of html5 (hypertext Markup Language) to draw an interface, each html node operation brings about a small performance overhead, and the efficiency is low when processing intensive data confidence maps such as the confidence map of a punching machine tool.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a data processing method, a data processing device, data processing equipment and a computer readable storage medium, and aims to solve the technical problem that the existing confidence map drawing efficiency is low.
In order to achieve the above object, the present invention provides a data processing method applied to a canvas of a hypertext markup language, the data processing method comprising the steps of:
acquiring an upper curve array and a lower curve array corresponding to the safe envelope area and a signal array corresponding to a stamping machine tool signal;
generating an upper curve in the canvas based on the upper curve array, generating a lower curve in the canvas based on the lower curve array, and generating a signal curve in the canvas based on the signal array;
determining first target coordinate data based on upper curve coordinate data corresponding to the upper curve, lower curve coordinate data corresponding to the lower curve and signal coordinate data corresponding to the signal curve;
generating a warning region in the canvas based on the first target coordinate data.
Further, the step of determining the first target coordinate data based on the upper curve coordinate data corresponding to the upper curve, the lower curve coordinate data corresponding to the lower curve, and the signal coordinate data corresponding to the signal curve includes:
if the upper curve coordinate data and the signal coordinate data meet a first preset condition, determining second target coordinate data;
if the lower curve coordinate data and the signal coordinate data meet a second preset condition, determining third target coordinate data;
and taking the second target coordinate data and/or the third target coordinate data as the first target coordinate data.
Further, if the upper curve coordinate data and the signal coordinate data satisfy a first preset condition, the step of determining second target coordinate data further includes:
acquiring first ordinate data in the upper curve coordinate data and second ordinate data in the signal coordinate data;
respectively determining first ordinate data and second ordinate data corresponding to each abscissa axis data of a rectangular coordinate system of a plane in a canvas, and determining a first coordinate difference obtained by subtracting the second ordinate data from the first ordinate data;
and if a first target coordinate difference smaller than a preset threshold value exists in the first coordinate difference, determining that the upper curve coordinate data and the signal coordinate data meet a first preset condition, and determining second target coordinate data.
Further, the second target coordinate data includes first sub-target coordinate data and second sub-target coordinate data, and if a first target coordinate difference smaller than a preset threshold exists in the first coordinate difference, it is determined that the upper curve coordinate data and the signal coordinate data satisfy a first preset condition, and the step of determining the second target coordinate data includes:
acquiring first target ordinate data corresponding to a first target coordinate difference from the first ordinate data, acquiring second target ordinate data corresponding to the first target coordinate difference from the second ordinate data, and acquiring first target abscissa axis data corresponding to the first target coordinate difference;
taking the target first abscissa axis data and the target first ordinate axis data as first sub-target coordinate data;
and taking the target first abscissa axis data and the target second ordinate axis data as second sub-target coordinate data.
Further, if the lower curve coordinate data and the signal coordinate data satisfy a second preset condition, the step of determining third target coordinate data includes:
acquiring third ordinate data in the lower curve coordinate data and fourth ordinate data in the signal coordinate data;
respectively determining third ordinate data and fourth ordinate data corresponding to each abscissa axis data of a rectangular plane coordinate system in the canvas, and determining a second coordinate difference obtained by subtracting the fourth ordinate data from the third ordinate data;
and if a second target coordinate difference larger than a preset threshold value exists in the second coordinate difference, determining that the lower curve coordinate data and the signal coordinate data meet a second preset condition, and determining third target coordinate data.
Further, the third target coordinate data includes third sub-target coordinate data and fourth sub-target coordinate data, and if a second target coordinate difference greater than a preset threshold exists in the second coordinate differences, it is determined that the lower curve coordinate data and the signal coordinate data satisfy a second preset condition, and the step of determining the third target coordinate data includes:
acquiring third target ordinate data corresponding to a second target coordinate difference from the third ordinate data, acquiring fourth target ordinate data corresponding to the second target coordinate difference from the fourth ordinate data, and acquiring second target abscissa axis data corresponding to the second target coordinate difference;
taking the second target abscissa axis data and the third target ordinate data as third sub-target coordinate data;
and taking the second target abscissa axis data and the fourth target ordinate data as fourth sub-target coordinate data.
Further, the data processing method further comprises:
if a translation instruction is detected, changing the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data based on the translation instruction;
if an amplification instruction is detected, amplifying the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data to a preset multiple;
and if a reduction instruction is detected, reducing the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data to a preset multiple.
Further, to achieve the above object, the present invention also provides a data processing apparatus comprising:
the acquisition module is used for acquiring an upper curve array and a lower curve array corresponding to the safe envelope area and a signal array corresponding to a stamping machine tool signal;
a first generation module that generates an upper curve in the canvas based on the upper curve array, generates a lower curve in the canvas based on the lower curve array, and generates a signal curve in the canvas based on the signal array;
the determining module is used for determining first target coordinate data based on upper curve coordinate data corresponding to the upper curve, lower curve coordinate data corresponding to the lower curve and signal coordinate data corresponding to the signal curve;
a second generation module that generates a warning region in the canvas based on the first target coordinate data.
Furthermore, to achieve the above object, the present invention also provides a data processing apparatus comprising: a memory, a processor and a data processing program stored on the memory and executable on the processor, the data processing program, when executed by the processor, implementing the steps of the data processing method as described above.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a data processing program which, when executed by a processor, implements the steps of the aforementioned data processing method.
According to the method, the upper curve array, the lower curve array and the signal array corresponding to the stamping machine tool signal corresponding to the safety envelope area are obtained, the upper curve is generated in the canvas based on the upper curve array, the lower curve is generated in the canvas based on the lower curve array, the signal curve is generated in the canvas based on the signal array, the first target coordinate data is determined based on the upper curve coordinate data corresponding to the upper curve, the lower curve coordinate data corresponding to the lower curve and the signal coordinate data corresponding to the signal curve, and the warning area is generated in the canvas based on the first target coordinate data.
Drawings
Fig. 1 is a schematic structural diagram of a data processing apparatus in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a data processing method according to a first embodiment of the present invention;
FIG. 3 is a functional block diagram of a data processing apparatus according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a data processing device in a hardware operating environment according to an embodiment of the present invention.
The data processing device of the embodiment of the invention can be a PC, and can also be a mobile terminal device with a display function, such as a smart phone, a tablet computer, a portable computer and the like.
As shown in fig. 1, the data processing apparatus may include: a processor 1001, e.g. a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the data processing device may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. In particular, the light sensor may include an ambient light sensor that adjusts the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that turns off the display screen and/or the backlight when the data processing device is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the device is stationary, and can be used for applications of recognizing the posture of data processing equipment (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; of course, the data processing device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and so on, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a data processing program.
In the data processing apparatus shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and communicating with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be used to invoke a data processing program stored in the memory 1005.
In this embodiment, the data processing apparatus includes: the system comprises a memory 1005, a processor 1001 and a data processing program which is stored on the memory 1005 and can run on the processor 1001, wherein when the processor 1001 calls the data processing program stored in the memory 1005, the steps of the data processing method in each embodiment are executed.
The invention also provides a data processing method applied to the canvas of the hypertext markup language, and referring to fig. 2, fig. 2 is a schematic flow diagram of a first embodiment of the method.
The data processing method comprises the following steps:
s101, acquiring an upper curve array and a lower curve array corresponding to a safe envelope area and a signal array corresponding to a stamping machine tool signal;
it should be noted that, before step S101, a canvas is first created, specifically, a canvas is created in an html document: < canvas id = "canvas" > < canvas >, then obtain canvas object in js, and create canvas context object ctx, the center of the canvas can be converted from the upper left corner to the lower left corner where people are more accustomed to through transform () and scale () methods.
In this embodiment, obtain the upper curve array, the lower curve array and the signal array that the safe envelope region corresponds, embody the upper curve array, the lower curve array and the signal array that the punching press machine tool signal corresponds in the canvas with the curve form, wherein, the safe envelope region refers to the punching press machine tool normal operating, and the signal data when gathering a large amount of the same punching press machine tool operating through ADC (Analog to Digital Converter) acquisition card obtains reasonable scope, for example: ADC data of the stamping machine tool during working are collected, the safe enveloping area is a closed area which is wrapped by an upper curve and a lower curve together, and signal curves of the stamping machine tool during normal working are in the safe enveloping area. It should be noted that a standard line may be included in the safety envelope area, wherein the standard line refers to a signal curve generated under the optimal working condition of the punching machine.
Step S102, generating an upper curve in the canvas based on the upper curve array, generating a lower curve in the canvas based on the lower curve array, and generating a signal curve in the canvas based on the signal array;
specifically, when the signal arrays corresponding to the upper curve array, the lower curve array and the punching machine tool signal are acquired, the canvas is told to be ready for drawing through a ctx. Then, the canvas represents the upper curve array, the lower curve array and the signal array corresponding to the punching machine tool signal in a curve form through ctx.value.lineto (x, y) in the canvas, wherein x in ctx.value.lineto (x, y) represents the subscript of the upper curve array, the subscript of the lower curve array or the signal array corresponding to the punching machine tool signal, and y represents the elements of the upper curve array, the lower curve array or the signal array corresponding to the punching machine tool signal, for example: the upper curve array is [1, 2.58, 3, 4, 5, 6, 5, 4.4, 4.2, 3.8, 2,1], and ctx.value.lineto (x, y) is repeatedly called to generate the upper curve in the canvas.
It should be noted that, the upper curve and the lower curve are drawn in the canvas, that is, a complete safety envelope area is formed, the safety envelope area can be filled with a ground color, a highlight color, a dark color and the like, and the drawn upper curve and the drawn lower curve can be added with a color, a bolder color, a highlight color and the like. For example, the ground color is filled by ctx.value.fillstyle function in the canvas, and the color is added by ctx.value.stroke function.
Step S103, determining first target coordinate data based on upper curve coordinate data corresponding to the upper curve, lower curve coordinate data corresponding to the lower curve and signal coordinate data corresponding to the signal curve;
in the coordinate system, the vertical axis data of the upper curve coordinate data, the vertical axis data of the lower curve coordinate data, and the vertical axis data of the signal coordinate data are associated with each horizontal axis data.
After the upper curve, the lower curve and the signal curve are obtained, upper curve coordinate data corresponding to the upper curve, lower curve coordinate data corresponding to the lower curve and signal coordinate data corresponding to the signal curve are obtained, and if the upper curve coordinate data and the signal coordinate data meet a first preset condition, second target coordinate data are determined. And if the lower curve coordinate data and the signal coordinate data meet a second preset condition, determining third target coordinate data. And taking the second target coordinate data and/or the third target coordinate data as the first target coordinate data.
Step S104, generating a warning area in the canvas based on the first target coordinate data.
When only the second target coordinate data exists, processing the second target coordinate data through the drawing function of the canvas to obtain a warning area in the canvas; when only the third target coordinate data exists, processing the third target coordinate data in the canvas through the drawing function of the canvas to obtain a warning area; and when the second target coordinate data and the third target coordinate data exist, processing the second target coordinate data and the third target coordinate data through the drawing function of the canvas to obtain a warning area in the canvas.
After the warning area is obtained, the warning area may be color-filled, highlighted, or the like. It should be noted that the alarm region means that the signal curve of the press machine during operation is abnormal, and the alarm is given to a person that the press machine may have failed.
In one implementation, the second target coordinate data or the third target coordinate region is placed in a three-dimensional array, each layer in the three-dimensional array representing a sub-warning region, e.g., the three-dimensional array: [ [1,2], [2,1], [3,2], [2,3] ], [ [1,2], [2,1], [3,2], [2,4] ], wherein [ [1,2], [2,1], [3,2], [2,3] ] and [ [1,2], [2,1], [3,2], [2,4] ] represent two sub-warning regions, [1,2], [ 35 zxft 3235 ], [ 3292 z3292 zxft 7492 ], [ 3426 zxft 3474 ], [ 3574 zxft 3592 ], [ 35zzft 3592 ], [ 3592 ] and [ 35zxft 3592 ], [ 3592 ] represent each of the warning regions. For example, [1,2],1 represents horizontal axis data and 2 represents vertical axis data, and the canvas pair may then traverse each layer of the three-dimensional array in turn, e.g., drawing a curve through a ctx. In another implementation, in the case of a small amount of data, all the second target coordinate data or the third target coordinate data is put into a one-dimensional array and directly processed by a ctx.
It should be noted that the websocket protocol may be used to send the signal array, specifically, the server sends the signal array with a fixed length once a second, the canvas obtains the signal array and draws the confidence map according to the array, the drawn confidence map may be stored through the save () function after the canvas is drawn, the restore () function is used to clear the content of the current canvas, and preparation is made for processing a new signal array sent by the websocket protocol for the next second.
According to the data processing method provided by the embodiment, the upper curve array, the lower curve array and the signal array corresponding to the stamping machine tool signal corresponding to the safety envelope area are obtained, the upper curve is generated in the canvas based on the upper curve array, the lower curve is generated in the canvas based on the lower curve array, the signal curve is generated in the canvas based on the signal array, the first target coordinate data is determined based on the upper curve coordinate data corresponding to the upper curve, the lower curve coordinate data corresponding to the lower curve and the signal coordinate data corresponding to the signal curve, and the warning area is generated in the canvas based on the first target coordinate data.
A second embodiment of the data processing method of the present invention is proposed based on the first embodiment, and in this embodiment, step S103 includes:
step S201, if the upper curve coordinate data and the signal coordinate data meet a first preset condition, determining second target coordinate data;
step S202, if the lower curve coordinate data and the signal coordinate data meet a second preset condition, determining third target coordinate data;
step S203, using the second target coordinate data and/or the third target coordinate data as the first target coordinate data.
In this embodiment, it is determined whether the upper curve coordinate data and the signal coordinate data satisfy a first preset condition, and if the upper curve coordinate data and the signal coordinate data satisfy the first preset condition, the upper curve coordinate data and the signal coordinate data are regarded as second target coordinate data according to the fact that the upper curve coordinate data and the signal coordinate data are the same in number.
And judging whether the lower curve coordinate data and the signal coordinate data meet a second preset condition, and if so, taking the lower curve coordinate data and the signal coordinate data as third target coordinate data, wherein the upper curve coordinate data and the signal coordinate data have the same number.
And finally, when the second target coordinate data and the third target coordinate data exist, taking the second target coordinate data and the third target coordinate data as the first target coordinate data. Or, when only the second target coordinate data exists and the third target coordinate data does not exist, the second target coordinate data is taken as the first target coordinate data. Or, when only the third target coordinate data exists and the second target coordinate data does not exist, the third target coordinate data is taken as the first target coordinate data.
According to the data processing method provided by the embodiment, second target coordinate data is determined if the upper curve coordinate data and the signal coordinate data meet a first preset condition, then third target coordinate data is determined if the lower curve coordinate data and the signal coordinate data meet a second preset condition, and finally the second target coordinate data and/or the third target coordinate data are/is used as the first target coordinate data, so that the first target coordinate data can be accurately obtained according to the second target coordinate data and/or the third target coordinate data, and the accuracy of determining the warning area on the canvas by the first target coordinate data is further improved.
Based on the second embodiment, a third embodiment of the data processing method of the present invention is proposed, in this embodiment, step S201 includes:
step S301, acquiring first vertical coordinate data in the upper curve coordinate data and second vertical coordinate data in the signal coordinate data;
step S302, respectively determining first ordinate data and second ordinate data corresponding to each abscissa axis data of a rectangular plane coordinate system in a canvas, and determining a first coordinate difference obtained by subtracting the second ordinate data from the first ordinate data;
step S303, if there is a first target coordinate difference smaller than a preset threshold in the first coordinate difference, determining that the upper curve coordinate data and the signal coordinate data satisfy a first preset condition, and determining a second target coordinate data.
In this embodiment, first ordinate data in the upper curve coordinate data and second ordinate data in the signal coordinate data are first obtained, where the first ordinate data is longitudinal axis data in each coordinate data in the upper curve coordinate data, and the second ordinate data is longitudinal axis data in each coordinate data in the signal coordinate data.
And then, respectively calculating a first coordinate difference between first ordinate data and second ordinate data corresponding to each abscissa axis data, wherein the first coordinate difference = the first ordinate data-the second ordinate data, and when a preset threshold is 0 and a coordinate difference smaller than zero exists in the first coordinate difference, determining that the coordinate difference in the first coordinate difference smaller than zero is a first target coordinate difference, signal coordinate data corresponding to the first target coordinate difference is outside a safety envelope area, and upper curve coordinate data and the signal coordinate data meet a first preset condition. And when the first coordinate differences are larger than zero, the upper curve coordinate data and the signal coordinate data do not meet a second preset condition.
Further, in an embodiment, the step S303 includes:
step a, acquiring first target ordinate data corresponding to a first target coordinate difference from the first ordinate data, acquiring second target ordinate data corresponding to the first target coordinate difference from the second ordinate data, and acquiring first target abscissa axis data corresponding to the first target coordinate difference;
step b, taking the first target abscissa axis data and the first target ordinate data as first sub-target coordinate data;
and c, taking the first abscissa axis data of the target and the second ordinate axis data of the target as second sub-target coordinate data.
It should be noted that the second target coordinate data includes first sub-target coordinate data and second sub-target coordinate data.
In this embodiment, if the upper curve coordinate data and the signal coordinate data satisfy the first preset condition, the first target ordinate data corresponding to the first target coordinate difference is obtained in the first ordinate data, then the second target ordinate data corresponding to the first target coordinate difference is obtained in the second ordinate data, and the first target abscissa data corresponding to the first target coordinate difference is obtained.
And finally, taking the first target abscissa axis data and the first target ordinate data as first sub-target coordinate data, and taking the first target abscissa axis data and the second target ordinate data as second sub-target coordinate data.
According to the data processing method provided by the embodiment, the first ordinate data in the upper curve coordinate data and the second ordinate data in the signal coordinate data are acquired, then the first coordinate difference between the first ordinate data and the second ordinate data corresponding to each abscissa axis data is respectively determined, and finally if the first target coordinate difference smaller than the preset threshold exists in the first coordinate difference, it is determined that the upper curve coordinate data and the signal coordinate data meet the first preset condition, and the second target coordinate data is determined.
A fourth embodiment of the data processing method of the present invention is proposed based on the second embodiment, and in this embodiment, step S202 includes:
step 401, acquiring third ordinate data in the lower curve coordinate data and fourth ordinate data in the signal coordinate data;
step 402, respectively determining third ordinate data and fourth ordinate data corresponding to each abscissa axis data of a rectangular plane coordinate system in a canvas, and determining a second coordinate difference obtained by subtracting the fourth ordinate data from the third ordinate data;
step 403, if a second target coordinate difference larger than a preset threshold exists in the second coordinate differences, determining that the lower curve coordinate data and the signal coordinate data meet a second preset condition, and determining third target coordinate data.
In this embodiment, first, third ordinate data in the lower curve coordinate data and fourth ordinate data in the signal coordinate data are obtained, where the third ordinate data is longitudinal axis data in each coordinate data in the lower curve coordinate data, and the fourth ordinate data is longitudinal axis data in each coordinate data in the signal coordinate data.
And then, respectively calculating a second coordinate difference between third ordinate data and fourth ordinate data corresponding to each abscissa axis data, wherein the second coordinate difference = the third ordinate data-the fourth ordinate data, when a preset threshold is 0, and when a coordinate difference exists in the second coordinate difference and is greater than zero, determining that the coordinate difference in the second coordinate difference greater than zero is a second target coordinate difference, signal coordinate data corresponding to the second target coordinate difference is outside a safety envelope area, and lower curve coordinate data and the signal coordinate data meet a second preset condition. And when the second coordinate differences are less than zero, the upper curve coordinate data and the signal coordinate data do not meet a second preset condition.
Further, in an embodiment, step S403 includes:
step e, acquiring third target ordinate data corresponding to a second target coordinate difference from the third ordinate data, acquiring fourth target ordinate data corresponding to the second target coordinate difference from the fourth ordinate data, and acquiring second target abscissa axis data corresponding to the second target coordinate difference;
step f, taking the second target abscissa axis data and the third target ordinate data as third sub-target coordinate data;
and g, taking the second target abscissa axis data and the fourth target ordinate data as fourth sub-target coordinate data.
The third target coordinate data includes third sub-target coordinate data and fourth sub-target coordinate data.
In this embodiment, if the lower curve coordinate data and the signal coordinate data satisfy the second preset condition, third target ordinate data corresponding to the second target coordinate difference is obtained in the third ordinate data, then fourth target ordinate data corresponding to the second target coordinate difference is obtained in the fourth ordinate data, and second target abscissa axis data corresponding to the second target coordinate difference is obtained.
And finally, taking the second target abscissa axis data and the third target ordinate data as first sub-target coordinate data, and taking the second target abscissa axis data and the fourth target ordinate data as second sub-target coordinate data.
The data processing method provided by this embodiment obtains third ordinate data in the lower curve coordinate data and fourth ordinate data in the signal coordinate data, then determines second coordinate differences between the third ordinate data and the fourth ordinate data corresponding to each abscissa axis data, and finally determines that the lower curve coordinate data and the signal coordinate data satisfy a second preset condition and determines third target coordinate data if a second target coordinate difference larger than a preset threshold exists in the second coordinate differences.
Based on the foregoing embodiments, a fifth embodiment of the data processing method of the present invention is proposed, in this embodiment, the data processing method further includes:
step S501, if a translation instruction is detected, changing the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data based on the translation instruction;
step S502, if an amplifying instruction is detected, amplifying the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data to a preset multiple;
in step S503, if a reduction command is detected, the upper curve coordinate data, the lower curve coordinate data, and the signal coordinate data are reduced to a preset multiple.
It should be noted that, in order to improve user experience, an enlargement and reduction button is created to support enlargement and reduction of the confidence map, a translation button is created to support translation of the confidence map, the button can be created by using traditional html, translation is realized by changing subscripts on horizontal axes or values on vertical axes of a curve array in real time, and enlargement and reduction can be realized by multiplying preset enlargement or reduction factor by values on vertical axes of horizontal axes.
In particular, the pan instructions may include a left pan instruction, a right pan instruction, an up pan instruction, a down pan instruction. When a leftward translation instruction is detected, subtracting preset values from abscissa values of the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data at the same time; when a rightward translation instruction is detected, increasing the horizontal coordinate values of the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data by preset values at the same time; when an upward translation instruction is detected, increasing preset values for the vertical coordinate values of the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data at the same time; when a downward translation instruction is detected, simultaneously subtracting preset values from the ordinate values of the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data, wherein the preset values are artificially set, such as: 1. 2,3, 4, etc. When an amplification instruction is detected, simultaneously amplifying the abscissa value and the ordinate value of the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data to preset multiples; when a reduction instruction is detected, reducing the abscissa value and the ordinate value of the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data to preset multiples at the same time, wherein the preset multiples are manually set, such as: 1 time, 2 times, 3 times, 4 times and the like.
According to the data processing method provided by the embodiment, if a translation instruction is detected, the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data are changed based on the translation instruction, then if an amplification instruction is detected, the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data are amplified to the preset multiple, then if a reduction instruction is detected, the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data are reduced to the preset multiple, the coordinate data can be changed according to the translation instruction, the amplification instruction and the reduction instruction, the user requirements are met, and the user experience is improved.
The present invention also provides a data processing apparatus, referring to fig. 3, the data processing apparatus including:
the acquisition module 10 is used for acquiring an upper curve array and a lower curve array corresponding to the safe envelope area and a signal array corresponding to a stamping machine tool signal;
a first generating module 20 that generates an upper curve in the canvas based on the upper curve array, generates a lower curve in the canvas based on the lower curve array, and generates a signal curve in the canvas based on the signal array;
a determining module 30, configured to determine first target coordinate data based on upper curve coordinate data corresponding to the upper curve, lower curve coordinate data corresponding to the lower curve, and signal coordinate data corresponding to the signal curve;
a second generating module 40 that generates a warning region in the canvas based on the first target coordinate data.
Further, the determining module 30 is further configured to:
if the upper curve coordinate data and the signal coordinate data meet a first preset condition, determining second target coordinate data;
if the lower curve coordinate data and the signal coordinate data meet a second preset condition, determining third target coordinate data;
and taking the second target coordinate data and/or the third target coordinate data as the first target coordinate data.
Further, the determining module 30 is further configured to:
acquiring first ordinate data in the upper curve coordinate data and second ordinate data in the signal coordinate data;
respectively determining first ordinate data and second ordinate data corresponding to each abscissa axis data of a rectangular plane coordinate system in a canvas, and determining a first coordinate difference obtained by subtracting the second ordinate data from the first ordinate data;
and if a first target coordinate difference smaller than a preset threshold value exists in the first coordinate difference, determining that the upper curve coordinate data and the signal coordinate data meet a first preset condition, and determining second target coordinate data.
Further, the determining module 30 is further configured to:
acquiring first target ordinate data corresponding to a first target coordinate difference from the first ordinate data, acquiring second target ordinate data corresponding to the first target coordinate difference from the second ordinate data, and acquiring first target abscissa axis data corresponding to the first target coordinate difference;
taking the target first abscissa axis data and the target first ordinate axis data as first sub-target coordinate data;
and taking the target first abscissa axis data and the target second ordinate axis data as second sub-target coordinate data.
Further, the determining module 30 is further configured to:
acquiring third ordinate data in the lower curve coordinate data and fourth ordinate data in the signal coordinate data;
respectively determining third ordinate data and fourth ordinate data corresponding to each abscissa axis data of a rectangular plane coordinate system in the canvas, and determining a second coordinate difference obtained by subtracting the fourth ordinate data from the third ordinate data;
and if a second target coordinate difference larger than a preset threshold value exists in the second coordinate difference, determining that the lower curve coordinate data and the signal coordinate data meet a second preset condition, and determining third target coordinate data.
Further, the determining module 30 is further configured to:
acquiring third target ordinate data corresponding to a second target coordinate difference from the third ordinate data, acquiring fourth target ordinate data corresponding to the second target coordinate difference from the fourth ordinate data, and acquiring second target abscissa axis data corresponding to the second target coordinate difference;
taking the second target abscissa axis data and the third target ordinate data as third sub-target coordinate data;
and taking the second target abscissa axis data and the fourth target ordinate data as fourth sub-target coordinate data.
Further, the data processing apparatus is further configured to:
if a translation instruction is detected, changing the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data based on the translation instruction;
if an amplification instruction is detected, amplifying the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data to a preset multiple;
and if a reduction instruction is detected, reducing the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data to a preset multiple.
The methods executed by the program units can refer to the embodiments of the data processing method of the present invention, and are not described herein again.
In addition, an embodiment of the present invention further provides a data processing apparatus, where the data processing apparatus includes: a memory, a processor and a data processing program stored on the memory and executable on the processor, the data processing program, when executed by the processor, implementing the steps of the data processing method as described above.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where a data processing program is stored, and when the data processing program is executed by a processor, the data processing program implements the steps of the data processing method described above.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (7)

1. A data processing method is applied to a canvas of a hypertext markup language, and comprises the following steps:
acquiring an upper curve array and a lower curve array corresponding to the safe envelope area and a signal array corresponding to a stamping machine tool signal;
generating an upper curve in the canvas based on the upper curve array, generating a lower curve in the canvas based on the lower curve array, and generating a signal curve in the canvas based on the signal array;
determining first target coordinate data based on upper curve coordinate data corresponding to the upper curve, lower curve coordinate data corresponding to the lower curve and signal coordinate data corresponding to the signal curve;
generating a warning region in the canvas based on the first target coordinate data;
the step of determining first target coordinate data based on upper curve coordinate data corresponding to the upper curve, lower curve coordinate data corresponding to the lower curve, and signal coordinate data corresponding to the signal curve includes:
if the upper curve coordinate data and the signal coordinate data meet a first preset condition, determining second target coordinate data;
if the lower curve coordinate data and the signal coordinate data meet a second preset condition, determining third target coordinate data;
taking the second target coordinate data and/or the third target coordinate data as the first target coordinate data;
if the upper curve coordinate data and the signal coordinate data meet a first preset condition, the step of determining second target coordinate data further comprises:
acquiring first ordinate data in the upper curve coordinate data and second ordinate data in the signal coordinate data;
respectively determining first ordinate data and second ordinate data corresponding to each abscissa axis data of a rectangular plane coordinate system in a canvas, and determining a first coordinate difference obtained by subtracting the second ordinate data from the first ordinate data;
if a first target coordinate difference smaller than a preset threshold exists in the first coordinate difference, determining that the upper curve coordinate data and the signal coordinate data meet a first preset condition, and determining second target coordinate data;
if the lower curve coordinate data and the signal coordinate data meet a second preset condition, determining third target coordinate data comprises the following steps:
acquiring third ordinate data in the lower curve coordinate data and fourth ordinate data in the signal coordinate data;
respectively determining third ordinate data and fourth ordinate data corresponding to each abscissa axis data of a rectangular plane coordinate system in the canvas, and determining a second coordinate difference obtained by subtracting the fourth ordinate data from the third ordinate data;
and if a second target coordinate difference larger than a preset threshold value exists in the second coordinate differences, determining that the lower curve coordinate data and the signal coordinate data meet a second preset condition, and determining third target coordinate data.
2. The data processing method of claim 1, wherein the second target coordinate data includes first sub-target coordinate data and second sub-target coordinate data, and the step of determining that the upper curve coordinate data and the signal coordinate data satisfy a first preset condition and determining the second target coordinate data includes, if there is a first target coordinate difference smaller than a preset threshold among the first coordinate differences:
acquiring first target ordinate data corresponding to a first target coordinate difference from the first ordinate data, acquiring second target ordinate data corresponding to the first target coordinate difference from the second ordinate data, and acquiring first target abscissa axis data corresponding to the first target coordinate difference;
taking the first target abscissa axis data and the first target ordinate axis data as first sub-target coordinate data;
and taking the target first abscissa axis data and the target second ordinate axis data as second sub-target coordinate data.
3. The data processing method of claim 1, wherein the third target coordinate data includes third sub-target coordinate data and fourth sub-target coordinate data, and if there is a second target coordinate difference greater than a preset threshold in the second coordinate differences, it is determined that the lower curve coordinate data and the signal coordinate data satisfy a second preset condition, and the step of determining the third target coordinate data includes:
acquiring third target ordinate data corresponding to the second target coordinate difference from the third ordinate data, acquiring fourth target ordinate data corresponding to the second target coordinate difference from the fourth ordinate data, and acquiring second target abscissa axis data corresponding to the second target coordinate difference;
taking the second target abscissa axis data and the third target ordinate data as third sub-target coordinate data;
and taking the second target abscissa axis data and the fourth target ordinate data as fourth sub-target coordinate data.
4. A data processing method as claimed in any one of claims 1 to 3, the data processing method further comprising:
if a translation instruction is detected, changing the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data based on the translation instruction;
if an amplification instruction is detected, amplifying the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data to preset times;
and if a reduction instruction is detected, reducing the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data to a preset multiple.
5. A data processing apparatus, characterized in that the data processing apparatus comprises:
the acquisition module is used for acquiring an upper curve array and a lower curve array corresponding to the safe envelope area and a signal array corresponding to a stamping machine tool signal;
a first generating module to generate an upper curve in a canvas based on the upper curve array, a lower curve in the canvas based on the lower curve array, and a signal curve in the canvas based on the signal array;
the determining module is used for determining first target coordinate data based on upper curve coordinate data corresponding to the upper curve, lower curve coordinate data corresponding to the lower curve and signal coordinate data corresponding to the signal curve;
a second generation module to generate a warning region in the canvas based on the first target coordinate data;
the determining module is further configured to:
if the upper curve coordinate data and the signal coordinate data meet a first preset condition, determining second target coordinate data;
if the lower curve coordinate data and the signal coordinate data meet a second preset condition, determining third target coordinate data;
taking the second target coordinate data and/or the third target coordinate data as the first target coordinate data;
the determining module is further configured to:
acquiring first ordinate data in the upper curve coordinate data and second ordinate data in the signal coordinate data;
respectively determining first ordinate data and second ordinate data corresponding to each abscissa axis data of a rectangular plane coordinate system in a canvas, and determining a first coordinate difference obtained by subtracting the second ordinate data from the first ordinate data;
if a first target coordinate difference smaller than a preset threshold exists in the first coordinate difference, determining that the upper curve coordinate data and the signal coordinate data meet a first preset condition, and determining second target coordinate data;
the determining module is further configured to:
acquiring third ordinate data in the lower curve coordinate data and fourth ordinate data in the signal coordinate data;
respectively determining third ordinate data and fourth ordinate data corresponding to each abscissa axis data of a rectangular plane coordinate system in the canvas, and determining a second coordinate difference obtained by subtracting the fourth ordinate data from the third ordinate data;
and if a second target coordinate difference larger than a preset threshold value exists in the second coordinate difference, determining that the lower curve coordinate data and the signal coordinate data meet a second preset condition, and determining third target coordinate data.
6. A data processing apparatus, characterized in that the data processing apparatus comprises: memory, processor and data processing program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the data processing method according to any one of claims 1 to 4.
7. A computer-readable storage medium, on which a data processing program is stored, which when executed by a processor implements the steps of the data processing method according to any one of claims 1 to 4.
CN202210845240.6A 2022-07-19 2022-07-19 Data processing method, device, equipment and computer readable storage medium Active CN114998478B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210845240.6A CN114998478B (en) 2022-07-19 2022-07-19 Data processing method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210845240.6A CN114998478B (en) 2022-07-19 2022-07-19 Data processing method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN114998478A CN114998478A (en) 2022-09-02
CN114998478B true CN114998478B (en) 2022-11-11

Family

ID=83022545

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210845240.6A Active CN114998478B (en) 2022-07-19 2022-07-19 Data processing method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114998478B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1543405B1 (en) * 2002-09-27 2007-12-05 Casio Computer Co., Ltd. Graphic display control device for displaying graphs
CN106997348A (en) * 2016-01-22 2017-08-01 腾讯科技(深圳)有限公司 A kind of data method for drafting and device
CN111781447B (en) * 2020-06-28 2021-11-05 珠海格力智能装备有限公司 Method and device for determining mechanical zero point and machine tool equipment
CN112148404B (en) * 2020-09-24 2024-03-19 游艺星际(北京)科技有限公司 Head portrait generation method, device, equipment and storage medium
CN114011903A (en) * 2021-11-01 2022-02-08 深圳市信润富联数字科技有限公司 Stamping production abnormity monitoring method, device and system and readable storage medium

Also Published As

Publication number Publication date
CN114998478A (en) 2022-09-02

Similar Documents

Publication Publication Date Title
CN103399866A (en) Webpage rendering method, device and equipment
CN105867751B (en) Operation information processing method and device
CN107247691B (en) Text information display method and device, mobile terminal and storage medium
CN106780684B (en) Animation effect realization method and device
CN110399583B (en) Page display method and device, electronic equipment and storage medium
CN109947650B (en) Script step processing method, device and system
CN107749046B (en) Image processing method and mobile terminal
CN110516218B (en) Method for generating table, terminal and computer readable storage medium
CN108170723B (en) Webpage resource acquisition method, terminal equipment, server and system
CN112000566B (en) Method and device for generating test cases
CN109215640B (en) Speech recognition method, intelligent terminal and computer readable storage medium
CN108287706B (en) Data processing method and device
CN111783197A (en) Construction method of three-dimensional building model and related equipment
CN107957841B (en) Rolling screen capture method and device
CN114640727B (en) Protocol analysis method, device and computer readable storage medium
CN113313804A (en) Image rendering method and device, electronic equipment and storage medium
CN105095161B (en) Method and device for displaying rich text information
CN109141249B (en) Distance measuring method and computer-readable storage medium
CN114998478B (en) Data processing method, device, equipment and computer readable storage medium
CN108491128B (en) Application program management method and terminal
CN112650498B (en) Static library integration method and device, electronic equipment and storage medium
CN108182090A (en) Flash plug-in loading methods and device based on blink kernels
CN112328304B (en) Script adaptation method, system, equipment and computer storage medium
CN106204588B (en) Image processing method and device
CN112650530A (en) Multi-class library integration method and device, electronic equipment and readable 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