CN110830329A - Method, apparatus, electronic device and medium for data detection - Google Patents

Method, apparatus, electronic device and medium for data detection Download PDF

Info

Publication number
CN110830329A
CN110830329A CN201911212135.3A CN201911212135A CN110830329A CN 110830329 A CN110830329 A CN 110830329A CN 201911212135 A CN201911212135 A CN 201911212135A CN 110830329 A CN110830329 A CN 110830329A
Authority
CN
China
Prior art keywords
data
module
communication
sending
communication line
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
CN201911212135.3A
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.)
HAIFENG NAVIGATION TECHNOLOGY Co Ltd
Original Assignee
HAIFENG NAVIGATION TECHNOLOGY 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 HAIFENG NAVIGATION TECHNOLOGY Co Ltd filed Critical HAIFENG NAVIGATION TECHNOLOGY Co Ltd
Priority to CN201911212135.3A priority Critical patent/CN110830329A/en
Publication of CN110830329A publication Critical patent/CN110830329A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present disclosure provides a method for data detection, which implements detection of communication data in a communication line by performing any one or more of receiving, acquiring, analyzing, translating, displaying, transmitting and forwarding operations on the communication data in the communication line. The invention also provides a device, electronic equipment and a computer readable medium for data detection, which are a comprehensive solution for data detection integrating information acquisition, analysis, simulation, detection, acquisition and forwarding for various communication modes, and realize the detection of the communication data in the communication lines of various commonly used different communication modes and intuitively display the communication data by performing any one or more operations of receiving, acquiring, analyzing, translating, displaying, sending and forwarding on the communication data in the communication lines.

Description

Method, apparatus, electronic device and medium for data detection
Technical Field
The present disclosure relates to the field of data detection technologies, and in particular, to a method, an apparatus, an electronic device, and a medium for detecting data of a communication line.
Background
At present, the data detection of the communication line generally adopts a mode of matching multiple devices and multiple software, different detection devices are adopted for different communication modes, and then the data received by the detection devices are compared with a message protocol to check whether the received data is correct or not in a manual comparison mode. In the process of detecting the data of the communication line, the data cannot be visually displayed, the workload is large, the analysis speed is low, and the problems in the data transmission cannot be quickly and effectively positioned.
Meanwhile, the stored message data needs to be reused and analyzed, so that the efficiency is low, and the requirements on the technical level of data acquisition and analysis personnel are high. Meanwhile, in the data acquisition process, the communication line must be in an open circuit state, and both receiving and sending can not be considered at the same time, so that the normal work of the system can not be ensured while data acquisition and analysis are carried out.
In addition, for some specific occasions, data needs to be customized and sent, message simulation cannot be performed quickly and effectively, and the simulation needs to be completed by matching with a specific simulator, so that the cost is high.
Disclosure of Invention
In view of the above, the present disclosure provides a method, an apparatus, an electronic device, and a medium for data detection, so as to implement detection of communication data in a communication line.
In one aspect of the present disclosure, a method for data detection is provided, which performs detection on communication data in a communication line by performing any one or more of receiving, acquiring, analyzing, translating, displaying, sending and forwarding operations on the communication data in the communication line.
According to the embodiment of the disclosure, the receiving operation of the communication data in the communication line is to receive externally input data by adopting a plurality of interfaces; the operation of sending the communication data in the communication line is to send the displayed data by adopting a plurality of interfaces; the plurality of interfaces comprise serial ports, network ports, CAN (controller area network) and LAN (local area network) interfaces, and the communication among the interfaces is independent and CAN work simultaneously.
According to the embodiment of the disclosure, when the communication data in the communication line is sent, sending UDP data or sending multicast data is carried out; or sending serial port data; or sending CAN bus data; or when the communication data in the communication line is sent, sending single data or simultaneously and sequentially sending a plurality of different data; or when the communication data in the communication line is sent, the data is sent periodically, the interval time of the periodic sending is set, and the preset messages are sent at regular intervals; or when the communication data in the communication line is sent, the data is sent periodically, the interval time and the sending quantity of the periodic sending are set, the selected messages are sent according to the set message quantity, and the preset messages are sent at regular intervals until the sending quantity reaches the set value, and the sending is automatically stopped.
According to the embodiment of the disclosure, the operation of acquiring the communication data in the communication line adopts two modes of automatic acquisition and manual acquisition, wherein the automatic acquisition is to set the starting time and the ending time of data acquisition, and the data is automatically acquired in the time period defined by the starting time and the ending time; the manual acquisition is to start acquiring data after receiving an acquisition instruction and end acquiring data after receiving an end instruction.
According to the embodiment of the present disclosure, after the operation of obtaining the communication data in the communication line, the method further includes: storing the acquired data, receiving and executing the operation instructions of adding, deleting, modifying and inquiring the acquired data by the user, so as to realize the management of the data.
According to the embodiment of the disclosure, the analyzing and translating operation of the communication data in the communication line is to analyze and translate the received or acquired data according to a pre-customized protocol to obtain the analyzing and translating result of the data.
According to the embodiment of the disclosure, the pre-customized protocol is used for setting a frame header, a host address, a slave address, a frame function, a data length, a sequence code, a data content, a check code or a custom content of a message, and comprises protocols of a serial port, a network port, a CAN and a LAN interface; and the pre-customized protocol is stored in a local database or a server or a cloud.
According to the embodiment of the disclosure, the operation of displaying the communication data in the communication line is to display the analysis and translation results of the data, wherein when the analysis and translation results of the data are displayed, the analysis and translation results are displayed in a form of a list; or sorting and screening the data by filtering different information, and then displaying, wherein the different information comprises the ID of the message and the field in the translated message; or the translated data and the metadata of the message are displayed at the same time, so that comparison display is convenient.
According to the embodiment of the present disclosure, the forwarding operation on the communication data in the communication line is a direct sending operation on the received or acquired data.
In another aspect of the present disclosure, an apparatus for data detection is provided, the apparatus includes a data receiving module, a data analyzing module, a data displaying module and a data sending module, which are connected in sequence, wherein:
the data receiving module is used for receiving externally input data by adopting a plurality of interfaces;
the data analysis module is used for analyzing, translating or forwarding the data input by the data receiving module;
the data display module is used for displaying the data analysis and translation results received from the data analysis module;
and the data sending module is used for sending the data processed by the data display module by adopting a plurality of interfaces.
According to the embodiment of the disclosure, the plurality of interfaces adopted by the data receiving module and the plurality of interfaces adopted by the data sending module respectively comprise a serial port, a network port, a CAN (controller area network) interface and a LAN (local area network) interface, and the communication between the interfaces is independent and CAN work simultaneously.
According to the embodiment of the disclosure, when analyzing and translating the data input by the data receiving module, the data analyzing module analyzes and translates the data according to a pre-customized protocol and transmits the analysis and translation results to the data display module; and the data analysis module directly transmits the data received from the data receiving module to the data display module when forwarding the data input by the data receiving module.
According to the embodiment of the disclosure, when the data display module displays data, the analysis and translation results are displayed in a list form; or sorting and screening the data by filtering different information, and then displaying, wherein the different information comprises the ID of the message and the field in the translated message; or the translated data and the metadata of the message are displayed at the same time, so that comparison display is convenient.
According to the embodiment of the disclosure, when sending data, the data sending module sends a single piece of data, or sends a plurality of pieces of different data in sequence at the same time; or, periodically sending the data, setting the interval time of periodic sending, and sending preset messages at regular intervals; or the preset message is sent according to the set sending time interval and the sending quantity.
According to the embodiment of the disclosure, the device also forwards the received data, when the data is forwarded, the data received by the data receiving module is processed by the data analysis module and the data display module and then directly sent to the data sending module to send the data, or the received data is directly transmitted to the data sending module to send the original data according to the setting of a user, so that the function of the line is not affected when the device is connected into the line, and the function of data detection is realized.
According to the embodiment of the disclosure, the device further comprises a protocol customizing module connected to the data analyzing module and used for customizing and saving the protocol according to the actual protocol content for the data analyzing module to call.
According to the embodiment of the disclosure, the protocol customization module is used for setting frame headers, host addresses, slave addresses, frame functions, data lengths, sequence codes, data contents, check codes or custom contents of messages, and protocols including serial ports, network ports, CAN and LAN interfaces; the protocol customized by the protocol customization module is stored in a local database, or stored in a server or a cloud.
According to the embodiment of the present disclosure, the apparatus further includes a data acquisition module, connected to the data analysis module, for acquiring and storing communication data in the communication line, wherein: the data acquisition module acquires communication data in a communication line by adopting two modes of automatic acquisition and manual acquisition, wherein the automatic acquisition is to set the starting time and the ending time of data acquisition and automatically acquire the data within a time period defined by the starting time and the ending time; the manual acquisition is to start to acquire the data after receiving an acquisition instruction and finish acquiring the data after receiving a finishing instruction; the data acquisition module acquires communication data in a communication line, stores the acquired data, and receives and executes operation instructions of adding, deleting, modifying and inquiring the acquired data by a user so as to realize data management.
Another aspect of the present disclosure provides an electronic device including: one or more processors; and a storage device for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the above-described method for data detection.
Another aspect of the present disclosure provides a computer-readable medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method for data detection described above.
It can be seen from the foregoing embodiments of the present disclosure that the method, apparatus, electronic device, and medium for data detection provided by the present disclosure are a comprehensive solution for data detection that integrates information acquisition, analysis, simulation, detection, acquisition, and forwarding for multiple communication modes, and implement detection of communication data in various commonly used communication lines of different communication modes and intuitively display the communication data by performing any one or more operations of receiving, acquiring, analyzing, translating, displaying, sending, and forwarding on the communication data in the communication line.
According to the method, the device, the electronic equipment and the medium for data detection, the problem of data reading, sending and detecting is solved in a one-stop mode through operations such as receiving, obtaining, analyzing, translating, displaying, sending and forwarding of communication data in a communication line, the problem that a communication link is disconnected when a traditional detection tool is detected and the field working condition cannot be simulated normally is solved, the problems that a message is obscure and difficult to understand after being received in a traditional mode and the problem is difficult to troubleshoot are solved, meanwhile, the communication data of different communication modes can be simulated, the function of data simulation sending is achieved, and the problem that the simulation data sending is difficult is solved.
The method, the device, the electronic equipment and the medium for detecting data provided by the disclosure can detect the received data and then forward the data by receiving, acquiring, analyzing, translating, displaying, sending, forwarding and the like the communication data in the communication line, so as to detect the communication data in the communication line. Meanwhile, according to the characteristics, the communication cable can be detected, and the integrity of the communication data cable is detected.
The method, the device, the electronic equipment and the medium for data detection solve the problems that multiple communication modes need multiple tools to be matched for collection, data are in an open circuit state in the collection process, messages cannot be visually displayed and analyzed according to protocols, the protocols can be conveniently customized, the messages in different communication modes can be sent according to the protocols, the data can be conveniently and quickly acquired, and the like, and data can be conveniently and quickly durably operated and stored.
Drawings
For a more complete understanding of the present disclosure and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which:
fig. 1 schematically shows a flow chart for a data detection method according to an embodiment of the present disclosure.
Fig. 2 schematically shows a block diagram of an apparatus for data detection according to an embodiment of the present disclosure.
Fig. 3 schematically shows a block diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described below with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Embodiments of the present disclosure provide a method, an apparatus, an electronic device, and a medium for data detection, where the method for data detection implements detection of communication data in a communication line by performing any one or more of receiving, acquiring, analyzing, translating, displaying, sending, and forwarding operations on the communication data in the communication line.
Fig. 1 schematically shows a flow chart for a data detection method according to an embodiment of the present disclosure. As shown in fig. 1, the method includes:
step S1: and performing receiving operation on communication data in the communication line.
The receiving operation of the communication data in the communication line is to adopt a plurality of interfaces to receive externally input data, wherein the plurality of interfaces comprise interfaces such as a serial port, a network port, a CAN and a LAN, and the communication between the interfaces is independent and CAN work simultaneously. The serial port can be RS232, RS422, RS485 and other interfaces. When receiving operation is carried out on communication data in a communication line, the adopted interface needs to be analyzed, and the interface which is adopted to receive the data is selected and confirmed; filtering the received data and selecting the data meeting the requirements; further, the received data may also be buffered.
Step S2: and carrying out acquisition operation on communication data in the communication line.
The communication data in the communication line is acquired by adopting two modes of automatic acquisition and manual acquisition, wherein the automatic acquisition is to set the starting time and the ending time of the data acquisition and automatically acquire the data within a time period defined by the starting time and the ending time; the manual acquisition is to start acquiring data after receiving an acquisition instruction and end acquiring data after receiving an end instruction.
After the operation of obtaining the communication data in the communication line, the method further includes: storing the acquired data, receiving and executing operation instructions of adding, deleting, modifying, inquiring and the like of the acquired data by a user so as to realize the management of the data.
Step S3: analysis and interpretation operations are performed on the communication data in the communication line.
The operation of analyzing and translating the communication data in the communication line is to analyze and translate the received or acquired data according to a pre-customized protocol to obtain the analysis and translation results of the data. The pre-customized protocol is used for setting a frame header, a host address, a slave address, a frame function, a data length, a sequence code, data content, a check code or custom content of a message, and comprises protocols of a serial port, a network port, a CAN (controller area network) interface and a LAN (local area network) interface; the serial port can be RS232, RS422, RS485 and other interfaces. And the pre-customized protocol is stored in a local database or a server or a cloud.
Step S4: and carrying out display operation on the communication data in the communication line.
The operation of displaying the communication data in the communication line is to display the analysis and translation results of the data, wherein the analysis and translation results are displayed in a list form when the analysis and translation results of the data are displayed; or sorting and screening the data by filtering different information, and then displaying, wherein the different information comprises the ID of the message and the field in the translated message; or the translated data and the metadata of the message are displayed at the same time, so that comparison display is convenient.
Step S5: and carrying out a sending operation on communication data in the communication line.
The operation of sending the communication data in the communication line is to send the displayed data by adopting a plurality of interfaces; the plurality of interfaces comprise serial ports, network ports, CAN (controller area network) and LAN (local area network) interfaces, and the communication among the interfaces is independent and CAN work simultaneously. The serial port can be RS232, RS422, RS485 and other interfaces.
When the communication data in the communication line is sent, sending UDP data or sending multicast data; or sending serial port data; or sending CAN bus data; or when the communication data in the communication line is sent, sending single data or simultaneously and sequentially sending a plurality of different data; or when the communication data in the communication line is sent, the data is sent periodically, the interval time of the periodic sending is set, and the preset messages are sent at regular intervals; or when the communication data in the communication line is sent, the data is sent periodically, the interval time and the sending quantity of the periodic sending are set, the selected messages are sent according to the set message quantity, and the preset messages are sent at regular intervals until the sending quantity reaches the set value, and the sending is automatically stopped.
In addition, the method for data detection provided by the embodiment of the disclosure can also perform a forwarding operation on communication data in a communication line, that is, directly perform a sending operation on received or acquired data.
In summary, the method for detecting data provided in the embodiments of the present disclosure realizes detection of communication data in various commonly used communication lines of different communication modes by performing any one or more of receiving, obtaining, analyzing, translating, displaying, sending, and forwarding operations on communication data in the communication line, and can detect a communication cable, thereby realizing inspection of integrity of the cable.
Fig. 2 schematically shows a block diagram of an apparatus for data detection according to an embodiment of the present disclosure. As shown in fig. 2, the device includes a data receiving module 1, a data analyzing module 4, a data displaying module 5 and a data sending module 6, which are connected in sequence, wherein: the data receiving module 1 is used for receiving externally input data by adopting a plurality of interfaces; the data analysis module 4 is used for analyzing, translating or forwarding the data input by the data receiving module 1; the data display module 5 is used for displaying the data analysis and translation results received from the data analysis module 4; the data sending module 6 is used for sending the data processed by the data display module 5 by adopting a plurality of interfaces.
According to the embodiment of the present disclosure, the plurality of interfaces adopted by the data receiving module 1 and the plurality of interfaces adopted by the data sending module 6 each include a serial port, a network port, a CAN, and a LAN interface, and the communication between the interfaces is independent and CAN work simultaneously. The serial port can be RS232, RS422, RS485 and other interfaces. The data receiving module 1 is used for analyzing the adopted interfaces and selecting and confirming which interface is adopted to receive data when a plurality of interfaces are adopted to receive externally input data; filtering the received data and selecting the data meeting the requirements; further, the received data may also be buffered. In the embodiment of the present disclosure, the data receiving module 1 uses characters to label the data input port and the data output port of each interface by detecting the serial port, the network port, the CAN interface, and the like in the device, so as to prevent reverse connection. The serial port comprises RS232, RS422 and RS485, the external communication line is connected to the detection platform through the serial port line, and the RS422 and the RS485 are connected through the wiring terminal. The net port is provided with an LED indicator light, and data can flash in the communication process. The CAN interface, the RS422 interface and the RS485 interface adopt the same design. Each interface can use characters and icons to obviously indicate the purpose of the interface on the interface, and wrong connection is prevented. After the data is received, the data receiving module 1 transmits the data to the data analyzing module 4 for processing. Meanwhile, more complex communication protocols, such as a communication protocol which requires multiple handshakes to communicate, can be configured by a user, and the user can automatically reply according to received data. Meanwhile, the continuous sending function is set, so that the continuous sending times of one message and the sending time interval of each message can be set.
According to the embodiment of the present disclosure, when analyzing and translating the data received by the data receiving module 1, the data analyzing module 4 analyzes and translates the data according to a pre-customized protocol, and transmits the analysis and translation results to the data displaying module 5. In the embodiment of the present disclosure, the data analysis module 4 may not only translate the received data item by item, but also translate multiple pieces of data at the same time, so that the message data acquired from other devices may be imported into the apparatus to analyze and translate the data. If the analysis is not needed, the data received from the data receiving module 1 is directly transmitted to the data display module 5, so that the data forwarding function is realized. When the data analysis module 4 forwards the data received by the data receiving module 1, the data analysis module directly transmits the data received from the data receiving module 1 to the data display module 5.
According to the embodiment of the present disclosure, when the data display module 5 displays data, the analysis and translation results may be displayed in a list form; or sorting and screening the data by filtering different information, and then displaying, wherein the different information comprises the ID of the message, the fields in the translated message and the like; or the translated data and the metadata of the message are displayed at the same time, so that comparison display is convenient.
In the embodiment of the disclosure, a user can receive and pause the message through the button, so that the data can be conveniently checked. Meanwhile, the user can set the maximum number of received data to reduce the problem of inconvenient viewing caused by excessive data. The user can store the current message, and the maximum number of stored messages is the maximum number of received data set by the user. Meanwhile, the stored data can be exported, so that the message can be conveniently analyzed again or through other equipment or systems. The user can clear all the data currently received and re-receive and display the data. Meanwhile, the user can select to display the translated data and the metadata of the message at the same time, and comparison is convenient. Meanwhile, the interface displays the number of the currently received messages, the receiving time of each piece of data and other auxiliary information, and provides reference for a user.
According to the embodiment of the present disclosure, when sending data, the data sending module 6 sends a single piece of data, or sends a plurality of different pieces of data sequentially and simultaneously; or, periodically sending the data, setting the interval time of periodic sending, and sending preset messages at regular intervals; or the preset message is sent according to the set sending time interval and the sending quantity. In the embodiment of the present disclosure, the data sending module also includes interfaces such as RS232, RS422, RS485, CAN, LAN, and the like. The interfaces are independent, so that the interfaces can work simultaneously. The LAN interface data can transmit not only UDP data but also multicast data. The system can send single data or send multiple different data simultaneously according to the need. Meanwhile, the method supports the periodic transmission of data, can set the interval time of the periodic transmission, and transmits messages preset by a user at regular intervals. While the number of pieces of data to be continuously transmitted can be set.
According to the embodiment of the disclosure, the device can also realize the forwarding of the received data, and when the data are forwarded, the data received by the data receiving module 1 are processed by the data analysis module 4 and the data display module 5, and then directly sent to the data sending module 6 for sending the data, so that the function of the line is not affected when the device is accessed into the line, and the function of data detection is realized.
According to the embodiment of the present disclosure, the apparatus further includes a protocol customizing module 2 connected to the data analyzing module 4, for customizing and saving the protocol according to the actual protocol content, for the data analyzing module 4 to call.
According to the embodiment of the present disclosure, the protocol customization module 2 is configured to set a frame header, a host address, a slave address, a frame function, a data length, a sequence code, a data content, a check code, or a custom content of a packet, and includes protocols of a serial port, a network port, a CAN, and a LAN interface; the protocol customized in advance by the protocol customization module 2 may be stored in a local database, or may be stored in a server or a cloud connected to the protocol customization module 2.
According to the embodiment of the present disclosure, the user can customize the protocol of the message by using the protocol customizing module 2, and customize the protocol according to the actual protocol content. The user can set the frame header, the host address, the slave address, the frame function, the data length, the sequence code, the data content, the check code or the self-defined content of the message, and the contents can be combined according to the actual message to correspond a certain content to certain bytes of the message. Meanwhile, a user can perform specific data configuration on each item of data and perform specific name on the data, for example, different frame header information is correspondingly transmitted to different communication systems, different equipment names are correspondingly transmitted according to the addresses of a master machine and a slave machine, and the function of a message is correspondingly realized according to the frame function. The check code can also be configured, different check modes are selected, the check modes comprise a plurality of common data check modes such as SUM, XOR, CRC8, CRC16 and CRC32, and the corresponding check code can be automatically generated according to the selected check mode. Meanwhile, the verification can be independently used as a tool, a user can input message contents, then a verification mode is selected, and a corresponding verification code is automatically generated, so that the use is convenient. The customized protocol can be stored, and meanwhile, the server can be connected to download the customized protocol on other equipment for use.
In the embodiment of the disclosure, the protocol customization includes protocols of interfaces such as a serial port, a network port and a CAN, the customized protocol CAN be stored in a local database, and a user CAN upload the protocol to a server for storage, so that the customized protocol is convenient to use after equipment is replaced and download by other users. In addition, the user can upload the protocol to own private space and also can upload the protocol to public space, the protocol content of the private control can be downloaded and used only by the user, and all the content owners in the public space can download and use the protocol.
In the embodiment of the present disclosure, the data analysis module 4 determines whether to analyze the data according to the selection of the user, if the data needs to be analyzed, one of the protocols customized in advance in the protocol customization module 2 is selected, the data analysis module 4 analyzes and translates the data according to the protocol, and after the translation is completed, the result is handed to the data display module 5 to display the data. The data analysis module 4 can not only perform real-time translation according to the received single data, but also perform translation on existing multiple pieces of data at the same time, so that message data acquired by other equipment can be imported into the system for data analysis and translation, or historical data can be translated and viewed again. If no analysis is required, the data analysis module 4 passes the data received from the data receiving module 1 directly to the data presentation module 5. Meanwhile, the user can filter and receive the data, only receive the corresponding frame header or correct data after verification, or receive all the data, so that the error content in the data transmission message can be conveniently checked.
According to the embodiment of the present disclosure, the apparatus further includes a data obtaining module 3, connected to the data analyzing module 4, for obtaining and storing communication data in the communication line, wherein: the data acquisition module 3 acquires communication data in a communication line by adopting two modes of automatic acquisition and manual acquisition, wherein the automatic acquisition is to set the starting time and the ending time of data acquisition and automatically acquire the data within a time period defined by the starting time and the ending time; the manual acquisition is to start to acquire the data after receiving an acquisition instruction and finish acquiring the data after receiving a finishing instruction; the data acquisition module 3 acquires communication data in a communication line, stores the acquired data, and receives and executes operation instructions of adding, deleting, modifying and querying the acquired data by a user to realize data management.
The device for data detection provided by the embodiment of the disclosure receives data through the data receiving module 1, analyzes and translates the data through the protocol customized by the protocol customizing module 2 for the data analyzing module 4 which needs to analyze, acquires the data through the data acquiring module 3 if the data needs to be acquired, then sends the data to the data displaying module 5 for displaying the data, and sends the data through the data sending module 6 if the data needs to be forwarded, or sends the data through the data sending module as a convenient and fast simulation data source of the data simulation platform alone.
In the embodiment of the disclosure, a user may use the apparatus as a data source to perform data simulation, and may select a function of transmitting data through a certain interface. Meanwhile, the system records the sending time, the sending content, the number of sent pieces and other auxiliary information of each piece of data, and displays the auxiliary information in the data display module 5. The user can select the data forwarding function, that is, after the data received by the data receiving module 1 is processed by the data analyzing module 4 and the data displaying module 5, the metadata is sent to the data sending module 6 to send the data, so that the device can be conveniently accessed into the line without affecting the function of the line, and the function of data detection is realized.
In the embodiment of the present disclosure, the device for data detection provided in the embodiment of the present disclosure may set an interface or all interfaces that need to be acquired, store the acquired data, and manage the acquired data by a user, including adding, modifying, deleting, checking, searching, and the like, conveniently.
Meanwhile, according to the design characteristics of the device for detecting data provided by the embodiment of the disclosure, the device can be used for detecting the connection and disconnection or integrity of a line, for example, the connection and disconnection function of a network cable is detected, the network cable can be connected to a receiving port and a sending port of equipment, and then data is transmitted to see whether correct data can be received, so that whether the line is intact or not is judged. The method is also suitable for detecting the connecting wires of serial ports, CAN and the like. Meanwhile, the system provides various small tools for use in working conveniently, including calculation of check values according to different check modes. Meanwhile, the system provides a single data transmission port, so that the received data can be sent to other equipment through the interface, and the use of the data by the other equipment is facilitated.
It should be understood that the data receiving module 1, the protocol customizing module 2, the data obtaining module 3, the data analyzing module 4, the data presenting module 5 and the data sending module 6 may be combined and implemented in one module, or any one of them may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module.
According to an embodiment of the present invention, at least one of the data receiving module 1, the protocol customizing module 2, the data acquiring module 3, the data analyzing module 4, the data presenting module 5 and the data transmitting module 6 may be at least partially implemented as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented in a suitable combination of three implementations of software, hardware and firmware. Alternatively, at least one of the data receiving module 1, the protocol customizing module 2, the data acquiring module 3, the data analyzing module 4, the data presenting module 5, and the data transmitting module 6 may be at least partially implemented as a computer program module, which may perform the functions of the respective modules when the program is executed by a computer.
The invention provides an electronic device, as shown in fig. 3, fig. 3 schematically shows a block diagram of an electronic device according to an embodiment of the disclosure. The electronic device 300 includes a processor 310 and a memory 320. The electronic device 300 may perform a method according to an embodiment of the present disclosure shown in fig. 1.
In particular, processor 310 may include, for example, a general purpose microprocessor, an instruction set processor and/or related chip set and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), and/or the like. The processor 310 may also include on-board memory for caching purposes. The processor 610 may be a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
The memory 320, for example, can be any medium that can contain, store, communicate, propagate, or transport instructions. For example, a readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or propagation medium. Specific examples of the readable storage medium include: magnetic storage devices, such as magnetic tape or Hard Disk Drives (HDDs); optical storage devices, such as compact disks (CD-ROMs); a memory, such as a Random Access Memory (RAM) or a flash memory; and/or wired/wireless communication links.
The memory 320 may comprise a computer program 321, which computer program 321 may comprise code/computer executable instructions that, when executed by the processor 310, cause the processor 310 to perform a method according to an embodiment of the disclosure or any variant thereof.
The computer program 321 may be configured with, for example, computer program code comprising computer program modules. For example, in an example embodiment, code in computer program 321 may include at least one program module, including for example, module 321A, module 321B, … …. It should be noted that the division and number of the modules are not fixed, and those skilled in the art may use suitable program modules or program module combinations according to actual situations, so that the processor 310 may execute the method according to the embodiment of the present disclosure or any variation thereof when the program modules are executed by the processor 310.
The present disclosure also provides a computer-readable medium, which may be embodied in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer readable medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, a computer readable medium may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, optical fiber cable, radio frequency signals, etc., or any suitable combination of the foregoing.
While the present disclosure has been shown and described with reference to certain exemplary embodiments thereof, various changes in form and details may be made therein without departing from the spirit and scope of the present disclosure as defined by the appended claims and their equivalents. Accordingly, the scope of the present disclosure should not be limited to the above-described embodiments, but should be defined not only by the appended claims, but also by equivalents thereof.

Claims (20)

1. A method for detecting data is used for detecting communication data in a communication line by performing any one or more of receiving, obtaining, analyzing, translating, displaying, sending and forwarding operations on the communication data in the communication line.
2. The method for data detection of claim 1, wherein,
the receiving operation of the communication data in the communication line is to adopt a plurality of interfaces to receive externally input data;
the operation of sending the communication data in the communication line is to send the displayed data by adopting a plurality of interfaces;
the plurality of interfaces comprise serial ports, network ports, CAN (controller area network) and LAN (local area network) interfaces, and the communication among the interfaces is independent and CAN work simultaneously.
3. The method for data detection as recited in claim 2,
when the communication data in the communication line is sent, sending UDP data or sending multicast data; or sending serial port data; or sending CAN bus data; or
When the communication data in the communication line is sent, sending single data or simultaneously and sequentially sending a plurality of different data; or
When sending operation is carried out on communication data in a communication line, the data are sent periodically, the interval time of periodic sending is set, and preset messages are sent at regular intervals; or
When the communication data in the communication line is sent, the data is sent periodically, the interval time and the sending quantity of the periodic sending are set, the selected messages are sent according to the set message quantity, and the preset messages are sent at regular intervals until the sending quantity reaches the set value, so that the sending is automatically stopped.
4. The method for detecting data according to claim 1, wherein the operation of acquiring the communication data in the communication line adopts two modes of automatic acquisition and manual acquisition, wherein the automatic acquisition is to set a starting time and an ending time of data acquisition, and the data is automatically acquired within a time period defined by the starting time and the ending time; the manual acquisition is to start acquiring data after receiving an acquisition instruction and end acquiring data after receiving an end instruction.
5. The method for data detection as claimed in claim 4, wherein after the operation of obtaining the communication data in the communication line, further comprising: storing the acquired data, receiving and executing the operation instructions of adding, deleting, modifying and inquiring the acquired data by the user, so as to realize the management of the data.
6. The method for data detection according to claim 1, wherein the analyzing and translating operation of the communication data in the communication line is to analyze and translate the received or obtained data according to a pre-customized protocol to obtain the analyzing and translating result of the data.
7. The method for data detection according to claim 6, wherein the pre-customized protocol is used to set a header, a host address, a slave address, a frame function, a data length, a sequence code, a data content, a check code or a custom content of a message, and comprises protocols of a serial port, a network port, a CAN and a LAN interface; and the pre-customized protocol is stored in a local database or a server or a cloud.
8. The method for detecting data according to claim 1, wherein the presenting operation of the communication data in the communication line is presenting analysis and translation results of the data, wherein the presentation of the analysis and translation results of the data is presented in a form of a list; or sorting and screening the data by filtering different information, and then displaying, wherein the different information comprises the ID of the message and the field in the translated message; or the translated data and the metadata of the message are displayed at the same time, so that comparison display is convenient.
9. The method for data detection according to claim 1, wherein the forwarding operation on the communication data in the communication line is a direct sending operation on the received or acquired data.
10. The utility model provides a device for data detection, the device is including the data receiving module, data analysis module, data display module and the data transmission module that connect gradually, wherein:
the data receiving module is used for receiving externally input data by adopting a plurality of interfaces;
the data analysis module is used for analyzing, translating or forwarding the data input by the data receiving module;
the data display module is used for displaying the data analysis and translation results received from the data analysis module;
and the data sending module is used for sending the data processed by the data display module by adopting a plurality of interfaces.
11. The device for detecting data according to claim 10, wherein the plurality of interfaces adopted by the data receiving module and the plurality of interfaces adopted by the data sending module each include a serial port, a network port, a CAN, and a LAN interface, and communication between the interfaces is independent and CAN be performed simultaneously.
12. The apparatus for data detection of claim 10,
when the data analysis module analyzes and translates the data input by the data receiving module, the data analysis module analyzes and translates the data according to a pre-customized protocol and transmits the analysis and translation results to the data display module;
and the data analysis module directly transmits the data received from the data receiving module to the data display module when forwarding the data received by the data receiving module.
13. The apparatus for data detection as recited in claim 10, wherein the data presentation module, when presenting data,
displaying the analysis and translation results in a list form; or
Sorting and screening data by filtering different information, and then displaying, wherein the different information comprises the ID of the message and the field in the translated message; or
And meanwhile, the translated data and the metadata of the message are displayed, so that comparison display is convenient.
14. The apparatus for data detection as defined in claim 10, wherein the data transmission module, when transmitting data,
sending single data or simultaneously and sequentially sending a plurality of different data; alternatively, the first and second electrodes may be,
the data is sent periodically, the interval time of the periodic sending is set, and the preset messages are sent at regular intervals; or the preset message is sent according to the set sending time interval and the sending quantity.
15. The device for detecting data according to claim 10, wherein the device further forwards received data, and when the device forwards data, the data received by the data receiving module is processed by the data analyzing module and the data displaying module and then directly handed to the data sending module to send the data, or the received data is directly transmitted to the data sending module according to the setting of a user to send original data, so that the function of the line is not affected when the device is connected to the line, and the function of detecting data is realized.
16. The apparatus for data detection as claimed in claim 10, wherein the apparatus further comprises a protocol customizing module connected to the data analyzing module for customizing and saving the protocol according to the actual protocol content for the data analyzing module to call.
17. The apparatus for data detection according to claim 16, wherein the protocol customization module is configured to set a header, a host address, a slave address, a frame function, a data length, a sequence code, a data content, a check code, or a custom content of a message, and includes protocols of a serial port, a network port, a CAN, and a LAN interface; the protocol customized by the protocol customization module is stored in a local database, or stored in a server or a cloud.
18. The apparatus for data detection according to claim 10, wherein the apparatus further comprises a data acquisition module connected to the data analysis module for acquiring and storing communication data in the communication line, wherein:
the data acquisition module acquires communication data in a communication line by adopting two modes of automatic acquisition and manual acquisition, wherein the automatic acquisition is to set the starting time and the ending time of data acquisition and automatically acquire the data within a time period defined by the starting time and the ending time; the manual acquisition is to start to acquire the data after receiving an acquisition instruction and finish acquiring the data after receiving a finishing instruction;
the data acquisition module acquires communication data in a communication line, stores the acquired data, and receives and executes operation instructions of adding, deleting, modifying and inquiring the acquired data by a user so as to realize data management.
19. An electronic device, comprising:
one or more processors; and
a storage device for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method for data detection of any of claims 1-9.
20. A computer readable medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method for data detection of any one of claims 1 to 9.
CN201911212135.3A 2019-11-28 2019-11-28 Method, apparatus, electronic device and medium for data detection Pending CN110830329A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911212135.3A CN110830329A (en) 2019-11-28 2019-11-28 Method, apparatus, electronic device and medium for data detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911212135.3A CN110830329A (en) 2019-11-28 2019-11-28 Method, apparatus, electronic device and medium for data detection

Publications (1)

Publication Number Publication Date
CN110830329A true CN110830329A (en) 2020-02-21

Family

ID=69542083

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911212135.3A Pending CN110830329A (en) 2019-11-28 2019-11-28 Method, apparatus, electronic device and medium for data detection

Country Status (1)

Country Link
CN (1) CN110830329A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113985854A (en) * 2021-11-02 2022-01-28 苏州挚途科技有限公司 Data processing method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099828A (en) * 2015-08-25 2015-11-25 南京理工大学 High performance network tester and the testing method thereof
CN106685815A (en) * 2017-01-04 2017-05-17 上海建坤信息技术有限责任公司 Multi - protocol hardware acquisition gateway system
CN107395448A (en) * 2017-06-01 2017-11-24 国网福建省电力有限公司 A kind of 2M communication checks method and detection device
CN109672565A (en) * 2018-12-29 2019-04-23 北京奇安信科技有限公司 Data stream monitoring method, device, equipment and medium
CN211791554U (en) * 2019-11-28 2020-10-27 海丰通航科技有限公司 Apparatus for data detection

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099828A (en) * 2015-08-25 2015-11-25 南京理工大学 High performance network tester and the testing method thereof
CN106685815A (en) * 2017-01-04 2017-05-17 上海建坤信息技术有限责任公司 Multi - protocol hardware acquisition gateway system
CN107395448A (en) * 2017-06-01 2017-11-24 国网福建省电力有限公司 A kind of 2M communication checks method and detection device
CN109672565A (en) * 2018-12-29 2019-04-23 北京奇安信科技有限公司 Data stream monitoring method, device, equipment and medium
CN211791554U (en) * 2019-11-28 2020-10-27 海丰通航科技有限公司 Apparatus for data detection

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113985854A (en) * 2021-11-02 2022-01-28 苏州挚途科技有限公司 Data processing method and device and electronic equipment
CN113985854B (en) * 2021-11-02 2024-05-28 苏州挚途科技有限公司 Data processing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN109388530B (en) Blade server-oriented automatic test platform and test method
CN110635938B (en) Monitoring method, system, equipment and medium
CN109857452B (en) Configuration method and device of rocket test launch control system based on XML
CN109873867B (en) Express cabinet information transmission method, device and system, express cabinet and storage medium
CN110321154A (en) A kind of interface message methods of exhibiting, device and the electronic equipment of micro services
CN105809942A (en) Data processing method and device for electricity information collection system
CN103441861A (en) Method and device for generating data records
US11740997B2 (en) Method and apparatus for debugging a device
CN106850316B (en) Optical fiber terminating graphical management method and system
CN113760730A (en) Automatic testing method and device
CN110830329A (en) Method, apparatus, electronic device and medium for data detection
CN114780315A (en) Hardware simulation test method and device
CN211791554U (en) Apparatus for data detection
CN107430391A (en) Management system
CN110489326B (en) IDS-based HTTPAPI debugging method device, medium and equipment
CN109743225B (en) Data testing method and device, storage medium and computer equipment
CN112579406A (en) Log call chain generation method and device
CN105227407A (en) A kind of protocol debugging method, Apparatus and system
CN110856208B (en) Network type resource environment data acquisition communication platform
CN116974795A (en) Service path generation and service data verification method and device and electronic equipment
CN114296696A (en) Business function operation method and device, storage medium and electronic equipment
CN102455986A (en) Command transmission mechanism
US8676941B2 (en) Using wireless technology to direct complex wiring configurations
CN109271310B (en) Development testing method and device for network function of mobile application program
CN110244638A (en) Data monitoring device and method

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: 20200221