Test method and device of pulse voting function and electronic equipment

By configuring system status and pulse signals, the pulse voting function of the rail transit safety computer platform system was tested under simulated communication failure conditions. This solved the testing problem of the pulse voting function logic under communication failure conditions and ensured the correct operation of the system under pulse voting conditions.

CN115617663BActive Publication Date: 2026-05-12TRAFFIC CONTROL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TRAFFIC CONTROL TECH CO LTD
Filing Date
2022-10-13
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

How to effectively test the pulse voting function of a safety computer platform system in rail transit, especially the pulse voting function logic under the condition of communication failure between the two host systems.

Method used

By defining test cases, configuring the system status and pulse configuration information of the target host, simulating the communication status changes between the two hosts, and sending specified pulse signals to test the pulse voting function, including pulse signal combinations under different states and communication interruption conditions.

Benefits of technology

This enables effective testing of the system host's pulse voting function under communication failure conditions, ensuring the correct operation of the system under pulse voting conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115617663B_ABST
    Figure CN115617663B_ABST
Patent Text Reader

Abstract

The application provides a test method, device and electronic equipment for pulse voting function, the method comprises: determining a test case, the test case comprising system state configuration information and pulse configuration information; based on the system state configuration information, configuring the system state of the target host, the target host being any one of the dual-system host; based on the pulse configuration information, configuring the communication state between the dual-system host within the test period and sending the pulse signal to the target host, the pulse signal being used for testing the pulse voting function of the target host; at the starting time of the test, the communication state of the dual-system host is the connection state, and at the end time of the test, the communication state of the dual-system host is the interruption state. The application configures the communication state of the dual-system host as the interruption state at the specified time in the test to meet the necessary and sufficient condition of the pulse voting, and then sends the specified pulse signal to the target host based on the pulse configuration information, so that the pulse voting function can be tested.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of rail transit technology, and in particular to a test method, apparatus, and electronic device for pulse voting function. Background Technology

[0002] As a safety device in rail transit, the safety computer platform system plays an important role in both vehicles and stations. The two-by-two mechanism adopted by the safety computer platform system is an important guarantee for the platform's availability and safety.

[0003] In actual line operation, unforeseen circumstances can lead to communication failures between 2x2 dual-system hosts. The system needs to use pulse voting, an alternative to normal communication, to ensure the uniqueness of the host system. How to test the software logic of the system host's pulse voting function is a crucial problem that the industry urgently needs to solve. Summary of the Invention

[0004] To address the problems existing in the prior art, embodiments of the present invention provide a testing method, apparatus, and electronic device for pulse voting function.

[0005] In a first aspect, the present invention provides a test method for pulse voting function, comprising:

[0006] Determine test cases, which include system status configuration information and pulse configuration information;

[0007] Based on the system status configuration information, configure the system status of the target host, where the target host is either one of the dual-system hosts;

[0008] Based on the pulse configuration information, the communication status between the two host systems is configured and pulse signals are sent to the target host during the test period. The pulse signals are used to test the pulse voting function of the target host.

[0009] At the start of the test period, the communication between the two hosts is in a connected state, and at the end of the test period, the communication between the two hosts is in an interrupted state.

[0010] Optionally, according to a test method for pulse voting function provided by the present invention, when the system status configuration information indicates that the system status of the target host is master, and the pulse configuration information is first pulse configuration information, the step of configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes:

[0011] At the end time, four first pulse signals are sent to the target host, and the four first pulse signals include at least one host pulse.

[0012] Optionally, according to a test method for pulse voting function provided by the present invention, when the system status configuration information indicates that the system status of the target host is primary and the pulse configuration information is second pulse configuration information, the step of configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes:

[0013] At the end time, four second pulse signals are sent to the target host.

[0014] The four second pulse signals include a Y-channel backup pulse and a Z-channel error pulse, where Y+Z=4, Y is a positive integer greater than or equal to 0, and Z is a positive integer greater than or equal to 0.

[0015] Optionally, according to a test method for pulse voting function provided by the present invention, when the system status configuration information indicates that the system status of the target host is configured as a standby system, and the pulse configuration information is third pulse configuration information, the step of configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes:

[0016] At the first moment, four third pulse signals are sent to the target host;

[0017] At the stated end time, four error pulses are sent to the target host;

[0018] The four third pulse signals include K error pulses, where K is 0 or 1, the first time is a time in the test period, and the first time is two preset periods apart from the end time.

[0019] Optionally, according to a test method for pulse voting function provided by the present invention, when the system status configuration information indicates that the system status of the target host is configured as a standby system, and the pulse configuration information is the fourth pulse configuration information, the step of configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes:

[0020] At the second moment, four fourth pulse signals are sent to the target host.

[0021] At the stated end time, four error pulses are sent to the target host;

[0022] The four fourth pulse signals include P error pulses, where P is 2, 3 or 4, the second time is the time in the test period, and the second time is two preset periods apart from the end time.

[0023] Optionally, according to a test method for pulse voting function provided by the present invention, when the system status configuration information indicates that the system status of the target host is configured as a standby system, and the pulse configuration information is the fifth pulse configuration information, the step of configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes:

[0024] At the end time, four fifth pulse signals are sent to the target host, and the four fifth pulse signals include L error pulses, where L is 0, 1, 2 or 3;

[0025] During the period from the start time to the third time, the communication status between the two host systems is a connected state. The third time is a time in the test period, and the third time is separated from the end time by a preset period.

[0026] Optionally, according to a test method for pulse voting function provided by the present invention, when the system status configuration information indicates that the system status of the target host is configured as a standby system, and the pulse configuration information is the sixth pulse configuration information, the step of configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes:

[0027] At the fourth moment, the communication status between the two host systems is set to interrupted, and four sixth pulse signals are sent to the target host.

[0028] At the end time, four seventh pulse signals are sent to the target host.

[0029] The four sixth pulse signals include M error pulses, where M is 0, 1, 2 or 3; the four seventh pulse signals include N error pulses, where N is 0, 1, 2 or 3; the fourth time point is a time point within the test period; and the fourth time point is spaced one preset period apart from the end time point.

[0030] Optionally, according to a test method for pulse voting function provided by the present invention, when the system status configuration information indicates that the system status of the target host is a follower system and the pulse configuration information is the seventh pulse configuration information, the step of configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes:

[0031] At the end time, four eighth pulse signals are sent to the target host, and the eighth pulse signal is an arbitrary pulse signal.

[0032] Secondly, the present invention also provides a testing device for pulse voting function, comprising:

[0033] The determination module is used to determine test cases, which include system status configuration information and pulse configuration information;

[0034] The configuration module is used to configure the system status of the target host based on the system status configuration information, wherein the target host is either one of the dual-system hosts;

[0035] The testing module is used to configure the communication status between the two hosts and send pulse signals to the target host during the test period based on the pulse configuration information. The pulse signals are used to test the pulse voting function of the target host.

[0036] At the start of the test period, the communication between the two hosts is in a connected state, and at the end of the test period, the communication between the two hosts is in an interrupted state.

[0037] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement a test method for the pulse voting function as described above.

[0038] The present invention provides a test method, apparatus, and electronic device for pulse voting function. By determining test cases, system state configuration information and pulse configuration information can be obtained. Based on the system state configuration information, the target host can be configured to a specified system state. When the target host is in the specified system state, the communication state between the two hosts can be configured to be interrupted at a specified time during the test period based on the pulse configuration information to meet the necessary and sufficient conditions for pulse voting. Based on the pulse configuration information, a specified pulse signal is sent to the target host during the test period, thereby realizing the pulse voting function of the test system host. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0040] Figure 1 This is a flowchart illustrating the testing method for the pulse voting function provided by the present invention;

[0041] Figure 2 This is a hardwired connection diagram of pulse voting provided by the present invention;

[0042] Figure 3 This is a schematic diagram of the pulse voting hardwired principle provided by the present invention;

[0043] Figure 4 This is the master-slave synchronization micro-cycle flowchart provided by the present invention;

[0044] Figure 5 This is a flowchart of the pulse voting process provided by the present invention;

[0045] Figure 6 This is one of the pulse voting test principle diagrams provided by the present invention;

[0046] Figure 7 This is the second schematic diagram of the pulse voting test provided by the present invention;

[0047] Figure 8 This is the third schematic diagram of the pulse voting test provided by the present invention;

[0048] Figure 9 This is the fourth schematic diagram of the pulse voting test provided by the present invention;

[0049] Figure 10 This is the fifth schematic diagram of the pulse voting test provided by the present invention;

[0050] Figure 11 This is the sixth schematic diagram of the pulse voting test provided by the present invention;

[0051] Figure 12 This is the seventh schematic diagram of the pulse voting test provided by the present invention;

[0052] Figure 13 This is a schematic diagram of the structure of the test device for the pulse voting function provided by the present invention;

[0053] Figure 14 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0055] Figure 1 This is a flowchart illustrating the testing method for the pulse voting function provided by the present invention, as shown below. Figure 1 As shown, the device executing the test method for the pulse voting function can be an electronic device. The method includes:

[0056] Step 101: Determine test cases, which include system status configuration information and pulse configuration information.

[0057] Specifically, in order to implement the pulse voting function of the test system host, test cases can be determined, and then the target host can be tested based on the test cases. Among them, the system status configuration information can be used to indicate the system status of the target host to a specified state, and the pulse configuration information can be used to indicate the pulse signal sent to the target host.

[0058] Optionally, a test case library can be pre-built for various test scenarios of the pulse voting function. The test case library includes multiple test cases, and the test cases are determined by querying the test case library.

[0059] For example, the test scenarios for the pulse voting function can include test scenario 1, test scenario 2, and test scenario 3. A test case library can be pre-built for various test scenarios of the pulse voting function. The test case library includes test case 1 corresponding to test scenario 1, test case 2 corresponding to test scenario 2, and test case 3 corresponding to test scenario 3. Then, by querying the test case library, the test cases can be determined.

[0060] Optionally, external input can be received, which can be used for a specified test scenario for the pulse voting function. System status configuration information and pulse configuration information can be received, and test cases can be determined in response to the external input.

[0061] For example, the test scenarios for the pulse voting function can include test scenario 1, test scenario 2 and test scenario 3. External input can be used for test scenario 2 of the pulse voting function. System status configuration information and pulse configuration information are received. In response to the external input, test cases corresponding to test scenario 2 can be determined.

[0062] Figure 2 This is a hardwired connection diagram for pulse voting provided by the present invention. Figure 3 This is a schematic diagram of the pulse voting hardwired principle provided by the present invention. Figure 4 This is the master-slave synchronization micro-cycle flowchart provided by the present invention. Figure 5 This is a flowchart of the pulse voting process provided by the present invention, which is described below in conjunction with... Figures 2 to 5 This further illustrates the test scenario for the pulse voting function.

[0063] (1) Hardware principle analysis of pulse voting;

[0064] like Figure 2As shown, the connecting lines represent the hardwired connections between the four Central Processing Units (CPUs) of the platform host. The arrows indicate the transmission direction of the pulse signals. Each CPU sends its own hot standby status pulse to the dual CPUs of the counterpart board, receives the hot standby status pulses from the counterpart dual CPUs, and also samples back the pulses it sends. Since in the 2x2 architecture, the board only uses the sampled pulses when performing pulse voting, and the sampling function is used to check the correctness of its own pulse signals, the complex connection diagram can be simplified. The sending (OUT) and sampling (Selfcheck) parts of the pulse voting system are removed, and all pulse receiving (IN1, IN2, and Selfcheck) parts are removed from the pulse sending system, resulting in a pulse voting principle diagram that is easier to analyze (e.g., ...). Figure 3 (As shown).

[0065] like Figure 3 As shown, Figure 3 In the A-series, the board performs pulse voting, while the B-series provides the pulse information required for voting. During voting, the system state of the A-series may be primary, backup, or follower. The pulse signals sent by the B-series may be primary, backup, power-on initialization, or error signals. Furthermore, since the hardwired connection spans multiple boards, partial failures are possible. For example, if the pulse signal sent by CPU1 in the B-series cannot be received by CPU1 in the A-series, then the A-series interprets the signal sent by CPU2 in the B-series as an error. Therefore, from the receiving end (A-series), there are four paths: CPU1-IN1, CPU1-IN2, CPU2-IN1, and CPU2-IN2, and the possibility of partial or complete failure of these paths needs to be considered.

[0066] (2) Software logic analysis of pulse voting;

[0067] like Figure 4 As shown, after the platform enters the master-slave synchronization micro-cycle, it first judges the communication status between the two systems. Data synchronization between the two systems is performed when communication is normal, and pulse voting is only initiated when there is an anomaly. Therefore, communication interruption is a necessary and sufficient condition for pulse voting.

[0068] (3) Test process analysis;

[0069] Based on the above analysis, the test procedure for the pulse voting function can be derived as follows: Under the premise of abnormal communication between the two systems, the target host (i.e., the host system) is subjected to primary / backup voting using incompletely correct neighboring system pulse information (some pulse information changes from normal pulses to erroneous pulses) in different hot standby states to verify whether the host system can correctly switch its own hot standby state. Normal pulses can include primary and backup pulses, while erroneous pulses can be pulse signals other than primary and backup pulses.

[0070] Based on the above test procedure for the pulse voting function, it is possible to... Figure 4 The pulse voting section in the test procedure is adjusted to obtain the pulse voting procedure (e.g., Figure 5 (As shown).

[0071] like Figure 5 As shown, the input conditions for the test are a network communication failure between the two systems, the status of the local system, and the acquisition of pulse information from neighboring systems. The test result is the status after the local system's vote. The status of the local system determines how the software judges the acquired pulse results; therefore, the test scenarios are classified according to the system status of the local system.

[0072] When the primary system is the dominant system, the software only needs to determine whether the acquired pulse results contain a primary system pulse, thus resulting in two scenarios: one with a primary system pulse and one without.

[0073] When the main system is the backup system, the software first determines whether the currently acquired pulse is a four-way error: if it is a four-way error, it judges the number of pulse errors in the previous cycle, and judges based on the number of errors not being greater than 1, thus obtaining two test scenarios; if it is not a four-way error, it judges the dual-system network communication status in the previous cycle, thus obtaining two test scenarios.

[0074] If this department is neither the primary nor the backup department, meaning it is a follower department, the test platform will crash directly if a network communication failure occurs. Therefore, there is only one test scenario.

[0075] Thus, we can obtain 7 test scenarios for testing pulse voting. Based on the actual connection of the hardwire, we can define the system status configuration information and pulse configuration information (such as the specific number and type of each pulse) in each test scenario to form test cases.

[0076] Optionally, the system status configuration information can indicate the system status of the target host as a primary, backup, or follower system.

[0077] Step 102: Based on the system status configuration information, configure the system status of the target host, where the target host is any one of the dual-system hosts.

[0078] Specifically, after determining the test cases, the system state of the target host can be configured to a specified state based on the system state configuration information.

[0079] Step 103: Based on the pulse configuration information, configure the communication status between the two host systems and send pulse signals to the target host during the test period. The pulse signals are used to test the pulse voting function of the target host.

[0080] At the start of the test period, the communication between the two hosts is in a connected state, and at the end of the test period, the communication between the two hosts is in an interrupted state.

[0081] Specifically, after configuring the system status of the target host, the communication status between the two hosts can be configured as connected at the start of the test period based on the pulse configuration information, and as interrupted at a specified time during the test period. Additionally, a specified pulse signal can be sent to the target host during the test period based on the pulse configuration information.

[0082] The pulse voting function test method provided by this invention can obtain system state configuration information and pulse configuration information by determining test cases. Then, based on the system state configuration information, the target host can be configured to a specified system state. When the target host is in the specified system state, the communication state between the two hosts can be configured to be interrupted at a specified time during the test period based on the pulse configuration information to meet the necessary and sufficient conditions for pulse voting. Then, based on the pulse configuration information, a specified pulse signal is sent to the target host during the test period, which can realize the pulse voting function of the test system host.

[0083] Optionally, according to a test method for pulse voting function provided by the present invention, when the system status configuration information indicates that the system status of the target host is master, and the pulse configuration information is first pulse configuration information, the step of configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes:

[0084] At the end time, four first pulse signals are sent to the target host, and the four first pulse signals include at least one host pulse.

[0085] Specifically, Figure 6 This is one of the pulse voting test principle diagrams provided by the present invention, such as... Figure 6 As shown, the test scenario can be that the target host (i.e., the host system) is the master system, and when a communication interruption occurs between the two systems, the master system pulse is collected in the pulse of the target system. For this test scenario, the corresponding test cases can be determined. Among them, the system status configuration information can indicate that the system status of the target host is configured as the master system, and the first pulse configuration information can indicate that four first pulse signals are sent to the target host at the end time.

[0086] Specifically, after sending four first pulse signals to the target host, the target host's operation log can be queried. If the operation log indicates "Communication between this system platform and the other system failed and pulse voting was entered, the pulse acquisition result shows that there are X main system pulses, and the platform crashes", where X represents the number of main system pulses in the four first pulse signals, then the test result of the target host's pulse voting function is qualified in this test scenario. Otherwise, the test result of the target host's pulse voting function is unqualified in this test scenario.

[0087] It is understandable that the master pulse can be a pulse sent by the host whose system status is master. Figure 6 The current period in the equation can be the period in which the end time occurs.

[0088] Optionally, the communication status between the two hosts can be configured to be interrupted during the period at which the end time occurs.

[0089] Therefore, the test scenario can be that the target system is the primary system, and when a communication interruption occurs between the two systems, the pulses of the target system are collected, including the pulses of the primary system. The pulse voting function of the target host can be tested under this test scenario.

[0090] Optionally, according to a test method for pulse voting function provided by the present invention, when the system status configuration information indicates that the system status of the target host is primary and the pulse configuration information is second pulse configuration information, the step of configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes:

[0091] At the end time, four second pulse signals are sent to the target host.

[0092] The four second pulse signals include a Y-channel backup pulse and a Z-channel error pulse, where Y+Z=4, Y is a positive integer greater than or equal to 0, and Z is a positive integer greater than or equal to 0.

[0093] Specifically, Figure 7 This is the second schematic diagram of the pulse voting test provided by the present invention, as follows: Figure 7 As shown, the test scenario can be that the target host (i.e., the host system) is the master system, and when a communication interruption occurs between the two systems, no master system pulse is collected from the pulses of the target system. For this test scenario, corresponding test cases can be determined. The system status configuration information can indicate that the target host's system status is set to master, and the second pulse configuration information can indicate that four second pulse signals are sent to the target host at the end time.

[0094] Specifically, after sending four second pulse signals to the target host, the target host's operation log can be queried. If the operation log indicates "Communication between this system platform and the counterpart system failed, and pulse voting was entered. The pulse acquisition result is Y backup system pulses and Z error pulses. There are no primary system pulses. The platform continues to run the primary system," it means that the test result of the target host's pulse voting function is qualified under this test scenario. Otherwise, the test result of the target host's pulse voting function is unqualified under this test scenario.

[0095] It is understandable that the standby pulse can be a pulse sent by the host machine whose system status is standby. Figure 7 The current period in the data can be the period in which the end time occurs. Figure 7 The non-primary pulse can be a backup pulse or an error pulse.

[0096] Optionally, the communication status between the two hosts can be configured to be interrupted during the period at which the end time occurs.

[0097] Therefore, the test scenario can be that the target system is the primary system, and when a communication interruption occurs between the two systems, the pulses of the target system are collected without the pulses of the primary system. The pulse voting function of the target host can be tested under this test scenario.

[0098] Optionally, according to a test method for pulse voting function provided by the present invention, when the system status configuration information indicates that the system status of the target host is configured as a standby system, and the pulse configuration information is third pulse configuration information, the step of configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes:

[0099] At the first moment, four third pulse signals are sent to the target host;

[0100] At the stated end time, four error pulses are sent to the target host;

[0101] The four third pulse signals include K error pulses, where K is 0 or 1, the first time is a time in the test period, and the first time is two preset periods apart from the end time.

[0102] Specifically, Figure 8 This is the third schematic diagram of the pulse voting test provided by the present invention, as shown below. Figure 8As shown, the test scenario can be that the target host (i.e., the host system) is the backup system. When a communication interruption occurs between the two systems, four error pulses are collected from the target host system, and the number of error pulses in the previous cycle is no greater than 1. For this test scenario, corresponding test cases can be determined. The system status configuration information can indicate that the target host's system status is configured as a backup system, and the third pulse configuration information can indicate that four third pulse signals are sent to the target host at the first moment and four error pulses are sent to the target host at the end moment.

[0103] Specifically, after sending four error pulses to the target host based on the third pulse configuration information, the target host's operation log can be queried. If the operation log indicates "Communication between this system platform and the other system is interrupted, and pulse voting is entered. The pulse acquisition result is 4 error pulses, and the error pulses of the previous cycle are K, which is less than or equal to 1. The platform switches to main system operation", it means that the test result of the target host's pulse voting function is qualified in this test scenario. Otherwise, the test result of the target host's pulse voting function is unqualified in this test scenario.

[0104] Understandable Figure 8 The current period in the data can be the period in which the end time occurs. Figure 8 The non-error pulse in the pulse can be either the primary pulse or the backup pulse.

[0105] Optionally, the communication status between the two hosts can be configured to be interrupted during the first time period.

[0106] Therefore, the test scenario can be that the system is the backup system, and when the communication between the two systems is interrupted, the system collects four error pulses and the number of error pulses in the previous cycle is no greater than 1. The pulse voting function of the target host can be tested under this test scenario.

[0107] Optionally, according to a test method for pulse voting function provided by the present invention, when the system status configuration information indicates that the system status of the target host is configured as a standby system, and the pulse configuration information is the fourth pulse configuration information, the step of configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes:

[0108] At the second moment, four fourth pulse signals are sent to the target host.

[0109] At the stated end time, four error pulses are sent to the target host;

[0110] The four fourth pulse signals include P error pulses, where P is 2, 3 or 4, the second time is the time in the test period, and the second time is two preset periods apart from the end time.

[0111] Specifically, Figure 9 This is the fourth schematic diagram of the pulse voting test provided by the present invention, as follows: Figure 9 As shown, the test scenario can be that the target host (i.e., the host system) is the backup system. When a communication interruption occurs between the two systems, four error pulses are collected from the target host system, and the error count of the pulses in the previous cycle is greater than or equal to 2. For this test scenario, corresponding test cases can be determined. The system status configuration information can indicate that the target host's system status is configured as a backup system. The fourth pulse configuration information can indicate that four fourth pulse signals are sent to the target host at the second time point, and four error pulses are sent to the target host at the end time.

[0112] Specifically, after sending four error pulses based on the fourth pulse configuration information, the target host's operation log can be queried. If the operation log indicates "Communication between this system platform and the other system failed and pulse voting was entered, the pulse acquisition result is 4 error pulses, the error pulses of the previous cycle are P, which is greater than or equal to 2, and the platform crashes", it means that the test result of the target host's pulse voting function is qualified in this test scenario. Otherwise, the test result of the target host's pulse voting function is unqualified in this test scenario.

[0113] Understandable Figure 9 The current period in the equation can be the period in which the end time occurs.

[0114] Optionally, the communication status between the two hosts can be configured to be interrupted during the period in which the second time point occurs.

[0115] Therefore, the test scenario can be that the host system is the backup system, and when the communication between the two systems is interrupted, four error pulses of the host system are collected and the number of error pulses in the previous cycle is greater than or equal to 2. The pulse voting function of the target host can be tested under this test scenario.

[0116] Optionally, according to a test method for pulse voting function provided by the present invention, when the system status configuration information indicates that the system status of the target host is configured as a standby system, and the pulse configuration information is the fifth pulse configuration information, the step of configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes:

[0117] At the end time, four fifth pulse signals are sent to the target host, and the four fifth pulse signals include L error pulses, where L is 0, 1, 2 or 3;

[0118] During the period from the start time to the third time, the communication status between the two host systems is a connected state. The third time is a time in the test period, and the third time is separated from the end time by a preset period.

[0119] Specifically, Figure 10 This is the fifth schematic diagram of the pulse voting test provided by the present invention, such as... Figure 10 As shown, the test scenario can be that the target host (i.e., the host system) is the backup system, and when a communication interruption occurs between the two systems, the target host system does not have four error pulses, and both systems were normal in the previous cycle. For this test scenario, corresponding test cases can be determined. The system status configuration information can indicate that the target host's system status is configured as a backup system, and the fifth pulse configuration information can indicate that four fifth pulse signals are sent to the target host at the end time.

[0120] Specifically, after sending four fifth pulse signals to the target host, the target host's operation log can be queried. If the operation log indicates "Communication between this system platform and the other system failed and pulse voting was entered, the pulse acquisition result is L erroneous pulses, and the communication between the two systems was normal in the previous cycle, and the backup system is still running", then it means that the test result of the target host's pulse voting function is qualified in this test scenario. Otherwise, the test result of the target host's pulse voting function is unqualified in this test scenario.

[0121] Understandable Figure 10 The current period in the data can be the period in which the end time occurs. Figure 10 The error pulse in the middle system can be either a primary system pulse or a backup system pulse.

[0122] Therefore, the test scenario can be that the system is the backup system, and when the communication between the two systems is interrupted, the system collects pulses that are not four-way error pulses and the two systems are normal in the previous cycle. The pulse voting function of the target host can be tested under this test scenario.

[0123] Optionally, according to a test method for pulse voting function provided by the present invention, when the system status configuration information indicates that the system status of the target host is configured as a standby system, and the pulse configuration information is the sixth pulse configuration information, the step of configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes:

[0124] At the fourth moment, the communication status between the two host systems is set to interrupted, and four sixth pulse signals are sent to the target host.

[0125] At the end time, four seventh pulse signals are sent to the target host.

[0126] The four sixth pulse signals include M error pulses, where M is 0, 1, 2 or 3; the four seventh pulse signals include N error pulses, where N is 0, 1, 2 or 3; the fourth time point is a time point within the test period; and the fourth time point is spaced one preset period apart from the end time point.

[0127] Specifically, Figure 11 This is the sixth schematic diagram of the pulse voting test provided by the present invention, as follows: Figure 11 As shown, the test scenario can be that the target host (i.e., the host system) is the backup system. When a communication interruption occurs between the two systems, the target host system collects non-four-channel error pulses, and the previous cycle also shows a communication interruption and non-four-channel error pulses. For this test scenario, corresponding test cases can be determined. The system status configuration information can instruct the target host to be configured as a backup system. The sixth pulse configuration information can instruct that at the fourth moment, the communication status between the two hosts be configured as an interrupted state and four sixth pulse signals be sent to the target host, and at the end moment, four seventh pulse signals be sent to the target host.

[0128] Specifically, after sending four seventh pulse signals to the target host, the target host's operation log can be queried. If the operation log indicates "The last cycle of communication between this system and the other system failed and entered pulse voting. The pulse acquisition result is N erroneous pulses, and the communication between the two systems in the previous cycle was abnormal and there were no four erroneous pulses. This system crashed", it means that the test result of the target host's pulse voting function is qualified in this test scenario. Otherwise, the test result of the target host's pulse voting function is unqualified in this test scenario.

[0129] Understandable Figure 11 The current period in the data can be the period in which the end time occurs. Figure 11 The non-error pulse in the pulse can be either the primary pulse or the backup pulse.

[0130] Optionally, the communication status between the two hosts can be configured to be interrupted during the fourth time period.

[0131] Therefore, the test scenario can be that the host system is the backup system, and when the communication between the two systems is interrupted, the host system's pulses are not four-way error pulses and the previous cycle is also a communication interruption and not four-way error pulses. The pulse voting function of the target host can be tested under this test scenario.

[0132] Optionally, according to a test method for pulse voting function provided by the present invention, when the system status configuration information indicates that the system status of the target host is a follower system and the pulse configuration information is the seventh pulse configuration information, the step of configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes:

[0133] At the end time, four eighth pulse signals are sent to the target host, and the eighth pulse signal is an arbitrary pulse signal.

[0134] Specifically, Figure 12 This is the seventh schematic diagram of the pulse voting test provided by the present invention, as shown below. Figure 12As shown, the test scenario could be that the target host (i.e., the host system) is a follower system, and a communication interruption occurs between the two systems. For this test scenario, corresponding test cases can be determined. The system status configuration information can indicate that the target host's system status is configured as a follower system, and the seventh pulse configuration information can indicate that four eighth pulse signals should be sent to the target host at the end time.

[0135] Specifically, after sending four eighth pulse signals to the target host, the target host's operation log can be queried. If the operation log indicates "communication between this system and the other system is interrupted, and this system crashes", it means that the test result of the target host's pulse voting function is qualified under this test scenario. Otherwise, the test result of the target host's pulse voting function is unqualified under this test scenario.

[0136] Understandable Figure 12 The current period in the equation can be the period in which the end time occurs.

[0137] Optionally, the communication status between the two hosts can be configured to be interrupted during the period at which the end time occurs.

[0138] Therefore, the test scenario could be that the target host is a follower system and a communication interruption occurs between the two systems. In this test scenario, the pulse voting function of the target host can be tested.

[0139] The pulse voting function test method provided by this invention can obtain system state configuration information and pulse configuration information by determining test cases. Then, based on the system state configuration information, the target host can be configured to a specified system state. When the target host is in the specified system state, the communication state between the two hosts can be configured to be interrupted at a specified time during the test period based on the pulse configuration information to meet the necessary and sufficient conditions for pulse voting. Then, based on the pulse configuration information, a specified pulse signal is sent to the target host during the test period, which can realize the pulse voting function of the test system host.

[0140] The test apparatus for the pulse voting function provided by the present invention is described below. The test apparatus for the pulse voting function described below can be referred to in correspondence with the test method for the pulse voting function described above.

[0141] Figure 13 This is a schematic diagram of the structure of the test device for the pulse voting function provided by the present invention, as shown below. Figure 13 As shown, the device includes: a determination module 1301, a configuration module 1302, and a test module 1303, wherein:

[0142] The determination module 1301 is used to determine test cases, the test cases including system status configuration information and pulse configuration information;

[0143] Configuration module 1302 is used to configure the system status of the target host based on the system status configuration information, wherein the target host is any one of the dual-system hosts;

[0144] Test module 1303 is used to configure the communication status between the two hosts and send pulse signals to the target host during the test period based on the pulse configuration information. The pulse signals are used to test the pulse voting function of the target host.

[0145] At the start of the test period, the communication between the two hosts is in a connected state, and at the end of the test period, the communication between the two hosts is in an interrupted state.

[0146] The pulse voting function testing device provided by this invention can obtain system status configuration information and pulse configuration information by determining test cases. Then, based on the system status configuration information, it can configure the target host to a specified system state. When the target host is in the specified system state, it can configure the communication state between the two hosts to be interrupted at a specified time during the test period based on the pulse configuration information to meet the necessary and sufficient conditions for pulse voting. Then, based on the pulse configuration information, it can send a specified pulse signal to the target host during the test period, thereby realizing the pulse voting function of the test system host.

[0147] Figure 14 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 14 As shown, the electronic device may include: a processor 1410, a communication interface 1420, a memory 1430, and a communication bus 1440, wherein the processor 1410, the communication interface 1420, and the memory 1430 communicate with each other through the communication bus 1440. The processor 1410 can call logical instructions in the memory 1430 to execute a test method for the pulse voting function, for example, the method includes:

[0148] Determine test cases, which include system status configuration information and pulse configuration information;

[0149] Based on the system status configuration information, configure the system status of the target host, where the target host is either one of the dual-system hosts;

[0150] Based on the pulse configuration information, the communication status between the two host systems is configured and pulse signals are sent to the target host during the test period. The pulse signals are used to test the pulse voting function of the target host.

[0151] At the start of the test period, the communication between the two hosts is in a connected state, and at the end of the test period, the communication between the two hosts is in an interrupted state.

[0152] Furthermore, the logical instructions in the aforementioned memory 1430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0153] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program that can be stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is capable of performing the test method for the pulse voting function provided by the above methods, for example, the method comprising:

[0154] Determine test cases, which include system status configuration information and pulse configuration information;

[0155] Based on the system status configuration information, configure the system status of the target host, where the target host is either one of the dual-system hosts;

[0156] Based on the pulse configuration information, the communication status between the two host systems is configured and pulse signals are sent to the target host during the test period. The pulse signals are used to test the pulse voting function of the target host.

[0157] At the start of the test period, the communication between the two hosts is in a connected state, and at the end of the test period, the communication between the two hosts is in an interrupted state.

[0158] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a test method for performing the pulse voting function provided by the methods described above, for example, the method includes:

[0159] Determine test cases, which include system status configuration information and pulse configuration information;

[0160] Based on the system status configuration information, configure the system status of the target host, where the target host is either one of the dual-system hosts;

[0161] Based on the pulse configuration information, the communication status between the two host systems is configured and pulse signals are sent to the target host during the test period. The pulse signals are used to test the pulse voting function of the target host.

[0162] At the start of the test period, the communication between the two hosts is in a connected state, and at the end of the test period, the communication between the two hosts is in an interrupted state.

[0163] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0164] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0165] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A test method for pulse voting function, characterized in that, include: Determine test cases, which include system status configuration information and pulse configuration information; Based on the system status configuration information, configure the system status of the target host, where the target host is either one of the dual-system hosts; Based on the pulse configuration information, the communication status between the two host systems is configured and pulse signals are sent to the target host during the test period. The pulse signals are used to test the pulse voting function of the target host. At the start of the test period, the communication between the two hosts is in a connected state, and at the end of the test period, the communication between the two hosts is in an interrupted state. Wherein, when the system status configuration information indicates that the system status of the target host is standby, and the pulse configuration information is third pulse configuration information, the step of configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes: At the first moment, four third pulse signals are sent to the target host; At the stated end time, four error pulses are sent to the target host; The four third pulse signals include K error pulses, where K is 0 or 1, the first time is a time in the test period, and the first time is two preset periods apart from the end time.

2. The test method for the pulse voting function according to claim 1, characterized in that, When the system status configuration information indicates that the target host's system status is master, and the pulse configuration information is the first pulse configuration information, configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes: At the end time, four first pulse signals are sent to the target host, and the four first pulse signals include at least one host pulse.

3. The test method for the pulse voting function according to claim 1, characterized in that, When the system status configuration information indicates that the target host's system status is master, and the pulse configuration information is the second pulse configuration information, configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes: At the end time, four second pulse signals are sent to the target host. The four second pulse signals include a Y-channel backup pulse and a Z-channel error pulse, where Y+Z=4, Y is a positive integer greater than or equal to 0, and Z is a positive integer greater than or equal to 0.

4. The test method for the pulse voting function according to claim 1, characterized in that, When the system status configuration information indicates that the target host's system status is standby, and the pulse configuration information is the fourth pulse configuration information, configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes: At the second moment, four fourth pulse signals are sent to the target host. At the stated end time, four error pulses are sent to the target host; The four fourth pulse signals include P error pulses, where P is 2, 3 or 4, the second time is the time in the test period, and the second time is two preset periods apart from the end time.

5. The test method for the pulse voting function according to claim 1, characterized in that, When the system status configuration information indicates that the target host's system status is standby, and the pulse configuration information is the fifth pulse configuration information, configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes: At the end time, four fifth pulse signals are sent to the target host, and the four fifth pulse signals include L error pulses, where L is 0, 1, 2 or 3; During the period from the start time to the third time, the communication status between the two host systems is a connected state. The third time is a time in the test period, and the third time is separated from the end time by a preset period.

6. The test method for the pulse voting function according to claim 1, characterized in that, When the system status configuration information indicates that the target host's system status is standby, and the pulse configuration information is the sixth pulse configuration information, configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes: At the fourth moment, the communication status between the two host systems is set to interrupted, and four sixth pulse signals are sent to the target host. At the end time, four seventh pulse signals are sent to the target host. The four sixth pulse signals include M error pulses, where M is 0, 1, 2 or 3; the four seventh pulse signals include N error pulses, where N is 0, 1, 2 or 3; the fourth time point is a time point within the test period; and the fourth time point is spaced one preset period apart from the end time point.

7. The test method for the pulse voting function according to claim 1, characterized in that, When the system status configuration information indicates that the target host's system status is "following system" and the pulse configuration information is the seventh pulse configuration information, configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes: At the end time, four eighth pulse signals are sent to the target host, and the eighth pulse signal is an arbitrary pulse signal.

8. A testing device for pulse voting function, characterized in that, include: The determination module is used to determine test cases, which include system status configuration information and pulse configuration information; The configuration module is used to configure the system status of the target host based on the system status configuration information, wherein the target host is either one of the dual-system hosts; The testing module is used to configure the communication status between the two hosts and send pulse signals to the target host during the test period based on the pulse configuration information. The pulse signals are used to test the pulse voting function of the target host. At the start of the test period, the communication between the two hosts is in a connected state, and at the end of the test period, the communication between the two hosts is in an interrupted state. When the system status configuration information indicates that the target host's system status is standby, and the pulse configuration information is the third pulse configuration information, configuring the communication status between the two hosts and sending pulse signals to the target host during the test period based on the pulse configuration information includes: At the first moment, four third pulse signals are sent to the target host; At the stated end time, four error pulses are sent to the target host; The four third pulse signals include K error pulses, where K is 0 or 1, the first time is a time in the test period, and the first time is two preset periods apart from the end time.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the program to implement a test method for the pulse voting function as described in any one of claims 1 to 7.