CN114407986A - Testing method and device for annunciator button, electronic equipment and storage medium - Google Patents

Testing method and device for annunciator button, electronic equipment and storage medium Download PDF

Info

Publication number
CN114407986A
CN114407986A CN202210001387.7A CN202210001387A CN114407986A CN 114407986 A CN114407986 A CN 114407986A CN 202210001387 A CN202210001387 A CN 202210001387A CN 114407986 A CN114407986 A CN 114407986A
Authority
CN
China
Prior art keywords
button
display state
test
annunciator
visual interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210001387.7A
Other languages
Chinese (zh)
Inventor
孙志科
徐昱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CRSC Research and Design Institute Group Co Ltd
Original Assignee
CRSC Research and Design Institute Group 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 CRSC Research and Design Institute Group Co Ltd filed Critical CRSC Research and Design Institute Group Co Ltd
Priority to CN202210001387.7A priority Critical patent/CN114407986A/en
Publication of CN114407986A publication Critical patent/CN114407986A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Train Traffic Observation, Control, And Security (AREA)

Abstract

The embodiment of the invention discloses a method and a device for testing a signaler button, electronic equipment and a storage medium. Wherein, the method comprises the following steps: responding to a train route test instruction, and acquiring the position of a signal machine button of a signal machine to be tested on a visual interface; acquiring the current display state of the annunciator button on the visual interface according to the position of the annunciator button on the visual interface; judging whether the current display state meets the requirement of the expected display state or not according to the expected display state in a preset test script; and if so, determining that the operation of the train signal machine button is successful. The automatic judgment of the display state of the signal machine button is realized, whether the test instruction is successfully executed or not is determined according to the display state of the signal machine button, and the confirmation efficiency and precision of the test result are improved.

Description

Testing method and device for annunciator button, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to a train test technology, in particular to a method and a device for testing a signal machine button, electronic equipment and a storage medium.
Background
The equipment for controlling train running in the railway station mainly comprises a signal machine, a turnout, a track section and the like, wherein the signal machine is equipment for indicating the running and the stopping of the train in the railway station. The computer control system for controlling the running line of the train in the railway station is called a computer interlocking system, and before the computer interlocking system is installed in the station, software and data in the system need to be tested. In the test process, the display state of the button of the train signal machine is changed due to the operations of handling and canceling the train route, reopening the train signal and the like.
In order to improve the testing efficiency, an automatic testing technology is required. In the existing test method, the display state of the train signal machine button is not tested, only a test signal can be sent to a train, the real-time state of the train signal machine button cannot be automatically identified, whether the test operation is effective or not is confirmed, and the determination efficiency and the accuracy of a test result are low.
Disclosure of Invention
The embodiment of the invention provides a method and a device for testing an annunciator button, electronic equipment and a storage medium, which are used for identifying the display state of the annunciator button and improving the determination efficiency of a test result.
In a first aspect, an embodiment of the present invention provides a method for testing an annunciator button, where the method includes:
responding to a train route test instruction, and acquiring the position of a signal machine button of a signal machine to be tested on a visual interface;
acquiring the current display state of the annunciator button on the visual interface according to the position of the annunciator button on the visual interface;
and judging whether the current display state meets the requirement of the expected display state or not according to the expected display state in a preset test script, and if so, determining that the operation test of the button of the train signal machine is successful.
In a second aspect, an embodiment of the present invention further provides a device for testing an annunciator button, where the device includes:
the button position acquisition module is used for responding to a train route test instruction and acquiring the position of a signal machine button of a signal machine to be tested on a visual interface;
the current state acquisition module is used for acquiring the current display state of the annunciator button on the visual interface according to the position of the annunciator button on the visual interface;
the current state judging module is used for judging whether the current display state meets the requirement of the expected display state or not according to the expected display state in a preset test script; and if so, determining that the operation test of the train signal machine button is successful.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the method for testing the annunciator button according to any embodiment of the present invention when executing the program.
In a fourth aspect, embodiments of the present invention also provide a storage medium containing computer-executable instructions for performing a method of testing an annunciator button according to any of the embodiments of the present invention when executed by a computer processor.
The embodiment of the invention determines the position of the signal machine button in the display screen by responding to the test instruction of the train route. And acquiring the current display state of the button at the position of the annunciator button, judging whether the current display state meets the requirement of the expected display state, if so, determining that the test instruction operation is effective, and completing the test of the annunciator button. The problem of among the prior art, can't the real-time condition of automatic identification train signal machine button to confirm whether test operation takes effect is solved, can in time judge the test result, reduce user's judgement operation, improve definite efficiency and the precision of test result.
Drawings
Fig. 1 is a schematic flow chart of a method for testing an annunciator button according to a first embodiment of the present invention;
FIG. 2 is a schematic flow chart of a method for testing an annunciator button according to a second embodiment of the present invention;
fig. 3 is a block diagram of a testing apparatus for an annunciator button according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a test device for an annunciator button according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a schematic flowchart of a method for testing a traffic signal button according to an embodiment of the present invention, where the method is applicable to a case of testing a train route, and the method can be executed by a device for testing a traffic signal button. As shown in fig. 1, the method specifically includes the following steps:
and step 110, responding to the train route test instruction, and acquiring the position of the signal machine button of the signal machine to be tested on the visual interface.
The computer interlocking system comprises an interlocking host which can control the opening and closing states of a signal machine, and control software running in the interlocking host is called interlocking software. When the computer interlocking system controls the train, the control process and the control result can be displayed on a visual interface of a screen of the control display machine. Before the computer interlocking system is installed in a station, the interlocking system test needs to be carried out on software and data in the system.
And the test server responds to the test instruction of the train route and calls a preset test script to start testing. In the test process, the display state of the button of the train signal machine changes due to the operations of handling and canceling the train route, reopening the train signal and the like. Whether the test instruction is successfully executed or not can be determined through the display state of the signal button, for example, when the train station entering test is carried out, the button of the station entering signal is lightened, the station entering test can be determined to be successful, and the test operation is effective. When the interlocking system is tested, a signal machine to be tested can be determined firstly, and the signal machine to be tested is a signal machine capable of receiving a test signal. And determining the position of the signal machine to be tested on a visual interface, wherein the visual interface is a display screen of a control display machine, and the control display machine is a computer for providing an operation display interface for station operators to finish train receiving and sending operations. Can show semaphore and semaphore button on visual interface with the form of presetting the icon, the position of different semaphores overall arrangement on visual interface can be different. For example, the icon of the inbound signal is placed on the left side portion of the visual interface, and the icon of the outbound signal is placed on the right side portion of the visual interface. The position of the signal button on the visual interface can be the coordinate of the icon of the signal button on the visual interface, and for example, the position of the signal button can be determined according to the coordinate of the central point of the icon of the signal button.
In this embodiment, optionally, responding to the train route test instruction, acquiring a position of a traffic signal button of a traffic signal to be tested on the visual interface includes: responding to a train route test instruction, and determining a signal machine in a station area of the train to be tested as a signal machine to be tested; and determining the size of a rectangular frame of a signal machine button of the signal machine to be tested and any vertex coordinate of the rectangular frame in the visual interface.
Specifically, in response to a test instruction of a train route, a train station to be tested is determined, all signal machines in a train station area to be tested are determined as signal machines to be tested, and the signal machines to be tested can comprise all incoming signal machines and all outgoing signal machines in the train station area to be tested. And determining the coordinate positions of all the to-be-tested signal machines in the visual interface. The rectangular frame of the signal machine button icon can be obtained through image recognition, the size and the size of the rectangular frame and the vertex coordinate of any one of four vertexes of the rectangular frame are determined, and the position of the signal machine button can be obtained according to the size and the coordinate of any one vertex of the rectangular frame. For example, any vertex coordinate is an upper left corner coordinate, and a lower right corner coordinate can be obtained according to the size of the rectangular frame and the upper left corner coordinate, so as to obtain the position of the rectangular frame. In the same station, the sizes of all the train signal machine button graphs are the same, and the length and width numerical values of the buttons have independent configuration items in a configuration data file of the control display software. The coordinate range of each of the train signal buttons can be obtained by reading the button size configuration in the data file and the coordinate data of the train signal. The beneficial effect who sets up like this lies in, confirms the position of semaphore button, is convenient for monitor the display state of semaphore button, avoids monitoring unnecessary position in the interface, improves efficiency of software testing and precision.
And 120, acquiring the current display state of the signal machine button on the visual interface according to the position of the signal machine button on the visual interface.
The signal machine button display method comprises the steps that a test script runs, the current display state of a signal machine button on a visual interface can be monitored in real time, and the display state of the signal machine button can change along with the progress of a test. For example, the icon of the semaphore button may change color from black to green, indicating that the actual semaphore button has changed from "pressed" to "lifted". And when the current display state of the annunciator is monitored, acquiring the color change of the corresponding position according to the determined position of the annunciator button, and determining the current display state according to the color change.
In this embodiment, optionally, acquiring the current display state of the traffic signal button on the visual interface according to the position of the traffic signal button on the visual interface includes: determining the preset point coordinates of the rectangular frame according to the size of the rectangular frame of the signal machine button and any vertex coordinates of the rectangular frame; acquiring color information of preset point coordinates in a visual interface; and determining the current display state of the signal button according to the color information and the incidence relation between the preset color and the display state.
Specifically, the coordinates of any coordinate point on the rectangular frame size can be obtained according to the determined rectangular frame size of the traffic signal button and any vertex coordinates on the rectangular frame. The preset points at which the coordinates are to be acquired may be preset, for example, the preset points may be the four vertices and the center point of a rectangular box. According to the size of the rectangular frame and any vertex coordinate on the rectangular frame, for example, the vertex coordinate of the upper left corner, the coordinate of the lower left corner, the coordinate of the upper right corner, the coordinate of the lower right corner and the coordinate of the center point of the rectangular frame can be obtained. And acquiring color information at the coordinate position of a preset point in the visual interface in real time, wherein the color information can be pixel value information of a pixel point. Presetting the association relationship between the preset point color and the display state, for example, the color of all points in the rectangular frame is black, which indicates that the display state of the button is "pressed down"; the color of all the points in the rectangular frame is green, which indicates that the display state of the button is 'lift'; the color of the point on the two diagonal lines in the rectangular frame is red, and the color of the other points is green, which indicates that the display state of the button is "blocked". And searching the display state corresponding to the preset point color information according to the incidence relation between the color and the display state, and taking the display state as the current display state of the signal machine button. The beneficial effect who sets up like this lies in, can in time seek in the test procedure, the current state of semaphore button confirms whether the state of semaphore button changes according to the regulation of test script, is convenient for confirm the test result, improves definite efficiency and the precision of test result.
The color information of the preset point coordinates can also be directly used as the current display state of the annunciator button, namely, the incidence relation between the color and the display state does not need to be set, and only the color of the annunciator button on the visual interface at present needs to be determined. For example, if the color of the preset point is black, the current display state is a black state.
In this embodiment, optionally, the obtaining of the color information of the preset point coordinate in the visual interface includes: storing RGB characteristic values of screen pixel points in a visual interface in a display buffer area; and searching the RGB characteristic value of the preset point coordinate from the display buffer area as the color information of the preset point coordinate.
Specifically, the color information may be a combination of RGB (Red-Green-Blue ) feature values, and the test server may store the RGB feature values of each point on the visual interface in the display buffer in real time, and search for the RGB feature values corresponding to the preset point coordinates from the display buffer. For example, the RGB characteristic value of the preset point found out may be (0,0,0), indicating that the color of the preset point is black. If the RGB values of all the preset points are (0,0,0), for example, the number of the preset points is 5, it may be determined that the current color of the train signal button is black; if the RGB values of the 5 preset points are all (0,128,0), the current color of the train signal button can be determined to be dark green; if the RGB values of the 5 preset points are all (255,0,0), it can be determined that the current color of the train signal button is red.
And reading the coordinate data and the size configuration data of the train signal machine button, and calculating to obtain the coordinate data of 5 preset points required for identifying the state of the button. And reading RGB values of 5 preset points in the train signal machine button in real time, comparing the RGB values with a preset standard value, and determining the current display state of the train signal machine button. The beneficial effect who sets up like this lies in, can look for the RGB eigenvalue of arbitrary coordinate point in showing the buffer, and the colour of automatic identification preset point is convenient for realize testing the display content of man-machine interface, reduces manual operation, improves efficiency of software testing.
If the association relationship between the color and the display state is preset, the current display state of the annunciator button can be obtained after the RGB characteristic value is determined. For example, if the RGB values of the 5 preset points are all (0,0,0), it indicates that the train signal button is in a pressed state; if the RGB values of the 5 preset points are all (0,128,0), the train signal machine button is in a lifting state; if the RGB values of the 5 preset points are all (255,0,0), the train signal button is in a blocking state.
And step 130, judging whether the current display state meets the requirement of the expected display state or not according to the expected display state in the preset test script, and if so, determining that the operation test of the train signal machine button is successful.
Wherein, the test script is preset with the correct display state of the annunciator button after the test is finished, namely the expected display state. And after the current display state is obtained, comparing the current display state with the expected display state, judging whether the current display state meets the requirement of the expected display state, and if so, determining that the test is passed. For example, the current display state is color information represented by RGB characteristic values, the expected display state is a preset range of the RGB characteristic values, and if the RGB characteristic values of the current display state are within the preset range of the expected RGB characteristic values, it is determined that the current display state meets the requirement of the expected display state; and if the RGB characteristic value of the current display state is not in the expected RGB characteristic value range, determining that the current display state does not meet the requirement of the expected display state.
In this embodiment, optionally, the determining whether the current display state meets the requirement of the expected display state includes: and judging whether the current display state is consistent with the expected display state, if so, determining that the current display state meets the requirement of the expected display state.
Specifically, the current display state may be an operation state of a button, for example, the operation state may include a lift, a press, a block, and the like, and the current display state may be a state obtained according to an association relationship between a color and a state. The expected display state can be an operation state which should be realized by the button after the test is finished, the current display state is compared with the expected display state, and if the current display state is consistent with the expected display state, the current display state is determined to meet the requirement of the expected display state; and if not, determining that the current display state does not meet the requirement of the expected display state. For example, if the expected display state is "blocked", the RGB feature value combination of the preset point color information of the annunciator button after the test is completed is (255,0,0), and the corresponding current display state is "blocked", it is determined that the current display state meets the requirement of the expected display state.
The current display state may be color information of a preset point of the annunciator button, and the expected display state is color information that the annunciator button should display after the test is completed. Comparing the RGB characteristic value of the current display state with the RGB characteristic value of the expected display state, and if the RGB characteristic values are consistent, determining that the current display state meets the requirement of the expected display state; and if not, determining that the current display state does not meet the requirement of the expected display state. For example, the RGB feature value combination with the expected display state of (255,0,0) and the current display state of (255,128,0), the current display state is determined not to satisfy the requirement of the expected display state.
The beneficial effect who sets up like this lies in, through judging whether current display state is unanimous with anticipated display state, can accurately obtain the affirmation result of test, does not need the staff to carry out artifical comparison, improves the affirmation precision and the efficiency of test result, realizes the discernment and the test to the display content on man-machine interface, is convenient for accomplish whole test flow, improves efficiency of software testing and precision.
According to the technical scheme of the embodiment, the position of the signal machine button in the display screen is determined by responding to the test instruction of the train route. And acquiring the current display state of the button at the position of the annunciator button, judging whether the current display state meets the requirement of the expected display state, if so, determining that the test instruction operation is effective, and completing the test of the annunciator button. The problem of among the prior art, can't the real-time condition of automatic identification train signal machine button to confirm whether test operation takes effect is solved, can in time judge the test result, reduce user's judgement operation, improve definite efficiency and the precision of test result.
Example two
Fig. 2 is a schematic flow chart of a method for testing a semaphore button according to a second embodiment of the present invention, which is further optimized based on the above embodiments. As shown in fig. 2, the method specifically includes the following steps:
and step 210, initializing the display state of the annunciator button on the visual interface, and determining that the initialization test result of the annunciator button is test failure.
Before the test, the display state of the signal machine button on the visual interface can be initialized, and the color of the signal machine button is initialized to be a preset color, for example, the color can be initialized to be black. The test result of the annunciator button can be initialized, and the test result of the annunciator button refers to a result of whether the actual display state of the annunciator button after the test meets the requirement of the expected display state. The initialization test result may be preset to False, that is, the actual display state of the annunciator button after the test does not meet the requirement of the expected display state, and the initialization test result is a test failure.
And step 220, responding to the train route test instruction, and acquiring the position of the signal machine button of the signal machine to be tested on the visual interface.
And step 230, acquiring the current display state of the signal machine button on the visual interface according to the position of the signal machine button on the visual interface.
And 240, judging whether the current display state meets the requirement of the expected display state or not according to the expected display state in the preset test script, and if so, determining that the operation test of the train signal machine button is successful.
The current display state is compared with the expected display state, whether the current display state meets the requirement of the expected display state is judged, if not, a user cannot determine whether a signal instruction sent by the test operation is effective through the annunciator, namely, the interlocking system fails to test the annunciator, the test server does not need to modify the initialized test result, sends the initialized test failure result to the user, and informs the annunciator that the current display state does not meet the requirement of the expected display state.
In this embodiment, optionally, if yes, it is determined that the operation test of the train signal machine button is successful, including: and if the current display state meets the requirement of the expected display state, updating the test result of the annunciator button from the initial test result to a test success, and sending a prompt message that the operation test of the train annunciator button is successful.
Specifically, if the current display state meets the requirement of the expected display state, the annunciator button is considered to correctly reflect the execution result of the test instruction, and the test is effective. The initialization test result of the annunciator button can be updated to be successful in test, and prompt information of successful test is sent to the user. That is, the test server only needs to change the test result when the test is successful, for example, the test result is changed from False to True, so that the work of the test server is reduced, and the confirmation efficiency of the test result is improved.
If the initialization test result is not set, the test server needs to generate the test result of the current test no matter the test is successful or failed.
The embodiment of the invention initializes the button display state and the test result, and then responds to the test instruction of the train route to determine the position of the signal machine button in the display screen. And acquiring the current display state of the button at the position of the signal machine button, judging whether the current display state meets the requirement of the expected display state, if so, determining that the test instruction is effective to operate, changing the initialized test result, and finishing the operation test of the train signal machine button. The problem of among the prior art, can't the real-time status of automatic identification train signal machine button to confirm whether test operation is effective is solved, realize testing the display content on man-machine interface. The workload of the test server is reduced, the test result is judged in time, the judgment operation of a user is reduced, and the determination efficiency and accuracy of the test result are improved. In the prior art, after the test is completed, the test server may return a result of the test success or the test failure, but the returned result is only for whether the annunciator receives and executes the test instruction, and it cannot be determined whether the annunciator button correctly updates the display state according to the test instruction, and the user can only check the display color of each annunciator button in sequence. By automatically identifying the display state of the train annunciator button in the human-computer interface, the interlocking system test instruction is determined to take effect, the annunciator successfully receives the instruction, and the confirmation efficiency and precision of the test result are improved.
EXAMPLE III
Fig. 3 is a block diagram of a testing apparatus for an annunciator button according to a third embodiment of the present invention, which is capable of executing a testing method for an annunciator button according to any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method. As shown in fig. 3, the apparatus specifically includes:
the button position acquisition module 301 is configured to respond to a train route test instruction and acquire a position of a signal machine button of a signal machine to be tested on a visual interface;
a current state obtaining module 302, configured to obtain a current display state of the annunciator button on the visual interface according to the position of the annunciator button on the visual interface;
the current state judgment module 303 is configured to judge whether the current display state meets the requirement of the expected display state according to the expected display state in the preset test script, and if yes, determine that the operation test of the train signal machine button is successful.
Optionally, the apparatus further comprises:
and the initialization module is used for initializing the display state of the annunciator button on the visual interface before responding to the train route test instruction and acquiring the position of the annunciator button of the annunciator to be tested on the visual interface, and determining that the initialization test result of the annunciator button is test failure.
Optionally, the button position obtaining module 301 includes:
the to-be-tested signal machine determining unit is used for responding to the train route test instruction and determining the signal machine in the to-be-tested train station area as the to-be-tested signal machine;
and the rectangular frame determining unit is used for determining the size of a rectangular frame of a signal machine button of the signal machine to be tested and any vertex coordinate of the rectangular frame in the visual interface.
Optionally, the current state obtaining module 302 includes:
the preset point coordinate determination unit is used for determining the preset point coordinate of the rectangular frame according to the size of the rectangular frame of the signal machine button and any vertex coordinate of the rectangular frame;
the color information determining unit is used for acquiring color information of coordinates of preset points in the visual interface;
and the display state determining unit is used for determining the current display state of the signal machine button according to the color information and the incidence relation between the preset color and the display state.
Optionally, the color information determining unit is specifically configured to:
storing RGB characteristic values of screen pixel points in a visual interface in a display buffer area;
and searching the RGB characteristic value of the preset point coordinate from the display buffer area as the color information of the preset point coordinate.
Optionally, the current state determining module 303 is specifically configured to:
and judging whether the current display state is consistent with the expected display state, if so, determining that the current display state meets the requirement of the expected display state.
Optionally, the current state determining module 303 is further specifically configured to:
and if the current display state meets the requirement of the expected display state, updating the test result of the annunciator button from the initial test result to a test success, and sending out prompt information that the operation test of the train annunciator button is successful.
The embodiment of the invention determines the position of the signal machine button in the display screen by responding to the test instruction of the train route. And acquiring the current display state of the button at the position of the signal machine button, judging whether the current display state meets the requirement of the expected display state, if so, determining that the test instruction operation is effective, and finishing the operation test of the train signal machine button. The problem of among the prior art, can't the real-time condition of automatic identification train signal machine button to confirm whether test operation takes effect is solved, can in time judge the test result, reduce user's judgement operation, improve definite efficiency and the precision of test result.
Example four
Fig. 4 is a schematic structural diagram of a test device for an annunciator button according to a fourth embodiment of the present invention. The semaphores button test device is an electronic device and fig. 4 shows a block diagram of an exemplary electronic device 400 suitable for use in implementing embodiments of the present invention. The electronic device 400 shown in fig. 4 is only an example and should not bring any limitation to the function and the scope of use of the embodiments of the present invention.
As shown in fig. 4, electronic device 400 is embodied in the form of a general purpose computing device. The components of electronic device 400 may include, but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 that couples the various system components (including the system memory 402 and the processing unit 401).
Bus 403 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 400 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 400 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 402 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)404 and/or cache memory 405. The electronic device 400 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 406 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 403 by one or more data media interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 407 generally perform the functions and/or methods of the described embodiments of the invention.
The electronic device 400 may also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 410, etc.), with one or more devices that enable a user to interact with the electronic device 400, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 400 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interface 411. Also, the electronic device 400 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 412. As shown in FIG. 4, the network adapter 412 communicates with the other modules of the electronic device 400 over the bus 403. It should be appreciated that although not shown in FIG. 4, other hardware and/or software modules may be used in conjunction with electronic device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 401 executes various functional applications and data processing by running the program stored in the system memory 402, for example, implementing a method for testing a semaphore button provided by an embodiment of the present invention, including:
responding to a train route test instruction, and acquiring the position of a signal machine button of a signal machine to be tested on a visual interface;
acquiring the current display state of the annunciator button on the visual interface according to the position of the annunciator button on the visual interface;
and judging whether the current display state meets the requirement of the expected display state or not according to the expected display state in a preset test script, and if so, determining that the operation test of the button of the train signal machine is successful.
EXAMPLE five
The fifth embodiment of the present invention further provides a storage medium containing computer-executable instructions, where the storage medium stores a computer program, and when the computer program is executed by a processor, the method for testing an annunciator button provided by the fifth embodiment of the present invention is implemented, where the method includes:
responding to a train route test instruction, and acquiring the position of a signal machine button of a signal machine to be tested on a visual interface;
acquiring the current display state of the annunciator button on the visual interface according to the position of the annunciator button on the visual interface;
and judging whether the current display state meets the requirement of the expected display state or not according to the expected display state in a preset test script, and if so, determining that the operation test of the button of the train signal machine is successful.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for testing an annunciator button, comprising:
responding to a train route test instruction, and acquiring the position of a signal machine button of a signal machine to be tested on a visual interface;
acquiring the current display state of the annunciator button on the visual interface according to the position of the annunciator button on the visual interface;
and judging whether the current display state meets the requirement of the expected display state or not according to the expected display state in a preset test script, and if so, determining that the operation test of the button of the train signal machine is successful.
2. The method of claim 1, further comprising, prior to obtaining a location of a signal button of a signal under test on the visual interface in response to the train route test command:
initializing the display state of the annunciator button on the visual interface, and determining the initialization test result of the annunciator button as test failure.
3. The method of claim 1, wherein obtaining a position of a signal button of a signal to be tested on a visual interface in response to a train route test command comprises:
responding to a train route test instruction, and determining a signal machine in a station area of the train to be tested as a signal machine to be tested;
and determining the size of a rectangular frame of a signal machine button of the signal machine to be tested and any vertex coordinate of the rectangular frame in the visual interface.
4. The method according to claim 3, wherein obtaining the current display state of the traffic signal button on the visual interface according to the position of the traffic signal button on the visual interface comprises:
determining the preset point coordinates of the rectangular frame according to the size of the rectangular frame of the signal machine button and any vertex coordinates of the rectangular frame;
acquiring color information of preset point coordinates in a visual interface;
and determining the current display state of the signal machine button according to the color information and the incidence relation between the preset color and the display state.
5. The method of claim 4, wherein obtaining color information of preset point coordinates in a visual interface comprises:
storing RGB characteristic values of screen pixel points in a visual interface in a display buffer area;
and searching the RGB characteristic value of the preset point coordinate from the display buffer area as the color information of the preset point coordinate.
6. The method of claim 1, wherein determining whether the current display state meets the requirements of the desired display state comprises:
and judging whether the current display state is consistent with the expected display state, if so, determining that the current display state meets the requirement of the expected display state.
7. The method of claim 2, wherein determining that the train signal button operation test is successful if yes comprises:
and if the current display state meets the requirement of the expected display state, updating the test result of the annunciator button from the initial test result to a test success, and sending out prompt information that the operation test of the train annunciator button is successful.
8. A device for testing a pushbutton of a traffic signal, comprising:
the button position acquisition module is used for responding to a train route test instruction and acquiring the position of a signal machine button of a signal machine to be tested on a visual interface;
the current state acquisition module is used for acquiring the current display state of the annunciator button on the visual interface according to the position of the annunciator button on the visual interface;
and the current state judgment module is used for judging whether the current display state meets the requirement of the expected display state or not according to the expected display state in a preset test script, and if so, determining that the operation test of the train signal machine button is successful.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method for testing an annunciator button according to any one of claims 1 to 7 when executing the program.
10. A storage medium containing computer-executable instructions for performing the method of testing a semaphore button according to any of claims 1-7 when executed by a computer processor.
CN202210001387.7A 2022-01-04 2022-01-04 Testing method and device for annunciator button, electronic equipment and storage medium Pending CN114407986A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210001387.7A CN114407986A (en) 2022-01-04 2022-01-04 Testing method and device for annunciator button, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210001387.7A CN114407986A (en) 2022-01-04 2022-01-04 Testing method and device for annunciator button, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114407986A true CN114407986A (en) 2022-04-29

Family

ID=81271240

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210001387.7A Pending CN114407986A (en) 2022-01-04 2022-01-04 Testing method and device for annunciator button, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114407986A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115107837A (en) * 2022-07-14 2022-09-27 中铁武汉电气化局集团第一工程有限公司 Single debugging system for railway open signal and turnout equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060104607A (en) * 2005-03-31 2006-10-09 주식회사 팬택 Mobile terminal with user interface function using camcoder and user interface method
JP2012061998A (en) * 2010-09-17 2012-03-29 Meielec:Kk Simulator for railway signal cad system, computer program therefor, computer-readable recording medium in which program is recorded and method of simulating railway signal cad system
CN109649447A (en) * 2018-12-21 2019-04-19 中国铁道科学研究院集团有限公司通信信号研究所 A kind of distributed autonomic station autonomous controlling machine data automatic test approach and system
CN112172877A (en) * 2020-09-23 2021-01-05 中国铁道科学研究院集团有限公司通信信号研究所 Station field representation information identification method based on video image
CN112395201A (en) * 2020-11-26 2021-02-23 交控科技股份有限公司 ATS test method and device
CN112686338A (en) * 2021-03-10 2021-04-20 卡斯柯信号(北京)有限公司 Image information identification method, device, equipment and storage medium
CN112765020A (en) * 2021-01-15 2021-05-07 通号万全信号设备有限公司 Automatic testing method of computer interlocking system
CN113212502A (en) * 2021-05-03 2021-08-06 中铁建电气化局集团南方工程有限公司 Integrated test method for CTCS-3 level train control system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060104607A (en) * 2005-03-31 2006-10-09 주식회사 팬택 Mobile terminal with user interface function using camcoder and user interface method
JP2012061998A (en) * 2010-09-17 2012-03-29 Meielec:Kk Simulator for railway signal cad system, computer program therefor, computer-readable recording medium in which program is recorded and method of simulating railway signal cad system
CN109649447A (en) * 2018-12-21 2019-04-19 中国铁道科学研究院集团有限公司通信信号研究所 A kind of distributed autonomic station autonomous controlling machine data automatic test approach and system
CN112172877A (en) * 2020-09-23 2021-01-05 中国铁道科学研究院集团有限公司通信信号研究所 Station field representation information identification method based on video image
CN112395201A (en) * 2020-11-26 2021-02-23 交控科技股份有限公司 ATS test method and device
CN112765020A (en) * 2021-01-15 2021-05-07 通号万全信号设备有限公司 Automatic testing method of computer interlocking system
CN112686338A (en) * 2021-03-10 2021-04-20 卡斯柯信号(北京)有限公司 Image information identification method, device, equipment and storage medium
CN113212502A (en) * 2021-05-03 2021-08-06 中铁建电气化局集团南方工程有限公司 Integrated test method for CTCS-3 level train control system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115107837A (en) * 2022-07-14 2022-09-27 中铁武汉电气化局集团第一工程有限公司 Single debugging system for railway open signal and turnout equipment
CN115107837B (en) * 2022-07-14 2024-05-10 中铁武汉电气化局集团第一工程有限公司 Single-item debugging system for railway open signal and turnout equipment

Similar Documents

Publication Publication Date Title
CN107506300B (en) User interface testing method, device, server and storage medium
CN114407986A (en) Testing method and device for annunciator button, electronic equipment and storage medium
CN113436100A (en) Method, apparatus, device, medium and product for repairing video
CN113947571A (en) Training method of vehicle damage detection model and vehicle damage identification method
CN111539924A (en) Defect detection method, device and equipment for suspension clamp and storage medium
CN113361468A (en) Business quality inspection method, device, equipment and storage medium
US20230098684A1 (en) Dynamic simulation display method and system for working machine structure
CN114022767A (en) Elevator floor positioning method and device, terminal equipment and storage medium
CN108109580A (en) Parameter adaptation method, apparatus, equipment and the storage medium of LED display
CN113936232A (en) Screen fragmentation identification method, device, equipment and storage medium
CN111054072B (en) Method, device, equipment and storage medium for role model tailing
CN112573312B (en) Elevator car position determining method and device, elevator system and storage medium
WO2024012154A1 (en) Working-efficiency display method and apparatus based on digital twin, and device
CN111383457B (en) Parking space state detection method and device, equipment and storage medium
CN114816670A (en) Virtual machine detection method and device, electronic equipment and storage medium
CN114067283A (en) Violation identification method and device, electronic equipment and storage medium
CN114140612A (en) Method, device, equipment and storage medium for detecting hidden danger of power equipment
CN114398969A (en) Method, device, equipment and medium for verifying instruction validity
CN110633976B (en) Virtual resource transfer method and device
CN113591787A (en) Method, device, equipment and storage medium for identifying optical fiber link component
CN112288774B (en) Mobile detection method, mobile detection device, electronic equipment and storage medium
CN110968519A (en) Game testing method, device, server and storage medium
CN110348626A (en) A kind of polling path planing method, device, equipment and storage medium
CN115953502B (en) Reachability approach display method, device, equipment and storage medium
WO2024026990A1 (en) Automatic iterative training method, system and device for recognition model, and storage medium

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