CN114998478A - 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
CN114998478A
CN114998478A CN202210845240.6A CN202210845240A CN114998478A CN 114998478 A CN114998478 A CN 114998478A CN 202210845240 A CN202210845240 A CN 202210845240A CN 114998478 A CN114998478 A CN 114998478A
Authority
CN
China
Prior art keywords
data
coordinate data
target
signal
coordinate
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.)
Granted
Application number
CN202210845240.6A
Other languages
Chinese (zh)
Other versions
CN114998478B (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 web-side confidence map tools only have some common confidence maps with higher universality, no professional confidence map of the 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 like the confidence map of a punching machine tool and the like.
The above is only for the purpose of assisting understanding of the technical solution of the present invention, and does not represent an admission that the above is the 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 differences, 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 coordinate system of a plane in a 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 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.
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 implementing the steps of the aforementioned data processing method when executed by the processor.
Furthermore, to achieve the above object, the present invention also provides a computer readable storage medium, which stores thereon a data processing program, the data processing program realizing the steps of the foregoing data processing method when being executed by a processor.
The invention obtains the upper curve array and the lower curve array corresponding to the safe envelope area and the signal array corresponding to the punching machine tool signal, then 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, then 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, and finally determining a second target coordinate data based on the second target coordinate data, and generating a warning area in the canvas, wherein 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.
Drawings
FIG. 1 is a block diagram of a data processing device 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., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory such as a 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 based on the ambient light level and a proximity sensor that turns off the display screen and/or 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, etc., 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, which is applied to the canvas of the hypertext markup language, and referring to fig. 2, fig. 2 is a schematic flow chart 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, an upper curve array, a lower curve array and a signal array corresponding to the safe envelope area are obtained, and the upper curve array, the lower curve array and the signal array corresponding to the punching machine signal are embodied in a curve form in a canvas, where the safe envelope area refers to a reasonable range obtained by acquiring a large amount of signal data of the same punching machine during working through an ADC (Analog to Digital Converter) acquisition card when the punching machine works normally, 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 upper curve array, the lower curve array and the signal array corresponding to the signal of the punching machine tool are obtained, the canvas is told to be ready for drawing through the 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 the upper curve is generated in the canvas by repeatedly calling ctx.value.lineto (x, y).
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 base 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 boldness 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 it is warned 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], [2,1], [3,2], [2,3], [1,2], [2,1], [3,2], [2,4] represent respective points on the sub-warning regions. For example, [1,2], 1 represents horizontal axis data, 2 represents vertical axis data, and then the canvas pair traverses each layer of the three-dimensional array in turn, for example, 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 is 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.
In the data processing method provided by this embodiment, by obtaining the upper curve array and the lower curve array corresponding to the safe envelope region and the signal array corresponding to the signal of the punching machine, then 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, then 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, and finally determining a second target coordinate data based on the second target coordinate data, and generating a warning area in the canvas, wherein 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.
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 taken as second target coordinate data, where it is to be noted that the number of the upper curve coordinate data is the same as that of the signal coordinate data.
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.
A third embodiment of the data processing method of the present invention is proposed based on the second embodiment, and 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 target first abscissa axis data and the target second ordinate axis data 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 a first preset condition, first target ordinate data corresponding to a first target coordinate difference is obtained in the first ordinate data, then second target ordinate data corresponding to the first target coordinate difference is obtained in the second ordinate data, and first target abscissa axis 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.
In the data processing method provided by this embodiment, by acquiring the first ordinate data in the upper curve coordinate data and the second ordinate data in the signal coordinate data, then, first coordinate differences between first ordinate data and second ordinate data corresponding to the abscissa axis data are respectively determined, and finally, if a first target coordinate difference smaller than a preset threshold value exists in the first coordinate differences, determining that the upper curve coordinate data and the signal coordinate data meet a first preset condition, and determining second target coordinate data, so that the second target coordinate data can be accurately obtained according to a first target coordinate difference between the first ordinate data and the second ordinate data, the accuracy of the first target coordinate data being obtained through the second target coordinate data and/or the third target coordinate data is improved, and the accuracy of determining the warning area on the canvas through the first target coordinate data is improved.
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 in this embodiment obtains the third ordinate data in the lower curve coordinate data and the fourth ordinate data in the signal coordinate data, then, second coordinate differences between third ordinate data and fourth ordinate data corresponding to the abscissa axis data are respectively determined, and finally, 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, determining third target coordinate data, and accurately obtaining the third target coordinate data according to a second target coordinate difference between the third ordinate data and the second ordinate data, so as to improve the accuracy of the first target coordinate data obtained by the second target coordinate data and/or the third target coordinate data, and the accuracy of determining the warning area on the canvas through the first target coordinate data is improved.
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 a preset value from the 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 of 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, subtracting preset values from ordinate values of the upper curve coordinate data, the lower curve coordinate data and the signal coordinate data at the same time, wherein the preset values are set manually, 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 generation 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 differences, 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 an … …" does not exclude the presence of other like elements 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 above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention or the portions contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above and includes several instructions for enabling a terminal device (which may be 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 is not intended to limit the scope of the present invention, and all equivalent structures or equivalent processes performed by the present invention or directly or indirectly applied to other related technical fields are also included in the scope of the present invention.

Claims (10)

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.
2. The data processing method of claim 1, wherein 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 comprises:
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.
3. The data processing method of claim 2, wherein the step of determining second target coordinate data if the upper curve coordinate data and the signal coordinate data satisfy a first predetermined condition 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;
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.
4. The data processing method according to claim 3, 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 if there is a first target coordinate difference smaller than a preset threshold among the first coordinate differences, and 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.
5. The data processing method of claim 2, wherein the step of determining a third target coordinate data if the lower curve coordinate data and the signal coordinate data satisfy a second predetermined condition comprises:
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. The data processing method of claim 5, 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 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.
7. The data processing method of any of claims 1-6, 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 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.
8. 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 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.
9. 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 7.
10. A computer-readable storage medium, characterized in that a data processing program is stored thereon, which when executed by a processor implements the steps of the data processing method according to any one of claims 1 to 7.
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 true CN114998478A (en) 2022-09-02
CN114998478B 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)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040227738A1 (en) * 2002-09-27 2004-11-18 Casio Computer Co., Ltd. Graphic display control device for displaying graph and graphic and recording medium
US20180082450A1 (en) * 2016-01-22 2018-03-22 Tencent Technology (Shenzhen) Company Limited Data drawing method and apparatus, terminal, and storage medium
WO2022001040A1 (en) * 2020-06-28 2022-01-06 珠海格力智能装备有限公司 Mechanical zero determination method and apparatus, and machine tool device
CN114011903A (en) * 2021-11-01 2022-02-08 深圳市信润富联数字科技有限公司 Stamping production abnormity monitoring method, device and system and readable storage medium
WO2022062808A1 (en) * 2020-09-24 2022-03-31 游艺星际(北京)科技有限公司 Portrait generation method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040227738A1 (en) * 2002-09-27 2004-11-18 Casio Computer Co., Ltd. Graphic display control device for displaying graph and graphic and recording medium
US20180082450A1 (en) * 2016-01-22 2018-03-22 Tencent Technology (Shenzhen) Company Limited Data drawing method and apparatus, terminal, and storage medium
WO2022001040A1 (en) * 2020-06-28 2022-01-06 珠海格力智能装备有限公司 Mechanical zero determination method and apparatus, and machine tool device
WO2022062808A1 (en) * 2020-09-24 2022-03-31 游艺星际(北京)科技有限公司 Portrait generation method and device
CN114011903A (en) * 2021-11-01 2022-02-08 深圳市信润富联数字科技有限公司 Stamping production abnormity monitoring method, device and system and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李存华: "数控机床坐标反向差值及其曲线分析", 《制造技术与机床》 *

Also Published As

Publication number Publication date
CN114998478B (en) 2022-11-11

Similar Documents

Publication Publication Date Title
CN103399866A (en) Webpage rendering method, device and equipment
CN110796725B (en) Data rendering method, device, terminal and storage medium
CN107247691B (en) Text information display method and device, mobile terminal and storage medium
CN105867751B (en) Operation information processing method and device
CN110136142A (en) A kind of image cropping method, apparatus, electronic equipment
CN106780684B (en) Animation effect realization method and device
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
CN111783197A (en) Construction method of three-dimensional building model and related equipment
CN109215640B (en) Speech recognition method, intelligent terminal and computer readable storage medium
CN108287706B (en) Data processing method and device
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
CN107918509B (en) Software shortcut prompt setting method and device and readable storage medium
CN105095161B (en) Method and device for displaying rich text information
CN112328304B (en) Script adaptation method, system, equipment and computer storage medium
CN114998478B (en) Data processing method, device, equipment and computer readable storage medium
CN106204588B (en) Image processing method and device
CN112650530A (en) Multi-class library integration method and device, electronic equipment and readable storage medium
CN109871324B (en) Control operation method and device
CN111338728A (en) Screen capturing method and device and computer readable storage medium
CN114972318A (en) Image quality evaluation method, device, equipment and computer readable storage medium
CN110706688B (en) Method, system, terminal and readable storage medium for constructing voice recognition model

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