Data processing method and device, electronic equipment and storage medium

文档序号:7556 发布日期:2021-09-17 浏览:21次 中文

1. A data processing method, comprising:

periodically acquiring stored pressure detection data to be processed corresponding to the current pantograph from a data cache region; the pressure detection data to be processed comprises at least one height value and a pressure value corresponding to the height value; the data cache region is used for replacing the stored pressure detection data according to the data volume of the pressure detection data to be stored when the data volume to be stored reaches a preset data volume threshold value and the pressure detection data to be stored is received;

processing the height value in the pressure detection data to be processed, and determining the height interval between two adjacent height values in the pressure detection data to be used; the pressure detection data to be used comprise a minimum height value and a maximum height value within a preset height range;

when the fact that the height interval is inconsistent with the preset height interval is detected, the periodic period duration is adjusted, so that pressure detection data to be processed corresponding to the current pantograph are periodically obtained from a data cache region based on the adjusted period duration, and the height interval is determined based on the pressure detection data to be processed;

when the height interval is detected to be consistent with the preset height interval, target pressure detection data are obtained, and a pressure detection result of the current pantograph is determined based on a height value in the target pressure detection data and a pressure value corresponding to the height value.

2. The method of claim 1, wherein the processing the height values in the pressure detection data to be processed and determining the height interval between two adjacent height values in the pressure detection data to be used comprises:

when detecting that at least two pieces of pressure detection data to be processed with the same height value exist, determining the at least two pieces of pressure detection data to be processed as pressure detection data to be screened, and determining pressure detection data to be replaced from the pressure detection data to be screened;

taking the pressure detection data to be replaced and the rest pressure detection data to be processed except the pressure detection data to be screened as pressure detection data to be sorted;

and sequencing the height values in the pressure detection data to be sequenced, and determining the height interval between two adjacent height values in the pressure detection data to be used.

3. The method of claim 1, further comprising, prior to said processing the height values in the pressure measurement data to be processed:

determining whether the height interval between two adjacent height values in the pressure detection data to be processed in each period is consistent with the preset height interval;

if not, sending out early warning information to prompt that the pressure detection data to be processed in the data cache area is incomplete in the period corresponding to the inconsistency between the height interval and the preset height interval.

4. The method of claim 1, wherein said adjusting a cycle duration of said periodicity comprises:

and shortening the periodic period duration to periodically acquire the pressure detection data to be processed corresponding to the current pantograph from the data cache region based on the shortened period duration.

5. The method according to claim 1, wherein the determining the pressure detection result of the current pantograph based on the height value in the target pressure detection data and the pressure value corresponding to the height value comprises:

carrying out mean value processing on the height values in the target pressure detection data to determine a target height value;

carrying out mean value processing on pressure values corresponding to the height values in the target pressure detection data to determine target pressure values;

determining a pressure detection result of the current pantograph based on the target height value and the target pressure value.

6. The method of claim 5, wherein said determining a pressure detection of the current pantograph based on the target height value and the target pressure value comprises:

when the target height value is detected to be within a preset height value range and the target pressure value is within a preset pressure value range corresponding to the preset height value range, determining that the pressure detection result of the current pantograph is qualified.

7. The method of claim 1, further comprising:

and if the height values in the pressure detection data to be processed, which is acquired from the data cache region in the current period and corresponds to the current pantograph, in the pressure detection data to be processed, which is acquired from the data cache region in the previous period and corresponds to the current pantograph, one to one, stopping acquiring the pressure detection data to be processed.

8. A data processing apparatus, comprising:

the pressure detection data acquisition module to be processed is used for periodically acquiring stored pressure detection data to be processed corresponding to the current pantograph from the data cache region; the pressure detection data to be processed comprises at least one height value and a pressure value corresponding to the height value; the data cache region is used for replacing the stored pressure detection data according to the data volume of the pressure detection data to be stored when the data volume to be stored reaches a preset data volume threshold value and the pressure detection data to be stored is received;

the height interval determining module is used for processing the height value in the pressure detection data to be processed and determining the height interval between two adjacent height values in the pressure detection data to be used; the pressure detection data to be used comprise a minimum height value and a maximum height value within a preset height range;

the periodic time length adjusting module is used for adjusting the periodic time length when the fact that the height interval is inconsistent with the preset height interval is detected, so that the to-be-processed pressure detection data corresponding to the current pantograph is periodically obtained from the data cache region based on the adjusted periodic time length, and the height interval is determined based on the to-be-processed pressure detection data;

and the target pressure detection data determining module is used for obtaining target pressure detection data when the height interval is detected to be consistent with the preset height interval, and determining a pressure detection result of the current pantograph based on a height value in the target pressure detection data and a pressure value corresponding to the height value.

9. An electronic device, characterized in that the electronic device comprises:

one or more processors;

a storage device for storing one or more programs,

when executed by the one or more processors, cause the one or more processors to implement a data processing method as claimed in any one of claims 1-7.

10. A storage medium containing computer-executable instructions for performing the data processing method of any one of claims 1 to 7 when executed by a computer processor.

Background

The pantograph is an electrical device which is arranged at the top of an electric traction locomotive and obtains electric energy through a contact net. Before the pantograph comes into use, need detect the pressure that produces between pantograph and the contact net, avoid the pressure value that the pantograph produced too big, strut the contact net or, the pressure value undersize can't acquire sufficient electric power, and then makes the unable normal use of electric tractor.

The pantograph is typically pressure tested on a static pressure test stand. The method includes the steps of determining pressure detection data corresponding to a height value by controlling continuous height change of a pantograph, wherein the pressure detection data comprise the height value-pressure value, and storing multiple sets of pressure detection data in a data cache region in a Programmable Logic Controller (PLC). And reading pressure detection data in the data cache region through a serial port of the industrial personal computer, processing the pressure detection data, and judging whether the pressure between the pantograph and the contact network meets the requirement, namely, whether the pressure is qualified.

Generally, the capacity of the data cache region is limited, and under the condition that the data volume of the pressure detection data reaches the cache capacity threshold value, the newly generated pressure detection data can be stored in the data cache region in a covering manner, and the speed of reading the pressure detection data in the data cache region by the industrial personal computer through the serial port is low, so that when the industrial personal computer obtains the pressure detection data in the data cache region, the problem that the unprocessed original pressure detection data is covered by the new pressure detection data exists, the pressure detection data is incomplete, the pressure detection on the pantograph cannot be performed, and the problem that the accuracy is low when the pressure detection data is adopted to evaluate the pressure pantograph exists.

Disclosure of Invention

Embodiments of the present invention provide a data processing method and apparatus, an electronic device, and a storage medium, so as to implement that pressure detection data stored in a data cache region is called out before the pressure detection data to be stored is not covered by the pressure detection data to be stored, thereby ensuring the integrity of the pressure detection data to be processed corresponding to a current pantograph, and further improving the accuracy of a pressure detection result.

In a first aspect, an embodiment of the present invention provides a data processing method, where the method includes:

periodically acquiring stored pressure detection data to be processed corresponding to the current pantograph from a data cache region; the pressure detection data to be processed comprises at least one height value and a pressure value corresponding to the height value; the data cache region is used for replacing the stored pressure detection data according to the data volume of the pressure detection data to be stored when the data volume to be stored reaches a preset data volume threshold value and the pressure detection data to be stored is received;

processing the height value in the pressure detection data to be processed, and determining the height interval between two adjacent height values in the pressure detection data to be used; the pressure detection data to be used comprise a minimum height value and a maximum height value within a preset height range;

when the fact that the height interval is inconsistent with the preset height interval is detected, the periodic period duration is adjusted, so that pressure detection data to be processed corresponding to the current pantograph are periodically obtained from a data cache region based on the adjusted period duration, and the height interval is determined based on the pressure detection data to be processed;

when the height interval is detected to be consistent with the preset height interval, target pressure detection data are obtained, and a pressure detection result of the current pantograph is determined based on a height value in the target pressure detection data and a pressure value corresponding to the height value.

In a second aspect, an embodiment of the present invention further provides a data processing apparatus, where the apparatus includes:

the pressure detection data acquisition module to be processed is used for periodically acquiring stored pressure detection data to be processed corresponding to the current pantograph from the data cache region; the pressure detection data to be processed comprises at least one height value and a pressure value corresponding to the height value; the data cache region is used for replacing the stored pressure detection data according to the data volume of the pressure detection data to be stored when the data volume to be stored reaches a preset data volume threshold value and the pressure detection data to be stored is received;

the height interval determining module is used for processing the height value in the pressure detection data to be processed and determining the height interval between two adjacent height values in the pressure detection data to be used; the pressure detection data to be used comprise a minimum height value and a maximum height value within a preset height range;

the periodic time length adjusting module is used for adjusting the periodic time length when the fact that the height interval is inconsistent with the preset height interval is detected, so that the to-be-processed pressure detection data corresponding to the current pantograph is periodically obtained from the data cache region based on the adjusted periodic time length, and the height interval is determined based on the to-be-processed pressure detection data;

and the target pressure detection data determining module is used for obtaining target pressure detection data when the height interval is detected to be consistent with the preset height interval, and determining a pressure detection result of the current pantograph based on a height value in the target pressure detection data and a pressure value corresponding to the height value.

In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:

one or more processors;

a storage device for storing one or more programs,

when the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method according to any one of the embodiments of the present invention.

In a fourth aspect, the embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are used for executing the data processing method according to any one of the embodiments of the present invention.

According to the technical scheme of the embodiment of the invention, the stored pressure detection data to be processed corresponding to the current pantograph is periodically acquired from the data cache region, the height value in the pressure detection data to be processed is processed, and the height interval between two adjacent height values in the pressure detection data to be used is determined. When the fact that the height interval is inconsistent with the preset height interval is detected, the periodic period duration is adjusted, to-be-processed pressure detection data corresponding to the current pantograph are periodically acquired from the data cache area based on the adjusted period duration, the height interval is determined based on the to-be-processed pressure detection data, when the fact that the height interval is consistent with the preset height interval is detected, target pressure detection data are obtained, and the pressure detection result of the current pantograph is determined based on the height value in the target pressure detection data and the pressure value corresponding to the height value. The technical scheme of the embodiment of the invention realizes that whether the pressure detection data to be processed is complete or not is determined through the height interval, if not, the integrity of the acquired pressure detection data to be processed is ensured by adjusting the periodic period duration, so that the integrity of the target pressure detection data determined based on the pressure detection data to be processed is ensured, and the pressure detection result of the current pantograph is more accurate based on the height value in the target pressure detection and the pressure value corresponding to the height value.

Drawings

In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.

Fig. 1 is a schematic flowchart of a data processing method according to an embodiment of the present invention;

fig. 2 is a flowchart illustrating a data processing method according to a second embodiment of the present invention;

fig. 3 is a schematic flowchart of a data processing method according to a third embodiment of the present invention;

fig. 4 is a schematic structural diagram of a data processing apparatus according to a fourth embodiment of the present invention;

fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.

Detailed Description

The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.

Example one

Fig. 1 is a schematic flow chart of a data processing method according to an embodiment of the present invention, where the present embodiment is applicable to a situation where a pressure of a pantograph is detected, and the method may be executed by a data processing apparatus, and the apparatus may be implemented in a form of software and/or hardware.

Before the technical solution of the embodiment of the present invention is explained, an application scenario of the embodiment of the present invention is briefly explained:

the technical scheme of the embodiment of the invention is applied to a scene of detecting the pressure of the pantograph, for example, the pressure detection data to be processed of the pantograph (the pressure detection data to be processed comprises the height value of the pantograph and the pressure value between the pantograph and a contact network) is obtained on a static pressure detection test bed of the pantograph through the mutual matching of an industrial personal computer, a PLC, a height sensor and a pressure sensor, so that a target height value and a target pressure value are determined based on the pressure detection data to be processed, and the pressure detection result of the current pantograph is determined according to the target height value and the target pressure value. The technical scheme of the embodiment of the invention can improve the integrity of the industrial personal computer for acquiring the pressure detection data to be processed in the data cache region, and further improve the accuracy of determining the pressure detection result of the current pantograph according to the pressure detection result to be processed.

As shown in fig. 1, the data processing method according to the embodiment of the present invention specifically includes the following steps:

and S110, periodically acquiring the stored to-be-processed pressure detection data corresponding to the current pantograph from the data cache region.

The periodicity refers to the periodicity when the timing duration reaches the preset period duration. The data buffer area is a storage area for temporarily storing pressure detection data to be processed. The data buffer area can be arranged in the computer or the PLC. In the embodiment of the invention, the data cache region is arranged in the PLC. The pantograph is an electric device which is arranged on an electric tractor and obtains electric energy from a contact net. The pressure detection data to be processed comprises at least one height value and a pressure value corresponding to the height value. The height value refers to the height value between one end of the pantograph, which is in contact with the contact network, and the horizontal plane, and the pressure value refers to the pressure value between the pantograph and the contact network. When the pantograph is subjected to pressure detection, the height of the pantograph is adjusted, pressure values between the pantograph and a contact network at different heights are determined, and a pressure detection result of the pantograph is determined according to a plurality of height values and the pressure value corresponding to each height. And the data cache region is used for replacing the stored pressure detection data according to the data volume of the pressure detection data to be stored when the data volume to be stored reaches a preset data volume threshold value and the pressure detection data to be stored is received. Optionally, the pressure detection data to be stored is replaced with the pressure detection data stored in the data buffer area according to a "storage-first replaced principle" and a data amount of the pressure detection data to be stored.

Specifically, when the timing duration reaches a preset period duration, the stored pressure detection data to be processed corresponding to the current pantograph is obtained from the data cache region. And acquiring pressure detection data to be processed to prepare for subsequent height value processing. It should be noted that, each time the pressure detection data to be processed is obtained, all the pressure detection data to be processed corresponding to the current pantograph, which are stored in the data buffer area, are obtained.

In the embodiment of the present invention, when it is detected that the stored data amount reaches the preset data amount threshold and pressure detection data to be stored is received, the data buffer area replaces the stored pressure detection data according to the data amount of the pressure detection data to be stored, so that the stored pressure detection data to be processed corresponding to the current pantograph obtained from the data buffer area is also different in different periods, but when it is detected that the stored data amount reaches the preset data amount threshold and the pressure detection data to be stored is not received, the pressure detection data in the data buffer area does not change. Therefore, if each height value in the to-be-processed pressure detection data corresponding to the current pantograph, which is obtained from the data cache region in the current cycle, corresponds to each height value in the to-be-processed pressure detection data corresponding to the current pantograph, which is obtained from the data cache region in the previous cycle, one-to-one correspondence is made, the to-be-processed pressure detection data stops being obtained.

Specifically, each height value of the to-be-processed pressure detection data corresponding to the current pantograph acquired from the data cache region in the current cycle corresponds to each height value of the to-be-processed pressure detection data corresponding to the current pantograph acquired from the data cache region in the previous cycle. That is to say, the pressure detection data to be processed in the data cache region does not change, the data cache region does not receive the pressure detection data to be stored from the sensor, and at this time, the pressure detection data to be processed can be stopped from being obtained from the data cache region, so that repeated obtaining of the pressure detection data to be processed is avoided, and the subsequent calculation efficiency is reduced.

And S120, processing the height values in the pressure detection data to be processed, and determining the height interval between two adjacent height values in the pressure detection data to be used.

Wherein the pressure detection data to be used includes a minimum height value and a maximum height value within a preset height range. The height interval refers to the interval value between two height values. It should be noted that in the embodiment of the present invention, the height of the pantograph is continuously changed from large to small or from small to large. When the height interval between the current height value of the pantograph and the height value obtained last time (when the current height value is the height value obtained for the first time, the height value obtained last time is the initial height value 0) reaches the preset height interval, the current height value of the pantograph and the corresponding pressure value (collectively referred to as pressure detection data to be stored) are obtained through the sensor and sent to the data cache region, so that the pressure detection data to be stored are stored through the data cache region.

Specifically, the height value in the pressure detection data to be processed is processed, and the height interval between two adjacent height values in the pressure detection data to be used is determined. For example, the height values in the pressure detection data to be processed are sorted, and the height interval between two adjacent height values is determined according to the sorting result. Determining the height interval provides for subsequent determination of whether to adjust the cycle duration based on the height interval.

In this embodiment of the present invention, the processing the height value in the pressure detection data to be processed to determine the height interval between two adjacent height values in the pressure detection data to be used includes: when detecting that at least two pieces of pressure detection data to be processed with the same height value exist, determining the at least two pieces of pressure detection data to be processed as pressure detection data to be screened, and determining pressure detection data to be replaced from the pressure detection data to be screened; taking the pressure detection data to be replaced and the rest pressure detection data to be processed except the pressure detection data to be screened as pressure detection data to be sorted; and sequencing the height values in the pressure detection data to be sequenced, and determining the height interval between two adjacent height values in the pressure detection data to be used.

Wherein sorting the height values comprises sorting from large to small or from small to large. The mode for determining the pressure detection data to be replaced from the pressure detection data to be screened comprises the steps of selecting any one data from the pressure detection data to be screened as the pressure detection data to be replaced, carrying out mean value processing on the pressure detection data to be replaced, obtaining the pressure detection data to be replaced and the like.

Specifically, when it is detected that at least two pieces of pressure detection data to be processed with the same height value exist, the at least two pieces of pressure detection data to be processed are used as pressure detection data to be screened, pressure detection data to be replaced are determined from the pressure detection data to be screened, the pressure detection data to be replaced and the rest of the pressure detection data to be processed except the pressure detection data to be screened are used as pressure detection data to be sorted, the height values in the pressure detection data to be sorted are sorted, and the height interval between two adjacent height values in the pressure detection data to be used is determined according to the sorting result. For example, 10 pieces of pressure detection data to be processed are detected, height values of 2 pieces of pressure detection data to be processed are detected to be the same, the 2 pieces of pressure detection data to be processed are used as pressure detection data to be screened, then, any one piece of data is determined from the pressure detection data to be screened to be used as pressure detection data to be replaced, and the replacement pressure detection data and 8 pieces of pressure detection data to be processed except the pressure detection data to be screened are used as pressure detection data to be sorted. And sequencing the 9 pieces of pressure detection data to be sequenced from small to large, and determining the height interval between two adjacent height values according to the sequencing result.

S130, when the fact that the height interval is inconsistent with the preset height interval is detected, the periodic period duration is adjusted, so that the to-be-processed pressure detection data corresponding to the current pantograph are periodically acquired from the data cache region based on the adjusted period duration, and the height interval is determined based on the to-be-processed pressure detection data.

Specifically, when the height interval is inconsistent with the preset height interval, it is indicated that the height value in the currently acquired pressure detection data to be processed is incomplete. And at the moment, the period duration needs to be adjusted, and the pressure detection data to be processed corresponding to the current pantograph is periodically acquired from the data cache region according to the adjusted period duration. It should be noted that, when the pressure detection data to be processed is obtained from the data buffer again according to the adjusted cycle duration, the pressure detection data to be processed of the pantograph needs to be obtained again through the sensor and transmitted to the data buffer. It should be understood that, at this time, re-acquiring the to-be-processed pressure detection data of the pantograph by the sensor means re-adjusting the height of the pantograph from a preset height range, from a maximum value to a minimum value or from the minimum value to the maximum value, re-acquiring the to-be-processed pressure detection data by the sensor, and transmitting the to-be-processed pressure detection data to the data buffer area. In this way, the to-be-processed pressure detection data corresponding to the current pantograph is periodically acquired from the data cache region according to the adjusted period duration, the height interval is determined based on the to-be-processed pressure detection data, whether the height interval is consistent with the preset height interval is detected, and if not, the step of adjusting the period duration is carried out again, so that the height intervals between adjacent height values in the to-be-processed pressure detection data corresponding to the current pantograph periodically acquired according to the adjusted period duration are consistent.

In this embodiment of the present invention, the adjusting the periodic time length includes: and shortening the periodic period duration to periodically acquire the pressure detection data to be processed corresponding to the current pantograph from the data cache region based on the shortened period duration.

Specifically, the cycle duration is shortened, the to-be-processed pressure detection data corresponding to the current pantograph is periodically acquired according to the shortened cycle duration, the speed of acquiring the to-be-processed pressure detection data is increased, and the problem that the stored pressure detection data cannot be acquired due to the fact that the stored pressure detection data is replaced by the to-be-stored pressure detection data when the data cache region receives the to-be-stored pressure detection data is solved.

And S140, when the height interval is detected to be consistent with the preset height interval, obtaining target pressure detection data, and determining a pressure detection result of the current pantograph based on a height value in the target pressure detection data and a pressure value corresponding to the height value.

The target pressure detection data refers to data determined according to the to-be-processed pressure detection data, for example, the to-be-processed pressure detection data with the same height interval is determined as the target pressure detection data, and the pressure detection result refers to whether the pressure detection of the current pantograph is qualified or not.

Specifically, when it is detected that the height interval is consistent with the preset height interval, a target pressure detection result is obtained, and the pressure detection result of the current pantograph is determined based on the pressure value corresponding to the height value in the target pressure detection data. For example, the height values in the target pressure detection data are subjected to mean processing to obtain target height values, the pressure values are subjected to mean processing to obtain target pressure values, whether the target height values are within a preset height range or not is judged, if yes, whether the target pressure values are within a preset pressure range or not is judged, and if yes, the pressure detection result of the current pantograph is determined to be qualified.

According to the technical scheme of the embodiment of the invention, the stored pressure detection data to be processed corresponding to the current pantograph is periodically acquired from the data cache region, the height value in the pressure detection data to be processed is processed, and the height interval between two adjacent height values in the pressure detection data to be used is determined. When the fact that the height interval is inconsistent with the preset height interval is detected, the periodic period duration is adjusted, to-be-processed pressure detection data corresponding to the current pantograph are periodically acquired from the data cache area based on the adjusted period duration, the height interval is determined based on the to-be-processed pressure detection data, when the fact that the height interval is consistent with the preset height interval is detected, target pressure detection data are obtained, and the pressure detection result of the current pantograph is determined based on the height value in the target pressure detection data and the pressure value corresponding to the height value. The technical scheme of the embodiment of the invention realizes that whether the pressure detection data to be processed is complete or not is determined through the height interval, if not, the integrity of the acquired pressure detection data to be processed is ensured by adjusting the periodic period duration, so that the integrity of the target pressure detection data determined based on the pressure detection data to be processed is ensured, and the pressure detection result of the current pantograph is more accurate based on the height value in the target pressure detection and the pressure value corresponding to the height value.

Example two

Fig. 2 is a schematic flow chart of a data processing method provided by an embodiment of the present invention, and the embodiment of the present invention refines step 140 on the basis of an alternative to the above-mentioned embodiment, wherein a specific refinement process is elaborated in the embodiment of the present invention. Technical terms identical or similar to those of the above embodiments will not be described again.

As shown in fig. 2, the data processing method provided in the embodiment of the present invention specifically includes the following steps:

and S210, periodically acquiring the stored to-be-processed pressure detection data corresponding to the current pantograph from the data cache region.

S220, processing the height values in the pressure detection data to be processed, and determining the height interval between two adjacent height values in the pressure detection data to be used.

And S230, when the fact that the height interval is inconsistent with the preset height interval is detected, adjusting the periodic period duration to periodically acquire the pressure detection data to be processed corresponding to the current pantograph from the data cache region based on the adjusted period duration, and determining the height interval based on the pressure detection data to be processed.

S240, when the height interval is detected to be consistent with the preset height interval, target pressure detection data are obtained.

S250, carrying out mean value processing on the height values in the target pressure detection data to determine a target height value; carrying out mean value processing on pressure values corresponding to the height values in the target pressure detection data to determine target pressure values; determining a pressure detection result of the current pantograph based on the target height value and the target pressure value.

Specifically, the average value of the height values in the target pressure detection data is processed to obtain an average value corresponding to each height value, the average value is determined as a target height value, similarly, the average value of the pressure values is processed to obtain an average value corresponding to each pressure value, and the average value corresponding to each pressure value is determined as a target pressure value. And determining whether the pressure detection result of the current pantograph is qualified or unqualified according to the target height value and the target pressure value.

In an embodiment of the present invention, the determining a pressure detection result of the current pantograph based on the target height value and the target pressure value includes: when the target height value is detected to be within a preset height value range and the target pressure value is within a preset pressure value range corresponding to the preset height value range, determining that the pressure detection result of the current pantograph is qualified.

The height value range and the pressure value range are preset, and different height value ranges and corresponding pressure value ranges can be set, for example, the height value range is [1m,1.5m ], the corresponding pressure value range is [50N,60N ], the height value range is [1.6m, 2.0m ], and the corresponding pressure value range is [70N, 80N ]. Optionally, a corresponding relation table of the height value range and the pressure value range may be set.

Specifically, when the target height value is detected to be within the preset height value range, the preset pressure value range corresponding to the preset height value range is determined according to the corresponding relation table, whether the target pressure value is within the preset pressure value range is determined, and if yes, the current pantograph pressure detection result is determined to be qualified.

According to the technical scheme of the embodiment of the invention, the stored pressure detection data to be processed corresponding to the current pantograph is periodically acquired from the data cache region, the height value in the pressure detection data to be processed is processed, and the height interval between two adjacent height values in the pressure detection data to be used is determined. When the fact that the height interval is inconsistent with the preset height interval is detected, the periodic period duration is adjusted, to-be-processed pressure detection data corresponding to the current pantograph are periodically obtained from the data cache area based on the adjusted period duration, the height interval is determined based on the to-be-processed pressure detection data, when the fact that the height interval is consistent with the preset height interval is detected, target pressure detection data are obtained, the height values in the target pressure detection data are subjected to mean value processing, the target height value is determined, the pressure values corresponding to the height values are subjected to mean value processing, the target pressure value is determined, and the pressure detection result of the current pantograph is determined according to the target height value and the target pressure value. The technical scheme of the embodiment of the invention realizes that whether the pressure detection data to be processed is complete or not is determined through the height interval, if not, the integrity of the obtained pressure detection data to be processed is ensured by adjusting the periodic period duration, so that the integrity of the target pressure detection data determined based on the pressure detection data to be processed is ensured, the target height value is determined based on the height value in the target pressure detection and the pressure value corresponding to the height value is determined to be the target pressure value, and the pressure detection result of the current pantograph is more accurate based on the target height value and the target pressure value. And the target height value and the target pressure value are determined in a mean value processing mode, so that the pressure detection result is not influenced by marginalized data, and the accuracy of the pressure detection result is improved.

On the basis of the above embodiment, before the processing the height value in the pressure detection data to be processed, the method further includes: determining whether the height interval between two adjacent height values in the pressure detection data to be processed in each period is consistent with the preset height interval; if not, sending out early warning information to prompt that the pressure detection data to be processed in the data cache area is incomplete in the period corresponding to the inconsistency between the height interval and the preset height interval.

The early warning information comprises a current period identifier, a pantograph identifier, time for acquiring pressure detection data to be processed, two adjacent height values corresponding to height intervals different from a preset height interval, storage position information corresponding to the two adjacent height values and the like. The sending information of the early warning information comprises short messages, push messages, voice and the like. The incomplete pressure detection data to be processed means that the height value in the pressure detection data to be processed is not continuously changed, and correspondingly, the pressure value is also incomplete.

Specifically, when pressure detection data to be processed in a data cache region are periodically acquired, whether a height interval between two adjacent height values in the pressure detection data to be processed in each period is consistent with a preset height interval is determined, if yes, the height values in the pressure detection data to be processed are continuously processed, and the height interval between two adjacent height values in the pressure detection data to be used is determined; if not, sending out early warning information to prompt that the pressure detection data to be processed in the data cache region is incomplete in a period corresponding to the inconsistency between the height interval of the detection number and the preset height interval, and prompting workers, so that the workers can conveniently overhaul the sensor for acquiring the pressure detection data to be processed, a communication bus for connecting the sensor and the PLC according to the early warning information, and the pressure detection data to be processed stored in the data cache region is complete.

EXAMPLE III

An embodiment of the present invention is an alternative to the above-described embodiments. The technical scheme of the embodiment of the invention is used for detecting the static pressure of the pantograph on the pantograph static pressure detection test bed. And acquiring a height value of the pantograph and a pressure value corresponding to the height value through a sensor. And receiving pressure detection data (a height value of the pantograph and a pressure value corresponding to the height value) sent by the sensor through a data buffer area in the PLC. And acquiring pressure detection data to be processed from the data cache region through the industrial personal computer. It should be noted that, in order to avoid occupying too many resources in the PLC, the capacity of the data buffer is set to be small. Therefore, when the data buffer area detects that the stored data amount reaches the preset data amount threshold value and receives the pressure detection data to be stored, the stored pressure detection data is replaced according to the data amount of the pressure detection data to be stored. Optionally, the pressure detection data to be processed, which is stored in the data buffer area first, is replaced according to the data size of the pressure detection data to be stored.

In the embodiment of the present invention, the PLC employs S7_200, performs initialization operation on S7_200, sets a start address of the data buffer area to be transmitted to the VD1310, determines a storage location of each pressure detection data to be stored by the VD1310, determines whether the height value is a preset height value by the VD1300, determines a data amount stored in the data buffer area, sets a value in the VW1308 to 0, and the VW1308 is used to determine whether the data amount stored in the current data buffer area reaches an upper limit.

The data cache region receives pressure detection data to be stored, when it is detected that a height interval between a current height value of a current pantograph and a height value obtained last time reaches a preset height interval (the current height value reaches the preset height value), the pressure detection data to be processed (the height value and a pressure value corresponding to the height value) is received and stored in a storage position designated by the VD1310 in the data cache region, and 1 is added to a numerical value in the VW 1308. And then receiving the next pressure detection data to be processed, storing the next pressure detection data to be processed at a corresponding position, sequentially receiving the pressure detection data to be processed, adding 1 to the numerical value in the VW1308 after receiving the pressure detection data to be processed each time, determining that the stored data amount of the data cache region reaches a preset data amount threshold value according to the corresponding relation between the numerical value in the VD1308 and the stored data amount of the data cache region when the numerical value in the VW1308 reaches a preset value, transmitting the starting address of the data cache region to the VD1310 when receiving the pressure detection data to be stored again, setting the numerical value in the VW1308 to be 0, and storing the pressure detection data to be stored at the starting position appointed by the VD 1310. The above steps are repeated until the height value reaches the upper limit of the preset height value, and the sensor does not send the data of the height value and the pressure value corresponding to the height value, as shown in fig. 3.

The industrial personal computer periodically reads the pressure detection data to be processed of the current pantograph in the data cache region, and processes the height value in the read pressure detection data to be processed. Firstly, whether the height interval of two adjacent height values in the pressure detection data to be processed in each period is consistent with a preset height interval is determined, if not, early warning information is sent out to prompt a worker that the pressure detection data to be processed corresponding to the current pantograph in the period corresponding to the inconsistency of the height interval and the preset height interval is incomplete, and if so, all the pressure detection data to be processed corresponding to the current pantograph are sequenced. Determining whether the height interval between two adjacent height values is consistent with a preset height interval or not, if not, shortening the period duration, and periodically reading pressure detection data to be processed according to the shortened period duration; if yes, determining target pressure detection data according to the pressure detection data to be processed, carrying out mean value processing on height values in the target pressure detection data to obtain a target height value, carrying out mean value processing on pressure values to obtain a target pressure value, then judging whether the target height value is within a preset height value range, if yes, judging whether the target pressure value is within a preset pressure value range corresponding to the preset height value range, and if yes, determining that the pressure detection result of the current pantograph is qualified.

According to the technical scheme of the embodiment of the invention, the pressure detection data to be processed are sequenced, whether the height interval between two adjacent height values is consistent with the preset height interval is determined, and whether the obtained pressure detection data to be processed is complete is judged. If not, the period duration is shortened, the pressure detection data to be processed is obtained again according to the shortened period duration, the problem that the pressure detection data to be processed is covered by the pressure detection data to be stored when the stored pressure detection data to be processed corresponding to the current pantograph is not obtained is solved, the integrity of the pressure detection data to be processed is ensured, and the accuracy of the pressure detection result of the pantograph is improved.

Example four

Fig. 4 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention, where the data processing apparatus according to the embodiment of the present invention can execute a data processing method according to any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method. The device includes: a pressure detection data to be processed acquisition module 410, a height interval determination module 420, a period duration adjustment module 430 and a target pressure detection data determination module 440; wherein:

a to-be-processed pressure detection data obtaining module 410, configured to periodically obtain, from the data cache region, stored to-be-processed pressure detection data corresponding to the current pantograph; the pressure detection data to be processed comprises at least one height value and a pressure value corresponding to the height value; the data cache region is used for replacing the stored pressure detection data according to the data volume of the pressure detection data to be stored when the data volume to be stored reaches a preset data volume threshold value and the pressure detection data to be stored is received;

a height interval determining module 420, configured to process a height value in the to-be-processed pressure detection data, and determine a height interval between two adjacent height values in the to-be-used pressure detection data; the pressure detection data to be used comprise a minimum height value and a maximum height value within a preset height range;

a period duration adjusting module 430, configured to adjust the periodic period duration when it is detected that there is a difference between the height interval and a preset height interval, so as to periodically obtain to-be-processed pressure detection data corresponding to the current pantograph from the data cache region based on the adjusted period duration, and determine the height interval based on the to-be-processed pressure detection data;

a target pressure detection data determining module 440, configured to obtain target pressure detection data when it is detected that the height interval is consistent with the preset height interval, and determine a pressure detection result of the current pantograph based on a height value in the target pressure detection data and a pressure value corresponding to the height value.

Further, the height interval determination module 420 includes:

the height interval determining submodule is used for determining at least two pieces of pressure detection data to be processed as pressure detection data to be screened when the pressure detection data to be processed with the same height value are detected, and determining pressure detection data to be replaced from the pressure detection data to be screened; taking the pressure detection data to be replaced and the rest pressure detection data to be processed except the pressure detection data to be screened as pressure detection data to be sorted; and sequencing the height values in the pressure detection data to be sequenced, and determining the height interval between two adjacent height values in the pressure detection data to be used.

Further, the apparatus further comprises:

the early warning information sending module is used for determining whether the height interval between two adjacent height values in the pressure detection data to be processed in each period is consistent with the preset height interval or not; if not, sending out early warning information to prompt that the pressure detection data to be processed in the data cache area is incomplete in the period corresponding to the inconsistency between the height interval and the preset height interval.

Further, the cycle duration adjustment module 430 includes:

and the period duration shortening submodule is used for shortening the periodic period duration so as to periodically acquire the pressure detection data to be processed corresponding to the current pantograph from the data cache region based on the shortened period duration.

Further, the target pressure detection data determination module 440 includes:

the target height value determining submodule is used for carrying out mean value processing on the height values in the target pressure detection data and determining a target height value; carrying out mean value processing on pressure values corresponding to the height values in the target pressure detection data to determine target pressure values; determining a pressure detection result of the current pantograph based on the target height value and the target pressure value.

Further, the target height value determination sub-module is further configured to:

when the target height value is detected to be within a preset height value range and the target pressure value is within a preset pressure value range corresponding to the preset height value range, determining that the pressure detection result of the current pantograph is qualified.

Further, the apparatus further comprises:

and the data stop acquisition module is used for stopping acquiring the pressure detection data to be processed if each height value in the pressure detection data to be processed, which is acquired from the data cache region in the current period and corresponds to each height value in the pressure detection data to be processed, which is acquired from the data cache region in the previous period and corresponds to the current pantograph, in the previous period.

According to the technical scheme of the embodiment of the invention, the stored pressure detection data to be processed corresponding to the current pantograph is periodically acquired from the data cache region, the height value in the pressure detection data to be processed is processed, and the height interval between two adjacent height values in the pressure detection data to be used is determined. When the fact that the height interval is inconsistent with the preset height interval is detected, the periodic period duration is adjusted, to-be-processed pressure detection data corresponding to the current pantograph are periodically acquired from the data cache area based on the adjusted period duration, the height interval is determined based on the to-be-processed pressure detection data, when the fact that the height interval is consistent with the preset height interval is detected, target pressure detection data are obtained, and the pressure detection result of the current pantograph is determined based on the height value in the target pressure detection data and the pressure value corresponding to the height value. The technical scheme of the embodiment of the invention realizes that whether the pressure detection data to be processed is complete or not is determined through the height interval, if not, the integrity of the acquired pressure detection data to be processed is ensured by adjusting the periodic period duration, so that the integrity of the target pressure detection data determined based on the pressure detection data to be processed is ensured, and the pressure detection result of the current pantograph is more accurate based on the height value in the target pressure detection and the pressure value corresponding to the height value.

It should be noted that, the modules and sub-modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the present invention.

EXAMPLE five

Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary electronic device 50 suitable for use in implementing embodiments of the present invention. The electronic device 50 shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.

As shown in fig. 5, electronic device 50 is embodied in the form of a general purpose computing device. The components of the electronic device 50 may include, but are not limited to: one or more processors or processing units 501, a system memory 502, and a bus 503 that couples the various system components (including the system memory 502 and the processing unit 501).

Bus 503 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.

Electronic device 50 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 50 and includes both volatile and nonvolatile media, removable and non-removable media.

The system memory 502 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)504 and/or cache memory 505. The electronic device 50 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 506 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 503 by one or more data media interfaces. Memory 502 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.

A program/utility 508 having a set (at least one) of program modules 507 may be stored, for instance, in memory 502, such program modules 507 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 507 generally perform the functions and/or methodologies of embodiments of the invention as described herein.

The electronic device 50 may also communicate with one or more external devices 509 (e.g., keyboard, pointing device, display 510, etc.), with one or more devices that enable a user to interact with the electronic device 50, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 50 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 511. Also, the electronic device 50 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 512. As shown, the network adapter 512 communicates with the other modules of the electronic device 50 over the bus 503. It should be appreciated that although not shown in FIG. 5, other hardware and/or software modules may be used in conjunction with electronic device 50, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.

The processing unit 501 executes various functional applications and data processing, for example, implementing a data processing method provided by an embodiment of the present invention, by executing a program stored in the system memory 502.

EXAMPLE six

Embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a data processing method, the method comprising:

periodically acquiring stored pressure detection data to be processed corresponding to the current pantograph from a data cache region; the pressure detection data to be processed comprises at least one height value and a pressure value corresponding to the height value; the data cache region is used for replacing the stored pressure detection data according to the data volume of the pressure detection data to be stored when the data volume to be stored reaches a preset data volume threshold value and the pressure detection data to be stored is received; processing the height value in the pressure detection data to be processed, and determining the height interval between two adjacent height values in the pressure detection data to be used; the pressure detection data to be used comprise a minimum height value and a maximum height value within a preset height range; when the fact that the height interval is inconsistent with the preset height interval is detected, the periodic period duration is adjusted, so that pressure detection data to be processed corresponding to the current pantograph are periodically obtained from a data cache region based on the adjusted period duration, and the height interval is determined based on the pressure detection data to be processed; when the height interval is detected to be consistent with the preset height interval, target pressure detection data are obtained, and a pressure detection result of the current pantograph is determined based on a height value in the target pressure detection data and a pressure value corresponding to the height value.

Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.

A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).

It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种设备手持终端的操作数据更新方法和系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!