WO2012119416A1 - Method for testing electronic device, and electronic device - Google Patents

Method for testing electronic device, and electronic device Download PDF

Info

Publication number
WO2012119416A1
WO2012119416A1 PCT/CN2011/078902 CN2011078902W WO2012119416A1 WO 2012119416 A1 WO2012119416 A1 WO 2012119416A1 CN 2011078902 W CN2011078902 W CN 2011078902W WO 2012119416 A1 WO2012119416 A1 WO 2012119416A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
detection
detecting
message
packet
Prior art date
Application number
PCT/CN2011/078902
Other languages
French (fr)
Chinese (zh)
Inventor
傅振
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN2011800021534A priority Critical patent/CN102369684A/en
Priority to PCT/CN2011/078902 priority patent/WO2012119416A1/en
Publication of WO2012119416A1 publication Critical patent/WO2012119416A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/24Testing correct operation

Definitions

  • the present invention relates to the field of electronic communications, and in particular, to a method and an electronic device for detecting electronic devices. Background technique
  • the large and complex communication system is composed of a large number of communication electronic devices.
  • Each communication electronic device is composed of a large number of functional units, and each functional unit is divided and cooperated to complete the processing of voice and data services of the communication system.
  • the device itself inevitably has some failure, and over time, device failure issues may be more easily exposed.
  • When a communication device is used in a large amount there is no guarantee that all devices on each functional unit will remain in a normal operation state, and the device may have a hard failure that is permanently ineffective, or a soft failure that may accidentally fail. Regardless of the type of failure, if it is not discovered in time and effective measures are taken, it will ultimately affect the communication network operation indicators and user experience. In particular, if a functional unit at a critical interface location fails, it can even cause a flaw in the entire communication system.
  • the communication mechanism includes responding to receiving and receiving messages and independently transmitting and receiving messages, and the functional units can monitor each other's operating conditions.
  • the response to the transmission and reception of the message means that the data message is sent from a functional unit to another functional unit, and the message transmission function unit expects to receive the response from the other party. If the response is not received within a certain period of time and the situation is the same after several attempts, then the other party is considered to be in an abnormal operating state (unhealthy state).
  • Independently sending and receiving packets means that two different functional units send packets to each other.
  • the packets are sent in one direction and do not need to be acknowledged. If the message sent by the other party is not received within a certain period of time, the other party is considered to be in an abnormal running state.
  • An object of the present invention is to provide a method and an electronic device for detecting an electronic device, which realizes an electronic device The running status of the device is automatically and comprehensively detected.
  • a method of electronic device detection including:
  • the detection message after passing through each functional unit in the electronic device is checked to detect the running state of the electronic device.
  • an electronic device including a detecting unit and a functional unit, the detecting unit comprising:
  • a detection packet generating module configured to generate a detection packet for detecting the electronic device
  • a detection packet control module configured to reserve, by using the electronic device, a resource for establishing a data packet transmission path at runtime Controlling the detection message to pass through each functional unit in the electronic device in sequence
  • detecting a message verification module configured to perform verification on the detection message after sequentially passing through each functional unit in the electronic device, to detect The operating state of the electronic device.
  • the embodiment of the present invention solves the prior art by controlling resources for establishing a data packet transmission path reserved by the electronic device during operation, and controlling the detection message to sequentially pass through each functional unit in the electronic device.
  • the medium message cannot cover the data packet path in the real environment, and the function and effect of device failure detection on the data message path are very limited.
  • the detection message is generated by simulating the internal data of the device and/or the external data source of the device.
  • the resources reserved by the full communication system can automatically detect the health status of the functional unit in real time during the operation of the electronic device, and take self-healing or other measures in time to ensure the normal operation of the communication electronic device, thereby solving the failure of the device.
  • the abnormal operation status of the functional unit cannot be detected in time and at the maximum extent.
  • FIG. 1 is a schematic flow chart of a method for detecting an electronic device according to a first embodiment of the present invention
  • FIG. 2 is a schematic flow chart of a method for detecting a second embodiment of an electronic device according to the present invention
  • 3 is a schematic diagram of detecting a message transmission path in an electronic device according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a first embodiment of an electronic device according to the present invention
  • FIG. 5 is a block diagram showing the structure of a second embodiment of the electronic device of the present invention. detailed description
  • FIG. 1 is a schematic flowchart of a method for detecting an electronic device according to the first embodiment of the present invention, which includes the following steps: Step S101: Generate a detection packet for detecting an electronic device.
  • the electronic device may generate a data message by first applying for a memory space, and then filling the data into the memory space according to the protocol; and the electronic device generates a detection message for detecting the electronic device.
  • Step S102 The resource for establishing a data packet transmission path reserved by the electronic device during operation is controlled to sequentially pass the detection message through each functional unit in the electronic device.
  • the electronic device reserves the resource for establishing the data packet transmission path during operation to control
  • the detection message sequentially passes through each functional unit in the electronic device.
  • Step S103 Perform verification on the detection message after sequentially passing through each functional unit in the electronic device to detect an operating state of the electronic device.
  • the step S101 may be specifically: generating at least one detection packet for detecting the electronic device according to a message protocol inside the electronic device or outside the electronic device, where the detection packet carries the detection identifier.
  • the electronic device is provided with a detecting unit, which can simulate an internal data source of the electronic device and/or the electronic device, and generate at least one device for detecting the electronic device according to a message protocol inside the electronic device or outside the electronic device.
  • the detection message that is, the detection unit can simulate the data source to generate the detection message according to the private internal protocol, and can also simulate all external data sources according to the common standard protocol (such as the transmission control protocol TCP protocol, the address resolution protocol ARP, etc.) Generating a detection packet; the detection packet carries a detection identifier, and the technician can pre-negotially set the detection identifier to indicate
  • the detection packet is used for detecting the electronic device, for example, setting the payload in the packet as a special payload pre-negotiated by the two parties, or setting other attributes in the packet as special attributes negotiated by both parties in advance.
  • the detecting unit may be a main CPU chip in the electronic device; the message entering the communication device functional unit may be processed on the control plane and the data plane of the main CPU chip according to the attributes thereof.
  • the control plane can control the direction of the message.
  • the detection packet may be simulated by the control surface of the main CPU chip and the external data source of the electronic device, and at least one is generated according to the message protocol inside the electronic device or outside the electronic device.
  • the detection packet of the electronic device; the control plane sends the detection packet generated to the data plane, and the data plane receives the detection packet and performs the packet processing.
  • the detection packet traffic is small and does not affect the performance of the functional unit.
  • FIG. 2 the schematic diagram of the method of the second embodiment of the electronic device of the present invention as shown in FIG. 2 includes:
  • Step S201 Generate a detection packet for detecting an electronic device.
  • Step S202 The resource for establishing a data packet transmission path reserved by the electronic device during operation is controlled, and the detection packet is sequentially passed through each functional unit in the electronic device.
  • steps S201 to S202 are similar to the foregoing steps S101 to S102, and details are not described herein again.
  • Step S203 Perform, according to the check field carried in the detection packet, a check packet that is sequentially passed through each functional unit in the electronic device to detect an operating state of the electronic device.
  • the The detection packet carries a check field
  • the electronic device may add a check field when generating the test packet
  • the electronic device detects the function unit in the electronic device according to the check field carried in the test packet.
  • the packet is verified. For example, it is detected whether the detected packet is sent back, whether the recovered detection packet meets the preset rule, whether an error occurs, or the like.
  • Step S204 When it is detected that the electronic device is in abnormal operation, an alarm is generated according to the detection result.
  • the electronic device when it is detected that the electronic device is in abnormal operation, it is further detected in which functional unit the detection message has a problem, and the report can be generated according to the detection result, and the alarm is reported in time to take self-healing measures. Or other solutions to ensure the normal operation of electronic equipment. Further, when detecting that the electronic device is in abnormal operation, the electronic device may be automatically repaired according to the detection result, for example, a soft failure of a functional unit of the electronic device may be based on the detection result. Automatically repair the functional unit.
  • step S102 or step S202 further includes: a resource reserved for establishing a data packet transmission path reserved by the electronic device during operation, when the detection packet passes an edge function in the electronic device In the unit, the edge function unit loops back the detection packet according to the preset loopback identifier, and sends the detection packet to the next functional unit.
  • a schematic diagram of detecting a message transmission path in the electronic device according to the embodiment of the present invention shown in FIG. 3 is further illustrated:
  • the electronic device includes a plurality of chips, and the plurality of chips are a plurality of functional units.
  • the detecting unit of the embodiment of the present invention is the chip a in FIG. 3, and the chip a can be a main CPU chip of the electronic device, and the chip a further includes detection.
  • the packet generation module, the detection packet verification module, and the plurality of modules, the detection packet generation module simulates the message source, and generates at least one detection for detecting the electronic device according to a message protocol inside the electronic device or outside the electronic device. A message, an arrow in FIG.
  • control message is sequentially passed through each functional unit in the electronic device, for example, in the chip a, first through the module 1, and then transmitted to the chip b, after being transmitted in the chip b, Transfer to the next functional unit;
  • the chip c When the detection packet passes through the edge function unit in the electronic device, such as the chip c in FIG. 3, the chip c will loop back the detection packet according to the preset loopback identifier, and the detection report is The text is sent to the next functional unit.
  • the edge function unit (chip c in FIG. 3) is preset in advance, and the edge function unit can be triggered by a loopback identifier.
  • the detection message is sent to the chip n;
  • the detection packet is returned to the chip a, and the detection packet verification module of the chip a checks the detection packet according to the check field carried in the detection packet to detect the running state of the electronic device; When the electronic device is in abnormal operation, it will further detect which functional unit has a problem in the detection message, and can generate a report according to the detection result and report the alarm on time to take self-healing measures or other solutions to ensure The normal operation of electronic equipment.
  • the process of generating and detecting the detection message in the embodiment of the present invention may be automatically performed in real time; the detection algorithm may be designed according to the network status and specific conditions of the functional unit, and the accuracy may be achieved. Detecting the health of the functional unit without causing misjudgment.
  • Embodiments of the present invention by using resources reserved for establishing a data packet transmission path reserved by the electronic device during operation, controlling the detection message to sequentially pass through each functional unit in the electronic device,
  • the message in the prior art cannot cover the data packet path in the real environment, and the function and effect of device failure detection on the data message path are very limited; the data source is generated by simulating the internal data of the device and/or external device.
  • the detection of the message using the resources reserved by the full communication system, can realize the automatic detection of the health status of the functional unit in real time during the operation of the electronic device, and find self-healing or other measures in time to ensure the normal operation of the communication electronic device, and solve the problem.
  • the abnormal operation of the functional unit due to device failure cannot be detected in time and at the maximum extent.
  • FIG. 4 is a schematic structural diagram of a first embodiment of an electronic device according to the present invention.
  • the electronic device 4 includes a detecting unit 41.
  • the detecting unit 41 includes a detecting message generating module 411, a detecting message control module 412, and detecting a message check.
  • the module 413 in particular, the detection message generation module 411 can generate a data message by first applying for a memory space, and then filling the data into the memory space according to the protocol; the detection message generation module 411 is configured to detect the electronic Detection message of device 4.
  • the detection message control module 412 is configured to control, by the electronic device 4, a resource for establishing a data message transmission path, which is used by the electronic device 4, to control the detection message to sequentially pass through each functional unit in the electronic device 4;
  • the transmission path of the detection packet covers the data packet path of the external packet in the real environment in the real environment, and the electronic device 4 reserves the resource for establishing the data packet transmission path during operation to control the detection packet.
  • the text passes through each functional unit in the electronic device 4 in sequence.
  • the detection packet verification module 413 is configured to check the detection packets sequentially passing through the functional units in the electronic device 4 to detect the running state of the electronic device 4.
  • the detection packet generating module 411 is specifically configured to generate at least one detection packet for detecting the electronic device 4 according to a message protocol inside the electronic device 4 or outside the electronic device 4, where the detection packet carries a detection identifier;
  • the detecting unit 41 may simulate an external data source of the electronic device 4 and/or the electronic device 4, and generate at least one detection message for detecting the electronic device 4 according to a message protocol inside the electronic device 4 or outside the electronic device 4. That is, the detecting unit 41 may simulate that the data source generates the detection message according to the private internal protocol, and may also simulate that all external data sources are generated according to a common standard protocol (such as the transmission control protocol TCP protocol, the address resolution protocol ARP, etc.).
  • a common standard protocol such as the transmission control protocol TCP protocol, the address resolution protocol ARP, etc.
  • the detection packet carries There is a detection identifier, and the technician can pre-negotially set the detection identifier to indicate that the detection packet is used for detecting the electronic device 4, for example, setting the payload in the packet to a special payload pre-negotiated by both parties, or setting a report.
  • Other attributes in the text are special attributes that are mutually negotiated by the two parties, and so on.
  • the detecting unit 41 may be a main CPU chip in the electronic device 4; the message entering the functional unit of the communication device may be processed on the control plane and the data plane of the main CPU chip according to its attributes.
  • the control plane can control the direction of the message.
  • the detection message may be simulated by the control surface of the main CPU chip and the external data source of the electronic device 4 and/or the external data source of the electronic device 4, and generated according to the message protocol inside the electronic device 4 or outside the electronic device 4.
  • the detection packet of the electronic device 4 is detected; the control plane sends the detection packet generated to the data plane, and the data plane receives the detection packet and performs the packet processing.
  • the detection packet traffic is small and does not affect the performance of the functional unit.
  • the electronic device 4 includes a detecting unit 41, further includes a plurality of functional units 42, and at least one edge functional unit 43, 5 includes an edge function unit 43 as an example, specifically:
  • the detection message control module 412 controls the resources of the data message transmission path reserved by the electronic device 4 to control the detection message to sequentially pass through the functional units in the electronic device 4, when the detection message passes.
  • the edge function unit 43 loops back the detection packet according to the preset loopback identifier, and sends the detection packet to the next functional unit.
  • the detection packet carries a check field
  • the check packet verification module 413 is configured to check, according to the check field carried in the test packet, the test packet that has passed through each functional unit in the electronic device 4 in sequence. To detect the operating state of the electronic device.
  • the detecting unit 41 further includes a detecting alarm module 414 and a repairing module 415, wherein
  • the detection alarm module 414 is configured to perform an alarm according to the detection result when the detection message verification module 413 detects that the electronic device 4 is in abnormal operation. Specifically, when it is detected that the electronic device 4 is in abnormal operation, the detection alarm module 414 further detects which functional unit has a problem in the detection message, and can generate a report according to the detection result and report the alarm on time to take Self-healing measures or other solutions ensure the normal operation of the electronic device 4.
  • the repair module 415 is configured to automatically repair the electronic device 4 according to the detection result when the detection message verification module 413 detects that the electronic device 4 is in abnormal operation. Specifically, for example, a certain functional unit of the electronic device 4 has a soft failure problem, and the repair module 415 can automatically repair the functional unit according to the detection result.
  • a schematic diagram of detecting a message transmission path in an electronic device according to an embodiment of the present invention shown in FIG. 3 is further illustrated:
  • the electronic device includes a plurality of chips, and the plurality of chips are a plurality of functional units.
  • the detecting unit of the embodiment of the present invention is the chip a in FIG. 3, and the chip a can be a main CPU chip of the electronic device, and the chip a further includes detection.
  • the packet generation module, the detection packet verification module, and the plurality of modules, the detection packet generation module simulates the message source, and generates at least one detection for detecting the electronic device according to a message protocol inside the electronic device or outside the electronic device. A message, an arrow in FIG.
  • control message is sequentially passed through each functional unit in the electronic device, for example, in the chip a, first through the module 1, and then transmitted to the chip b, after being transmitted in the chip b, Transfer to the next functional unit;
  • the chip c When the detection packet passes through the edge function unit in the electronic device, such as the chip c in FIG. 3, the chip c will loop back the detection packet according to the preset loopback identifier, and the detection report is The text is sent to the next functional unit.
  • the edge function unit (chip c in FIG. 3) is preset in advance, and the edge function unit can be triggered by a loopback identifier.
  • the detection message is sent to the chip n;
  • the detection packet is returned to the chip a, and the detection packet verification module of the chip a checks the detection packet according to the check field carried in the detection packet to detect the running state of the electronic device; When the electronic device is in abnormal operation, it will further detect which functional unit has a problem in the detection message, and can generate a report according to the detection result and report the alarm on time to take self-healing measures or other solutions to ensure The normal operation of electronic equipment.
  • the process of generating and detecting the detection message in the embodiment of the present invention may be automatically performed in real time; the detection algorithm may be designed according to the network status and specific conditions of the functional unit, and the accuracy may be achieved. Detecting the health of the functional unit without causing misjudgment.
  • the embodiment of the present invention solves the prior art by controlling resources for establishing a data packet transmission path reserved by the electronic device during operation, and controlling the detection message to sequentially pass through each functional unit in the electronic device.
  • the medium message cannot cover the data packet path in the real environment, and the function and effect of device failure detection on the data message path are very limited.
  • the detection message is generated by simulating the internal data of the device and/or the external data source of the device.
  • the resources reserved by the full communication system can be implemented to operate on the electronic device.
  • the health status of the functional unit is automatically and completely detected in real time, and the problem is taken in time to take self-healing or other measures to ensure the normal operation of the communication electronic device, and the abnormal operation state of the functional unit due to the device failure cannot be detected in time and at the maximum extent.
  • the problem is taken in time to take self-healing or other measures to ensure the normal operation of the communication electronic device, and the abnormal operation state of the functional unit due to the device failure cannot be detected in time and at the maximum extent.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Abstract

Disclosed are a method for testing an electronic device and an electronic device. The method includes: generating a detection message for testing an electronic device; controlling the detection message to successively pass through various function units in the electronic device by way of the resources reserved by the electronic device when running for establishing data message transmission paths; and checking the detection message after it has successively passed through the various function units in the electronic device so as to detect the operation status of the electronic device. By way of the present invention, the operation status of the electronic device can be fully and automatically detected.

Description

一种电子设备检测的方法和电子设备 技术领域  Method and electronic device for detecting electronic equipment
本发明涉及电子通信领域, 尤其涉及一种电子设备检测的方法和电子设备。 背景技术  The present invention relates to the field of electronic communications, and in particular, to a method and an electronic device for detecting electronic devices. Background technique
庞大复杂的通信系统由众多通信电子设备组成, 每个通信电子设备又由众 多的功能单元组成, 各功能单元之间分工合作, 完成通信系统语音和数据业务 的处理。 其中每个功能单元上分布着成百上千个硬件器件。 器件本身不可避免 地存在一定的失效, 而且随着时间的推移, 器件失效问题可能更加容易暴露。 当通信设备海量运用时, 无法保证每个功能单元上的所有器件均保持正常运行 的状态, 器件可能会出现永久失效的硬故障, 也可能出现偶然失效的软故障。 不管哪种故障, 如果没有及时发现并采取有效措施, 最终都会影响通信网络运 行指标和用户体验。 特别是如果处于关键接口位置的功能单元失效, 甚至会造 成整个通信系统的瘫痪。  The large and complex communication system is composed of a large number of communication electronic devices. Each communication electronic device is composed of a large number of functional units, and each functional unit is divided and cooperated to complete the processing of voice and data services of the communication system. There are hundreds of hardware devices distributed on each functional unit. The device itself inevitably has some failure, and over time, device failure issues may be more easily exposed. When a communication device is used in a large amount, there is no guarantee that all devices on each functional unit will remain in a normal operation state, and the device may have a hard failure that is permanently ineffective, or a soft failure that may accidentally fail. Regardless of the type of failure, if it is not discovered in time and effective measures are taken, it will ultimately affect the communication network operation indicators and user experience. In particular, if a functional unit at a critical interface location fails, it can even cause a flaw in the entire communication system.
现有技术中, 不同功能单元间双向定时通信, 通信机制包括响应收发报文 及独立收发报文等, 功能单元间可以互相监控对方的运行状况。  In the prior art, bidirectional timing communication between different functional units, the communication mechanism includes responding to receiving and receiving messages and independently transmitting and receiving messages, and the functional units can monitor each other's operating conditions.
响应收发报文是指数据报文从某个功能单元发出, 发往另一个功能单元, 报文发送功能单元期望收到对方的应答。 如果一段时间内没有收到应答, 且尝 试几次之后情况皆如此, 那么认为对方此时处于非正常的运行状态 (不健康的 状态)。  The response to the transmission and reception of the message means that the data message is sent from a functional unit to another functional unit, and the message transmission function unit expects to receive the response from the other party. If the response is not received within a certain period of time and the situation is the same after several attempts, then the other party is considered to be in an abnormal operating state (unhealthy state).
独立收发报文是指两个不同的功能单元之间互相发送报文, 报文发送是单 向进行的, 不需要应答。 如果一段时间内没有收到对方发过来的报文, 则认为 对方处于非正常的运行状态。  Independently sending and receiving packets means that two different functional units send packets to each other. The packets are sent in one direction and do not need to be acknowledged. If the message sent by the other party is not received within a certain period of time, the other party is considered to be in an abnormal running state.
然而, 不管是响应收发报文还是独立收发报文机制, 其报文的内容单一, 且报文在功能单元中的路径都是特殊的检测通道, 因此根本无法覆盖现实环境 中的数据报文路径, 对数据报文路径上的器件失效检测的功能和效果十分有限。 发明内容  However, regardless of whether the message is sent or received in response to the packet, the content of the packet is single, and the path of the packet in the functional unit is a special detection channel, so the data packet path in the real environment cannot be covered at all. The function and effect of device failure detection on the data message path is very limited. Summary of the invention
本发明的目的是提供一种电子设备检测的方法和电子设备, 实现了对电子 设备的运行状态自动全面的检测。 An object of the present invention is to provide a method and an electronic device for detecting an electronic device, which realizes an electronic device The running status of the device is automatically and comprehensively detected.
一方面, 提供了一种电子设备检测的方法, 包括:  In one aspect, a method of electronic device detection is provided, including:
生成用于检测电子设备的检测报文;  Generating a detection message for detecting the electronic device;
通过所述电子设备在运行时预留的用于建立数据报文传输路径的资源, 控 制所述检测报文依次经过所述电子设备中各功能单元;  Controlling, by the electronic device, the resource for establishing a data packet transmission path, and controlling the detection packet to pass through each functional unit in the electronic device;
对依次经过所述电子设备中各功能单元后的检测报文进行校验, 以检测出 所述电子设备的运行状态。  The detection message after passing through each functional unit in the electronic device is checked to detect the running state of the electronic device.
另一方面, 提供了一种电子设备, 包括检测单元和功能单元, 所述检测单 元包括:  In another aspect, an electronic device is provided, including a detecting unit and a functional unit, the detecting unit comprising:
检测报文生成模块, 用于生成用于检测所述电子设备的检测报文; 检测报文控制模块, 用于通过所述电子设备在运行时预留的用于建立数据 报文传输路径的资源, 控制所述检测报文依次经过所述电子设备中各功能单元; 检测报文校验模块, 用于对依次经过所述电子设备中各功能单元后的检测 报文进行校验, 以检测出所述电子设备的运行状态。  a detection packet generating module, configured to generate a detection packet for detecting the electronic device, and a detection packet control module, configured to reserve, by using the electronic device, a resource for establishing a data packet transmission path at runtime Controlling the detection message to pass through each functional unit in the electronic device in sequence; and detecting a message verification module, configured to perform verification on the detection message after sequentially passing through each functional unit in the electronic device, to detect The operating state of the electronic device.
实施本发明实施例, 通过所述电子设备在运行时预留的用于建立数据报文 传输路径的资源, 控制所述检测报文依次经过所述电子设备中各功能单元, 解 决了现有技术中报文无法覆盖现实环境中的数据报文路径, 对数据报文路径上 的器件失效检测的功能和效果十分有限的问题; 通过模拟设备内部和 /或设备外 部数据源生成检测报文, 使用全通信系统预留的资源可实现对电子设备在运行 期间实时自动全面检测功能单元的健康状态, 发现问题及时采取自愈或其他措 施, 保证通信电子设备的正常运行, 解决了因器件失效而导致功能单元运行状 态异常的情况无法及时和最大程度得到检测的问题。 附图说明 例或现有技术描述中所需要使用的附图作筒单地介绍, 显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付 出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。  The embodiment of the present invention solves the prior art by controlling resources for establishing a data packet transmission path reserved by the electronic device during operation, and controlling the detection message to sequentially pass through each functional unit in the electronic device. The medium message cannot cover the data packet path in the real environment, and the function and effect of device failure detection on the data message path are very limited. The detection message is generated by simulating the internal data of the device and/or the external data source of the device. The resources reserved by the full communication system can automatically detect the health status of the functional unit in real time during the operation of the electronic device, and take self-healing or other measures in time to ensure the normal operation of the communication electronic device, thereby solving the failure of the device. The abnormal operation status of the functional unit cannot be detected in time and at the maximum extent. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are incorporated in the claims Other drawings may also be obtained from these drawings without the inventive labor.
图 1为本发明电子设备检测的第一实施例的方法流程示意图;  1 is a schematic flow chart of a method for detecting an electronic device according to a first embodiment of the present invention;
图 2是本发明电子设备检测的第二实施例的方法流程示意图; 图 3是本发明实施例的电子设备中检测报文传输路径的示意图; 图 4是本发明电子设备的第一实施例的结构示意图; 2 is a schematic flow chart of a method for detecting a second embodiment of an electronic device according to the present invention; 3 is a schematic diagram of detecting a message transmission path in an electronic device according to an embodiment of the present invention; FIG. 4 is a schematic structural diagram of a first embodiment of an electronic device according to the present invention;
图 5是本发明电子设备的第二实施例的结构示意图。 具体实施方式  Figure 5 is a block diagram showing the structure of a second embodiment of the electronic device of the present invention. detailed description
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。  BRIEF DESCRIPTION OF THE DRAWINGS The technical solutions in the embodiments of the present invention will be described in detail with reference to the accompanying drawings. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative work are within the scope of the present invention.
如图 1示出的本发明电子设备检测的第一实施例的方法流程示意图, 包括: 步骤 S101: 生成用于检测电子设备的检测报文;  FIG. 1 is a schematic flowchart of a method for detecting an electronic device according to the first embodiment of the present invention, which includes the following steps: Step S101: Generate a detection packet for detecting an electronic device.
具体地, 电子设备可以通过先申请内存空间, 然后按照协议将数据填写到 该内存空间中, 即可生成数据报文; 电子设备生成用于检测电子设备的检测报 文。  Specifically, the electronic device may generate a data message by first applying for a memory space, and then filling the data into the memory space according to the protocol; and the electronic device generates a detection message for detecting the electronic device.
步骤 S102: 通过所述电子设备在运行时预留的用于建立数据报文传输路径 的资源, 控制所述检测报文依次经过所述电子设备中各功能单元;  Step S102: The resource for establishing a data packet transmission path reserved by the electronic device during operation is controlled to sequentially pass the detection message through each functional unit in the electronic device.
具体地, 为了让检测报文的传输路径覆盖真实环境中的外部报文在功能单 元内的数据报文路径, 电子设备在运行时将预留用于建立数据报文传输路径的 资源, 以控制所述检测报文依次经过所述电子设备中各功能单元。  Specifically, in order to make the transmission path of the detection packet cover the data packet path of the external packet in the real environment in the real environment, the electronic device reserves the resource for establishing the data packet transmission path during operation to control The detection message sequentially passes through each functional unit in the electronic device.
步骤 S103:对依次经过所述电子设备中各功能单元后的检测报文进行校验, 以检测出所述电子设备的运行状态。  Step S103: Perform verification on the detection message after sequentially passing through each functional unit in the electronic device to detect an operating state of the electronic device.
进一步地, 步骤 S101可以具体为: 根据电子设备内部或电子设备外部的报 文协议生成至少一个用于检测所述电子设备的检测报文, 所述检测报文携带有 检测标识。  Further, the step S101 may be specifically: generating at least one detection packet for detecting the electronic device according to a message protocol inside the electronic device or outside the electronic device, where the detection packet carries the detection identifier.
具体地, 电子设备中设有一检测单元, 该检测单元可以模拟电子设备内部 和 /或电子设备外部数据源, 根据电子设备内部或电子设备外部的报文协议生成 至少一个用于检测所述电子设备的检测报文, 即, 该检测单元可以模拟数据源 根据私有的内部协议来生成检测报文, 也可以模拟所有外部数据源根据共有的 标准协议(如传输控制协议 TCP协议、地址解析协议 ARP等 )来生成检测报文; 该检测报文携带有检测标识, 技术人员可预先协商设置好该检测标识, 以表明 该检测报文是用于检测电子设备, 比如设置报文中的净荷为双方预先协商好的 特殊净荷, 或设置报文中的其他属性为双方预先协商好的特殊属性等等。 Specifically, the electronic device is provided with a detecting unit, which can simulate an internal data source of the electronic device and/or the electronic device, and generate at least one device for detecting the electronic device according to a message protocol inside the electronic device or outside the electronic device. The detection message, that is, the detection unit can simulate the data source to generate the detection message according to the private internal protocol, and can also simulate all external data sources according to the common standard protocol (such as the transmission control protocol TCP protocol, the address resolution protocol ARP, etc.) Generating a detection packet; the detection packet carries a detection identifier, and the technician can pre-negotially set the detection identifier to indicate The detection packet is used for detecting the electronic device, for example, setting the payload in the packet as a special payload pre-negotiated by the two parties, or setting other attributes in the packet as special attributes negotiated by both parties in advance.
需要说明的是, 该检测单元可以为电子设备中的主 CPU芯片; 进入通信设 备功能单元的报文, 根据其属性, 可分别在主 CPU芯片的控制面和数据面进行 处理。 一般来说, 控制面可以控制报文的走向。 本发明实施例中, 检测报文可 以由主 CPU芯片的控制面模拟电子设备内部和 /或电子设备外部数据源,根据电 子设备内部或电子设备外部的报文协议生成至少一个用于检测所述电子设备的 检测报文; 控制面将产生的检测报文发往数据面, 数据面接收到检测报文之后 进行报文处理。 检测报文流量较小, 不会影响功能单元的性能。  It should be noted that the detecting unit may be a main CPU chip in the electronic device; the message entering the communication device functional unit may be processed on the control plane and the data plane of the main CPU chip according to the attributes thereof. In general, the control plane can control the direction of the message. In the embodiment of the present invention, the detection packet may be simulated by the control surface of the main CPU chip and the external data source of the electronic device, and at least one is generated according to the message protocol inside the electronic device or outside the electronic device. The detection packet of the electronic device; the control plane sends the detection packet generated to the data plane, and the data plane receives the detection packet and performs the packet processing. The detection packet traffic is small and does not affect the performance of the functional unit.
再进一步地, 如图 2示出的本发明电子设备检测的第二实施例的方法流程 示意图, 包括:  Still further, the schematic diagram of the method of the second embodiment of the electronic device of the present invention as shown in FIG. 2 includes:
步骤 S201: 生成用于检测电子设备的检测报文;  Step S201: Generate a detection packet for detecting an electronic device.
步骤 S202: 通过所述电子设备在运行时预留的用于建立数据报文传输路径 的资源, 控制所述检测报文依次经过所述电子设备中各功能单元;  Step S202: The resource for establishing a data packet transmission path reserved by the electronic device during operation is controlled, and the detection packet is sequentially passed through each functional unit in the electronic device.
具体地, 步骤 S201至步骤 S202与上述步骤 S101至步骤 S102类似, 这里 不再赘述。  Specifically, the steps S201 to S202 are similar to the foregoing steps S101 to S102, and details are not described herein again.
步骤 S203: 根据所述检测报文携带的检验字段, 对依次经过所述电子设备 中各功能单元后的检测报文进行校验, 以检测出所述电子设备的运行状态; 具体地, 所述检测报文携带有检验字段, 电子设备在生成检测报文的时候 可以增加校验字段, 电子设备根据所述检测报文携带的检验字段, 对依次经过 所述电子设备中各功能单元后的检测报文进行校验, 比如检测是否收回发出去 的检测报文, 检测收回的检测报文是否符合预设的规则, 是否发生错误等等。  Step S203: Perform, according to the check field carried in the detection packet, a check packet that is sequentially passed through each functional unit in the electronic device to detect an operating state of the electronic device. Specifically, the The detection packet carries a check field, and the electronic device may add a check field when generating the test packet, and the electronic device detects the function unit in the electronic device according to the check field carried in the test packet. The packet is verified. For example, it is detected whether the detected packet is sent back, whether the recovered detection packet meets the preset rule, whether an error occurs, or the like.
步骤 S204: 当检测出所述电子设备处于非正常运行时, 根据检测结果进行 告警。  Step S204: When it is detected that the electronic device is in abnormal operation, an alarm is generated according to the detection result.
具体地, 当检测出所述电子设备处于非正常运行时, 将进一步检测该检测 报文具体在哪个功能单元发生了问题, 并可以根据检测结果生产报告以及时上 报告警, 以便采取自愈措施或其他解决方案, 保证电子设备的正常运行。 进一 步地, 所述当检测出所述电子设备处于非正常运行时, 还可以根据检测结果对 所述电子设备进行自动修复, 例如电子设备的某功能单元出现软失效的问题, 那么可以根据检测结果对该功能单元进行自动修复。 再进一步地, 上述步骤 S102或步骤 S202还包括: 通过所述电子设备在运 行时预留的用于建立数据报文传输路径的资源, 当所述检测报文经过所述电子 设备中的边缘功能单元时, 所述边缘功能单元将根据预设的环回标识对检测报 文环回, 将所述检测报文发往下一个功能单元。 具体地, 结合图 3 示出的本发 明实施例的电子设备中检测报文传输路径的示意图, 来进一步地说明: Specifically, when it is detected that the electronic device is in abnormal operation, it is further detected in which functional unit the detection message has a problem, and the report can be generated according to the detection result, and the alarm is reported in time to take self-healing measures. Or other solutions to ensure the normal operation of electronic equipment. Further, when detecting that the electronic device is in abnormal operation, the electronic device may be automatically repaired according to the detection result, for example, a soft failure of a functional unit of the electronic device may be based on the detection result. Automatically repair the functional unit. Further, the foregoing step S102 or step S202 further includes: a resource reserved for establishing a data packet transmission path reserved by the electronic device during operation, when the detection packet passes an edge function in the electronic device In the unit, the edge function unit loops back the detection packet according to the preset loopback identifier, and sends the detection packet to the next functional unit. Specifically, a schematic diagram of detecting a message transmission path in the electronic device according to the embodiment of the present invention shown in FIG. 3 is further illustrated:
电子设备包括多个芯片, 该多个芯片即为多个功能单元; 本发明实施例的 检测单元为图 3中的芯片 a, 该芯片 a可以为电子设备的主 CPU芯片, 芯片 a 还包括检测报文生成模块、 检测报文校验模块以及多个模块, 检测报文生成模 块模拟报文源, 根据电子设备内部或电子设备外部的报文协议生成至少一个用 于检测所述电子设备的检测报文, 图 3 中一个箭头表示一个报文, 可以生成多 个不同类别的检测报文, 然后通过所述电子设备在运行时预留的用于建立数据 报文传输路径的资源, 按照电子设备设置好的数据流的走向顺序, 控制所述检 测报文依次经过所述电子设备中各功能单元, 比如在芯片 a中先通过模块 1 , 然 后传输到芯片 b, 在芯片 b中传输完后, 传输到下一个功能单元;  The electronic device includes a plurality of chips, and the plurality of chips are a plurality of functional units. The detecting unit of the embodiment of the present invention is the chip a in FIG. 3, and the chip a can be a main CPU chip of the electronic device, and the chip a further includes detection. The packet generation module, the detection packet verification module, and the plurality of modules, the detection packet generation module simulates the message source, and generates at least one detection for detecting the electronic device according to a message protocol inside the electronic device or outside the electronic device. A message, an arrow in FIG. 3 indicates a message, which can generate a plurality of different types of detection messages, and then the resources reserved for establishing the data message transmission path reserved by the electronic device at the time of operation, according to the electronic device Setting the direction of the data flow, the control message is sequentially passed through each functional unit in the electronic device, for example, in the chip a, first through the module 1, and then transmitted to the chip b, after being transmitted in the chip b, Transfer to the next functional unit;
当所述检测报文经过所述电子设备中的边缘功能单元时,如图 3中的芯片 c, 那么该芯片 c将根据预设的环回标识对检测报文环回, 将所述检测报文发往下 一个功能单元, 具体地, 在电子设备设置数据流的走向顺序时, 将预先设置到 达边缘功能单元(图 3中芯片 c )时, 可以通过一个环回标识触发边缘功能单元 进行识别, 以识别出需要在该边缘功能单元中对该检测报文进行环回, 以将该 检测报文发往下一个功能单元, 如图 3中将检测报文发送到芯片 n;  When the detection packet passes through the edge function unit in the electronic device, such as the chip c in FIG. 3, the chip c will loop back the detection packet according to the preset loopback identifier, and the detection report is The text is sent to the next functional unit. Specifically, when the electronic device sets the direction of the data flow, the edge function unit (chip c in FIG. 3) is preset in advance, and the edge function unit can be triggered by a loopback identifier. In order to identify that the detection message needs to be looped back in the edge function unit, to send the detection message to the next functional unit, as shown in FIG. 3, the detection message is sent to the chip n;
最终检测报文返回到芯片 a, 芯片 a的检测报文校验模块根据所述检测报文 携带的检验字段对检测报文进行校验, 以检测出所述电子设备的运行状态; 当 检测出所述电子设备处于非正常运行时, 将进一步检测该检测报文具体在哪个 功能单元发生了问题, 并可以根据检测结果生产报告以及时上报告警, 以便采 取自愈措施或其他解决方案, 保证电子设备的正常运行。  The detection packet is returned to the chip a, and the detection packet verification module of the chip a checks the detection packet according to the check field carried in the detection packet to detect the running state of the electronic device; When the electronic device is in abnormal operation, it will further detect which functional unit has a problem in the detection message, and can generate a report according to the detection result and report the alarm on time to take self-healing measures or other solutions to ensure The normal operation of electronic equipment.
需要说明的是, 本发明实施例中的检测报文的产生和检测的过程可以完全 是实时自动进行的; 检测的算法可以根据功能单元的所处的网络地位和具体情 况来设计, 可达到精确检测功能单元健康状况, 又不会引起误判断。  It should be noted that the process of generating and detecting the detection message in the embodiment of the present invention may be automatically performed in real time; the detection algorithm may be designed according to the network status and specific conditions of the functional unit, and the accuracy may be achieved. Detecting the health of the functional unit without causing misjudgment.
实施本发明实施例, 通过所述电子设备在运行时预留的用于建立数据报文 传输路径的资源, 控制所述检测报文依次经过所述电子设备中各功能单元, 解 决了现有技术中报文无法覆盖现实环境中的数据报文路径, 对数据报文路径上 的器件失效检测的功能和效果十分有限的问题; 通过模拟设备内部和 /或设备外 部数据源生成检测报文, 使用全通信系统预留的资源可实现对电子设备在运行 期间实时自动全面检测功能单元的健康状态, 发现问题及时采取自愈或其他措 施, 保证通信电子设备的正常运行, 解决了因器件失效而导致功能单元运行状 态异常的情况无法及时和最大程度得到检测的问题。 说明本发明实施例的电子设备的结构。 Embodiments of the present invention, by using resources reserved for establishing a data packet transmission path reserved by the electronic device during operation, controlling the detection message to sequentially pass through each functional unit in the electronic device, In the prior art, the message in the prior art cannot cover the data packet path in the real environment, and the function and effect of device failure detection on the data message path are very limited; the data source is generated by simulating the internal data of the device and/or external device. The detection of the message, using the resources reserved by the full communication system, can realize the automatic detection of the health status of the functional unit in real time during the operation of the electronic device, and find self-healing or other measures in time to ensure the normal operation of the communication electronic device, and solve the problem. The abnormal operation of the functional unit due to device failure cannot be detected in time and at the maximum extent. The structure of an electronic device according to an embodiment of the present invention will be described.
如图 4示出的本发明电子设备的第一实施例的结构示意图, 电子设备 4包 括检测单元 41 ,检测单元 41包括检测报文生成模块 411、检测报文控制模块 412 以及检测报文校验模块 413, 其中 具体地, 检测报文生成模块 411 可以通过先申请内存空间, 然后按照协议 将数据填写到该内存空间中, 即可生成数据报文; 检测报文生成模块 411 生成 用于检测电子设备 4的检测报文。  FIG. 4 is a schematic structural diagram of a first embodiment of an electronic device according to the present invention. The electronic device 4 includes a detecting unit 41. The detecting unit 41 includes a detecting message generating module 411, a detecting message control module 412, and detecting a message check. The module 413, in particular, the detection message generation module 411 can generate a data message by first applying for a memory space, and then filling the data into the memory space according to the protocol; the detection message generation module 411 is configured to detect the electronic Detection message of device 4.
检测报文控制模块 412用于通过电子设备 4在运行时预留的用于建立数据 报文传输路径的资源, 控制所述检测报文依次经过电子设备 4中各功能单元; 具体地, 为了让检测报文的传输路径覆盖真实环境中的外部报文在功能单 元内的数据报文路径, 电子设备 4在运行时将预留用于建立数据报文传输路径 的资源, 以控制所述检测报文依次经过电子设备 4中各功能单元。  The detection message control module 412 is configured to control, by the electronic device 4, a resource for establishing a data message transmission path, which is used by the electronic device 4, to control the detection message to sequentially pass through each functional unit in the electronic device 4; The transmission path of the detection packet covers the data packet path of the external packet in the real environment in the real environment, and the electronic device 4 reserves the resource for establishing the data packet transmission path during operation to control the detection packet. The text passes through each functional unit in the electronic device 4 in sequence.
检测报文校验模块 413用于对依次经过电子设备 4中各功能单元后的检测 报文进行校验, 以检测出电子设备 4的运行状态。  The detection packet verification module 413 is configured to check the detection packets sequentially passing through the functional units in the electronic device 4 to detect the running state of the electronic device 4.
进一步地, 检测报文生成模块 411具体用于根据电子设备 4内部或电子设 备 4外部的报文协议生成至少一个用于检测电子设备 4的检测报文, 所述检测 报文携带有检测标识;  Further, the detection packet generating module 411 is specifically configured to generate at least one detection packet for detecting the electronic device 4 according to a message protocol inside the electronic device 4 or outside the electronic device 4, where the detection packet carries a detection identifier;
具体地,该检测单元 41可以模拟电子设备 4内部和 /或电子设备 4外部数据 源, 根据电子设备 4内部或电子设备 4外部的报文协议生成至少一个用于检测 电子设备 4的检测报文, 即, 该检测单元 41可以模拟数据源根据私有的内部协 议来生成检测报文, 也可以模拟所有外部数据源根据共有的标准协议(如传输 控制协议 TCP协议、 地址解析协议 ARP等)来生成检测报文; 该检测报文携带 有检测标识, 技术人员可预先协商设置好该检测标识, 以表明该检测报文是用 于检测电子设备 4, 比如设置报文中的净荷为双方预先协商好的特殊净荷, 或设 置报文中的其他属性为双方预先协商好的特殊属性等等。 Specifically, the detecting unit 41 may simulate an external data source of the electronic device 4 and/or the electronic device 4, and generate at least one detection message for detecting the electronic device 4 according to a message protocol inside the electronic device 4 or outside the electronic device 4. That is, the detecting unit 41 may simulate that the data source generates the detection message according to the private internal protocol, and may also simulate that all external data sources are generated according to a common standard protocol (such as the transmission control protocol TCP protocol, the address resolution protocol ARP, etc.). Detection packet; the detection packet carries There is a detection identifier, and the technician can pre-negotially set the detection identifier to indicate that the detection packet is used for detecting the electronic device 4, for example, setting the payload in the packet to a special payload pre-negotiated by both parties, or setting a report. Other attributes in the text are special attributes that are mutually negotiated by the two parties, and so on.
需要说明的是, 该检测单元 41可以为电子设备 4中的主 CPU芯片; 进入 通信设备功能单元的报文, 根据其属性, 可分别在主 CPU芯片的控制面和数据 面进行处理。 一般来说, 控制面可以控制报文的走向。 本发明实施例中, 检测 报文可以由主 CPU芯片的控制面模拟电子设备 4内部和 /或电子设备 4外部数据 源, 根据电子设备 4内部或电子设备 4外部的报文协议生成至少一个用于检测 电子设备 4 的检测报文; 控制面将产生的检测报文发往数据面, 数据面接收到 检测报文之后进行报文处理。 检测报文流量较小, 不会影响功能单元的性能。  It should be noted that the detecting unit 41 may be a main CPU chip in the electronic device 4; the message entering the functional unit of the communication device may be processed on the control plane and the data plane of the main CPU chip according to its attributes. In general, the control plane can control the direction of the message. In the embodiment of the present invention, the detection message may be simulated by the control surface of the main CPU chip and the external data source of the electronic device 4 and/or the external data source of the electronic device 4, and generated according to the message protocol inside the electronic device 4 or outside the electronic device 4. The detection packet of the electronic device 4 is detected; the control plane sends the detection packet generated to the data plane, and the data plane receives the detection packet and performs the packet processing. The detection packet traffic is small and does not affect the performance of the functional unit.
再进一步地, 如图 5 示出的本发明电子设备的第二实施例的结构示意图, 电子设备 4包括检测单元 41夕卜, 还包括多个功能单元 42, 以及至少一个边缘功 能单元 43 , 图 5中以包括一个边缘功能单元 43为例, 具体地:  Further, as shown in FIG. 5, a schematic structural diagram of a second embodiment of the electronic device of the present invention, the electronic device 4 includes a detecting unit 41, further includes a plurality of functional units 42, and at least one edge functional unit 43, 5 includes an edge function unit 43 as an example, specifically:
检测报文控制模块 412通过电子设备 4在运行时预留的用于建立数据报文 传输路径的资源, 控制所述检测报文依次经过电子设备 4 中各功能单元, 当所 述检测报文经过边缘功能单元 43时, 边缘功能单元 43将根据预设的环回标识 对检测报文环回, 将所述检测报文发往下一个功能单元。  The detection message control module 412 controls the resources of the data message transmission path reserved by the electronic device 4 to control the detection message to sequentially pass through the functional units in the electronic device 4, when the detection message passes. When the edge function unit 43 is used, the edge function unit 43 loops back the detection packet according to the preset loopback identifier, and sends the detection packet to the next functional unit.
所述检测报文携带有检验字段; 检测报文校验模块 413 具体用于根据所述 检测报文携带的检验字段, 对依次经过电子设备 4 中各功能单元后的检测报文 进行校验, 以检测出所述电子设备的运行状态。  The detection packet carries a check field, and the check packet verification module 413 is configured to check, according to the check field carried in the test packet, the test packet that has passed through each functional unit in the electronic device 4 in sequence. To detect the operating state of the electronic device.
检测单元 41还包括检测告警模块 414以及修复模块 415 , 其中  The detecting unit 41 further includes a detecting alarm module 414 and a repairing module 415, wherein
检测告警模块 414用于当检测报文校验模块 413检测出电子设备 4处于非 正常运行时, 根据检测结果进行告警。 具体地, 当检测出电子设备 4处于非正 常运行时, 检测告警模块 414将进一步检测该检测报文具体在哪个功能单元发 生了问题, 并可以根据检测结果生产报告以及时上报告警, 以便采取自愈措施 或其他解决方案, 保证电子设备 4的正常运行。  The detection alarm module 414 is configured to perform an alarm according to the detection result when the detection message verification module 413 detects that the electronic device 4 is in abnormal operation. Specifically, when it is detected that the electronic device 4 is in abnormal operation, the detection alarm module 414 further detects which functional unit has a problem in the detection message, and can generate a report according to the detection result and report the alarm on time to take Self-healing measures or other solutions ensure the normal operation of the electronic device 4.
修复模块 415用于当检测报文校验模块 413检测出电子设备 4处于非正常 运行时, 根据检测结果对电子设备 4进行自动修复。 具体地, 例如电子设备 4 的某功能单元出现软失效的问题, 那么修复模块 415 可以根据检测结果对该功 能单元进行自动修复。 下面, 结合图 3 示出的本发明实施例的电子设备中检测报文传输路径的示 意图, 来进一步地说明: The repair module 415 is configured to automatically repair the electronic device 4 according to the detection result when the detection message verification module 413 detects that the electronic device 4 is in abnormal operation. Specifically, for example, a certain functional unit of the electronic device 4 has a soft failure problem, and the repair module 415 can automatically repair the functional unit according to the detection result. In the following, a schematic diagram of detecting a message transmission path in an electronic device according to an embodiment of the present invention shown in FIG. 3 is further illustrated:
电子设备包括多个芯片, 该多个芯片即为多个功能单元; 本发明实施例的 检测单元为图 3中的芯片 a, 该芯片 a可以为电子设备的主 CPU芯片, 芯片 a 还包括检测报文生成模块、 检测报文校验模块以及多个模块, 检测报文生成模 块模拟报文源, 根据电子设备内部或电子设备外部的报文协议生成至少一个用 于检测所述电子设备的检测报文, 图 3 中一个箭头表示一个报文, 可以生成多 个不同类别的检测报文, 然后通过所述电子设备在运行时预留的用于建立数据 报文传输路径的资源, 按照电子设备设置好的数据流的走向顺序, 控制所述检 测报文依次经过所述电子设备中各功能单元, 比如在芯片 a中先通过模块 1 , 然 后传输到芯片 b, 在芯片 b中传输完后, 传输到下一个功能单元;  The electronic device includes a plurality of chips, and the plurality of chips are a plurality of functional units. The detecting unit of the embodiment of the present invention is the chip a in FIG. 3, and the chip a can be a main CPU chip of the electronic device, and the chip a further includes detection. The packet generation module, the detection packet verification module, and the plurality of modules, the detection packet generation module simulates the message source, and generates at least one detection for detecting the electronic device according to a message protocol inside the electronic device or outside the electronic device. A message, an arrow in FIG. 3 indicates a message, which can generate a plurality of different types of detection messages, and then the resources reserved for establishing the data message transmission path reserved by the electronic device at the time of operation, according to the electronic device Setting the direction of the data flow, the control message is sequentially passed through each functional unit in the electronic device, for example, in the chip a, first through the module 1, and then transmitted to the chip b, after being transmitted in the chip b, Transfer to the next functional unit;
当所述检测报文经过所述电子设备中的边缘功能单元时,如图 3中的芯片 c, 那么该芯片 c将根据预设的环回标识对检测报文环回, 将所述检测报文发往下 一个功能单元, 具体地, 在电子设备设置数据流的走向顺序时, 将预先设置到 达边缘功能单元(图 3中芯片 c )时, 可以通过一个环回标识触发边缘功能单元 进行识别, 以识别出需要在该边缘功能单元中对该检测报文进行环回, 以将该 检测报文发往下一个功能单元, 如图 3中将检测报文发送到芯片 n;  When the detection packet passes through the edge function unit in the electronic device, such as the chip c in FIG. 3, the chip c will loop back the detection packet according to the preset loopback identifier, and the detection report is The text is sent to the next functional unit. Specifically, when the electronic device sets the direction of the data flow, the edge function unit (chip c in FIG. 3) is preset in advance, and the edge function unit can be triggered by a loopback identifier. In order to identify that the detection message needs to be looped back in the edge function unit, to send the detection message to the next functional unit, as shown in FIG. 3, the detection message is sent to the chip n;
最终检测报文返回到芯片 a, 芯片 a的检测报文校验模块根据所述检测报文 携带的检验字段对检测报文进行校验, 以检测出所述电子设备的运行状态; 当 检测出所述电子设备处于非正常运行时, 将进一步检测该检测报文具体在哪个 功能单元发生了问题, 并可以根据检测结果生产报告以及时上报告警, 以便采 取自愈措施或其他解决方案, 保证电子设备的正常运行。  The detection packet is returned to the chip a, and the detection packet verification module of the chip a checks the detection packet according to the check field carried in the detection packet to detect the running state of the electronic device; When the electronic device is in abnormal operation, it will further detect which functional unit has a problem in the detection message, and can generate a report according to the detection result and report the alarm on time to take self-healing measures or other solutions to ensure The normal operation of electronic equipment.
需要说明的是, 本发明实施例中的检测报文的产生和检测的过程可以完全 是实时自动进行的; 检测的算法可以根据功能单元的所处的网络地位和具体情 况来设计, 可达到精确检测功能单元健康状况, 又不会引起误判断。  It should be noted that the process of generating and detecting the detection message in the embodiment of the present invention may be automatically performed in real time; the detection algorithm may be designed according to the network status and specific conditions of the functional unit, and the accuracy may be achieved. Detecting the health of the functional unit without causing misjudgment.
实施本发明实施例, 通过所述电子设备在运行时预留的用于建立数据报文 传输路径的资源, 控制所述检测报文依次经过所述电子设备中各功能单元, 解 决了现有技术中报文无法覆盖现实环境中的数据报文路径, 对数据报文路径上 的器件失效检测的功能和效果十分有限的问题; 通过模拟设备内部和 /或设备外 部数据源生成检测报文, 使用全通信系统预留的资源可实现对电子设备在运行 期间实时自动全面检测功能单元的健康状态, 发现问题及时采取自愈或其他措 施, 保证通信电子设备的正常运行, 解决了因器件失效而导致功能单元运行状 态异常的情况无法及时和最大程度得到检测的问题。 The embodiment of the present invention solves the prior art by controlling resources for establishing a data packet transmission path reserved by the electronic device during operation, and controlling the detection message to sequentially pass through each functional unit in the electronic device. The medium message cannot cover the data packet path in the real environment, and the function and effect of device failure detection on the data message path are very limited. The detection message is generated by simulating the internal data of the device and/or the external data source of the device. The resources reserved by the full communication system can be implemented to operate on the electronic device. During the period, the health status of the functional unit is automatically and completely detected in real time, and the problem is taken in time to take self-healing or other measures to ensure the normal operation of the communication electronic device, and the abnormal operation state of the functional unit due to the device failure cannot be detected in time and at the maximum extent. The problem.
应用本发明实施例的电子设备, 进行检测的具体流程与前述方法实施例相 同, 此处不再赘述。  The specific process for performing the detection by using the electronic device in the embodiment of the present invention is the same as the foregoing method embodiment, and details are not described herein again.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程, 是可以通过计算机程序来指令相关的硬件来完成, 所述的程序可存储于一计算 机可读取存储介质中, 该程序在执行时, 可包括如上述各方法的实施例的流程。 其中, 所述的存储介质可为磁碟、 光盘、 只读存储记忆体(Read-Only Memory, ROM )或随机存储记忆体(Random Access Memory, RAM )等。  A person skilled in the art can understand that all or part of the process of implementing the above embodiment method can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. In execution, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
以上所揭露的仅为本发明一种较佳实施例而已, 当然不能以此来限定本发 明之权利范围, 因此依本发明权利要求所作的等同变化, 仍属本发明所涵盖的 范围。  The above description is only a preferred embodiment of the present invention, and the scope of the present invention is not limited thereto, and the equivalent changes made by the claims of the present invention are still within the scope of the present invention.

Claims

权 利 要 求 Rights request
1、 一种电子设备检测的方法, 其特征在于, 包括:  A method for detecting an electronic device, comprising:
生成用于检测电子设备的检测报文;  Generating a detection message for detecting the electronic device;
通过所述电子设备在运行时预留的用于建立数据报文传输路径的资源, 控 制所述检测报文依次经过所述电子设备中各功能单元;  Controlling, by the electronic device, the resource for establishing a data packet transmission path, and controlling the detection packet to pass through each functional unit in the electronic device;
对依次经过所述电子设备中各功能单元后的检测报文进行校验, 以检测出 所述电子设备的运行状态。  The detection message after passing through each functional unit in the electronic device is checked to detect the running state of the electronic device.
2、 如权利要求 1所述的电子设备检测的方法, 其特征在于, 所述生成用于 检测电子设备的检测报文包括: 2. The method of detecting an electronic device according to claim 1, wherein the generating the detection message for detecting the electronic device comprises:
根据电子设备内部或电子设备外部的报文协议生成至少一个用于检测所述 电子设备的检测报文, 所述检测报文携带有检测标识。  And generating at least one detection packet for detecting the electronic device according to a message protocol in the electronic device or outside the electronic device, where the detection message carries a detection identifier.
3、 如权利要求 2所述的电子设备检测的方法, 其特征在于, 所述通过所述 电子设备在运行时预留的用于建立数据报文传输路径的资源, 控制所述检测报 文依次经过所述电子设备中各功能单元包括: The method for detecting an electronic device according to claim 2, wherein the detecting the message by using the resource reserved for establishing a data packet transmission path reserved by the electronic device during operation Each functional unit in the electronic device includes:
通过所述电子设备在运行时预留的用于建立数据报文传输路径的资源, 当 所述检测报文经过所述电子设备中的边缘功能单元时, 所述边缘功能单元将根 据预设的环回标识对检测报文环回, 将所述检测报文发往下一个功能单元。  When the detection packet passes through an edge function unit in the electronic device, the edge function unit is configured according to a preset, by using a resource reserved for the data message transmission path reserved by the electronic device during operation. The loopback identifier loops back the detected packet, and sends the detection packet to the next functional unit.
4、 如权利要求 1-3任一项所述的电子设备检测的方法, 其特征在于, 所述 检测报文携带有检验字段; The method for detecting an electronic device according to any one of claims 1 to 3, wherein the detection message carries a check field;
所述对依次经过所述电子设备中各功能单元后的检测报文进行校验, 以检 测出所述电子设备的运行状态包括:  And verifying, by the detecting, the detection message of each of the functional units in the electronic device, to detect the running status of the electronic device, including:
根据所述检测报文携带的检验字段, 对依次经过所述电子设备中各功能单 元后的检测报文进行校验, 以检测出所述电子设备的运行状态。  And detecting, according to the check field carried in the detection packet, a detection packet that is sequentially passed through each functional unit in the electronic device, to detect an operating state of the electronic device.
5、 如权利要求 4所述的电子设备检测的方法, 其特征在于, 当检测出所述 电子设备处于非正常运行时, 根据检测结果进行告警。 The method for detecting an electronic device according to claim 4, wherein when the electronic device is detected to be in an abnormal operation, an alarm is generated according to the detection result.
6、 如权利要求 5所述的电子设备检测的方法, 其特征在于, 所述当检测出 所述电子设备处于非正常运行时, 根据检测结果进行告警包括: The method for detecting an electronic device according to claim 5, wherein, when detecting that the electronic device is in abnormal operation, performing an alarm according to the detection result includes:
根据检测结果对所述电子设备进行自动修复。  The electronic device is automatically repaired according to the detection result.
7、 一种电子设备, 包括检测单元和功能单元, 其特征在于, 所述检测单元 包括: An electronic device, comprising a detecting unit and a functional unit, wherein the detecting unit comprises:
检测报文生成模块, 用于生成用于检测所述电子设备的检测报文; 检测报文控制模块, 用于通过所述电子设备在运行时预留的用于建立数据 报文传输路径的资源, 控制所述检测报文依次经过所述电子设备中各功能单元; 检测报文校验模块, 用于对依次经过所述电子设备中各功能单元后的检测 报文进行校验, 以检测出所述电子设备的运行状态。  a detection packet generating module, configured to generate a detection packet for detecting the electronic device, and a detection packet control module, configured to reserve, by using the electronic device, a resource for establishing a data packet transmission path at runtime Controlling the detection message to pass through each functional unit in the electronic device in sequence; and detecting a message verification module, configured to perform verification on the detection message after sequentially passing through each functional unit in the electronic device, to detect The operating state of the electronic device.
8、 如权利要求 7所述电子设备, 其特征在于, 所述检测报文生成模块具体 电子设备的检测报文, 所述检测报文携带有检测标识。 The electronic device according to claim 7, wherein the detection packet generation module is configured to detect a packet of the electronic device, and the detection packet carries a detection identifier.
9、 如权利要求 8所述电子设备, 其特征在于, 所述功能单元包括至少一个 边缘功能单元; 当所述检测报文经过所述边缘功能单元时, 所述边缘功能单元 用于将根据预设的环回标识对检测报文环回, 将所述检测报文发往下一个功能 单元。 The electronic device according to claim 8, wherein the functional unit includes at least one edge function unit; when the detection message passes through the edge function unit, the edge function unit is used to The loopback identifier is set to detect the loopback of the packet, and sends the detection packet to the next functional unit.
10、 如权利要求 7-9任一项所述电子设备, 其特征在于, 所述检测报文携带 有检验字段; The electronic device according to any one of claims 7 to 9, wherein the detection message carries a check field;
所述检测报文校验模块具体用于根据所述检测报文携带的检验字段, 对依 次经过所述电子设备中各功能单元后的检测报文进行校验, 以检测出所述电子 设备的运行状态。  The detecting packet verification module is configured to check, according to the check field carried in the detection packet, a detection packet that is sequentially passed through each functional unit in the electronic device, to detect the electronic device. Operating status.
11、 如权利要求 10所述电子设备, 其特征在于, 所述检测单元还包括检测 告警模块, 用于当所述检测报文校验模块检测出所述电子设备处于非正常运行 时, 根据检测结果进行告警。 The electronic device according to claim 10, wherein the detecting unit further comprises: a detecting alarm module, configured to: when the detecting message verifying module detects that the electronic device is in abnormal operation When an alarm is generated based on the detection result.
12、 如权利要求 11所述电子设备, 其特征在于, 所述检测单元还包括修复 模块, 用于当所述检测报文校验模块检测出所述电子设备处于非正常运行时, 根据检测结果对所述电子设备进行自动修复。 The electronic device according to claim 11, wherein the detecting unit further comprises a repairing module, configured to: when the detecting message verifying module detects that the electronic device is in abnormal operation, according to the detection result Automatic repair of the electronic device.
PCT/CN2011/078902 2011-08-25 2011-08-25 Method for testing electronic device, and electronic device WO2012119416A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2011800021534A CN102369684A (en) 2011-08-25 2011-08-25 Electronic device detection method and electronic device
PCT/CN2011/078902 WO2012119416A1 (en) 2011-08-25 2011-08-25 Method for testing electronic device, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/078902 WO2012119416A1 (en) 2011-08-25 2011-08-25 Method for testing electronic device, and electronic device

Publications (1)

Publication Number Publication Date
WO2012119416A1 true WO2012119416A1 (en) 2012-09-13

Family

ID=45761460

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/078902 WO2012119416A1 (en) 2011-08-25 2011-08-25 Method for testing electronic device, and electronic device

Country Status (2)

Country Link
CN (1) CN102369684A (en)
WO (1) WO2012119416A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104065160A (en) * 2014-06-06 2014-09-24 武汉中元华电科技股份有限公司 Method for processing abnormal message in electric power system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR3045986B1 (en) * 2015-12-21 2018-02-02 Psa Automobiles Sa. DEVICE FOR TESTING AT LEAST ONE PART OF THE PHYSICAL LAYER OF A HIGH SPEED WIRED COMMUNICATION NETWORK

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996898A (en) * 2005-12-28 2007-07-11 中兴通讯股份有限公司 A system and method for real time detection of the data channel states
CN101848114A (en) * 2010-04-15 2010-09-29 华为技术有限公司 Fault detection method and device
CN102143014A (en) * 2010-11-03 2011-08-03 华为数字技术有限公司 Single board failure detection method, single board and router

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651581B (en) * 2009-09-11 2012-02-29 中兴通讯股份有限公司 Network system and calibration method for calibrating business

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996898A (en) * 2005-12-28 2007-07-11 中兴通讯股份有限公司 A system and method for real time detection of the data channel states
CN101848114A (en) * 2010-04-15 2010-09-29 华为技术有限公司 Fault detection method and device
CN102143014A (en) * 2010-11-03 2011-08-03 华为数字技术有限公司 Single board failure detection method, single board and router

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104065160A (en) * 2014-06-06 2014-09-24 武汉中元华电科技股份有限公司 Method for processing abnormal message in electric power system
CN104065160B (en) * 2014-06-06 2016-01-27 武汉中元华电科技股份有限公司 Exception message processing method in a kind of electric power system

Also Published As

Publication number Publication date
CN102369684A (en) 2012-03-07

Similar Documents

Publication Publication Date Title
US9363145B2 (en) Programmatically simulating system conditions
US8547845B2 (en) Soft error recovery for converged networks
Zhuang et al. {NetCheck}: Network Diagnoses from Blackbox Traces
CN104348578B (en) The method and device of data processing
CN110232012A (en) A kind of fuzz testing language protocol test script and testing engine based on xml
US20220014457A1 (en) Methods, systems and computer readable media for stateless service traffic generation
WO2012119416A1 (en) Method for testing electronic device, and electronic device
US10917504B1 (en) Identifying the source of CRC errors in a computing network
CN109495330B (en) Method and device for realizing UDP interception test
JP2014131212A (en) Verification program and information processing device
WO2022222479A1 (en) Network detection method and apparatus, and device and storage medium
KR20230068990A (en) Systems and methods for detecting intra-chip communication errors in a reconfigurable hardware system
CN110324283A (en) Licensing Methods, apparatus and system based on asymmetric encryption
WO2021077797A1 (en) Quality of service measurement method and device, and user plane function
CN111431739B (en) QualNet-oriented dynamic fault setting method for simulation communication network
CN111221764B (en) Cross-link data transmission method and system
WO2017054558A1 (en) Multicast diagnosis method and apparatus
US10116491B1 (en) Network cabling verification
US10162733B2 (en) Debugging failure of a service validation test
US11646957B1 (en) Network packet loss period expansion
KR101888041B1 (en) Method and apparatus for network diagnosis processing
CN110868321B (en) Fault positioning method and system based on edge calculation algorithm verification
Al‐tekreeti et al. An end‐user‐centric test generation methodology for performance evaluation of mobile networked applications
KR101859988B1 (en) Apparatus and method for selectively collecting network packets
CN106385417A (en) Computing equipment and equipment communication method

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180002153.4

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11860296

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11860296

Country of ref document: EP

Kind code of ref document: A1