CN108241589A - A kind of data processing method and device - Google Patents

A kind of data processing method and device Download PDF

Info

Publication number
CN108241589A
CN108241589A CN201611220464.9A CN201611220464A CN108241589A CN 108241589 A CN108241589 A CN 108241589A CN 201611220464 A CN201611220464 A CN 201611220464A CN 108241589 A CN108241589 A CN 108241589A
Authority
CN
China
Prior art keywords
data
label
data packet
sensor
filter condition
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.)
Pending
Application number
CN201611220464.9A
Other languages
Chinese (zh)
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.)
Datang Mobile Communications Equipment Co Ltd
Original Assignee
Datang Mobile Communications Equipment 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 Datang Mobile Communications Equipment Co Ltd filed Critical Datang Mobile Communications Equipment Co Ltd
Priority to CN201611220464.9A priority Critical patent/CN108241589A/en
Publication of CN108241589A publication Critical patent/CN108241589A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4221Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

An embodiment of the present invention provides a kind of data processing method and device, which includes:Obtain the data packet from sensor;According to preset rules, specified label is added to data packet;Judge whether specified label meets default filter condition;If so, deliver a packet to processor.So as to be effectively reduced sensor data transmission pressure, shorten the Refresh Data period, and improve local sensing precision.

Description

A kind of data processing method and device
Technical field
The present embodiments relate to the communications field more particularly to a kind of data processing method and devices.
Background technology
In the prior art, the collected data of sensor are transferred to processor by certain interface and carry out at analysis Reason, if directly connecting sensor using processor Peripheral Interface, the number of probes that processor can be directly connected to is very limited, If connecting sensor using certain Interface Expanding chip, greatly the quantity of sensor can be connected by extensible processor, but with Number of sensors increase, the collected data volume of sensor can also increase, cause processor by the limited interface of bandwidth come It can be taken a significant amount of time during poll check sensing data, in some instances it may even be possible to important data are missed in a polling cycle and are become Change.
Invention content
The embodiment of the present invention provides a kind of data processing method and device, (scene can to solve FPGA of the prior art Program gate array, Field-Programmable Gate Array) the problem of.
To solve the above-mentioned problems, the invention discloses a kind of data processing method, applied to FPGA, the method packet It includes:
Obtain the data packet from sensor;
According to preset rules, specified label is added to data packet;
Judge whether specified label meets default filter condition;
If so, deliver a packet to processor.
In a preferred embodiment of the invention, specified label includes:
Data Identification label, Data Labels label are used for unique mark sensor;
Data variation label, for identification data packet with the last time receive be compared with the same sensor data packet It is no to change;
Data alert label, whether exceed preset range for the data fluctuations in identification data packet;
Packet numbering label, for identifying grouping belonging to sensor;
Grouping alarm label, for whether identifying all the sensors in grouping belonging to sensor in abnormal area.
In a preferred embodiment of the invention, method further comprises:
Default filter condition is obtained by the control link between CPU.
In a preferred embodiment of the invention, the step of whether specified label meets default filter condition judged, It specifically includes:
Specified label is matched with default filter condition;
If specified label meets any filtering item in default filter condition, judge that specified label meets default filtering rod Part.
In a preferred embodiment of the invention, method further comprises:
If it is determined that specified label is unsatisfactory for default filter condition, then packet discard.
According to another aspect of the present invention, a kind of data processing equipment is provided, applied to FPGA, including:
Acquisition module, for obtaining the data packet from sensor;
Add module, for according to preset rules, specified label to be added to data packet;
Judgment module, for judging whether specified label meets default filter condition;
Sending module, for if so, delivering a packet to processor.
In a preferred embodiment of the invention, specified label includes:
Data Identification label, Data Labels label are used for unique mark sensor;
Data variation label, for identification data packet with the last time receive be compared with the same sensor data packet It is no to change;
Data alert label, whether exceed preset range for the data fluctuations in identification data packet;
Packet numbering label, for identifying grouping belonging to sensor;
Grouping alarm label, for whether identifying all the sensors in grouping belonging to sensor in abnormal area.
In a preferred embodiment of the invention, acquisition module is further used for through the Quality Initiative between CPU Road obtains default filter condition.
In a preferred embodiment of the invention, judgment module is further used for:
Specified label is matched with default filter condition;
If specified label meets any filtering item in default filter condition, judge that specified label meets default filtering rod Part.
In a preferred embodiment of the invention, device further comprises:
Filtering module, for if it is determined that specified label is unsatisfactory for default filter condition, then packet discard.
Compared with prior art, by obtaining the data packet from sensor in the present invention;According to preset rules, to data The specified label of packet addition;Judge whether specified label meets default filter condition;If so, deliver a packet to processor. So as to be effectively reduced sensor data transmission pressure, shorten the Refresh Data period, and improve local sensing precision.
Description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the present invention Example, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these attached drawings Obtain other attached drawings.
Fig. 1 is the equipment connection diagram in prior embodiment;
Fig. 2 is a kind of step flow chart of data processing method of the embodiment of the present invention;
Fig. 3 is the equipment connection diagram in the embodiment of the present invention;
Fig. 4 is a kind of specific steps flow chart of data processing method of the embodiment of the present invention;
Fig. 5 is a kind of structure diagram of data processing equipment of the embodiment of the present invention.
Specific embodiment
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, it is below in conjunction with the accompanying drawings and specific real Applying mode, the present invention is described in further detail.
It is as shown in Figure 1 the equipment connection diagram in prior embodiment.In Fig. 1:
Central processing unit (CPU, Central Processing Unit) is connected with fpga chip, and FPGA connections are multiple Sensor.
In prior embodiment, FPGA is received connects a large amount of sensor chips by Interface Expanding chip, sense more Device gathered data is transferred to processor after being packaged, processor obtains correlation values, the situation by parsing data packet in a program Mainly by the way of poll.
Whole be packaged of processor external sensor data indifference is transmitted to processor, such as transmits 1 sensing data Used time is t, then is n × t to the cycle time used in all the sensors poll one time.
With the increase of number of sensors, polling cycle becomes very long, even if operative sensor data do not generate variation, Also still numerical value is synchronized to processor using period regular time so that processor becomes the perception of data variation It is blunt.
In view of the above-mentioned problems, one of core concept of the present invention is to propose a kind of data processing method and device, to carry High data-handling efficiency and local sensing precision.
With reference to Fig. 2, a kind of flow chart of data processing method of the embodiment of the present invention is shown, this method is applied to FPGA specifically may comprise steps of:
Step 201, the data packet from sensor is obtained.
Specifically, the equipment connection diagram being illustrated in figure 3 in the embodiment of the present invention, in figure 3, CPU and FPGA it Between there are two kinds of interfaces of data channel and control channel.And there are coincidence senser requirements between N and FPGA for sensor 1 Data read interface, interface type includes but not limited to:I2C/SPI/UART etc..In the embodiment of the present invention, FPGA includes Dynamic group packet module, filtering setup module and tag generation module, the specific effect of each module will in the following embodiments It is described in detail.
In an embodiment of the present invention, FPGA obtains the data packet from one or more sensors being connected.
Step 202, according to preset rules, specified label is added to data packet.
Specifically, in an embodiment of the present invention, FPGA is identified data packet by tag generation module, and according to Preset rules add specified label to data packet.In a preferred embodiment of the invention, FPGA can add specified label Designated position is added to, designated position can be the head of data packet, can also be the tail portion of data packet.User can be according to practical need It asks and is configured, the present invention does not limit this.
Step 203, judge whether specified label meets default filter condition.
Specifically, in an embodiment of the present invention, the default filtering that FPGA receives CPU and send by filtering setup module Condition, and it is sent to dynamic group packet module.
FPGA judges whether specified label meets default filter condition by dynamic group packet module.
Step 204, if so, delivering a packet to processor.
Specifically, in an embodiment of the present invention, if FPGA judges that specified label meets default filter condition, this is counted Processor is sent to according to packet to be further processed.
To sum up, the technical solution in the embodiment of the present invention, by obtaining the data packet from sensor;According to default rule Then, specified label is added to data packet;Judge whether specified label meets default filter condition;If so, it sends the packet within To processor.So as to be effectively reduced sensor data transmission pressure, shorten the Refresh Data period, and improve local sensing essence Degree.
In addition, in a preferred embodiment of the invention, specified label includes:
Data Identification label, Data Labels label are used for unique mark sensor;
Data variation label, for identification data packet with the last time receive be compared with the same sensor data packet It is no to change;
Data alert label, whether exceed preset range for the data fluctuations in identification data packet;
Packet numbering label, for identifying grouping belonging to sensor;
Grouping alarm label, for whether identifying all the sensors in grouping belonging to sensor in abnormal area.
In a preferred embodiment of the invention, method further comprises:
Default filter condition is obtained by the control link between CPU.
In a preferred embodiment of the invention, the step of whether specified label meets default filter condition judged, It specifically includes:
Specified label is matched with default filter condition;
If specified label meets any filtering item in default filter condition, judge that specified label meets default filtering rod Part.
In a preferred embodiment of the invention, method further comprises:
If it is determined that specified label is unsatisfactory for default filter condition, then packet discard.
In order to make those skilled in the art be better understood from the present invention data processing method, below with specific embodiment into Row elaborates.
As shown in figure 4, the specific steps flow chart for the data processing method in the embodiment of the present invention, in Fig. 4:
1) it realizes that the data of coincidence senser requirement read interface inside FPGA, reads external sensor numerical value;
2) raw sensor numerical value/numerical value grouping generation is utilized by tag generation module according to user's needs inside FPGA Data label, and by the data structure label original sensor data in table 1.
Table 1
In an embodiment of the present invention, tag generation module can be by identifying data information or sensor phase in data packet Information is closed, according to preset rules, label is added into data.Specifically:
Data ID is sensing data unique identifying number, can be certainly for the accurate location of CPU positioning respective sensors It so counts, can also be realized according to information such as type, geographical locations using structured coding,
Whether data variation tag characterization single data produce variation at any time, according to data variation label, processor Only extraction may be selected and produce the sensing data of variation, and ignore not changed sensing data, so as to reduce data Transmission quantity accelerates Refresh Data frequency.
Whether data alarm tag characterization single data fluctuations according to data alert label, processor beyond normal range (NR) Only extraction may be selected and produce the sensing data of unusual fluctuations, and ignore the sensing data fluctuated in normal range (NR), from And volume of transmitted data is reduced in a wider context.When generating the alarm label, the number of triggering alarm can be flexibly set in FPGA It is worth range.
Packet numbering label can be belonging to mark sensor data grouping, a data can according to sorting technique difference, and Possess multiple packet labels, according to packet numbering label, processor may be selected only to extract some or certain several sensor groups Sensing data, and ignore other grouping sensing data.
Under grouping alarm tag characterization synchronization, whether the pattern that one group of sensor values is presented is located at exceptions area Domain alerts label according to grouping, and processor may be selected concern and the grouped data of abnormal patterns occurs, and ignore under normal mode Grouped data.When generating the alarm label, it can flexibly be set in FPGA and generate abnormal patterns.
With continued reference to Fig. 3, method further comprises:
3) one group of register is preserved inside FPGA for setting filter condition, CPU sets filter condition by control channel, For example, the sensor values of data variation do not occur for setting filtering, only refresh the sensor values for generating variation;
4) dynamic group packet module screens qualified sensing data composition data packet (encumbrance according to filter condition According to ID and data content);
5) dynamic group packet module delivers a packet to CPU processor from data channel;
6) CPU obtains sensing data, and perform corresponding task according to sensing data after parsing data packet;
7) CPU can also be according to the sensing data of acquisition and itself mission requirements, by setting filter condition with selectivity Extraction sensing data, such as selective extraction grouping alarm data, can be in large-range monitoring grouped data abnormal conditions;Or it carries The sensing data of a certain grouping is taken, is formed " attention window ", observes the local detail of the grouped data.
In conclusion the technical solution in the embodiment of the present invention, by obtaining the data packet from sensor;According to default Rule adds specified label to data packet;Judge whether specified label meets default filter condition;If so, data packet is sent out Give processor.So as to be effectively reduced sensor data transmission pressure, shorten the Refresh Data period, and improve local sensing essence Degree.
With reference to Fig. 5, a kind of structure diagram of data processing equipment of the embodiment of the present invention is shown, which is applied to FPGA can specifically include with lower module:
Acquisition module 501, for obtaining the data packet from sensor.
Add module 502, for according to preset rules, specified label to be added to data packet.
Judgment module 503, for judging whether specified label meets default filter condition.
Sending module 504, for if so, delivering a packet to processor.
In a preferred embodiment of the invention, specified label includes:
Data Identification label, Data Labels label are used for unique mark sensor;
Data variation label, for identification data packet with the last time receive be compared with the same sensor data packet It is no to change;
Data alert label, whether exceed preset range for the data fluctuations in identification data packet;
Packet numbering label, for identifying grouping belonging to sensor;
Grouping alarm label, for whether identifying all the sensors in grouping belonging to sensor in abnormal area.
In a preferred embodiment of the invention, acquisition module 501 is further used for through the control between CPU Link obtains default filter condition.
In a preferred embodiment of the invention, judgment module 503 is further used for:
Specified label is matched with default filter condition;
If specified label meets any filtering item in default filter condition, judge that specified label meets default filtering rod Part.
In a preferred embodiment of the invention, device further comprises:
Filtering module (not shown), for if it is determined that specified label is unsatisfactory for default filter condition, then abandoning data Packet.
In conclusion the device in the embodiment of the present invention is by obtaining the data packet from sensor;According to preset rules, Specified label is added to data packet;Judge whether specified label meets default filter condition;If so, deliver a packet to place Manage device.So as to be effectively reduced sensor data transmission pressure, shorten the Refresh Data period, and improve local sensing precision.
For apparatus embodiments, since it is basicly similar to embodiment of the method, so description is fairly simple, it is related Part illustrates referring to the part of embodiment of the method.
Each embodiment in this specification is described by the way of progressive, the highlights of each of the examples are with The difference of other embodiment, just to refer each other for identical similar part between each embodiment.
The embodiment of the present invention can be described in the general context of computer executable instructions, example Such as program module.Usually, program module include routines performing specific tasks or implementing specific abstract data types, program, Object, component, data structure etc..
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, term " comprising ", "comprising" or its any other variant meaning Covering non-exclusive inclusion, so that process, method, commodity or equipment including a series of elements not only include that A little elements, but also including other elements that are not explicitly listed or further include for this process, method, commodity or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except also there are other identical elements in the process including the element, method, commodity or equipment.
A kind of data processing method provided by the present invention and device are described in detail above, it is used herein Specific case is expounded the principle of the present invention and embodiment, and the explanation of above example is only intended to help to understand this The method and its core concept of invention;Meanwhile for those of ordinary skill in the art, thought according to the present invention, specific There will be changes in embodiment and application range, in conclusion the content of the present specification should not be construed as to the present invention's Limitation.

Claims (10)

1. a kind of data processing method, applied to on-site programmable gate array FPGA, which is characterized in that including:
Obtain the data packet from sensor;
According to preset rules, specified label is added to the data packet;
Judge whether the specified label meets default filter condition;
If so, the data packet is sent to processor.
2. according to the method described in claim 1, it is characterized in that, the specified label includes:
Data Identification label, the Data Labels label are used for sensor described in unique mark;
Data variation label, for identify the data packet with the last time receive be compared with the same sensor data packet It is no to change;
Data alert label, for whether identifying the data fluctuations in the data packet beyond preset range;
Packet numbering label, for identifying grouping belonging to the sensor;
Grouping alarm label, for whether identifying all the sensors in grouping belonging to the sensor in abnormal area.
3. according to the method described in claim 1, it is characterized in that, the method further includes:
The default filter condition is obtained by the control link between CPU.
4. according to the method described in claim 1, it is characterized in that, described judge whether the specified label meets default filtering The step of condition, specifically includes:
The specified label is matched with the default filter condition;
If the specified label meets any filtering item in the default filter condition, judge that the specified label meets institute State default filter condition.
5. according to the method described in claim 1, it is characterized in that, the method further includes:
If it is determined that the specified label is unsatisfactory for the default filter condition, then the data packet is abandoned.
6. a kind of data processing equipment, applied to on-site programmable gate array FPGA, which is characterized in that including:
Acquisition module, for obtaining the data packet from sensor;
Add module, for according to preset rules, specified label to be added to the data packet;
Judgment module, for judging whether the specified label meets default filter condition;
Sending module, for if so, the data packet is sent to processor.
7. device according to claim 6, which is characterized in that the specified label includes:
Data Identification label, the Data Labels label are used for sensor described in unique mark;
Data variation label, for identify the data packet with the last time receive be compared with the same sensor data packet It is no to change;
Data alert label, for whether identifying the data fluctuations in the data packet beyond preset range;
Packet numbering label, for identifying grouping belonging to the sensor;
Grouping alarm label, for whether identifying all the sensors in grouping belonging to the sensor in abnormal area.
8. device according to claim 6, which is characterized in that the acquisition module is further used for by between CPU Control link obtain the default filter condition.
9. device according to claim 6, which is characterized in that the judgment module is further used for:
The specified label is matched with the default filter condition;
If the specified label meets any filtering item in the default filter condition, judge that the specified label meets institute State default filter condition.
10. device according to claim 6, which is characterized in that described device further comprises:
Filtering module, for if it is determined that the specified label is unsatisfactory for the default filter condition, then abandoning the data packet.
CN201611220464.9A 2016-12-26 2016-12-26 A kind of data processing method and device Pending CN108241589A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611220464.9A CN108241589A (en) 2016-12-26 2016-12-26 A kind of data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611220464.9A CN108241589A (en) 2016-12-26 2016-12-26 A kind of data processing method and device

Publications (1)

Publication Number Publication Date
CN108241589A true CN108241589A (en) 2018-07-03

Family

ID=62701367

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611220464.9A Pending CN108241589A (en) 2016-12-26 2016-12-26 A kind of data processing method and device

Country Status (1)

Country Link
CN (1) CN108241589A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109117398A (en) * 2018-07-18 2019-01-01 维沃移动通信有限公司 A kind of sensor control and terminal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345673A (en) * 2013-07-08 2013-10-09 国家电网公司 Electric power asset whole life-cycle monitoring system
CN103945438A (en) * 2014-04-16 2014-07-23 中国人民解放军信息工程大学 Wireless AP, communication system and communication method
CN104616033A (en) * 2015-02-13 2015-05-13 重庆大学 Fault diagnosis method for rolling bearing based on deep learning and SVM (Support Vector Machine)
CN104915906A (en) * 2015-06-01 2015-09-16 南京邮电大学 Information sensing system and realization method for family-oriented health service

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345673A (en) * 2013-07-08 2013-10-09 国家电网公司 Electric power asset whole life-cycle monitoring system
CN103945438A (en) * 2014-04-16 2014-07-23 中国人民解放军信息工程大学 Wireless AP, communication system and communication method
CN104616033A (en) * 2015-02-13 2015-05-13 重庆大学 Fault diagnosis method for rolling bearing based on deep learning and SVM (Support Vector Machine)
CN104915906A (en) * 2015-06-01 2015-09-16 南京邮电大学 Information sensing system and realization method for family-oriented health service

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109117398A (en) * 2018-07-18 2019-01-01 维沃移动通信有限公司 A kind of sensor control and terminal

Similar Documents

Publication Publication Date Title
US9984022B2 (en) Method and apparatus to identify a communication protocol being used in a process control system
CN104850573A (en) Data collection method and device
CN107248892B (en) Monitoring system of security inspection equipment
CN104202220A (en) Pressure test method and pressure test device
EP3007386A1 (en) Apparatus and method for analyzing a control network
CN103581951A (en) Base station detection method and device
IL270850B1 (en) Information determination method, terminal apparatus, and network apparatus
CN114422412B (en) Equipment detection method and device and communication equipment
CN107637091A (en) The method and apparatus synchronous for sensor
CN105635317A (en) Wireless communication method and system applied to bridge detection
CN103248449B (en) The symbol of parallel data delimits method and device
CN108241589A (en) A kind of data processing method and device
CN106596162A (en) Intelligent vibration detecting method, device and system
CN104461847B (en) Data processor detection method and device
EP2713537B1 (en) High speed data transmission methods and systems upon error detection
CN104133745A (en) Electronic device with test function, test method and system
CN114070829B (en) Abnormal data acquisition method and system based on MQTT
US20150223286A1 (en) Sensor brain for simple sensors in a process control system
CN103905223A (en) Data packet acquisition method, system and device
CN104754328B (en) Distributed video quality diagnosis method
CN103499948A (en) Temperature and humidity wireless real-time verification and management system
CN105337784B (en) A kind of loss packet test method, test device and system
CN106598864B (en) A kind of multichannel bus timing monitoring system, method and microcomputer system
CN108989314A (en) A kind of Transmitting Data Stream, processing method and processing device
JP2016225772A (en) Abnormality detection method, abnormality detection device, and network system

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180703

RJ01 Rejection of invention patent application after publication