CN107369306B - Duplicate code detection method, duplicate code detection device and electronic equipment - Google Patents

Duplicate code detection method, duplicate code detection device and electronic equipment Download PDF

Info

Publication number
CN107369306B
CN107369306B CN201710454697.3A CN201710454697A CN107369306B CN 107369306 B CN107369306 B CN 107369306B CN 201710454697 A CN201710454697 A CN 201710454697A CN 107369306 B CN107369306 B CN 107369306B
Authority
CN
China
Prior art keywords
code
dark current
detected
address code
address
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.)
Active
Application number
CN201710454697.3A
Other languages
Chinese (zh)
Other versions
CN107369306A (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.)
Tanda Technology Co ltd
Original Assignee
Tanda Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tanda Technology Co ltd filed Critical Tanda Technology Co ltd
Priority to CN201710454697.3A priority Critical patent/CN107369306B/en
Publication of CN107369306A publication Critical patent/CN107369306A/en
Application granted granted Critical
Publication of CN107369306B publication Critical patent/CN107369306B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B29/00Checking or monitoring of signalling or alarm systems; Prevention or correction of operating errors, e.g. preventing unauthorised operation
    • G08B29/18Prevention or correction of operating errors
    • G08B29/185Signal analysis techniques for reducing or preventing false alarms or for enhancing the reliability of the system
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R19/00Arrangements for measuring currents or voltages or for indicating presence or sign thereof
    • G01R19/165Indicating that current or voltage is either above or below a predetermined value or within or outside a predetermined range of values

Abstract

The invention discloses a duplicate code detection method, a duplicate code detection device and electronic equipment, wherein the duplicate code detection method comprises the following steps: acquiring a code returning dark current value on a loop bus within a preset time after the code is sent to an address code to be detected; calculating a dark current ratio of a code returning dark current value on the loop bus to a preset code returning dark current value; and if the dark current ratio is larger than a preset first dark current ratio threshold, determining that the address code to be detected has a duplicate code. The scheme of the invention can quickly find the coincident code phenomenon in the automatic fire alarm system and ensure the normal operation of the automatic fire alarm system.

Description

Duplicate code detection method, duplicate code detection device and electronic equipment
Technical Field
The invention relates to the technical field of automatic fire alarm, in particular to a duplicate code detection method, a duplicate code detection device, electronic equipment and a computer readable storage medium.
Background
The fire automatic alarm system generally comprises a fire alarm controller, fire detectors connected with the fire alarm controller and distributed at monitoring points and control points, a combustible gas detector, an electrical appliance fire detector, a manual fire alarm button, a fire hydrant button, an input module, an input/output module, a relay module, an audible and visual alarm, a fire display panel and other front-end equipment, wherein the fire alarm controller is connected with the front-end equipment in a two-bus mode, under general conditions, the number of the front-end equipment which can be carried on two buses is dozens or even hundreds, and the fire alarm controller can configure unique address codes for the front-end equipment in order to timely acquire the feedback state of the front-end equipment. If more than two front-end devices have the same address code, false alarm may occur when there is no fire alarm condition, or the position of the fire alarm condition cannot be identified when there is a fire alarm condition, which seriously affects the normal operation of the automatic fire alarm system.
Disclosure of Invention
In view of this, the present invention provides a duplicate code detection method, a duplicate code detection apparatus, an electronic device and a computer readable storage medium, which are intended to quickly find a duplicate code phenomenon in an automatic fire alarm system and ensure the normal operation of the automatic fire alarm system.
A first aspect of the present invention provides a duplicate code detection method, including:
acquiring a code returning dark current value on a loop bus within a preset time after the code is sent to an address code to be detected;
calculating a dark current ratio of a code returning dark current value on the loop bus to a preset code returning dark current value;
and if the dark current ratio is larger than a preset first dark current ratio threshold, determining that the address code to be detected has a duplicate code.
A second aspect of the present invention provides a duplicate code detection apparatus, including:
the loop dark current acquisition unit is used for acquiring a loop dark current value on a loop bus within a preset time after the code is sent to the address code to be detected;
the dark current ratio calculation unit is used for calculating the dark current ratio of the code returning dark current value on the loop bus to a preset code returning dark current value;
and the detection result determining unit is used for determining that the address code to be detected has a duplicate code when the dark current ratio is greater than a preset first dark current ratio threshold.
A third aspect of the invention provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method as described above when executing the computer program.
A fourth aspect of the invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method as described above.
As can be seen from the above, in the present invention, first, in a preset time after a code is sent to an address code to be detected, a code return dark current value on a loop bus is obtained, then, a dark current ratio between the code return dark current value on the loop bus and a preset code return dark current value is calculated, and when the dark current ratio is greater than a preset first dark current ratio threshold, it can be determined that the address code to be detected has a duplicate code. According to the invention, whether the front-end equipment has a coincident code phenomenon or not can be quickly known through judging the amplitude of the return code dark current, so that the normal operation of each front-end equipment and the automatic fire alarm system is ensured.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions 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 to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flow chart illustrating an implementation of a duplicate code detection method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a duplicate code detection apparatus according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an electronic device provided in an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Example one
Fig. 1 shows an implementation process of the duplicate code detection method provided in the first embodiment of the present invention, which is detailed as follows:
in step S101, a code return dark current value on the loop bus is obtained within a preset time after the code is sent to the address code to be detected;
in the embodiment of the invention, the return code dark current value on the loop bus is obtained within the preset time after the loop card of the fire alarm controller sends the code to the address code to be detected. After the loop card sends a code to an address, if a front-end device is connected to the address, the front-end device will respond to the code sent by the loop card, that is, the front-end device will send a code back to the loop card of the fire alarm controller. When the code is returned, a dark current is generated on the loop bus, and generally speaking, the dark current when the code is returned by different front-end devices is the same.
In step S102, calculating a dark current ratio between a code returning dark current value on the loop bus and a preset code returning dark current value;
in the embodiment of the present invention, after the code returning dark current value on the loop bus is obtained in step S101, a dark current ratio between the code returning dark current value on the loop bus and a preset code returning dark current value may be calculated. Although the dark current values of the front-end devices of one automatic fire alarm system during code returning are the same, the code returning dark current values of the front-end devices of different automatic fire alarm systems obviously cannot be consistent, so that the preset code returning dark current value can be an empirical value set by a manufacturer according to the self-developed automatic fire alarm system, and is not limited herein.
In step S103, if the dark current ratio is greater than a preset first dark current ratio threshold, it is determined that the address code to be detected has a duplicate code.
In the embodiment of the present invention, the dark current ratio threshold is compared with a preset first dark current ratio, and if the dark current ratio is greater than the preset first dark current ratio threshold, it is determined that the address to be detected has a duplicate code, where the first dark current ratio threshold is greater than 1. The duplication code means that one address code corresponds to two front-end devices, that is, the two front-end devices have the same address code. Because the dark current value of the front-end equipment is always kept stable when the code is returned, when more than two front-end equipment with the same address code exist in the automatic fire alarm system and the loop card sends the code to the address code, the more than two front-end equipment can simultaneously receive the code sent by the loop card and further can simultaneously carry out code returning operation on the code. When more than two front-end devices return codes at the same time, the brought code returning dark currents are overlapped, so that the code returning dark current value on the loop bus is larger than the code returning dark current value of one front-end device in the normal condition when the code returns. Therefore, when the dark current ratio is detected to be greater than the preset first dark current ratio threshold in step S103, it may be determined that the address code to be detected has a duplicate code, that is, the address code of two or more front-end devices existing in the automatic fire alarm system is the address code to be detected.
Optionally, in order to obtain a state of the front-end device corresponding to the address code to be detected, the duplicate code detection method further includes:
if the dark current ratio is smaller than a preset second dark current ratio threshold, determining that the address code to be detected has no returned code;
when the dark current ratio is not greater than a preset first dark current ratio threshold, determining that the address code to be detected does not have coincident codes; but at this time, the state of the front-end device to be detected with the address code still cannot be determined. In order to determine whether the front-end device of the address code to be detected normally operates, the dark current ratio may be continuously compared with a preset second dark current ratio threshold, and when the dark current ratio is smaller than the preset second dark current ratio threshold, it may be determined that the address code to be detected does not return, where the second dark current ratio threshold is smaller than the first dark current ratio threshold, and optionally, a value interval of the second dark current ratio threshold is within an open interval of (0, 1). When the code return exists, the code return dark current is generated on the loop bus, so that it can be considered that when the dark current ratio of the code return dark current value on the loop bus to the preset code return dark current value is smaller than the preset second dark current ratio threshold, the code return dark current is not generated on the loop bus, that is, the address code to be detected has no code return.
Optionally, when it is determined that the address code to be detected has no returned code, in order to further determine a reason why the address code to be detected has no returned code, the repeated code detection method further includes:
acquiring a historical detection record of the address code to be detected;
if the historical detection records of the address code to be detected are all code return-free records, determining that the address code to be detected has no corresponding front-end equipment;
and if the historical detection record of the address code to be detected has a code return record, determining that the corresponding front-end equipment of the address code to be detected has a fault.
When the address code to be detected has no return code, two situations may occur: the first condition is that the address code to be detected has no corresponding front-end device, that is, the address code to be detected is empty and is not allocated to any front-end device, in this case, because the address code to be detected has no corresponding front-end device, it is normal that the address code to be detected has no code return, and excessive attention is not required; the second situation is that the address to be detected has corresponding front-end equipment, but the corresponding front-end equipment fails, so that the address code to be detected does not have a code return. In order to find out which kind of situation is specifically the corresponding front-end device when the address code to be detected has no return code, in the embodiment of the present invention, a history detection record of the address code to be detected may be obtained and referred to. In the history record, the detection result of each address code that has been subjected to duplicate code detection by using the method of the embodiment of the present invention is recorded. If the address code to be detected is subjected to duplicate code detection by using the scheme of the embodiment of the invention, the historical detection record of the address code to be detected can be searched. If the historical detection records of the address code to be detected are found by looking up to show that the duplicate code detection results of each time are the non-duplicate code record, that is, when the duplicate code detection is carried out on the address code to be detected, the state that the duplicate code is not found every time is the non-duplicate code state, the fact that the address code to be detected does not have the corresponding front-end equipment can be determined. If the historical detection records of the address code to be detected are found by looking up to show that a code return record exists once, namely, when the address code to be detected is subjected to duplicate code detection and is in a code return state at least once, determining that the corresponding front-end equipment of the address code to be detected has a fault, and requiring a worker of a manufacturer to maintain and check the corresponding front-end equipment of the address code to be detected. It should be noted that the past code records include normal code records and duplicate code records.
Optionally, in order to sequentially perform duplicate code detection on each address code in the automatic fire alarm system, the duplicate code detection method further includes:
acquiring a preset address code interval to be detected;
and sequentially determining each address code in the address code interval to be detected as the address code to be detected.
The address code of each front-end device of the fire automatic alarm system has a plurality of coding modes, and in most cases, a continuous coding mode is adopted when the front-end device is coded. Therefore, in order to sequentially detect duplicate codes of each address code in the automatic fire alarm system, in the embodiment of the present invention, a preset address code interval to be detected may be first obtained, which may specifically be represented by obtaining a minimum address code and a maximum address code in the automatic fire alarm system, and determining the minimum address code and the maximum address code as two end points of the preset address code interval to be detected. And then, sequentially determining each address code in the address code interval to be detected as the address code to be detected. The minimum address code in the address code interval to be detected is determined as the address code to be detected, after the duplication code detection is completed, the address code to be detected is added by one to form a new address code to be detected, and the process is repeated until the maximum address code in the address code interval to be detected is detected, and then the minimum address code in the address code interval to be detected is returned to be detected, so that the cyclic detection that the address codes are sequentially added is formed; certainly, the largest address code in the address code interval to be detected can be determined as the address code to be detected, after the duplication code detection is completed, the address code to be detected is reduced by one to become a new address code to be detected, and the rest can be done in sequence, and the largest address code in the address code interval to be detected is returned to be detected after the smallest address code in the address code interval to be detected is detected, so that the cyclic detection that the address codes are reduced in sequence is formed; of course, the address code to be detected may also be sequentially determined in the address code interval to be detected in other suitable manners according to the setting of the manufacturer staff or the user, which is not limited herein.
Optionally, in order to further improve the efficiency of duplicate code detection, the duplicate code detection method further includes:
if the address code to be detected is determined to have no corresponding front-end equipment, determining the address code to be detected as a null address code;
the above sequentially determining each address code in the address code interval to be detected as an address code to be detected specifically includes:
and sequentially determining other address codes except the empty address code in the address code interval to be detected as the address codes to be detected.
In the duplicate code detection process, because the code return condition of each address code is detected circularly in the address code interval to be detected, after the empty address code without the front-end equipment is determined, the empty address code is repeatedly detected meaninglessly to avoid resource waste, and when the address code to be detected is determined, other address codes except the empty address code in the address code interval to be detected can be determined as the address code to be detected in sequence.
Optionally, the step S101 includes:
detecting the voltage value of a test resistor on a loop bus within a preset time after the code is sent to an address code to be detected;
acquiring the resistance value of a test resistor on the loop bus;
and calculating to obtain the dark current value of the code return on the loop bus according to the voltage value and the resistance value of the test resistor on the loop bus.
In a preset time after the code is sent to the address code to be detected, the voltages at two ends of the test resistor on the loop bus can be sampled, and the voltage value of the test resistor is obtained. Then, the resistance value of the test resistor on the loop bus is obtained, and since the test resistor is selected by the operator of the manufacturer, the preset resistance value of the test resistor may be obtained here, or the resistance value of the test resistor may be input by the operator, which is not limited here. And after the voltage value and the resistance value of the test resistor are obtained, calculating the code returning dark current value on the loop bus according to ohm's law. Further, since the analog signal is obtained when the voltage at the two ends of the test resistor on the loop bus is sampled, in this step, analog-to-digital conversion and other signal processing operations need to be further performed on the analog signal of the voltage obtained by sampling, so as to obtain an accurate code returning dark current value.
Therefore, in the embodiment of the invention, whether the front-end equipment has the double code phenomenon can be quickly known by judging the amplitude of the code returning dark current, and whether the front-end equipment has the fault can be judged by combining the amplitude of the code returning dark current and a historical detection record. The operation process is simple, and the normal operation of each front-end device and the automatic fire alarm system can be guaranteed.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Example two
Fig. 2 shows a block diagram of a duplicate code detection apparatus according to an embodiment of the present invention, which corresponds to the duplicate code detection method of the first embodiment.
Referring to fig. 2, the duplicate detection apparatus 3 includes: a loop dark current acquisition unit 21, a dark current ratio calculation unit 22, and a detection result determination unit 23.
The loop dark current obtaining unit 21 is configured to obtain a loop dark current value on a loop bus within a preset time after a code is sent to an address code to be detected;
a dark current ratio calculation unit 22, configured to calculate a dark current ratio between a code returning dark current value on the loop bus and a preset code returning dark current value;
the detection result determining unit 23 is configured to determine that the address code to be detected has a duplicate code when the dark current ratio is greater than a preset first dark current ratio threshold.
Optionally, the detection result determining unit 23 is further configured to determine that the address code to be detected has no returned code when the dark current ratio is smaller than a preset second dark current ratio threshold;
the second dark current ratio threshold is less than or equal to the first dark current ratio threshold.
Optionally, the duplicate code detection apparatus 2 further includes:
the detection record acquisition unit is used for acquiring the historical detection record of the address code to be detected when the address code to be detected has no returned code;
the detection result determining unit 23 is specifically configured to determine that the address code to be detected has no corresponding front-end device when the historical detection records of the address code to be detected are all no return code records, and determine that the corresponding front-end device of the address code to be detected has a fault when the historical detection records of the address code to be detected have return code records.
Optionally, the duplicate code detection apparatus 2 further includes:
the device comprises an address code interval acquisition unit, a detection unit and a control unit, wherein the address code interval acquisition unit is used for acquiring a preset address code interval to be detected;
and the to-be-detected address code determining unit is used for sequentially determining each address code in the to-be-detected address code interval as the to-be-detected address code.
Optionally, the duplicate code detection apparatus 2 further includes:
a null address code determining unit, configured to determine, as a null address code, the address code to be detected that is determined by the detection result determining unit and does not have a corresponding front-end device;
the address code determining unit to be detected is specifically configured to sequentially determine, as the address code to be detected, each of the other address codes except the empty address code in the address code interval to be detected.
Alternatively, the loop dark current obtaining unit 21 includes:
the voltage detection subunit is used for detecting the voltage value of the test resistor on the loop bus within the preset time after the code is sent to the address code to be detected;
the resistance value obtaining subunit is used for obtaining the resistance value of the test resistor on the loop bus;
and the dark current calculating subunit is used for calculating the code returning dark current value on the loop bus according to the voltage value and the resistance value of the test resistor on the loop bus.
Therefore, in the embodiment of the present invention, the duplication code detection apparatus can quickly know whether the front-end device has the duplication code phenomenon by determining the amplitude of the dark current of the code return, and can also determine whether the front-end device has a fault by combining the amplitude of the dark current of the code return and the historical detection record. The operation process is simple, and the normal operation of each front-end device and the automatic fire alarm system can be guaranteed.
EXAMPLE III
Fig. 3 is a schematic diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 3, the electronic apparatus 3 of this embodiment includes: a processor 30, a memory 31 and a computer program 32, such as an duplicate code detection program, stored in the memory 31 and executable on the processor 30. The processor 30 executes the computer program 32 to implement the steps in the above embodiments of the duplicate code detection method, such as the steps S101 to S103 shown in fig. 1. Alternatively, the processor 30 implements the functions of the modules/units in the device embodiments, such as the functions of the units 21 to 23 shown in fig. 2, when executing the computer program 32.
Illustratively, the computer program 32 may be divided into one or more units, which are stored in the memory 31 and executed by the processor 30 to accomplish the present invention. The one or more units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 32 in the electronic device 3. For example, the computer program 32 may be divided into a loop dark current obtaining unit, a dark current ratio calculating unit, and a detection result determining unit, and the specific functions of the units are as follows:
the loop dark current acquisition unit is used for acquiring a loop dark current value on a loop bus within a preset time after the code is sent to the address code to be detected;
the dark current ratio calculation unit is used for calculating the dark current ratio of the code returning dark current value on the loop bus to a preset code returning dark current value;
and the detection result determining unit is used for determining that the address code to be detected has a duplicate code when the dark current ratio is greater than a preset first dark current ratio threshold.
The electronic device 3 may be a computing device such as an automatic fire alarm controller. The electronic device may include, but is not limited to, a processor 30 and a memory 31. It will be appreciated by those skilled in the art that fig. 3 is merely an example of the electronic device 3, and does not constitute a limitation of the electronic device 3, and may include more or less components than those shown, or combine certain components, or different components, for example, the electronic device may also include input-output devices, network access devices, buses, etc.
The Processor 30 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 31 may be an internal storage unit of the electronic device 3, such as a hard disk or a memory of the electronic device 3. The memory 31 may be an external storage device of the electronic device 3, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided in the electronic device 3. Further, the memory 31 may include both an internal storage unit and an external storage device of the electronic device 3. The memory 31 is used to store the computer program and other programs and data required by the electronic device. The above-mentioned memory 31 may also be used to temporarily store data that has been output or is to be output.
Therefore, in the embodiment of the invention, the electronic device can quickly know whether the front-end device has the double code phenomenon through judging the amplitude of the code returning dark current, and can judge whether the front-end device has the fault by combining the amplitude of the code returning dark current and the historical detection record. The operation process is simple, and the normal operation of each front-end device and the automatic fire alarm system can be guaranteed.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. 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.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the above modules or units is only one logical function division, and there may be other division manners in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units described above, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium and can implement the steps of the embodiments of the method when the computer program is executed by a processor. . The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable medium described above may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media excludes electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (4)

1. A duplicate code detection method, characterized in that the duplicate code detection method comprises:
acquiring a code returning dark current value on a loop bus within a preset time after the code is sent to an address code to be detected;
calculating a dark current ratio of a code returning dark current value on the loop bus to a preset code returning dark current value;
if the dark current ratio is larger than a preset first dark current ratio threshold, determining that the address code to be detected has a duplicate code, wherein the first dark current ratio threshold is larger than 1;
if the dark current ratio is smaller than a preset second dark current ratio threshold, determining that the address code to be detected has no returned code, and acquiring a historical detection record of the address code to be detected, wherein the second dark current ratio threshold is smaller than the first dark current ratio threshold;
if the historical detection records of the address code to be detected are all code return-free records, determining that the address code to be detected has no corresponding front-end equipment;
and if the historical detection records of the address code to be detected have code return records, determining that the corresponding front-end equipment of the address code to be detected has a fault, and triggering personnel to perform maintenance and troubleshooting on the corresponding front-end equipment of the address code to be detected, wherein the code return records comprise normal code return records and coincident code records.
2. The duplicate code detection method of claim 1, wherein the duplicate code detection method further comprises:
acquiring a preset address code interval to be detected;
and sequentially determining each address code in the address code interval to be detected as the address code to be detected.
3. The method for detecting duplicate codes according to claim 1, wherein the obtaining the value of the dark current of the code reply on the loop bus within a preset time after the code is transmitted to the address code to be detected comprises:
detecting the voltage value of a test resistor on a loop bus within a preset time after the code is sent to an address code to be detected;
acquiring the resistance value of a test resistor on the loop bus;
and calculating to obtain a return code dark current value on the loop bus according to the voltage value and the resistance value of the test resistor on the loop bus.
4. An apparatus for detecting duplicate codes, comprising:
the loop dark current acquisition unit is used for acquiring a loop dark current value on a loop bus within a preset time after the code is sent to the address code to be detected;
the dark current ratio calculation unit is used for calculating the dark current ratio of the code returning dark current value on the loop bus to a preset code returning dark current value;
the detection result determining unit is used for determining that the address code to be detected has a duplicate code when the dark current ratio is greater than a preset first dark current ratio threshold; when the dark current ratio is smaller than a preset second dark current ratio threshold, determining that the address code to be detected has no returned code; the second dark current ratio threshold is less than or equal to the first dark current ratio threshold, wherein the first dark current ratio threshold is greater than 1;
the detection record acquisition unit is used for acquiring the historical detection record of the address code to be detected when the address code to be detected has no returned code;
the detection result determining unit is further configured to determine that the address code to be detected has no corresponding front-end device when the historical detection records of the address code to be detected are all no return code records, determine that the corresponding front-end device of the address code to be detected has a fault when the historical detection records of the address code to be detected have a return code record, and trigger a person to perform maintenance and troubleshooting on the corresponding front-end device of the address code to be detected, where the return code record includes a normal return code record and a repeat code record.
CN201710454697.3A 2017-06-15 2017-06-15 Duplicate code detection method, duplicate code detection device and electronic equipment Active CN107369306B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710454697.3A CN107369306B (en) 2017-06-15 2017-06-15 Duplicate code detection method, duplicate code detection device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710454697.3A CN107369306B (en) 2017-06-15 2017-06-15 Duplicate code detection method, duplicate code detection device and electronic equipment

Publications (2)

Publication Number Publication Date
CN107369306A CN107369306A (en) 2017-11-21
CN107369306B true CN107369306B (en) 2020-04-03

Family

ID=60306335

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710454697.3A Active CN107369306B (en) 2017-06-15 2017-06-15 Duplicate code detection method, duplicate code detection device and electronic equipment

Country Status (1)

Country Link
CN (1) CN107369306B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106515614A (en) * 2015-09-11 2017-03-22 现代自动车株式会社 Dark current excess prevention method in telematics terminal and apparatus therefor

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093569B (en) * 2012-11-01 2015-04-22 深圳市泛海三江电子有限公司 Code returning judgment method and drive circuit of current type industrial control bus
CN103077575B (en) * 2012-11-01 2015-09-23 深圳市泛海三江电子有限公司 Sensor access bus protocol
CN104143244B (en) * 2013-09-09 2017-01-04 上海松江飞繁电子有限公司 Automatic fire alarm system communication modes and fire alarm automatic alarm system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106515614A (en) * 2015-09-11 2017-03-22 现代自动车株式会社 Dark current excess prevention method in telematics terminal and apparatus therefor

Also Published As

Publication number Publication date
CN107369306A (en) 2017-11-21

Similar Documents

Publication Publication Date Title
CN108564181B (en) Power equipment fault detection and maintenance method and terminal equipment
CN108501980B (en) Monitoring method of track circuit equipment and terminal equipment
CN110990255B (en) Buried point testing method and server
CN110611531B (en) Optical module fault diagnosis and early warning method, device and system
CN111444067A (en) Rule engine-based configuration system monitoring method, device and equipment
CN103713215A (en) System and method for detecting X-ray tube running state
CN110739637A (en) power transmission line monitoring method, system, terminal and storage medium
CN111813638A (en) Alarm information processing method and device and terminal equipment
CN111176918A (en) Server testing method, system, equipment and computer readable storage medium
CN111130944B (en) System monitoring method and system
CN114200877B (en) Monitoring method and device for electric equipment
CN114417996A (en) Distributed photovoltaic string abnormity detection method and device and electronic equipment
CN107369306B (en) Duplicate code detection method, duplicate code detection device and electronic equipment
CN114286363A (en) Off-line production testing method based on Bluetooth serial port
CN110598797B (en) Fault detection method and device, storage medium and electronic device
CN112583617B (en) Fault determination method, server, control terminal and storage medium
CN111159029A (en) Automatic testing method and device, electronic equipment and computer readable storage medium
CN110825630A (en) Vulnerability mining method and device
CN109699041A (en) A kind of RRU channel failure diagnosis processing method and RRU device
US8890704B2 (en) Method and apparatus for monitoring transient electrical strikes
CN114513334A (en) Risk management method and risk management device
CN107608294B (en) Safety electricity utilization control device and method
CN110442119B (en) ECU pin repeated configuration detection method and device
CN116866240B (en) CAN bus test method, device and system, electronic equipment and storage medium
CN111506477B (en) Log capture method and device of touch screen and mobile terminal

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 518000 East and fourth floors, building A1, xinjianxing science and Technology Industrial Park, Fengxin Road, Loucun, Gongming street, Guangming District, Shenzhen City, Guangdong Province

Applicant after: TANDA Technology Co., Ltd.

Address before: 518000 Guangdong province Shenzhen Guangming New District Gongming Street Village Feng Xin Lu Xinjian Xing Technology Industrial Park A1 Building 1 floor, 3 floor, 4 East Building, 5 floor

Applicant before: TANDA Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant