A communication method for a data conversion device to access a USB interface of a detection instrument
By establishing a Bluetooth connection between the testing instrument and the mobile terminal through a data conversion device, and utilizing USB storage and MD5 verification, the problem of traditional testing instruments being unable to communicate in real time is solved. This enables the intelligent transformation of the testing instrument and the mobility of operations, improving testing efficiency and communication reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
- Filing Date
- 2022-12-08
- Publication Date
- 2026-04-28
AI Technical Summary
In the existing technology, testing instruments with USB high-capacity storage interfaces cannot communicate with mobile terminals in real time, and data needs to be copied manually, which makes it impossible to achieve mobile operation.
A communication connection between the mobile terminal and the testing instrument is established via Bluetooth using a data conversion device. The testing instrument is mounted on a USB mass storage device, and MD5 code is used to verify data integrity, enabling real-time data interaction between the testing instrument and the mobile terminal. A dedicated file directory and timed polling technology are used to avoid communication conflicts.
It enables real-time data interaction between mobile terminals and testing instruments, improves testing efficiency, meets the needs of mobile operations, and enhances communication reliability and intelligence.
Smart Images

Figure CN115794698B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent operation and maintenance of power equipment, and in particular to a communication method for connecting a data conversion device to the USB interface of a testing instrument. Background Technology
[0002] As the company's power grid equipment scale grows rapidly while the number of operation and maintenance personnel remains relatively stable, the contradiction between the growth of the power grid scale and the allocation of operation and maintenance personnel is becoming increasingly prominent. The requirements for lean equipment management are constantly increasing, and the types of on-site operations are constantly increasing. A large amount of mechanical and repetitive work still needs to be carried out on-site by team personnel.
[0003] Smart hardware forms the foundation of innovative power grid operation and maintenance. Based on technologies such as big data, cloud computing, IoT, and mobile internet, a series of hardware devices have been developed for the new operation and maintenance model, including smart mobile terminals, IoT electronic tags, wireless smart sensors, robotic automated inspection systems, and wearable integrated testing equipment. Compared with traditional inspection models, the new operation and maintenance model features accurate and reliable testing data, standardized testing processes, intelligent testing procedures, and paperless test reports. It also significantly reduces the professional requirements for on-site personnel and improves operational efficiency.
[0004] By using mobile terminals and digital methods, planned test tasks can be uniformly assigned. Test task personnel can download tasks via mobile terminal APP without geographical restrictions and respond to task arrangements in a timely manner. Data can be collected on-site using handheld testing terminals and connected to the platform for live-line testing methods via APP or data cable for convenient analysis and processing, and to standardize the testing process.
[0005] Currently, a large number of existing testing instruments need to be upgraded to be intelligent enough to connect to mobile terminals in real time and enable mobile operations. Among these existing testing instruments, those with Bluetooth and Wi-Fi communication interfaces can easily establish real-time communication with mobile terminals; while some testing instruments with only USB high-capacity storage interfaces can currently only connect by manually copying data, and cannot truly achieve the so-called mobile operation. Summary of the Invention
[0006] The purpose of this invention is to provide a communication method for a data conversion device to access the USB interface of a testing instrument, enabling real-time communication between a testing instrument with only a USB mass storage interface and a mobile terminal, thereby improving testing efficiency and the level of intelligence in testing.
[0007] The objective of this invention can be achieved through the following technical solutions:
[0008] A communication method for connecting a data conversion device to the USB interface of a testing instrument, used to realize communication between the testing instrument and a mobile terminal, includes the following steps:
[0009] The mobile terminal and the data conversion device establish a communication connection via Bluetooth, and the data conversion device connects the testing instrument via USB mass storage.
[0010] The mobile terminal sends downlink data to the data conversion device via Bluetooth. The data conversion device writes the received data as a downlink data file into the downlink file directory of the testing instrument, and writes the MD5 code of the downlink data file into the corresponding downlink check code file in the downlink file directory.
[0011] The testing instrument periodically polls the downlink checksum file and verifies the integrity of the downlink data file based on the MD5 code. When the integrity verification of the downlink data file passes, the testing instrument parses the downlink data file and executes the corresponding testing task according to the file instructions. At the same time, it deletes the parsed downlink data file.
[0012] After the testing instrument completes the testing task, it writes the uplink data as an uplink data file to the uplink file directory of the testing instrument, and writes the MD5 code of the uplink data file to the corresponding uplink check code file in the uplink file directory.
[0013] The data conversion device periodically polls the uplink checksum file and verifies the integrity of the uplink data file based on the MD5 code. When the integrity verification of the uplink data file passes, the data conversion device sends the data content of the uplink data file to the mobile terminal via Bluetooth. At the same time, it deletes the parsed uplink data file.
[0014] The mobile terminal receives uplink data and performs corresponding processing.
[0015] The data files in the dedicated directories for upstream and downstream files are named in the order of year, month, date, hour, minute, second, and millisecond, with the file extension .dat.
[0016] The checksum files in the dedicated directories for upstream and downstream files are named in the order of year, month, date, hour, minute, second, and millisecond, with the file extension .md5.
[0017] The polling time interval for the downlink check code file by the detection instrument and the polling time interval for the uplink check code file by the data conversion device both do not exceed 100 milliseconds.
[0018] A communication method for connecting a data conversion device to the USB interface of a testing instrument, used to realize communication between the testing instrument and a mobile terminal, applied to the testing instrument, includes the following steps:
[0019] The testing instrument is mounted on the data conversion device via USB mass storage, and the data conversion device and the mobile terminal establish a communication connection via Bluetooth.
[0020] The testing instrument periodically polls the downlink checksum file to determine if there is downlink data to parse. If so, it verifies the integrity of the downlink data file based on the MD5 hash stored in the downlink checksum file. The downlink data file is created based on the downlink data received by the data conversion device and written to the testing instrument's dedicated downlink file directory by the data conversion device. The downlink data is sent to the data conversion device via Bluetooth from a mobile terminal. The downlink checksum file is created based on the MD5 hash of the downlink data file and written to the dedicated downlink file directory by the data conversion device. If not, it determines if there is uplink data to send. If so, it writes the uplink data as an uplink data file to the testing instrument's dedicated uplink file directory and writes the MD5 hash of the uplink data file to the corresponding uplink checksum file in the dedicated uplink file directory.
[0021] When the integrity verification of the downlink data file passes, the testing instrument parses the downlink data file and executes the corresponding testing task according to the file instructions. At the same time, the parsed downlink data file is deleted.
[0022] Data files in the dedicated directory are named in the order of year, month, day, hour, minute, second, and millisecond, with the file extension .dat; checksum files in the dedicated directory are named in the order of year, month, day, hour, minute, second, and millisecond, with the file extension .md5.
[0023] The polling interval of the downlink check code file by the detection instrument shall not exceed 100 milliseconds.
[0024] A communication method for connecting a data conversion device to the USB interface of a testing instrument, used to realize communication between the testing instrument and a mobile terminal, applied to the data conversion device, includes the following steps:
[0025] A communication connection is established between the device and the mobile terminal via Bluetooth, and the testing instrument is mounted using USB mass storage.
[0026] Acquire downlink data sent by the mobile terminal via Bluetooth;
[0027] Write the downlink data as a downlink data file to the downlink file directory of the testing instrument, and write the MD5 code of the downlink data file to the corresponding downlink check code file in the downlink file directory;
[0028] The uplink checksum file is periodically polled, and the integrity of the uplink data file is verified based on the MD5 code stored in the uplink checksum file. The uplink data file is created by the testing instrument based on the uplink data after completing the testing task and written to the uplink file dedicated directory of the testing instrument. At the same time, the testing instrument writes the MD5 code of the uplink data file into the corresponding uplink checksum file in the uplink file dedicated directory.
[0029] When the integrity verification of the uplink data file passes, the data content of the uplink data file is sent to the mobile terminal via Bluetooth. At the same time, the parsed uplink data file is deleted.
[0030] Data files in the dedicated directory are named in the order of year, month, day, hour, minute, second, and millisecond, with the file extension .dat; checksum files in the dedicated directory are named in the order of year, month, day, hour, minute, second, and millisecond, with the file extension .md5.
[0031] The polling interval for the uplink checksum file is no more than 100 milliseconds.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] (1) This invention solves the problem that when a mobile terminal accesses a traditional testing instrument with a USB large-capacity storage interface, data files can only be copied manually one by one. It realizes real-time data file interaction between the mobile terminal and the testing instrument, realizes the intelligent transformation of traditional testing instruments, meets the needs of mobile operation, and improves the efficiency of inspection operation.
[0034] (2) By reserving a dedicated uplink and downlink data transmission directory, the present invention avoids communication conflicts. At the same time, by using file naming rules, it prevents access conflicts and improves communication reliability. Attached Figure Description
[0035] Figure 1 This is a communication timing diagram of the method described in this invention;
[0036] Figure 2 A flowchart illustrating the method for real-time communication of detection instruments;
[0037] Figure 3 A flowchart illustrating a method for real-time communication with a data conversion device. Detailed Implementation
[0038] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.
[0039] Example 1
[0040] A communication method for connecting a data conversion device to the USB interface of a testing instrument is provided to enable communication between the testing instrument and a mobile terminal. The communication timing diagram is shown below. Figure 1 As shown, it includes the following steps:
[0041] The mobile terminal and the data conversion device establish a communication connection via Bluetooth, and the data conversion device connects the testing instrument via USB mass storage.
[0042] The mobile terminal sends downlink data to the data conversion device via Bluetooth. The data conversion device writes the received data as a downlink data file into the downlink file directory of the testing instrument, and writes the MD5 code of the downlink data file into the corresponding downlink check code file in the downlink file directory.
[0043] The testing instrument periodically polls the downlink checksum file and verifies the integrity of the downlink data file based on the MD5 code. When the integrity verification of the downlink data file passes, the testing instrument parses the downlink data file and executes the corresponding testing task according to the file instructions. At the same time, it deletes the parsed downlink data file. If the integrity verification fails, it continues to wait for data transmission.
[0044] After the testing instrument completes the testing task, it writes the uplink data as an uplink data file to the uplink file directory of the testing instrument, and writes the MD5 code of the uplink data file to the corresponding uplink check code file in the uplink file directory.
[0045] The data conversion device periodically polls the uplink checksum file and verifies the integrity of the uplink data file based on the MD5 code. When the integrity verification of the uplink data file passes, the data conversion device sends the data content of the uplink data file to the mobile terminal via Bluetooth. At the same time, it deletes the parsed uplink data file. If the integrity verification fails, it continues to wait for data transmission.
[0046] The mobile terminal receives uplink data and performs corresponding processing.
[0047] In this embodiment, the downstream directory is named "datadownload" and the upstream directory is named "dataupload".
[0048] To avoid duplicate filenames, data files in the datadownload and dataupload directories are named using the current time, following the naming convention "YYYY-MM-DD hh:mm:ss zzz.dat", where "YYYY" represents the year, "MM" represents the month, "DD" represents the day, "hh" represents the hour, "mm" represents the minute, "ss" represents the second, and "zzz" represents the millisecond.
[0049] To ensure consistency between the checksum file and the data file, the checksum file is named according to the rule "YYYY-MM-DDhh:mm:ss zzz.md5", where the time part is named in the same way as the data file.
[0050] To avoid noticeable lag for users when performing inspection tasks, the polling time interval between the downlink check code file of the detection instrument and the polling time interval between the uplink check code file of the data conversion device both do not exceed 100 milliseconds.
[0051] Example 2
[0052] A communication method for connecting a data conversion device to the USB interface of a testing instrument is disclosed, which enables communication between the testing instrument and a mobile terminal. This method is applied to the testing instrument. Figure 2 As shown, it includes the following steps:
[0053] The testing instrument is mounted on the data conversion device via USB mass storage, and the data conversion device and the mobile terminal establish a communication connection via Bluetooth.
[0054] The testing instrument periodically polls the downlink checksum file to determine if there is downlink data to parse. If so, it verifies the integrity of the downlink data file based on the MD5 hash stored in the downlink checksum file. The downlink data file is created based on the downlink data received by the data conversion device and written to the testing instrument's dedicated downlink file directory by the data conversion device. The downlink data is sent to the data conversion device via Bluetooth from a mobile terminal. The downlink checksum file is created based on the MD5 hash of the downlink data file and written to the dedicated downlink file directory by the data conversion device. If not, it determines if there is uplink data to send. If so, it writes the uplink data as an uplink data file to the testing instrument's dedicated uplink file directory and writes the MD5 hash of the uplink data file to the corresponding uplink checksum file in the dedicated uplink file directory.
[0055] When the integrity verification of the downlink data file passes, the testing instrument parses the downlink data file and executes the corresponding testing task according to the file instructions. At the same time, the parsed downlink data file is deleted.
[0056] The file naming rules in this embodiment are consistent with those described in Embodiment 1.
[0057] Example 3
[0058] A communication method for connecting a data conversion device to the USB interface of a testing instrument is provided to enable communication between the testing instrument and a mobile terminal. This method is applied to the data conversion device. Figure 3 As shown, it includes the following steps:
[0059] A communication connection is established between the device and the mobile terminal via Bluetooth, and the testing instrument is mounted using USB mass storage.
[0060] Acquire downlink data sent by the mobile terminal via Bluetooth;
[0061] Write the downlink data as a downlink data file to the downlink file directory of the testing instrument, and write the MD5 code of the downlink data file to the corresponding downlink check code file in the downlink file directory;
[0062] If no downlink data is received from the mobile terminal during the timed polling period, it is determined whether there is data in the uplink file directory of the detection instrument. If so, the following steps are executed; otherwise, it continues to wait to receive downlink data.
[0063] The uplink checksum file is periodically polled, and the integrity of the uplink data file is verified based on the MD5 code stored in the uplink checksum file. The uplink data file is created by the testing instrument based on the uplink data after completing the testing task and written to the uplink file dedicated directory of the testing instrument. At the same time, the testing instrument writes the MD5 code of the uplink data file into the corresponding uplink checksum file in the uplink file dedicated directory.
[0064] If the integrity check of the uplink data file passes, the data content of the uplink data file is sent to the mobile terminal via Bluetooth, and the parsed uplink data file is deleted; if the integrity check fails, the process continues to wait.
[0065] The file naming rules in this embodiment are consistent with those described in Embodiment 1.
[0066] In summary, the communication method of this invention utilizes data file exchange to achieve real-time data interaction, leverages USB storage area data file exchange for bidirectional communication, avoids communication conflicts by reserving dedicated uplink and downlink file directories in the USB storage area of the testing instrument, prevents access conflicts through data file naming and verification rules, and achieves real-time communication through periodic polling. Through this method, mobile terminals can achieve real-time communication with testing instruments that only have USB high-capacity interfaces, thereby enabling the intelligent transformation of such testing instruments and achieving true mobile operation.
[0067] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A communication method for connecting a data conversion device to the USB interface of a testing instrument, used to realize communication between the testing instrument and a mobile terminal, characterized in that, Includes the following steps: The mobile terminal and the data conversion device establish a communication connection via Bluetooth, and the data conversion device connects the testing instrument via USB mass storage. The mobile terminal sends downlink data to the data conversion device via Bluetooth. The data conversion device writes the received data as a downlink data file into the downlink file directory of the testing instrument, and writes the MD5 code of the downlink data file into the corresponding downlink check code file in the downlink file directory. The testing instrument periodically polls the downlink checksum file and verifies the integrity of the downlink data file based on the MD5 code. When the integrity verification of the downlink data file passes, the testing instrument parses the downlink data file and executes the corresponding testing task according to the file instructions. At the same time, it deletes the parsed downlink data file. After the testing instrument completes the testing task, it writes the uplink data as an uplink data file to the uplink file directory of the testing instrument, and writes the MD5 code of the uplink data file to the corresponding uplink check code file in the uplink file directory. The data conversion device periodically polls the uplink checksum file and verifies the integrity of the uplink data file based on the MD5 code. When the integrity verification of the uplink data file passes, the data conversion device sends the data content of the uplink data file to the mobile terminal via Bluetooth. At the same time, it deletes the parsed uplink data file. The mobile terminal receives uplink data and performs corresponding processing.
2. The communication method for connecting a data conversion device to the USB interface of a testing instrument according to claim 1, characterized in that, The data files in the dedicated directories for upstream and downstream files are named in the order of year, month, date, hour, minute, second, and millisecond, with the file extension .dat.
3. The communication method for connecting a data conversion device to the USB interface of a testing instrument according to claim 1, characterized in that, The checksum files in the dedicated directories for upstream and downstream files are named in the order of year, month, date, hour, minute, second, and millisecond, with the file extension .md5.
4. The communication method for connecting a data conversion device to the USB interface of a testing instrument according to claim 1, characterized in that, The polling time interval for the downlink check code file by the detection instrument and the polling time interval for the uplink check code file by the data conversion device both do not exceed 100 milliseconds.
5. A communication method for connecting a data conversion device to the USB interface of a testing instrument, used to realize communication between the testing instrument and a mobile terminal, applied to the testing instrument, characterized in that, Includes the following steps: The testing instrument is mounted on the data conversion device via USB mass storage, and the data conversion device and the mobile terminal establish a communication connection via Bluetooth. The testing instrument periodically polls the downlink checksum file to determine if there is downlink data to be parsed. If so, it verifies the integrity of the downlink data file based on the MD5 hash stored in the downlink checksum file. The downlink data file is created based on the downlink data received by the data conversion device and written to the testing instrument's dedicated downlink file directory by the data conversion device. The downlink data is sent to the data conversion device via Bluetooth from a mobile terminal. The downlink checksum file is created based on the MD5 hash of the downlink data file and written to the dedicated downlink file directory by the data conversion device. If not, it determines if there is uplink data to be sent. If so, it writes the uplink data as an uplink data file to the testing instrument's dedicated uplink file directory and writes the MD5 hash of the uplink data file to the corresponding uplink checksum file in the dedicated uplink file directory. When the integrity verification of the downlink data file passes, the testing instrument parses the downlink data file and executes the corresponding testing task according to the file instructions. At the same time, the parsed downlink data file is deleted.
6. A communication method for connecting a data conversion device to a USB interface of a testing instrument according to claim 5, characterized in that, The data files in the dedicated uplink and downlink file directories are named in the order of year, month, day, hour, minute, second, and millisecond, with the file extension .dat; the checksum files in the dedicated uplink and downlink file directories are named in the order of year, month, day, hour, minute, second, and millisecond, with the file extension .md5.
7. A communication method for connecting a data conversion device to a USB interface of a testing instrument according to claim 5, characterized in that, The polling interval of the downlink check code file by the detection instrument shall not exceed 100 milliseconds.
8. A communication method for connecting a data conversion device to the USB interface of a testing instrument, used to realize communication between the testing instrument and a mobile terminal, applied to the data conversion device, characterized in that, Includes the following steps: A communication connection is established between the device and the mobile terminal via Bluetooth, and the testing instrument is mounted using USB mass storage. Acquire downlink data sent by the mobile terminal via Bluetooth; Write the downlink data as a downlink data file to the downlink file directory of the testing instrument, and write the MD5 code of the downlink data file to the corresponding downlink check code file in the downlink file directory; The uplink checksum file is periodically polled, and the integrity of the uplink data file is verified based on the MD5 code stored in the uplink checksum file. The uplink data file is created by the testing instrument based on the uplink data after completing the testing task and written to the uplink file dedicated directory of the testing instrument. At the same time, the testing instrument writes the MD5 code of the uplink data file into the corresponding uplink checksum file in the uplink file dedicated directory. When the integrity verification of the uplink data file passes, the data content of the uplink data file is sent to the mobile terminal via Bluetooth. At the same time, the parsed uplink data file is deleted.
9. A communication method for connecting a data conversion device to a USB interface of a testing instrument according to claim 8, characterized in that, The data files in the dedicated uplink and downlink file directories are named in the order of year, month, day, hour, minute, second, and millisecond, with the file extension .dat; the checksum files in the dedicated uplink and downlink file directories are named in the order of year, month, day, hour, minute, second, and millisecond, with the file extension .md5.
10. A communication method for connecting a data conversion device to a USB interface of a testing instrument according to claim 8, characterized in that, The polling interval for the uplink checksum file is no more than 100 milliseconds.
Citation Information
Patent Citations
Secure data parser method and system
CA2780816A1
Image checking instrument and image checking device
CN102540272A