Data acquisition and transmission method and system

文档序号:141961 发布日期:2021-10-22 浏览:16次 中文

阅读说明:本技术 一种数据采集传输方法及系统 (Data acquisition and transmission method and system ) 是由 杨超群 于 2021-08-24 设计创作,主要内容包括:本发明公开了一种数据采集传输方法及系统,将采集到的数据根据数据的名称通过字符串的方式进行命名,得到数据名称的字符串;根据字符串将数据进行分类,得到数据的名称类型;根据每一个数据的名称类型,将数据排放至不同的信道的发送端进行列队等候发送,每一个信道均对应一个发送端;发送端将每一个所等候的数据发送到接收端之后,接收接收端返回的成功信号,成功信号在接收端收到数据都发送到发送端;发送端接收到接收端返回的成功信号之后,发送下一个等候的数据。本发明在对数据采集之后,根据数据的命名将对数据进行划分,在将不同划分的数据分别送入不同的信道中,从而使得数据在传输的时候,不会使得数据在传输的时候发生干扰。(The invention discloses a data acquisition and transmission method and a data acquisition and transmission system, wherein acquired data are named in a character string mode according to data names to obtain character strings of the data names; classifying the data according to the character strings to obtain the name type of the data; according to the name type of each piece of data, the data are discharged to the sending ends of different channels to be queued for sending, and each channel corresponds to one sending end; after the sending end sends each waiting data to the receiving end, a success signal returned by the receiving end is received, and the success signal is sent to the sending end after the data is received by the receiving end; and after receiving the success signal returned by the receiving end, the sending end sends the next waiting data. According to the invention, after data is acquired, the data is divided according to the data naming, and the data with different divisions are respectively sent to different channels, so that the data can not be interfered during transmission.)

1. A data acquisition and transmission method is characterized by comprising the following steps:

naming the acquired data in a character string mode according to the name of the data to obtain a character string of the name of the data;

classifying the data according to the character strings to obtain the name type of the data;

according to the name type of each piece of data, the data are discharged to the sending ends of different channels to be queued for sending, and each channel corresponds to one sending end;

after the sending end sends each data waiting to the receiving end, a success signal returned by the receiving end is received, and the success signal is sent to the sending end after the data is received by the receiving end;

and after receiving the success signal returned by the receiving end, the sending end sends the next waiting data.

2. The data acquisition and transmission method according to claim 1, wherein the transmitting end, when transmitting data, comprises the steps of:

extracting data to be sent, and splitting the data to obtain sub-data which are sequentially arranged;

numbering each subdata according to the sequence of the subdata, wherein the subdata sequentially changes from small to large;

sequentially packaging each subdata corresponding to the subdata and the corresponding number of the subdata, and then packaging each packaged subdata;

and transmitting the packed data.

3. A data collection and transmission method as claimed in claim 2, wherein the receiving end, upon receiving, comprises the steps of:

receiving the data and unpacking the received data to obtain a plurality of packed subdata;

extracting the number of each subdata, and sending a success signal to the sending end when each number is obtained;

and the sending end judges whether the data received by the receiving end is complete or not according to the number of the successful signals, if so, the sending end sends the next data, and if not, the sending end resends the data.

4. A data collection and transmission method according to claim 1, wherein when classifying data according to character strings, the method comprises the steps of:

carrying out digital processing on the character string to obtain a matrix corresponding to the data name;

calculating the characteristic value of the matrix, and taking the characteristic value of the matrix as the serial number of the sending end corresponding to the data;

each sending end corresponds to a different number.

5. A data collection and transmission method as claimed in claim 4, wherein the method includes the following steps when the character string is digitized:

disassembling the character string to obtain a plurality of characters which are sequentially arranged;

respectively acquiring binary digits of each character;

sequentially longitudinally arranging binary digits of each character which are sequentially arranged, wherein the vacancy is 0;

and outputting to obtain the matrix.

6. A data acquisition and transmission system is characterized by comprising a sending end and a receiving end;

the transmitting end comprises:

the data naming module is used for naming the acquired data in a character string mode according to the name of the data to obtain a character string of the name of the data;

the data classification module is used for classifying the data according to the character strings to obtain the name types of the data;

the data distribution module is used for discharging the data to the sending ends of different channels to be queued and sent according to the name type of each data, and each channel corresponds to one sending end;

the data sending module is used for sending each data waiting to a receiving end, receiving a success signal sent by the receiving end and sending the next data waiting;

the receiving end includes:

the data receiving module is used for receiving the data sent by the sending end;

and the data feedback module is used for receiving a data transmission success signal transmitted by the transmitting end at the data receiving module.

7. A data acquisition and transmission system as claimed in claim 6, wherein said data transmission module comprises:

the data splitting module is used for extracting data to be sent and splitting the data to obtain sub data which are sequentially arranged;

the data numbering module is used for numbering each subdata according to the arrangement sequence of the subdata from small to large in sequence;

and the packing and sending module is used for sequentially packing each subdata correspondence and the number corresponding to the subdata correspondence, and then packing and sending each packed subdata.

8. A data acquisition and transmission system as claimed in claim 7, wherein said data feedback module comprises:

the data unpacking module is used for receiving the data and unpacking the received data to obtain a plurality of packed subdata;

and the signal sending module is used for extracting the number of each subdata and sending a success signal to the sending end every time one number is obtained.

9. A data acquisition and transmission system as claimed in claim 6, wherein said data classification module comprises:

the digital processing module is used for carrying out digital processing on the character string to obtain a matrix corresponding to the data name;

the eigenvalue calculation module is used for calculating the eigenvalue of the matrix and taking the eigenvalue of the matrix as the serial number of the sending end corresponding to the data;

and the number corresponding module is used for corresponding each sending end with a different number.

10. A data acquisition and transmission system as claimed in claim 6, wherein said digital processing module comprises:

the character disassembling module is used for disassembling the character string to obtain a plurality of characters which are sequentially arranged;

the digital conversion module is used for respectively acquiring binary digits of each character;

and the matrix arrangement module is used for sequentially longitudinally arranging the binary digits of each sequentially arranged character, the vacancy is 0, and outputting the matrix.

Technical Field

The invention relates to the field of data acquisition and processing, in particular to a data acquisition and transmission method and a data acquisition and transmission system.

Background

In an intelligent era, data acquisition is an important process and is also the most basic step, and generally, after data acquisition, the acquired data is transmitted to a data processing terminal to be processed, so that the analysis and processing results of the data are obtained, and the intellectualization is smoothly performed. However, in the data acquisition process, the acquired data is often not a single type of data, but twenty-thirty types of data, which are different from each other, so that a common-frequency transmission method is generally used in data transmission, and therefore, two data transmitted simultaneously are likely to interfere with each other, so that the difference between the acquired data and the actual data in the data transmission process is large.

Disclosure of Invention

The present invention is directed to overcome the problems in the prior art, and provides a data acquisition and transmission method and system, in which after data is acquired, the data is named, and divided according to the naming of the data, and the data divided differently is sent to different channels, so that the data is transmitted without interference.

Therefore, the invention provides a data acquisition and transmission method, which comprises the following steps:

naming the acquired data in a character string mode according to the name of the data to obtain a character string of the name of the data;

classifying the data according to the character strings to obtain the name type of the data;

according to the name type of each piece of data, the data are discharged to the sending ends of different channels to be queued for sending, and each channel corresponds to one sending end;

after the sending end sends each data waiting to the receiving end, a success signal returned by the receiving end is received, and the success signal is sent to the sending end after the data is received by the receiving end;

and after receiving the success signal returned by the receiving end, the sending end sends the next waiting data.

Further, when the sending end sends data, the method includes the following steps:

extracting data to be sent, and splitting the data to obtain sub-data which are sequentially arranged;

numbering each subdata according to the sequence of the subdata, wherein the subdata sequentially changes from small to large;

sequentially packaging each subdata corresponding to the subdata and the corresponding number of the subdata, and then packaging each packaged subdata;

and transmitting the packed data.

Further, when receiving, the receiving end includes the following steps:

receiving the data and unpacking the received data to obtain a plurality of packed subdata;

extracting the number of each subdata, and sending a success signal to the sending end when each number is obtained;

and the sending end judges whether the data received by the receiving end is complete or not according to the number of the successful signals, if so, the sending end sends the next data, and if not, the sending end resends the data.

Further, when classifying the data according to the character string, the method comprises the following steps:

carrying out digital processing on the character string to obtain a matrix corresponding to the data name;

calculating the characteristic value of the matrix, and taking the characteristic value of the matrix as the serial number of the sending end corresponding to the data;

each sending end corresponds to a different number.

Further, when the character string is digitized, the method comprises the following steps:

disassembling the character string to obtain a plurality of characters which are sequentially arranged;

respectively acquiring binary digits of each character;

sequentially longitudinally arranging binary digits of each character which are sequentially arranged, wherein the vacancy is 0;

and outputting to obtain the matrix.

Compared with the data acquisition and transmission method, the invention provides a data acquisition and transmission system, which comprises a sending end and a receiving end;

the transmitting end comprises:

the data naming module is used for naming the acquired data in a character string mode according to the name of the data to obtain a character string of the name of the data;

the data classification module is used for classifying the data according to the character strings to obtain the name types of the data;

the data distribution module is used for discharging the data to the sending ends of different channels to be queued and sent according to the name type of each data, and each channel corresponds to one sending end;

the data sending module is used for sending each data waiting to a receiving end, receiving a success signal sent by the receiving end and sending the next data waiting;

the receiving end includes:

the data receiving module is used for receiving the data sent by the sending end;

and the data feedback module is used for receiving a data transmission success signal transmitted by the transmitting end at the data receiving module.

Further, the data sending module includes:

the data splitting module is used for extracting data to be sent and splitting the data to obtain sub data which are sequentially arranged;

the data numbering module is used for numbering each subdata according to the arrangement sequence of the subdata from small to large in sequence;

and the packing and sending module is used for sequentially packing each subdata correspondence and the number corresponding to the subdata correspondence, and then packing and sending each packed subdata.

Still further, the data feedback module includes:

the data unpacking module is used for receiving the data and unpacking the received data to obtain a plurality of packed subdata;

and the signal sending module is used for extracting the number of each subdata and sending a success signal to the sending end every time one number is obtained.

Further, the data classification module includes:

the digital processing module is used for carrying out digital processing on the character string to obtain a matrix corresponding to the data name;

the eigenvalue calculation module is used for calculating the eigenvalue of the matrix and taking the eigenvalue of the matrix as the serial number of the sending end corresponding to the data;

and the number corresponding module is used for corresponding each sending end with a different number.

Still further, the digital processing module comprises:

the character disassembling module is used for disassembling the character string to obtain a plurality of characters which are sequentially arranged;

the digital conversion module is used for respectively acquiring binary digits of each character;

and the matrix arrangement module is used for sequentially longitudinally arranging the binary digits of each sequentially arranged character, the vacancy is 0, and outputting the matrix.

The data acquisition and transmission method and the data acquisition and transmission system provided by the invention have the following beneficial effects:

1. after data are collected, the data are named and divided according to the naming of the data, and the data which are divided are respectively sent to different channels, so that the data are not interfered during transmission;

2. after each signal is received, a plurality of successful signals are sent to the transmitting end, the transmitting section sends the next data after receiving all the successful signals, and meanwhile, when the data are packaged, the data are packaged in a batch packaging label mode and then are packaged integrally, so that the data can be judged when being received, and whether the received data are complete or not is judged;

3. the invention names the data in a character string mode, obtains the name type of the data in a numbering mode, expresses the name type of the data in a numbering matrix mode, divides the type of the data according to the characteristic value of the numbering matrix, sends the data into different channels according to the name type, and leads the utilization rate of the channels to be more uniform compared with the division of the data type.

Drawings

FIG. 1 is a schematic block diagram of the overall flow of the process of the present invention;

FIG. 2 is a schematic block diagram of the flow of the method of the present invention when a transmitting end transmits data;

FIG. 3 is a schematic block diagram of the flow of the method of the present invention when the receiving end receives;

FIG. 4 is a schematic block flow diagram of the method of the present invention in classifying data according to character strings;

FIG. 5 is a schematic block diagram of the flow of the method of the present invention when digitizing a string;

FIG. 6 is a schematic block diagram of the system connections of the system of the present invention as a whole;

FIG. 7 is a schematic block diagram of a system connection of a data transmission module of the system of the present invention;

FIG. 8 is a system connection schematic block diagram of the data feedback module of the system of the present invention;

FIG. 9 is a system connection schematic block diagram of the data classification module of the system of the present invention;

FIG. 10 is a block diagram illustrating the system connections of the digitizing module of the system of the present invention.

Detailed Description

An embodiment of the present invention will be described in detail below with reference to the accompanying drawings, but it should be understood that the scope of the present invention is not limited to the embodiment.

Specifically, as shown in fig. 1 to 10, an embodiment of the present invention provides a data acquisition and transmission method and system, wherein the data acquisition and transmission method provided by the present invention includes the following steps:

naming the acquired data in a character string mode according to the name of the data to obtain a character string of the name of the data;

classifying the data according to the character strings to obtain the name type of the data;

thirdly, according to the name type of each piece of data, the data are discharged to the sending ends of different channels to be queued for sending, and each channel corresponds to one sending end;

(IV) after the sending end sends each data waiting to the receiving end, receiving a success signal returned by the receiving end, wherein the success signal is sent to the sending end after the receiving end receives the data;

and (V) after the transmitting end receives the success signal returned by the receiving end, transmitting the next waiting data.

In the above steps (a) to (v), the steps (a) to (v) are performed sequentially, wherein the step (a) is to name the data, so as to obtain the name of each data, for example, the name of the temperature data is "temperature", and this can obtain the character string of the name of the data, i.e., "{ temperature }", so that the step (a) is to perform the process of symbolizing the name of the data, and in the step (b), the character string is classified to obtain the name type of the data, i.e., the data is classified according to the name of the data, rather than the data type, which is advantageous in that the data can be uniformly divided into various categories, and the data is easily clustered according to the data type, so that the present invention makes the data classification more uniform, and makes a cushion for the subsequent transmission of different channels, in the step (III), according to the type of the obtained data name, completing the operation of classification, so that the data of different data name types respectively enter the sending ends of the corresponding signals to be queued and wait, the two ends of the channel are respectively the sending end and the receiving end, the sending end sequentially sends the data, only one data is sent at a time, in the step (IV), the sending end sends the data out and transmits the data to the receiving end through the channel, the receiving end can feed back a success signal after receiving the data, in the step (V), the sending end can continue to send the next data to be sent after receiving the success signal, and thus the condition that collision interference occurs when the data are transmitted can not occur, and the stability of data transmission and the independence between the data can be ensured.

In this embodiment, when the sending end sends data, in order to complete data sending, the method includes the following steps:

(1) extracting data to be sent, and splitting the data to obtain sub-data which are sequentially arranged;

(2) numbering each subdata according to the sequence of the subdata, wherein the subdata sequentially changes from small to large;

(3) sequentially packaging each subdata corresponding to the subdata and the corresponding number of the subdata, and then packaging each packaged subdata;

(4) and transmitting the packed data.

The steps (1) to (4) are sequentially performed, in the step (1), the data to be transmitted is split, namely, the data to be transmitted is disassembled to obtain a plurality of sub-data which are sequentially arranged, the sub-data are sequentially spliced according to the sequence to obtain the data to be transmitted, in step (2), each piece of sub-data obtained by the above-mentioned splitting is respectively numbered according to the arrangement order, generally, the number starts from 1, the number is a label added to the sub-data, in step (3), the corresponding sub-data and the corresponding numbers thereof are packed respectively, meanwhile, each packed subdata is packed, so that the serial numbers are inserted into the packed data, and (4) sending the packed data, namely sending the packed data into a signal for transmission.

Meanwhile, in this embodiment, when the receiving end receives the data, the method includes the following steps:

(11) receiving the data and unpacking the received data to obtain a plurality of packed subdata;

(22) extracting the number of each subdata, and sending a success signal to the sending end when each number is obtained;

(33) and the sending end judges whether the data received by the receiving end is complete or not according to the number of the successful signals, if so, the sending end sends the next data, and if not, the sending end resends the data.

The above steps (11) to (33) are sequentially performed in sequence, in step (11), the received data is unpacked to obtain a plurality of packed subdata, then step (22) is performed, in step (22), the number in each packed subdata is extracted to obtain the number contained in each subdata, and when one number is obtained, a success signal is sent to the sending end, at this time, in step (33), the sending end sends the next data if the subdata received by the receiving end is complete according to the number of the received success signals, and if the subdata is incomplete, the data is sent again.

According to the technical scheme, whether the sent data is complete or not can be known through the feedback of the obtained quantity during sending and receiving, and whether the data is sent again or not is judged and executed.

In this embodiment, when classifying data according to character strings, the method includes the following steps:

(A) carrying out digital processing on the character string to obtain a matrix corresponding to the data name;

(B) calculating the characteristic value of the matrix, and taking the characteristic value of the matrix as the serial number of the sending end corresponding to the data;

(C) each sending end corresponds to a different number.

In the technical scheme, the method for classifying the character strings sequentially comprises the steps (A) to (C), wherein in the step (A), a matrix corresponding to the character strings can be obtained by performing a digital conversion process on the character strings, then the matrix is processed, in the step (B), the matrix is processed to obtain a characteristic value corresponding to the matrix, and the characteristic value is the number of a sending end corresponding to more than one matrix, so that the data names of all data are classified.

Meanwhile, in this embodiment, when performing the digitization processing on the character string, the method includes the following steps:

(a) disassembling the character string to obtain a plurality of characters which are sequentially arranged;

(b) respectively acquiring binary digits of each character;

(c) sequentially longitudinally arranging binary digits of each character which are sequentially arranged, wherein the vacancy is 0;

(d) and outputting to obtain the matrix.

In the technical scheme, the character strings are converted into the matrix, so that the characteristic value corresponding to each character string can be obtained, the character strings are classified, and the data names can be classified. In step (a), the character string is disassembled to obtain a plurality of characters, in step (b), binary digits of each character are respectively obtained, the characters are respectively digitized, in step (c), the sequentially obtained binary digits of the characters are arranged in a general writing mode to obtain a matrix, for vacant positions, 0 is used for complementing, so that an integral matrix is obtained, and finally, in step (d), the matrix is output, so that the character string can be expressed in a matrix mode, and the matrix and the corresponding character string are divided according to the characteristic value.

Compared with the data acquisition and transmission method, the invention provides a data acquisition and transmission system which comprises a sending end and a receiving end.

The transmitting end comprises: the device comprises a data naming module, a data classification module, a data distribution module and a data sending module. The data naming module is used for naming the acquired data in a character string mode according to the name of the data to obtain a character string of the name of the data; the data classification module is used for classifying the data according to the character strings to obtain the name type of the data; the data distribution module is used for discharging data to the sending ends of different channels to be queued and sent according to the name type of each data, and each channel corresponds to one sending end; the data sending module is used for sending each data waiting to the receiving end, receiving a success signal sent by the receiving end and sending the next data waiting.

The receiving end includes: the device comprises a data receiving module and a data feedback module. The data receiving module is used for receiving data sent by the sending end; the data feedback module is used for receiving a data transmission success signal transmitted by the transmitting end at the data receiving module.

The technical scheme realizes the contents realized in the steps (one) to (five) of the invention.

In this embodiment, the data sending module includes: the device comprises a data splitting module, a data numbering module and a packaging and sending module. The data splitting module is used for extracting data to be sent and splitting the data to obtain sub data which are sequentially arranged; the data numbering module is used for numbering each subdata according to the arrangement sequence of the subdata from small to large in sequence; and the packing and sending module is used for sequentially packing each subdata correspondence and the number corresponding to the subdata correspondence, and then packing and sending each packed subdata.

The technical scheme realizes the contents realized in the steps (1) to (4) of the invention.

Meanwhile, in this embodiment, the data feedback module includes: the device comprises a data unpacking module and a signal sending module. The data unpacking module is used for receiving the data and unpacking the received data to obtain a plurality of packed subdata; the signal sending module is used for extracting the number of each subdata, and sending a success signal to the sending end every time one number is obtained.

The above technical solution realizes the contents realized in the steps (11) to (33) of the present invention.

In this embodiment, the data classification module includes: the device comprises a digital processing module, a characteristic value calculating module and a serial number corresponding module. The digital processing module is used for carrying out digital processing on the character string to obtain a matrix corresponding to the data name; the eigenvalue calculation module is used for calculating the eigenvalue of the matrix and taking the eigenvalue of the matrix as the serial number of the sending end corresponding to the data; the number corresponding module is used for corresponding each sending end with a different number.

The above technical solution realizes the contents realized in the steps (a) to (C) of the present invention.

Meanwhile, in this embodiment, the digital processing module includes: the device comprises a character disassembling module, a digital conversion module and a matrix arrangement module. The character disassembling module is used for disassembling the character string to obtain a plurality of characters which are sequentially arranged; the digital conversion module is used for respectively acquiring binary digits of each character; the matrix arrangement module is used for sequentially longitudinally arranging the binary digits of each character which are sequentially arranged, the vacancy is 0, and outputting the matrix.

The above technical solution realizes the contents realized in the steps (a) to (d) of the present invention.

The above disclosure is only for a few specific embodiments of the present invention, however, the present invention is not limited to the above embodiments, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present invention.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于块稀疏贝叶斯算法的上下链路通信感知一体化方法

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!