CN111614682A - Test data transmission method and device and readable storage medium - Google Patents

Test data transmission method and device and readable storage medium Download PDF

Info

Publication number
CN111614682A
CN111614682A CN202010448791.XA CN202010448791A CN111614682A CN 111614682 A CN111614682 A CN 111614682A CN 202010448791 A CN202010448791 A CN 202010448791A CN 111614682 A CN111614682 A CN 111614682A
Authority
CN
China
Prior art keywords
data
test
test data
protocol
preset
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
CN202010448791.XA
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.)
Electric Power Research Institute of State Grid Chongqing Electric Power Co Ltd
State Grid Corp of China SGCC
Original Assignee
Electric Power Research Institute of State Grid Chongqing Electric Power Co Ltd
State Grid Corp of China SGCC
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 Electric Power Research Institute of State Grid Chongqing Electric Power Co Ltd, State Grid Corp of China SGCC filed Critical Electric Power Research Institute of State Grid Chongqing Electric Power Co Ltd
Priority to CN202010448791.XA priority Critical patent/CN111614682A/en
Publication of CN111614682A publication Critical patent/CN111614682A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/03Protocol definition or specification 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Abstract

The invention discloses a test data transmission method, a test data transmission device and a readable storage medium, wherein the method comprises the following steps: recording test data according to a preset data identifier; unpacking the test data to obtain a data body, and setting the data body according to a preset data protocol; and performing data message based on the adjusted data body. The method of the invention unpacks the test data to obtain the data body, and sets the data body according to the preset data protocol, thereby uniformly processing the custom data protocol and format of various current test equipment manufacturers to set the custom data protocol and format into the data packet with the uniform format on the basis of not changing the original structure of the current test equipment, and improving the identifiability of the data.

Description

Test data transmission method and device and readable storage medium
Technical Field
The invention relates to the technical field of electrical test data acquisition, in particular to a test data transmission method and device and a readable storage medium.
Background
The test data acquisition is an essential key step in various electrical test processes, and the test data is acquired through the step to form an original record and a test report is issued according to relevant standards. At present, various test equipment for electrical tests are designed and produced mainly aiming at manual use, so that related data acquisition mainly adopts a tester to directly read and then make paper records or manually input the paper records into a related application system, thereby forming a complete original test record, and forming a related test report through calculation and analysis of original record data.
The method for manually and directly reading test data to make paper record or manually inputting the test data into the system needs a lot of time, and the correctness and the accuracy of the test data are uncontrollable, so that the complete data tracing cannot be carried out.
Disclosure of Invention
In view of the above-mentioned drawbacks of the prior art, an object of the present invention is to provide a test data transmission method, device and readable storage medium.
One of the objectives of the present invention is achieved by the technical solution, which is a test data transmission method, including:
recording test data according to a preset data identifier;
unpacking the test data to obtain a data body, and setting the data body according to a preset data protocol;
and performing data message based on the adjusted data body.
Optionally, recording test data according to a preset data identifier, including:
and recording the test data according to the data message header and the data message tail in the test data.
Optionally, recording test data according to a preset data identifier, including:
and storing the test data between the data message head and the data message tail into a buffer area.
Optionally, before storing the test data between the data packet header and the data packet trailer in a buffer, the method further includes:
and emptying the residual data of the buffer area.
Optionally, after storing the test data between the data packet header and the data packet trailer in a buffer, the method further includes:
making a length determination of the test data in the buffer, and/or,
and checking the test data in the buffer area.
Optionally, unpacking the test data to obtain a data volume includes:
removing a data message header and a data message tail in the test data to obtain intermediate data;
and carrying out data decoding on the intermediate data to obtain a data body.
Optionally, performing data decoding on the intermediate data to obtain a data volume, including:
and acquiring a data body according to the data length and the check bit of the intermediate data.
Optionally, the setting the data volume according to a preset data protocol includes:
decoding the data volume according to the determined length of the data volume and the check bits;
and encapsulating the decoded data body based on a preset data protocol.
Another object of the present invention is achieved by the above technical solution, in which the test data transmission device includes:
the data processing module is used for recording test data according to a preset data identifier;
unpacking the test data to obtain a data body, and setting the data body according to a preset data protocol;
and the communication module is used for performing data message based on the adjusted data body.
The third object of the present invention is achieved by a computer-readable storage medium, which stores an implementation program for information transfer, and when the program is executed by a processor, the method implements the steps of the foregoing method.
Due to the adoption of the technical scheme, the invention has the following advantages: the method of the invention unpacks the test data to obtain the data body, and sets the data body according to the preset data protocol, thereby uniformly processing the custom data protocol and format of various current test equipment manufacturers to set the custom data protocol and format into the data packet with a uniform format on the basis of not changing the original structure of the current test equipment, improving the identifiability of the data, facilitating the later calculation and utilization of the data and reducing the data use threshold.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention.
Drawings
The drawings of the invention are illustrated as follows:
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 is a schematic view of the apparatus of the present invention;
fig. 3 is a working principle diagram of the device of the invention.
Detailed Description
The invention is further illustrated by the following figures and examples.
Example one
A first embodiment of the present invention provides a test data transmission method, as shown in fig. 1, the method including:
s1, recording test data according to the preset data identification;
s2, unpacking the test data to obtain a data body, and setting the data body according to a preset data protocol;
and S3, performing data message based on the adjusted data body.
The method of the invention unpacks the test data to obtain the data body, and sets the data body according to the preset data protocol, thereby uniformly processing the custom data protocol and format of various current test equipment manufacturers to set the custom data protocol and format into the data packet with a uniform format on the basis of not changing the original structure of the current test equipment, improving the identifiability of the data, facilitating the later calculation and utilization of the data and reducing the data use threshold.
Optionally, recording test data according to a preset data identifier, including: and recording the test data according to the data message header and the data message tail in the test data.
Optionally, recording test data according to a preset data identifier, including:
and S11, storing the test data between the data message head and the data message tail into a buffer area.
Specifically, in this embodiment, it is determined whether a data packet header is detected for test data transmitted from an interface, and when the data packet header is encountered, the test data transmitted from the interface is recorded, and subsequent data after the data packet header is stored in a buffer area, otherwise, when the data packet header is not detected, the data transmitted from the interface is discarded, and when the packet data is considered to be finished by the packet data trailer, the transmission of the current test data packet is completed, so as to ensure the integrity of the obtained test data.
Optionally, before the test data between the data packet header and the data packet trailer is stored in a buffer, the remaining data in the buffer is emptied.
Specifically, in order to ensure the correctness of the recorded data, the data in the buffer area is emptied before the data header is encountered, and then the data recording is started.
Optionally, after recording the test data according to the preset data identifier, the method further includes:
s12, judging the length of the test data in the buffer area, and/or checking the test data in the buffer area.
Specifically, after the test data between the data packet header and the data packet trailer is recorded, in order to further ensure the accuracy of the recorded data, in this embodiment, the test data stored in the buffer area is subjected to length judgment and/or data verification.
Optionally, unpacking the test data to obtain a data volume includes:
s21, removing the data message header and the data message tail in the test data to obtain intermediate data;
and S22, decoding the intermediate data to obtain a data body.
Optionally, performing data decoding according to the intermediate data to obtain a data volume, includes: and acquiring a data body according to the data length and the check bit of the intermediate data.
In the embodiment, various collected and recorded test data are subjected to unified data management, various non-uniform data protocols and data formats are set into data of a recognizable unified protocol, the data protocols appear in the form of data packets, as shown in table 1, the data packets are divided into packet headers, data bodies and packet tails, and the data packet headers consist of start symbols (0x00) and command words; the data body consists of a subprotocol, a device number and data content; the packet tail is composed of an authentication code and an end symbol (0xFF), the length of the whole data packet is maximum 1024 bytes, wherein the data packet header comprises the start symbol and the data packet tail comprises the end symbol, and a data composition mode (protocol) user of the data body content can customize.
Table 1 packet format
Initial symbol Protocol Equipment number Data content 1bytes Ending symbol
0x00 1byte 3bytes n bytes Authorization code 0xFF
Specifically, in this embodiment, unpacking the test data to obtain the data volume includes:
firstly, removing a data message header and a data message tail in test data to obtain intermediate data;
then, the intermediate data is data-decoded to obtain a data volume.
Specifically, the data decoding is performed according to the intermediate data to obtain the data volume, including determining a data length and a check bit of the intermediate data, and extracting the intermediate data according to the determined data length and check bit to obtain the data volume.
Optionally, the setting the data volume according to a preset data protocol includes:
s23, decoding the data body according to the determined length of the data body and the check bit;
and S24, packaging the decoded data body based on a preset data protocol.
Specifically, in this embodiment, the unified data management is performed on various collected and recorded test data, various non-uniform data protocols and data formats are set to data of a recognizable unified protocol, and on the basis of the obtained data volume, in this embodiment, the data volume is further set, so as to obtain data of a recognizable unified protocol, including:
firstly, determining the length and check bits of the obtained data volume;
then, the data body is decoded according to the determined length of the data body and the check bit, corresponding data content in the data body can be obtained after the data body is decoded, the data content after the data decoding is packaged based on a preset data protocol, and specifically, a corresponding data message header and a data message tail can be added, so that the data body is set into data of a recognizable uniform protocol.
The method of the invention unpacks the test data to obtain the data body, and sets the data body according to the preset data protocol, thereby uniformly processing the custom data protocol and format of various current test equipment manufacturers to set the custom data protocol and format into the data packet with a uniform format on the basis of not changing the original structure of the current test equipment, improving the identifiability of the data, facilitating the later calculation and utilization of the data and reducing the data use threshold.
Example two
A second embodiment of the present invention provides a test data transmission apparatus, as shown in fig. 2, including:
the data processing module is used for recording test data according to a preset data identifier;
unpacking the test data to obtain a data body, and setting the data body according to a preset data protocol;
and the communication module is used for performing data message based on the adjusted data body.
Specifically speaking, in this embodiment, the device is provided with the integrated interface, and interface matching connection is performed on the current traditional experimental equipment, and the common interfaces of the current traditional experimental equipment are mainly matched, so that direct connection with the device is facilitated, and later-stage experimental data acquisition is facilitated, wherein the matched interface types mainly include RS232/RS485/USB/IEEE 1394/cinchra/VGA/DVI/RJ 45/RJ11/LTP and the like.
As shown in fig. 2, the data processing module receives data from the testing instrument through the integrated interface, and records the testing data according to the preset data identifier, and the data recording process includes: (1) when the message header is encountered, data is recorded, and the subsequent data is stored in a buffer area, otherwise, the data is discarded. (2) When the message header is encountered, the data in the buffer area is emptied first, and then the data recording is started. (3) When the packet data is considered to be finished at the end of the message, the data in the buffer area is subjected to subsequent processing such as length judgment, data verification and the like, and then the packet data is used.
After the recording is completed, the received data is subjected to receiving processing, which comprises the following steps: and removing the message head and the message tail- > data inversion meaning- > judging the data length and the check bit- > to obtain a data body.
After the received data is processed, the integration processing is carried out before the data is sent, and the integration processing method comprises the following steps: data body- > calculating data body length- > calculating check bit- > data meaning-adding message head and message tail.
Therefore, the processed data of the unified protocol can be transmitted through the communication module.
The test data transmission device of the present embodiment further includes: based on the interfaces, the test data converted into the unified protocol can be wirelessly transmitted through Bluetooth, WIFI or other entrance communication interfaces, and wireless connection with other wireless data acquisition hardware is facilitated, so that the purpose of wireless transmission of the test data is achieved.
Specifically, the use process of the device of the present invention is as shown in fig. 3, and includes connecting the testing instrument after the test preparation is completed, connecting the testing instrument to the interface of the testing instrument through the device of the present invention, performing the test while automatically acquiring and recording the test data through the device, and then transmitting the test data of the unified protocol after receiving, unpacking and integrating the data, so that the upper computer can issue the test report according to the test data of the unified protocol.
In conclusion, the invention can rapidly upgrade the single-machine equipment into the network equipment on the basis of not changing the original structure of the conventional test equipment by connecting the interfaces of the conventional test equipment and performing plug-in type nondestructive reconstruction, thereby realizing the purposes of wireless networking of the offline equipment, wireless transmission of test data and automatic acquisition of the test data. Therefore, the source tracing of the test data is facilitated, the accurate transmission of the test data is ensured, the error rate caused by manual reading is reduced, and the data acquisition efficiency is improved.
The device uniformly processes custom data protocols and formats of various current test equipment manufacturers and sets the custom data protocols and formats into data packets with uniform formats. Therefore, the identifiability of the data is greatly improved, the later-stage calculation and utilization of the data are facilitated, the data use threshold is reduced, and the data value is conveniently and deeply mined.
EXAMPLE III
A third embodiment of the present invention proposes a computer-readable storage medium on which an implementation program for information transfer is stored, which when executed by a processor implements the steps of the method of the first embodiment.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting the same, and although the present invention is described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications and equivalents may be made to the embodiments of the invention without departing from the spirit and scope of the invention, which is to be covered thereby.

Claims (10)

1. A method of experimental data transmission, the method comprising:
recording test data according to a preset data identifier;
unpacking the test data to obtain a data body, and setting the data body according to a preset data protocol;
and performing data message based on the adjusted data body.
2. The method of claim 1, wherein recording the test data according to the predetermined data identification comprises:
and recording the test data according to the data message header and the data message tail in the test data.
3. The method of claim 2, wherein recording the test data according to the predetermined data identification comprises:
and storing the test data between the data message head and the data message tail into a buffer area.
4. The method of claim 3, wherein prior to storing the test data between the data packet header and the data packet trailer in a buffer, further comprising:
and emptying the residual data of the buffer area.
5. The method of claim 3 or 4, wherein after storing the test data between the data packet header and the data packet trailer in a buffer, the method further comprises:
making a length determination of the test data in the buffer, and/or,
and checking the test data in the buffer area.
6. The method of any one of claims 1-4, wherein unpacking the test data to obtain a data volume comprises:
removing a data message header and a data message tail in the test data to obtain intermediate data;
and carrying out data decoding on the intermediate data to obtain a data body.
7. The method of claim 6, wherein data decoding the intermediate data to obtain a data volume comprises:
and acquiring a data body according to the data length and the check bit of the intermediate data.
8. The method of any of claims 1-4, wherein tuning the data volume according to a predetermined data protocol comprises:
decoding the data volume according to the determined length of the data volume and the check bits;
and encapsulating the decoded data body based on a preset data protocol.
9. A test data transmission apparatus, the apparatus comprising:
the data processing module is used for recording test data according to a preset data identifier;
unpacking the test data to obtain a data body, and setting the data body according to a preset data protocol;
and the communication module is used for performing data message based on the adjusted data body.
10. A computer-readable storage medium, characterized in that it has stored thereon a program for implementing the transfer of information, which program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 8.
CN202010448791.XA 2020-05-25 2020-05-25 Test data transmission method and device and readable storage medium Pending CN111614682A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010448791.XA CN111614682A (en) 2020-05-25 2020-05-25 Test data transmission method and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010448791.XA CN111614682A (en) 2020-05-25 2020-05-25 Test data transmission method and device and readable storage medium

Publications (1)

Publication Number Publication Date
CN111614682A true CN111614682A (en) 2020-09-01

Family

ID=72198833

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010448791.XA Pending CN111614682A (en) 2020-05-25 2020-05-25 Test data transmission method and device and readable storage medium

Country Status (1)

Country Link
CN (1) CN111614682A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111624950A (en) * 2020-06-02 2020-09-04 西门子工厂自动化工程有限公司 Wave-making data processing method and device, motion controller and wave-making system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013056031A1 (en) * 2011-10-14 2013-04-18 Qualcomm Incorporated Feedback channel for wireless display devices
CN109714327A (en) * 2018-12-21 2019-05-03 深圳市元征科技股份有限公司 Data processing method, device, terminal, system and server
CN111083161A (en) * 2019-12-27 2020-04-28 中消云(北京)物联网科技研究院有限公司 Data transmission processing method and device and Internet of things equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013056031A1 (en) * 2011-10-14 2013-04-18 Qualcomm Incorporated Feedback channel for wireless display devices
CN109714327A (en) * 2018-12-21 2019-05-03 深圳市元征科技股份有限公司 Data processing method, device, terminal, system and server
CN111083161A (en) * 2019-12-27 2020-04-28 中消云(北京)物联网科技研究院有限公司 Data transmission processing method and device and Internet of things equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111624950A (en) * 2020-06-02 2020-09-04 西门子工厂自动化工程有限公司 Wave-making data processing method and device, motion controller and wave-making system

Similar Documents

Publication Publication Date Title
CN112235326B (en) Internet of things equipment data analysis method and device and electronic equipment
CN107544463B (en) Automatic test method and test device for diagnosis function of vehicle controller
CN107122258A (en) Method and apparatus for the state code check of test interface
CN109756514B (en) Telemetry data dynamic processing method of spacecraft complex protocol
CN109981475B (en) Data transmitting, receiving and transmitting method, device, system and readable storage medium
CN111614682A (en) Test data transmission method and device and readable storage medium
CN108614765B (en) Method for acquiring embedded software test data in target machine
CN112347047A (en) Vehicle data file generation method and device
WO2022089363A1 (en) Method and apparatus for displaying function menu interface of automobile tyre pressure monitoring system
WO2020063861A1 (en) Tire pressure sensor signal analysis method and apparatus, tire pressure receiver and diagnostic system
CN114414255A (en) Automatic driving test method and system based on CAN message period monitoring
CN112311627B (en) Universal power protocol testing method and system based on protocol description file in XML format
CN113114659A (en) Diagnostic equipment detection method and device, terminal equipment and storage medium
CN107306256B (en) Communication protocol analysis method based on character string type data
CN106790130B (en) Message matching method and device
CN112422564A (en) Protocol testing method, device, storage medium and electronic device
CN110719216A (en) Data transmission data processing method, system, device and storage medium
CN114666255B (en) Method for testing network distribution performance of Internet of things equipment and related equipment thereof
CN103810085B (en) A kind of method and device that module testing is carried out by comparing
CN106899386B (en) Method for demodulating fragmented frame signals based on multi-channel communication receiving system
CN113660139B (en) V2X protocol consistency detection method based on multiple message layer communication
CN113986759A (en) Business processing flow acquisition method, business architecture flow verification method and system
CN113645052B (en) Firmware debugging method and related equipment
CN114666312B (en) Universal data acquisition method, system and equipment for weighing instrument and readable storage medium
CN112054955A (en) Equipment communication method based on gateway

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

Application publication date: 20200901