CN112804085A - Backup network detection method, device and equipment for master-slave structure - Google Patents

Backup network detection method, device and equipment for master-slave structure Download PDF

Info

Publication number
CN112804085A
CN112804085A CN202011600623.4A CN202011600623A CN112804085A CN 112804085 A CN112804085 A CN 112804085A CN 202011600623 A CN202011600623 A CN 202011600623A CN 112804085 A CN112804085 A CN 112804085A
Authority
CN
China
Prior art keywords
frame
information
message
message data
standby network
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.)
Granted
Application number
CN202011600623.4A
Other languages
Chinese (zh)
Other versions
CN112804085B (en
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.)
Beijing Hollysys Co Ltd
Hangzhou Hollysys Automation Co Ltd
Original Assignee
Beijing Hollysys Co Ltd
Hangzhou Hollysys Automation 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 Beijing Hollysys Co Ltd, Hangzhou Hollysys Automation Co Ltd filed Critical Beijing Hollysys Co Ltd
Priority to CN202011600623.4A priority Critical patent/CN112804085B/en
Publication of CN112804085A publication Critical patent/CN112804085A/en
Application granted granted Critical
Publication of CN112804085B publication Critical patent/CN112804085B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a backup network detection method of a master-slave structure, which obtains message data from a buffer area of a backup network; traversing the message data according to preset frame format information, and judging whether the message data comprises frame message information; when the message data comprises the frame message information, determining that the standby network is normal; and when the message data does not comprise the frame message information, determining that the standby network has a fault. The invention determines whether the standby network has the missed data by detecting whether the standby network comprises complete one-frame message information or not, realizes the automatic inspection of the state of the standby network, greatly reduces the labor cost and improves the production safety compared with the prior art. The invention also provides a backup network detection device, equipment and a computer readable storage medium with the master-slave structure.

Description

Backup network detection method, device and equipment for master-slave structure
Technical Field
The invention relates to the field of industrial automation, in particular to a backup network detection method, a backup network detection device, backup network detection equipment and a computer-readable storage medium for a master-slave structure.
Background
In the field of industrial automation, data communication among devices is particularly important, and in the prior art, information communication among the devices in a system is generally realized by adopting a serial bus mode, the safety transmission modes of the serial bus are many, redundant transmission is one mode, namely, a main working network and a standby network are arranged, bus protocol message data sent by a main control unit are received at the same time, only the main working network can process the received data and send the processed data to other devices during normal working, and when the main working network fails, the main working network can be seamlessly switched to the standby network to continue data processing and transmission.
Naturally, how to diagnose the state of the redundant dual-network of the serial bus quickly, reliably and undisturbed and to perform safe network switching is a popular technical point in the industry, but at present, no mature automatic detection equipment for the working state of the standby network exists, because the standby network does not directly participate in information processing and transmission in the system when the system works normally, whether the standby network works normally can be detected only by manual spot check and other modes, the method cannot find the fault of the standby network in time, possibly causes the fault of a main working network in actual work, and finds the standby network unusable after the standby network is switched to, thereby causing the potential safety hazard of production.
Therefore, how to automatically complete the inspection of the working state of the standby network is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a backup network detection method, a backup network detection device, backup network detection equipment and a computer readable storage medium with a master-slave structure, and aims to solve the problem that the prior art lacks a method for detecting the working state of an automatic backup network and is easy to cause potential safety hazards in production.
In order to solve the above technical problem, the present invention provides a backup network detection method for a master-slave structure, including:
acquiring message data from a buffer area of a standby network;
traversing the message data according to preset frame format information, and judging whether the message data comprises frame message information;
when the message data comprises the frame message information, determining that the standby network is normal; and when the message data does not comprise the frame message information, determining that the standby network has a fault.
Optionally, in the method for detecting a standby network of a master-slave structure, the traversing the packet data according to preset frame format information, and determining whether the packet data includes frame packet information includes:
traversing the message data according to the frame format information, and judging whether the message data comprises an initial byte;
when the initial byte exists in the message data, determining the byte in the frame to be checked according to the initial byte;
judging whether the format information of the frame bytes to be checked conforms to the frame format information;
and when the format information of the bytes in the frame to be checked accords with the frame format information, determining that the message data comprises the frame message information.
Optionally, in the method for detecting a standby network with a master-slave structure, when the starting byte does not exist in the packet data, the method includes:
determining that the frame message information is not included in the message data.
Optionally, in the backup network detecting method with a master-slave structure, when the format information of the frame to be checked does not conform to the frame format information, the method includes:
determining that the frame message information is not included in the message data.
Optionally, in the method for detecting a standby network of a master-slave structure, when the packet data includes the frame packet information, determining that the standby network is normal includes:
when the message data comprises the frame message information, judging whether the frame message information is legal information or not according to the frame message information and preset source address information;
and when the frame message information is the legal information, determining that the standby network is normal.
Optionally, in the method for detecting a standby network of a master-slave structure, when the packet data includes the frame packet information, determining that the standby network is normal includes:
determining a frame check byte according to the frame message information;
judging whether the frame message information is available information according to the frame check byte;
and when the frame message information is the available information, determining that the standby network is normal.
Optionally, in the method for detecting a standby network with a master-slave structure, the obtaining of the message data from the buffer of the standby network includes:
obtaining a first amount of message data from a buffer area of a standby network;
correspondingly, traversing the message data according to preset frame format information, and judging whether the message data comprises frame message information or not comprises:
according to preset frame format information, respectively traversing the first amount of message data to obtain the amount information of the message data including frame message information;
judging whether the quantity information exceeds a first threshold value;
correspondingly, when the message data comprises the frame message information, determining that the standby network is normal; when the message data does not include the frame message information, determining that the standby network failure includes:
when the quantity information exceeds a first threshold value, determining that the standby network is normal; determining that the backup network is faulty when the quantity information does not exceed a first threshold.
A backup network detection apparatus of a master-slave structure, comprising:
the acquisition module is used for acquiring message data from a buffer area of a standby network;
the frame searching module is used for traversing the message data according to preset frame format information and judging whether the message data comprises frame message information or not;
a state determining module, configured to determine that the standby network is normal when the packet data includes the frame packet information; and when the message data does not comprise the frame message information, determining that the standby network has a fault.
A backup network detection device of a master-slave architecture, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the backup network detection method of the master-slave architecture as described in any one of the above when executing the computer program.
A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the backup network detection method of a master-slave architecture as claimed in any one of the above.
The invention provides a backup network detection method of a master-slave structure, which obtains message data from a buffer area of a backup network; traversing the message data according to preset frame format information, and judging whether the message data comprises frame message information; when the message data comprises the frame message information, determining that the standby network is normal; and when the message data does not comprise the frame message information, determining that the standby network has a fault.
When the standby network works normally, the standby network can synchronously receive message data sent by the master control, so that whether the standby network has missed data or not is determined by detecting whether the standby network comprises complete frame message information or not (namely the frame message information), if the buffer area of the standby network has at least one frame of complete message data (the minimum value of the complete frame message data can be freely set according to the detection frequency), the standby network does not have the missed data, if the main working network is abnormal at the moment, the standby network can realize seamless take-over, namely the standby network works normally, and further the automatic inspection of the state of the standby network is realized. The invention also provides a backup network detection device, equipment and a computer readable storage medium with the master-slave structure.
Drawings
In order to more clearly illustrate the embodiments or technical solutions of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a backup network detection method of a master-slave structure according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of another embodiment of a backup network detection method of a master-slave structure according to the present invention;
fig. 3 is a schematic flow chart of a backup network detection method of a master-slave structure according to another embodiment of the present invention;
fig. 4 is a schematic structural diagram of a backup network detection apparatus with a master-slave structure according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The core of the present invention is to provide a backup network detection method of a master-slave structure, a flow diagram of a specific embodiment of which is shown in fig. 1, which is called a first specific embodiment, and includes:
s101: and acquiring message data from a buffer area of the standby network.
S102: traversing the message data according to preset frame format information, and judging whether the message data comprises frame message information.
The frame message information in this step refers to the complete frame message information.
S103: when the message data comprises the frame message information, determining that the standby network is normal; and when the message data does not comprise the frame message information, determining that the standby network has a fault.
Furthermore, the number of complete frame message information can be set to further determine whether the standby network is normal, and if one frame of complete frame message information exists in the message data, it is determined that the standby network is normal, or certainly, the standby network can be two or three frames, and corresponding changes can be made according to actual requirements.
As a preferred embodiment, when the message data includes the frame message information, determining whether the frame message information is legal information according to the frame message information and preset source address information;
and when the frame message information is the legal information, determining that the standby network is normal.
And a step of legally judging by adding a checking source address is carried out, so that the source of the message information is determined to be a compliant source and is not unknown third-party information, and the safety and reliability of the system are further improved.
In addition, when the packet data includes the frame packet information, determining that the standby network is normal includes:
s01: and determining a frame check byte according to the frame message information.
S02: and judging whether the frame message information is available information or not according to the frame check byte.
S03: and when the frame message information is the available information, determining that the standby network is normal.
And finding out frame check bytes in the frame message information, judging whether the frame check bytes are correct or not through calculation, if the frame check bytes are incorrect, abandoning the corresponding frame message information, and continuously searching other frame message information or determining the standby network fault.
The invention provides a backup network detection method of a master-slave structure, which obtains message data from a buffer area of a backup network; traversing the message data according to preset frame format information, and judging whether the message data comprises frame message information; when the message data comprises the frame message information, determining that the standby network is normal; and when the message data does not comprise the frame message information, determining that the standby network has a fault. When the standby network works normally, the standby network can synchronously receive message data sent by the master control, so that whether the standby network has missed data or not is determined by detecting whether the standby network comprises complete frame message information or not (namely the frame message information), if the buffer area of the standby network has at least one frame of complete message data (the minimum value of the complete frame message data can be freely set according to the detection frequency), the standby network does not have the missed data, if the main working network is abnormal at the moment, the standby network can realize seamless take-over, namely the standby network works normally, and further the automatic inspection of the state of the standby network is realized.
On the basis of the first specific embodiment, the step of determining whether the message data includes frame message information is further limited, and a second specific embodiment is obtained, where a flow diagram is shown in fig. 2, and includes:
s201: and acquiring message data from a buffer area of the standby network.
S202: and traversing the message data according to the frame format information, and judging whether the message data comprises an initial byte.
Of course, a plurality of kinds of the start byte may be set, such as SD2 byte or SD1 byte in profibus-DP protocol.
S203: and when the initial byte exists in the message data, determining the intra-frame byte to be checked according to the initial byte.
On the other hand, when the starting byte does not exist in the message data, it is determined that the frame message information is not included in the message data.
S204: and judging whether the format information of the bytes in the frame to be checked conforms to the frame format information.
S205: and when the format information of the bytes in the frame to be checked accords with the frame format information, determining that the message data comprises the frame message information.
On the other hand, when the format information of the intra-frame bytes to be searched does not accord with the frame format information, determining that the message data does not include the frame message information, or continuously searching other frame message data in the message data, and repeating the processes of searching the initial bytes, determining the intra-frame bytes to be searched and checking whether the intra-frame bytes to be searched accord with the frame format information until the message data is searched.
S206: when the message data comprises the frame message information, determining that the standby network is normal; and when the message data does not comprise the frame message information, determining that the standby network has a fault.
The specific implementation manner provides a specific implementation method for judging whether the message information includes the frame message information, wherein whether the message information includes the starting byte is judged firstly, if so, the next judgment is carried out, and if the starting byte is not found even after the message data is traversed, the following steps are not needed to be measured, the standby network fault can be directly judged, so that the calculation amount of the system is greatly reduced, and the detection efficiency is improved.
Taking a network with a bus protocol of Profibus-DP as an example, a specific process for diagnosing the working state of the standby network is illustrated below, which includes:
1) setting a buff pointer to point to the initial address of the buffer area;
2) if the buff pointer is still in the size of the buffer area, judging whether the current byte is SD2 byte (0x68), if not, jumping to 8); if the buff pointer is not in the size of the buffer area, jumping to the step 10;
3) judging whether two length byte (LE and LEr) values follow the SD2 byte to be equal or not, then following an SD2 byte, if not, adding 1 to a buff pointer, and jumping to 9) and continuing to find out the next byte;
4) judging whether the source address SA is 1 or 0, if so, determining that the source address SA is a packet sent by the master control; if not, the packet sent to the slave station by the master station is not a legal message, the step 2) is skipped to by adding 1 to the buff pointer, and the packet is continuously found backwards;
5) finding out the byte at the end of the frame according to the frame format, judging whether the byte is the correct ED byte (0x16), if not, determining that the byte is not a legal message, and jumping to step 2) to continue finding backwards;
6) finding a frame check byte FC according to a frame format, judging whether the frame check byte FC is correct or not through calculation, and if the frame check byte FC is incorrect, jumping to the step 2) and continuing to find the frame check byte FC;
7) setting the state of the backup network to be normal; if the working network is the B network, setting the A network to be normal, and if the working network is the A network, setting the B network to be normal;
8) judging whether the data is SD1 bytes (0x10), if so, judging according to the SD1 message judgment standard (similar to the SD2 message mode), otherwise, jumping to 9) and executing;
9) adding 1 to the buff pointer, jumping to the step 2), and continuing to find backwards;
10) if the packet sent by the master control is not found in the buffer area, the state of the standby network is judged to be a fault; if the working network is the B network, setting the A network to be normal, and if the working network is the A network, setting the B network to be normal.
On the basis of the first specific embodiment, a method for considering multiple pieces of message data together is further provided, a flow chart of which is shown in fig. 3, and a contract period is a third specific embodiment, including:
s301: a first amount of message data is obtained from a buffer of a standby network.
The first number can be selected according to actual requirements, but is necessarily an integer greater than one.
S302: and traversing the first amount of message data respectively according to preset frame format information to obtain the amount information of the message data comprising the frame message information.
S303: and judging whether the quantity information exceeds a first threshold value.
S304: when the quantity information exceeds a first threshold value, determining that the standby network is normal; determining that the backup network is faulty when the quantity information does not exceed a first threshold.
For example, if the first number is 10 and the first threshold is 5, if only 4 pieces of message data in 10 pieces of message data include complete frame message data, the standby network may be determined to have a fault, and if more than 5 pieces of message data include complete frame message data, the standby network may be determined to be normal.
In the embodiment, the detection range is increased by the method for collecting a plurality of copies of the message data, so that the judgment accuracy is improved, and the problem that the message data is difficult to detect when the standby network is in an occasional failure state is solved.
In the following, the standby network detection device of the master-slave structure provided in the embodiment of the present invention is introduced, and the standby network detection device of the master-slave structure described below and the standby network detection method of the master-slave structure described above may be referred to correspondingly.
Fig. 4 is a block diagram of a standby network detection device with a master-slave structure according to an embodiment of the present invention, which is referred to as a fourth specific implementation, where the standby network detection device with the master-slave structure according to fig. 4 may include:
the acquisition module is used for acquiring message data from a buffer area of a standby network;
the frame searching module is used for traversing the message data according to preset frame format information and judging whether the message data comprises frame message information or not;
a state determining module, configured to determine that the standby network is normal when the packet data includes the frame packet information; and when the message data does not comprise the frame message information, determining that the standby network has a fault.
As a preferred embodiment, the frame searching module includes:
the starting selection unit is used for traversing the message data according to the frame format information and judging whether the message data comprises a starting byte or not;
a unit for determining to-be-checked, configured to determine, when the starting byte exists in the packet data, an intra-frame byte to be checked according to the starting byte;
the format examining unit is used for judging whether the format information of the bytes in the frame to be examined conforms to the frame format information;
and the frame determining unit is used for determining that the message data comprises the frame message information when the format information of the bytes in the frame to be checked accords with the frame format information.
As a preferred embodiment, the frame searching module includes:
a zero frame unit, configured to determine that the message data does not include the frame message information when the starting byte does not exist in the message data.
As a preferred embodiment, the frame searching module includes:
and the format error unit is used for determining that the message data does not comprise the frame message information when the format information of the bytes in the frame to be checked does not conform to the frame format information.
As a preferred embodiment, the state determination module includes:
a rule determining unit, configured to, when the message data includes the frame message information, determine whether the frame message information is legal information according to the frame message information and preset source address information;
and the legal unit is used for determining that the standby network is normal when the frame message information is the legal information.
As a preferred embodiment, the state determination module includes:
a check byte unit, configured to determine a frame check byte according to the frame message information;
an available judging unit, configured to judge whether the frame message information is available information according to the frame check byte;
and a normal determining unit, configured to determine that the standby network is normal when the frame message information is the available information.
As a preferred embodiment, the obtaining module includes:
a plurality of obtaining units, configured to obtain a first amount of packet data from a buffer of a standby network;
accordingly, the frame searching module comprises:
a frame-containing determining unit, configured to traverse the first amount of the packet data respectively according to preset frame format information, to obtain amount information of packet data including frame packet information;
a threshold judgment unit configured to judge whether the quantity information exceeds a first threshold;
accordingly, the state determination module comprises:
a threshold state unit, configured to determine that the standby network is normal when the quantity information exceeds a first threshold; determining that the backup network is faulty when the quantity information does not exceed a first threshold.
The invention provides a backup network detection device with a master-slave structure, which is used for acquiring message data from a buffer area of a backup network through an acquisition module; the frame searching module is used for traversing the message data according to preset frame format information and judging whether the message data comprises frame message information or not; a state determining module, configured to determine that the standby network is normal when the packet data includes the frame packet information; and when the message data does not comprise the frame message information, determining that the standby network has a fault. When the standby network works normally, the standby network can synchronously receive message data sent by the master control, so that whether the standby network has missed data or not is determined by detecting whether the standby network comprises complete frame message information or not (namely the frame message information), if the buffer area of the standby network has at least one frame of complete message data (the minimum value of the complete frame message data can be freely set according to the detection frequency), the standby network does not have the missed data, if the main working network is abnormal at the moment, the standby network can realize seamless take-over, namely the standby network works normally, and further the automatic inspection of the state of the standby network is realized.
The standby network detection device of the master-slave structure in this embodiment is used to implement the foregoing standby network detection method of the master-slave structure, and therefore, specific embodiments of the standby network detection device of the master-slave structure may be found in the foregoing embodiments of the standby network detection method of the master-slave structure, for example, the obtaining module 100, the frame searching module 200, and the state determining module 300 are respectively used to implement steps S101, S102, and S103 in the standby network detection method of the master-slave structure, so that the specific embodiments thereof may refer to descriptions of corresponding partial embodiments, and are not described herein again.
A backup network detection device of a master-slave architecture, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the backup network detection method of the master-slave architecture as described in any one of the above when executing the computer program. The invention provides a backup network detection method of a master-slave structure, which obtains message data from a buffer area of a backup network; traversing the message data according to preset frame format information, and judging whether the message data comprises frame message information; when the message data comprises the frame message information, determining that the standby network is normal; and when the message data does not comprise the frame message information, determining that the standby network has a fault. When the standby network works normally, the standby network can synchronously receive message data sent by the master control, so that whether the standby network has missed data or not is determined by detecting whether the standby network comprises complete frame message information or not (namely the frame message information), if the buffer area of the standby network has at least one frame of complete message data (the minimum value of the complete frame message data can be freely set according to the detection frequency), the standby network does not have the missed data, if the main working network is abnormal at the moment, the standby network can realize seamless take-over, namely the standby network works normally, and further the automatic inspection of the state of the standby network is realized.
A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the backup network detection method of a master-slave architecture as claimed in any one of the above. The invention provides a backup network detection method of a master-slave structure, which obtains message data from a buffer area of a backup network; traversing the message data according to preset frame format information, and judging whether the message data comprises frame message information; when the message data comprises the frame message information, determining that the standby network is normal; and when the message data does not comprise the frame message information, determining that the standby network has a fault. When the standby network works normally, the standby network can synchronously receive message data sent by the master control, so that whether the standby network has missed data or not is determined by detecting whether the standby network comprises complete frame message information or not (namely the frame message information), if the buffer area of the standby network has at least one frame of complete message data (the minimum value of the complete frame message data can be freely set according to the detection frequency), the standby network does not have the missed data, if the main working network is abnormal at the moment, the standby network can realize seamless take-over, namely the standby network works normally, and further the automatic inspection of the state of the standby network is realized.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is to be noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The method, apparatus, device and computer readable storage medium for detecting a standby network with a master-slave structure provided by the present invention are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (10)

1. A backup network detection method of a master-slave structure is characterized by comprising the following steps:
acquiring message data from a buffer area of a standby network;
traversing the message data according to preset frame format information, and judging whether the message data comprises frame message information;
when the message data comprises the frame message information, determining that the standby network is normal; and when the message data does not comprise the frame message information, determining that the standby network has a fault.
2. The method for detecting a standby network according to claim 1, wherein the traversing the packet data according to the preset frame format information, and the determining whether the packet data includes the frame packet information comprises:
traversing the message data according to the frame format information, and judging whether the message data comprises an initial byte;
when the initial byte exists in the message data, determining the byte in the frame to be checked according to the initial byte;
judging whether the format information of the frame bytes to be checked conforms to the frame format information;
and when the format information of the bytes in the frame to be checked accords with the frame format information, determining that the message data comprises the frame message information.
3. The method for detecting a standby network in a master-slave structure according to claim 2, wherein when the start byte does not exist in the packet data, the method comprises:
determining that the frame message information is not included in the message data.
4. The backup network detecting method of master-slave structure according to claim 2, wherein when the format information of the frame byte to be checked does not conform to the frame format information, it comprises:
determining that the frame message information is not included in the message data.
5. The method for detecting a standby network in a master-slave configuration according to claim 1, wherein the determining that the standby network is normal when the packet data includes the frame packet information comprises:
when the message data comprises the frame message information, judging whether the frame message information is legal information or not according to the frame message information and preset source address information;
and when the frame message information is the legal information, determining that the standby network is normal.
6. The method for detecting a standby network in a master-slave configuration according to claim 1, wherein the determining that the standby network is normal when the packet data includes the frame packet information comprises:
determining a frame check byte according to the frame message information;
judging whether the frame message information is available information according to the frame check byte;
and when the frame message information is the available information, determining that the standby network is normal.
7. The method of claim 1, wherein the retrieving the message data from the buffer of the standby network comprises:
obtaining a first amount of message data from a buffer area of a standby network;
correspondingly, traversing the message data according to preset frame format information, and judging whether the message data comprises frame message information or not comprises:
according to preset frame format information, respectively traversing the first amount of message data to obtain the amount information of the message data including frame message information;
judging whether the quantity information exceeds a first threshold value;
correspondingly, when the message data comprises the frame message information, determining that the standby network is normal; when the message data does not include the frame message information, determining that the standby network failure includes:
when the quantity information exceeds a first threshold value, determining that the standby network is normal; determining that the backup network is faulty when the quantity information does not exceed a first threshold.
8. A backup network detection apparatus of a master-slave structure, comprising:
the acquisition module is used for acquiring message data from a buffer area of a standby network;
the frame searching module is used for traversing the message data according to preset frame format information and judging whether the message data comprises frame message information or not;
a state determining module, configured to determine that the standby network is normal when the packet data includes the frame packet information; and when the message data does not comprise the frame message information, determining that the standby network has a fault.
9. A backup network detection device of a master-slave architecture, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the backup network detection method of a master-slave architecture according to any of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the backup network detection method of a master-slave architecture according to any one of claims 1 to 7.
CN202011600623.4A 2020-12-29 2020-12-29 Backup network detection method, device and equipment for master-slave structure Active CN112804085B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011600623.4A CN112804085B (en) 2020-12-29 2020-12-29 Backup network detection method, device and equipment for master-slave structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011600623.4A CN112804085B (en) 2020-12-29 2020-12-29 Backup network detection method, device and equipment for master-slave structure

Publications (2)

Publication Number Publication Date
CN112804085A true CN112804085A (en) 2021-05-14
CN112804085B CN112804085B (en) 2022-07-08

Family

ID=75805709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011600623.4A Active CN112804085B (en) 2020-12-29 2020-12-29 Backup network detection method, device and equipment for master-slave structure

Country Status (1)

Country Link
CN (1) CN112804085B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114826890A (en) * 2022-04-13 2022-07-29 中车青岛四方机车车辆股份有限公司 Communication method, system, device and train

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030832A (en) * 2006-03-03 2007-09-05 华为技术有限公司 Method and system for realizing realtime transmission protocol message redundancy
US20080159260A1 (en) * 2006-12-15 2008-07-03 Brocade Communications Systems, Inc. Fibre channel over ethernet frame
CN101728869A (en) * 2009-11-10 2010-06-09 重庆大学 Power station automation system data network security monitoring method
CN102158882A (en) * 2011-05-27 2011-08-17 重庆邮电大学 Two-channel data detection and protocol analysis meter based on 6LowPAN and method
CN109104346A (en) * 2017-06-21 2018-12-28 比亚迪股份有限公司 Train network data transmission method, system and its apparatus based on CANopen agreement

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030832A (en) * 2006-03-03 2007-09-05 华为技术有限公司 Method and system for realizing realtime transmission protocol message redundancy
US20080159260A1 (en) * 2006-12-15 2008-07-03 Brocade Communications Systems, Inc. Fibre channel over ethernet frame
CN101728869A (en) * 2009-11-10 2010-06-09 重庆大学 Power station automation system data network security monitoring method
CN102158882A (en) * 2011-05-27 2011-08-17 重庆邮电大学 Two-channel data detection and protocol analysis meter based on 6LowPAN and method
CN109104346A (en) * 2017-06-21 2018-12-28 比亚迪股份有限公司 Train network data transmission method, system and its apparatus based on CANopen agreement

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114826890A (en) * 2022-04-13 2022-07-29 中车青岛四方机车车辆股份有限公司 Communication method, system, device and train
CN114826890B (en) * 2022-04-13 2024-01-19 中车青岛四方机车车辆股份有限公司 Communication method, system, device and train

Also Published As

Publication number Publication date
CN112804085B (en) 2022-07-08

Similar Documents

Publication Publication Date Title
CN112804085B (en) Backup network detection method, device and equipment for master-slave structure
CN110658400B (en) Embedded test method, microcontroller and system
CN108683528B (en) Data transmission method, central server, server and data transmission system
CN113259183B (en) Network relay control method and device, electronic equipment and storage medium
JP2008160356A (en) Waveform analyzer
CN108180935B (en) Fault detection method and device of sensor
CN112052170A (en) Automatic detection method and device, storage medium and electronic equipment
CN104749467A (en) Distribution terminal self-diagnostic method and system
CN109445375B (en) PLC redundancy system and PLC redundancy method
CN107799831B (en) Method and device for determining cell datum line
WO2014039032A1 (en) Method and apparatus for isolating a fault-active controller in a controller area network
CN106776911B (en) Method and system for optimizing lot exception handling caused by WAT machine alarm
JPH09205429A (en) Network fault diagnostic device, fault prediction device, and its diagnostic and prediction method
CN110532146B (en) Data acquisition monitoring method and device
CN109086185B (en) Fault detection method, device and equipment of storage cluster and storage medium
CN108512698B (en) Network disaster tolerance method and device and electronic equipment
CN114584475B (en) Communication test method and device
CN112124378B (en) Point-to-point automatic testing method and device for interlocking and ATS
CN112787883B (en) Method, device and equipment for detecting NAT (network Address translation) fault of equipment
CN113419885A (en) Data integrity processing method and device and electronic equipment
CN111030878A (en) Fault detection method and related device for linear networking frequency converter
JP2007322263A (en) Semiconductor testing system
CN112068017A (en) Battery management system and disconnection detection method in battery management system
JP5915560B2 (en) Analysis equipment
CN107124288B (en) Message processing method and device

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
GR01 Patent grant
GR01 Patent grant