A method, device, electronic equipment, and storage medium for detecting the status of a turnstile.
By sending a wake-up signal to the turnstile when power is restored and analyzing the acquired video information, the problem of abnormal operation of the turnstile caused by power fluctuations is solved, and fast and accurate turnstile status detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN REALBOM INTELLITECH CO LTD
- Filing Date
- 2022-11-03
- Publication Date
- 2026-06-02
AI Technical Summary
When power is restored, the turnstiles may malfunction or be damaged due to sudden power outages or power restoration, resulting in them being unable to operate normally. Furthermore, it is difficult for staff to quickly detect the operating status of a large number of turnstiles.
After detecting the power restoration signal, a wake-up signal is sent to the gate to determine whether the gate has been successfully woken up. The gate is then controlled to operate according to the preset functions. Video information is acquired and analyzed, and feature recognition and similarity calculation are used to determine whether the gate is operating normally.
It enables quick and accurate determination of whether the turnstile is operating normally, reducing the workload of manual inspection and improving inspection efficiency and accuracy.
Smart Images

Figure CN115661752B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of equipment testing, and in particular to a method, apparatus, electronic device, and storage medium for detecting the status of a turnstile. Background Technology
[0002] In subway stations, train stations, and airports, turnstiles are installed to control the orderly entry and exit of people. During actual operation, in the event of a power outage or maintenance, the turnstiles need to be restarted to return to working order. However, after a sudden power outage or restoration, the internal circuitry or functional modules of the turnstiles may become disordered or damaged, causing them to malfunction. Because subway stations and train stations are large and have a large number of turnstiles, it is inconvenient for staff to check the operational status of the turnstiles when power is restored. Therefore, how to check the operational status of the turnstiles when power is restored becomes a problem. Summary of the Invention
[0003] To facilitate knowing the operating status of the turnstiles when power is restored, this application provides a turnstile status detection method, device, electronic device, and storage medium.
[0004] Firstly, this application provides a method for detecting the status of a turnstile, employing the following technical solution:
[0005] A method for detecting the status of a turnstile includes:
[0006] When a power restoration signal is detected, a wake-up signal is sent to the gate.
[0007] Determine whether the gate has been successfully woken up;
[0008] If the wake-up is successful, the gate will be controlled to operate according to the preset functions;
[0009] Obtain video information from the turnstile;
[0010] Based on the video information, determine whether the gate is operating normally.
[0011] By adopting the above technical solution, when a power restoration signal is detected, it indicates that power has been restored. At this time, it is necessary to wake up the turnstile to power it on and put it into a standby state. Therefore, a wake-up signal is sent to the turnstile to power it on. After sending the wake-up signal, it is determined whether the turnstile has been successfully woken up. If the wake-up is successful, it means that the turnstile is powered on. Since the turnstile changes from a power-off state to a power-on state, it is necessary to verify whether the turnstile can operate normally. The turnstile is controlled to operate according to the preset functions, and video information at the turnstile is acquired and analyzed to determine whether the turnstile is operating according to the preset functions. This allows for a more convenient understanding of the turnstile's operating status.
[0012] In another possible implementation, determining whether the gate has been successfully woken up includes:
[0013] Determine whether a feedback signal sent by the gate is received within a preset time period;
[0014] If received, it is determined that the gate has been successfully woken up;
[0015] If no response is received, it is determined that the gate wake-up has failed.
[0016] By adopting the above technical solution, after sending a wake-up signal to the gate, if the gate is operating normally, it will output a feedback signal. If the feedback signal is received within a preset time, it means that the gate has been successfully woken up. If the feedback signal is not received within the preset time, it means that the gate has failed to wake up. Judging whether the wake-up is successful by whether a feedback signal is received is more accurate and convenient.
[0017] In another possible implementation, acquiring the video information at the turnstile includes:
[0018] Obtain the identity information of the gate;
[0019] The corresponding camera device is determined based on the identity information;
[0020] Obtain the start time of the gate operating according to the preset function, and the duration of the preset function;
[0021] The video information at the gate is obtained based on the start time and the duration of the preset function.
[0022] By adopting the above technical solution, since the turnstiles are located in different places, it is necessary to determine the camera device that can capture the turnstiles. Therefore, the corresponding camera device is determined according to the identity information of the turnstiles, and the start time and duration of the turnstiles running according to the preset functions are obtained. The video information of the turnstiles is obtained based on the start time and duration, making the duration of the video information more accurate and reducing useless segments in the video information. This saves time and reduces computing power when analyzing the operating status of the turnstiles in the future.
[0023] In another possible implementation, determining whether the gate is operating normally based on the video information includes:
[0024] The video information is subjected to feature recognition to obtain the features of at least one component on the gate;
[0025] Determine the target component feature corresponding to the preset function from the at least one component feature;
[0026] The video information is segmented to obtain the region video corresponding to the feature of the target component;
[0027] The system determines whether the turnstile is operating normally based on the video footage of the area.
[0028] By adopting the above technical solution, feature recognition is performed on video information, thereby identifying at least one component feature on the turnstile. From the component features, the target component feature corresponding to the preset function is determined. Then, the area video corresponding to the target component feature is segmented from the video information. The area video is analyzed to determine whether the turnstile is operating normally. Since only the target component feature exists in the area video, the influence of other components can be reduced when analyzing the area video of the target component feature, making the judgment result more accurate. It also reduces other useless information, saves computing power, and reduces the judgment time.
[0029] In another possible implementation, determining whether the gate is operating normally based on the area video includes:
[0030] Determine the trained target network model corresponding to the features of the target component;
[0031] The video information corresponding to the features of the target component is input into the trained target network model to identify the running status and obtain the running status result.
[0032] By adopting the above technical solution, the target network model corresponding to the characteristics of the target component is determined, and the regional video is input into the corresponding target network model for operation status recognition, resulting in more accurate operation status recognition results.
[0033] In another possible implementation, determining whether the gate is operating normally based on the area video includes:
[0034] Obtain the baseline video of the target component when it is operating normally;
[0035] Calculate the similarity between the regional video and the reference video;
[0036] If the similarity reaches a preset similarity threshold, then the gate is determined to be operating normally;
[0037] If the similarity does not reach the preset similarity threshold, the gate is determined to be malfunctioning.
[0038] By adopting the above technical solution, the similarity between the regional video and the baseline video when the target component features are operating normally is calculated. If the similarity reaches the preset similarity threshold, it means that the current target component features are close to the state when operating normally, and thus the gate is determined to be operating normally. If the similarity does not reach the preset similarity threshold, it means that the current target component features are significantly different from the state when operating normally, and thus the gate is determined to be operating abnormally. Calculating the similarity and comparing it with the preset similarity threshold is a more accurate way to determine whether the gate is operating normally.
[0039] In another possible implementation, the method further includes:
[0040] If wake-up fails, a prompt message will be output.
[0041] By adopting the above technical solution, a prompt message is output after the wake-up failure is determined, so that the staff can be informed of the abnormal operation of the gate in a timely manner.
[0042] Secondly, this application provides a gate status detection device, which adopts the following technical solution:
[0043] A gate status detection device, comprising:
[0044] The sending module is used to send a wake-up signal to the gate when a power restoration signal is detected;
[0045] The first judgment module is used to determine whether the gate has been successfully woken up;
[0046] The control module is used to control the gate to operate according to preset functions when the wake-up is successful;
[0047] The acquisition module is used to acquire video information at the turnstile.
[0048] The second judgment module is used to determine whether the gate is operating normally based on the video information.
[0049] By adopting the above technical solution, when a power restoration signal is detected, it indicates that power has been restored. At this time, the turnstile needs to be woken up to power on and enter the standby state. Therefore, the sending module sends a wake-up signal to the turnstile, thereby powering it on. After sending the wake-up signal, the first judgment module is used to determine whether the turnstile has been successfully woken up. If the wake-up is successful, it means that the turnstile is powered on. Since the turnstile changes from a power-off state to a power-on state, it is necessary to verify whether the turnstile can operate normally. The control module is used to control the turnstile to operate according to the preset functions. The acquisition module acquires the video information at the turnstile and analyzes the video information. The second judgment module then determines whether the turnstile is operating according to the preset functions, thereby determining whether the turnstile is operating normally. Therefore, it is easier to know the operating status of the turnstile.
[0050] In another possible implementation, when the first determining module determines whether the gate has been successfully woken up, it is specifically used for:
[0051] Determine whether a feedback signal sent by the gate is received within a preset time period;
[0052] If received, it is determined that the gate has been successfully woken up;
[0053] If no response is received, it is determined that the gate wake-up has failed.
[0054] In another possible implementation, the acquisition module, when acquiring video information at the gate, is specifically used for:
[0055] Obtain the identity information of the gate;
[0056] The corresponding camera device is determined based on the identity information;
[0057] Obtain the start time of the gate operating according to the preset function, and the duration of the preset function;
[0058] The video information at the gate is obtained based on the start time and the duration of the preset function.
[0059] In another possible implementation, when the second determining module determines whether the gate is operating normally based on the video information, it is specifically used for:
[0060] The video information is subjected to feature recognition to obtain the features of at least one component on the gate;
[0061] Determine the target component feature corresponding to the preset function from the at least one component feature;
[0062] The video information is segmented to obtain the region video corresponding to the feature of the target component;
[0063] The system determines whether the turnstile is operating normally based on the video footage of the area.
[0064] In another possible implementation, when the second determining module determines whether the gate is operating normally based on the area video, it is specifically used for:
[0065] Determine the trained target network model corresponding to the features of the target component;
[0066] The video information corresponding to the features of the target component is input into the trained target network model to identify the running status and obtain the running status result.
[0067] In another possible implementation, when the second determining module determines whether the gate is operating normally based on the area video, it is specifically used for:
[0068] Obtain the baseline video of the target component when it is operating normally;
[0069] Calculate the similarity between the regional video and the reference video;
[0070] If the similarity reaches a preset similarity threshold, then the gate is determined to be operating normally;
[0071] If the similarity does not reach the preset similarity threshold, the gate is determined to be malfunctioning.
[0072] In another possible implementation, the device further includes:
[0073] The output module is used to output a prompt message when wake-up fails.
[0074] Thirdly, this application provides an electronic device that adopts the following technical solution:
[0075] An electronic device comprising:
[0076] At least one processor;
[0077] Memory;
[0078] At least one application, wherein the application is stored in memory and configured to be executed by at least one processor, the at least one configuration being for: executing a gate status detection method according to any possible implementation of the first aspect.
[0079] Fourthly, this application provides a computer-readable storage medium, which adopts the following technical solution:
[0080] A computer-readable storage medium, when the computer program is executed in a computer, causes the computer to perform a gate status detection method as described in any one of the first aspects.
[0081] In summary, this application includes at least one of the following beneficial technical effects:
[0082] 1. When a power restoration signal is detected, it indicates that power has been restored. At this time, the turnstile needs to be woken up to power on and enter the standby state. Therefore, a wake-up signal is sent to the turnstile to power it on. After sending the wake-up signal, it is determined whether the turnstile has been successfully woken up. If the wake-up is successful, it means that the turnstile is powered on. Since the turnstile changes from a power-off state to a power-on state, it is necessary to verify whether the turnstile can operate normally. The turnstile is controlled to operate according to the preset functions, and video information at the turnstile is acquired and analyzed to determine whether the turnstile is operating according to the preset functions. This allows for a more convenient understanding of the turnstile's operating status.
[0083] 2. Feature recognition is performed on video information to identify at least one component feature on the turnstile. From the component features, the target component feature corresponding to the preset function is determined. Then, the video area corresponding to the target component feature is segmented from the video information. The video area is analyzed to determine whether the turnstile is operating normally. Since only the target component feature exists in the video area, the influence of other components can be reduced when analyzing the video area of the target component feature, making the judgment result more accurate. It also reduces other useless information, saves computing power, and reduces the judgment time. Attached Figure Description
[0084] Figure 1 This is a flowchart illustrating a gate status detection method according to an embodiment of this application.
[0085] Figure 2 This is a schematic diagram of the structure of a gate status detection device according to an embodiment of this application.
[0086] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0087] The present application will be further described in detail below with reference to the accompanying drawings.
[0088] After reading this specification, those skilled in the art may make modifications to this embodiment without contributing any inventive step, but such modifications are protected by patent law as long as they fall within the scope of the claims of this application.
[0089] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0090] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.
[0091] The embodiments of this application will now be described in further detail with reference to the accompanying drawings.
[0092] This application provides a gate status detection method, executed by an electronic device. This electronic device can be a server or a terminal device. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smartphone, tablet, laptop, desktop computer, etc., but is not limited to these. The terminal device and the server can be directly or indirectly connected via wired or wireless communication. This application does not impose any limitations on this. Figure 1 As shown, the method includes steps S101, S102, S103, S104, and S105, wherein,
[0093] S101, when a power restoration signal is detected, a wake-up signal is sent to the gate.
[0094] In this embodiment, the electronic device can be connected to power transmission lines in locations such as subway stations or train stations. When the subway station or train station transitions from a power outage to a power supply, the electronic device can detect the restoration of power. After power is restored, the turnstiles in the location remain closed, so they need to be opened to allow power to the turnstiles. The electronic device and the turnstiles are connected via wires or other media. After detecting power restoration, the electronic device sends a wake-up signal to the turnstiles. Upon receiving the wake-up signal, the voltage level of the chip or module managing power access within the turnstile is pulled low, allowing power from the transmission lines to enter the turnstiles, and the turnstiles enter the start state.
[0095] Since there are multiple turnstiles in the venue, and their locations vary, each turnstile can be assigned a different MAC address to distinguish it from others. Electronic devices can send a wake-up signal containing the MAC address of each turnstile. Upon receiving the wake-up signal, the turnstile compares the MAC address in the signal with the MAC address configured within the turnstile to determine if it corresponds to its specific wake-up signal.
[0096] In this embodiment, an enable register and a status register can be set inside the gate to configure the operation of waking up the gate. Alternatively, the wire connecting the electronic device and the gate can be directly connected to the relevant pins or chips for managing the gate's access and power supply. When the gate receives a wake-up signal, it directly responds to the wake-up signal to power on the gate.
[0097] S102, determine whether the gate has been successfully woken up.
[0098] In the embodiments of this application, after sending a wake-up signal to the gate, a wake-up failure may occur. Therefore, the electronic device also needs to determine whether the gate has been successfully woken up.
[0099] S103, if the wake-up is successful, the control gate will operate according to the preset function.
[0100] In this embodiment of the application, if the wake-up is successful, it indicates that the gate has been opened and the power supply from the transmission line has been connected to the gate. However, since the location changes from a power-off state to a power-on state, the internal circuitry of the gate may be damaged during a sudden power outage or power surge. Therefore, it is necessary to determine whether the gate can operate normally. At this time, the electronic device controls the gate to operate according to preset functions. For example, it controls the gate's baffles to flip or move, and controls the indicator lights on the gate to turn on and off.
[0101] S104, Obtain video information from the turnstile.
[0102] In this embodiment of the application, in order to better analyze the operating status of the turnstile and determine whether the turnstile is operating according to the preset function, video information at the turnstile is obtained. Since there are multiple camera devices distributed in the venue, the camera devices can collect video information at the turnstile. Therefore, the video information of the turnstile can be collected by the camera devices set in the venue and obtained by the electronic device.
[0103] S105 determines whether the gate is operating normally based on video information.
[0104] In this embodiment of the application, after the electronic device acquires the video information at the turnstile, it analyzes the video information, which includes information about the turnstile's operating status, to determine whether the turnstile is functioning normally. This method is more convenient, accurate, and efficient than manual inspection of the turnstile.
[0105] One possible implementation of this application embodiment is that step S102, which determines whether the gate has been successfully woken up, specifically includes steps S1021 (not shown in the figure), S1022 (not shown in the figure), and S1023 (not shown in the figure), wherein...
[0106] S1021, determine whether a feedback signal sent by the gate has been received within a preset time.
[0107] S1022, if received, it is confirmed that the gate has been successfully woken up.
[0108] S1023, if not received, it is determined that the gate wake-up failed.
[0109] In this embodiment, after the electronic device sends a wake-up signal to the gate, if the gate is successfully woken up, it indicates that the gate is connected to the power supply line and has been successfully opened. The opened gate then sends a feedback signal to the electronic device, informing the device that the gate has been successfully woken up. If the gate is not successfully opened, it cannot send a feedback signal. Assume a preset time of three seconds. If the electronic device does not receive a feedback signal from the gate within three seconds after sending the wake-up signal, it indicates that the gate has not been successfully woken up. If a feedback signal indicating that the gate has been activated is received within three seconds, it indicates that the gate has been successfully woken up. By determining whether a feedback signal is received within the preset time, it is possible to more accurately and conveniently determine whether the gate has been woken up.
[0110] One possible implementation of this application embodiment is that step S104, which involves obtaining video information at the turnstile, specifically includes steps S1041 (not shown in the figure), S1042 (not shown in the figure), S1043 (not shown in the figure), and S1044 (not shown in the figure), wherein...
[0111] S1041, Obtain the gate's identity information.
[0112] In the embodiments of this application, after the electronic device wakes up the gate, it obtains the gate's identity information, which may include the gate's MAC address, number, and location information, etc.
[0113] S1042, determine the corresponding camera device based on the identity information.
[0114] In this embodiment, different turnstiles correspond to different camera devices, and there is a correspondence between the turnstile's identification information and the camera device. Therefore, after obtaining the turnstile's identification information, the electronic device can determine the corresponding camera device, that is, the camera device that can capture the image at the turnstile's location.
[0115] S1043, obtain the start time of the gate running according to the preset function, and the duration of the preset function.
[0116] In this embodiment of the application, after the camera device is identified, the start time of the electronic device controlling the gate to run according to the preset function is obtained, assuming the start time is 17:00:00. The preset function corresponds to a duration, for example, the duration of the gate's barrier flipping can be three seconds, and the duration of the indicator light on and off on the gate can be 5 seconds, etc.
[0117] S1044, acquire video information at the gate based on the start time and the duration of the preset function.
[0118] For the embodiments of this application, taking step S103 as an example, assuming the preset function is baffle flipping, the electronic device starts acquiring video information from 17:00:00 and stops acquiring it at 17:00:03, thus obtaining a three-second video segment. By acquiring video information through the preset function's start time and duration, useless data and information in the video are reduced. This facilitates subsequent analysis and reduces computing power and analysis time.
[0119] One possible implementation of this application embodiment is that step S105, which determines whether the gate is operating normally based on video information, specifically includes steps S1051 (not shown in the figure), S1052 (not shown in the figure), S1053 (not shown in the figure), and S1054 (not shown in the figure), wherein...
[0120] S1051, Perform feature recognition on the video information to obtain the features of at least one component on the gate.
[0121] In this embodiment of the application, after obtaining video information, the video information can be input into a trained network model for feature recognition. The network model can be a convolutional neural network model, a recurrent neural network model, or other types of network models, which are not limited here. The video information is input into the trained convolutional neural network for feature recognition and then outputs at least one component feature on the gate, such as identifying the baffle and indicator light.
[0122] S1052, determine the target component feature corresponding to the preset function from at least one component feature.
[0123] In the embodiments of this application, there is a correspondence between preset functions and component features. Therefore, after obtaining at least one component feature on the gate, the target component feature can be determined based on the correspondence between the preset functions and component features. For example, if the preset function is a baffle flip, then the target component feature is determined to be a baffle.
[0124] S1053, segment the video information to obtain the region video corresponding to the feature of the target component.
[0125] In the embodiments of this application, after determining the target component features, the electronic device segments the video information, for example, by segmenting according to the size of the target component features in the video information, to obtain a region video containing only the target component features.
[0126] S1054, determines whether the gate is operating normally based on regional video.
[0127] In this embodiment of the application, after obtaining the regional video, the video of the viewing region is analyzed to determine the operating status of the target component features. The regional video only contains the target component features and does not contain other component features, thus reducing the interference of useless data and information on the analysis of the target component features, thereby making the analysis results more accurate and reducing the analysis time.
[0128] One possible implementation of this application embodiment is that step S1054, which determines whether the gate is operating normally based on the regional video, specifically includes steps S10541 (not shown in the figure) and S10542 (not shown in the figure), wherein...
[0129] S10541, Determine the trained target network model corresponding to the features of the target component.
[0130] In the embodiments of this application, after determining the features of the target component, the electronic device can obtain the trained network model corresponding to the features of the target component from a preset model library.
[0131] S10542, input the video information corresponding to the features of the target component into the trained target network model to identify the running status and obtain the running status result.
[0132] In this embodiment, the electronic device inputs the video of the region corresponding to the feature of the target component into a corresponding trained network model for state recognition. The network model can be a convolutional neural network (CNN), a recurrent neural network (RNN), or other types of network models, and is not limited thereto. Taking a CNN as an example, the electronic device inputs the video of the region corresponding to the feature of the target component into the trained CNN model. The CNN identifies and analyzes the operating state of the target component in the video region and finally outputs the operating state result. The operating state result reflects whether the feature of the target component is operating normally, thus indicating whether the gate is operating normally.
[0133] One possible implementation of this application embodiment is that step S1054, which determines whether the gate is operating normally based on the regional video, specifically includes steps S10543 (not shown in the figure), S10544 (not shown in the figure), S10545 (not shown in the figure), and S10546 (not shown in the figure), wherein...
[0134] S10543, Obtain the baseline video of the target component when it is operating normally.
[0135] In this embodiment of the application, the electronic device acquires a reference video corresponding to the characteristics of the target component when it is functioning normally. The reference video can be stored on the local storage medium of the electronic device or on a cloud server. The electronic device acquires the corresponding reference video according to different characteristics of the target component. Taking a baffle as an example, if the preset function is baffle flipping, the electronic device acquires the reference video corresponding to the baffle.
[0136] S10544 calculates the similarity between the region video and the reference video.
[0137] In the embodiments of this application, the electronic device can calculate the similarity between each frame of the regional video and the reference video. After calculating the similarity between each frame, the average of all the results can be taken to characterize the similarity between the regional video and the reference video. In other embodiments, keyframes corresponding to the different features of the target component can be determined according to their characteristics, and the similarity between the keyframes in the regional video and the reference video can be calculated. The similarity can be calculated using structural similarity measurement (SSIM), or cosine similarity, that is, representing the two frames as vectors and characterizing the similarity between the two frames by calculating the cosine distance between the vectors. It can also be calculated using histograms, or other methods, which are not limited here.
[0138] S10545, if the similarity reaches the preset similarity threshold, then the gate is determined to be operating normally.
[0139] S10546 If the similarity does not reach the preset similarity threshold, the gate operation is determined to be abnormal.
[0140] In this embodiment of the application, assuming a preset similarity threshold of 95%, if the electronic device determines that the similarity between the regional video and the reference video reaches 95%, it indicates that the current operating state of the turnstile is extremely similar to the normal operating state in the reference video, thus indicating that the turnstile is operating normally. If the similarity does not reach 95%, it indicates that the current operating state of the turnstile differs significantly from the normal operating state, thus indicating that the current turnstile is operating abnormally.
[0141] In other implementations, if an abnormality is detected in the gate's operation, video information can be displayed on a screen device to make it easier for staff to know the gate's operating status.
[0142] In one possible implementation of this application embodiment, step S106 (not shown in the figure) is included after step S102, wherein...
[0143] S106, if wake-up fails, output a prompt message.
[0144] In this embodiment of the application, when the turnstile malfunctions, the electronic device can output a prompt message based on the turnstile's identity information. For example, if turnstile A malfunctions, the electronic device can control the display screen to output the text message "Turntile A malfunctions, please repair it promptly," or control the speaker to broadcast the voice message "Turntile A malfunctions, please repair it promptly." Alternatively, it can send a text message "Turntile A malfunctions, please repair it promptly" to the staff's corresponding terminal device, thereby enabling the staff to be informed of the turnstile malfunction in a timely manner.
[0145] The above embodiments describe a gate status detection method from the perspective of process flow. The following embodiments describe a gate status detection device from the perspective of virtual module or virtual unit. For details, please refer to the following embodiments.
[0146] This application provides a gate status detection device 20, such as... Figure 2 As shown, the gate status detection device 20 may specifically include:
[0147] The sending module 201 is used to send a wake-up signal to the gate when a power restoration signal is detected;
[0148] The first judgment module 202 is used to determine whether the gate has been successfully woken up;
[0149] Control module 203 is used to control the gate to operate according to preset functions when the wake-up is successful;
[0150] Module 204 is used to acquire video information at the turnstile.
[0151] The second judgment module 205 is used to determine whether the gate is operating normally based on video information.
[0152] This application provides a gate status detection device 20. When a power restoration signal is detected, it indicates that the power has been restored. At this time, the gate needs to be woken up to power on and enter the standby state. Therefore, the sending module 201 sends a wake-up signal to the gate to power on the gate. After sending the wake-up signal, the first judgment module 202 is used to determine whether the gate has been successfully woken up. If the wake-up is successful, it means that the gate is powered on. Since the gate changes from a power-off state to a power-on state, it is necessary to verify whether the gate can operate normally. The control module 203 is used to control the gate to operate according to the preset function. The acquisition module 204 acquires the video information at the gate and analyzes the video information. The second judgment module 205 then determines whether the gate is operating according to the preset function, thereby determining whether the gate is operating normally. Therefore, it is easier to know the operating status of the gate.
[0153] In one possible implementation of this application embodiment, when determining whether the gate has been successfully woken up, the first judgment module 202 is specifically used for:
[0154] Determine whether a feedback signal from the gate is received within a preset time.
[0155] If received, it confirms that the gate has been successfully woken up;
[0156] If no response is received, the gate wake-up process has failed.
[0157] In one possible implementation of this application embodiment, when the acquisition module 204 acquires video information at the gate, it is specifically used for:
[0158] Obtain the gate's identity information;
[0159] The corresponding camera device is determined based on the identity information;
[0160] Obtain the start time of the gate's operation according to the preset function, as well as the duration of the preset function;
[0161] The video information at the gate is obtained based on the start time and the duration of the preset function.
[0162] In one possible implementation of this application embodiment, when the second judgment module 205 determines whether the gate is operating normally based on video information, it is specifically used for:
[0163] Feature recognition is performed on the video information to obtain the features of at least one component on the turnstile;
[0164] Determine the target component feature corresponding to the preset function from at least one component feature;
[0165] The video information is segmented to obtain the region video corresponding to the feature of the target component;
[0166] Determine whether the turnstile is operating normally based on regional video.
[0167] In one possible implementation of this application embodiment, when the second judgment module 205 judges whether the gate is operating normally based on the regional video, it is specifically used for:
[0168] Determine the trained target network model corresponding to the features of the target component;
[0169] The video information corresponding to the features of the target component is input into the trained target network model to identify the running status and obtain the running status result.
[0170] In one possible implementation of this application embodiment, when the second judgment module 205 judges whether the gate is operating normally based on the regional video, it is specifically used for:
[0171] Obtain the baseline video of the target component when it is operating normally;
[0172] Calculate the similarity between the region video and the baseline video;
[0173] If the similarity reaches the preset similarity threshold, the gate is considered to be operating normally.
[0174] If the similarity does not reach the preset similarity threshold, the gate is determined to be malfunctioning.
[0175] In one possible implementation of this application embodiment, the apparatus 20 further includes:
[0176] The output module is used to output a prompt message when wake-up fails.
[0177] In the embodiments of this application, the first judgment module 202 and the second judgment module 205 can be the same judgment module or different judgment modules.
[0178] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the gate status detection device 20 described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0179] This application provides an electronic device, such as... Figure 3 As shown, Figure 3 The illustrated electronic device 30 includes a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, for example, via a bus 302. Optionally, the electronic device 30 may also include a transceiver 304. It should be noted that in practical applications, the transceiver 304 is not limited to one type, and the structure of this electronic device 30 does not constitute a limitation on the embodiments of this application.
[0180] Processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 301 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0181] Bus 302 may include a pathway for transmitting information between the aforementioned components. Bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 302 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 3 The symbol is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0182] The memory 303 may be a ROM (Read Only Memory) or other type of static storage device capable of storing static information and instructions, RAM (Random Access Memory) or other type of dynamic storage device capable of storing information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.
[0183] The memory 303 is used to store application code that executes the solution of this application, and its execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the content shown in the foregoing method embodiments.
[0184] Electronic devices include, but are not limited to: mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (such as in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Servers can also be included. Figure 3 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0185] This application provides a computer-readable storage medium storing a computer program. When the program is run on a computer, it enables the computer to execute the corresponding content in the aforementioned method embodiments. Compared with related technologies, in this application embodiment, when a power restoration signal is detected, it indicates that power has been restored. At this time, it is necessary to wake up the turnstile to power it on and put it into a standby state. Therefore, a wake-up signal is sent to the turnstile to power it on. After sending the wake-up signal, it is determined whether the turnstile has been successfully woken up. If the wake-up is successful, it means that the turnstile is powered on. Since the turnstile changes from a power-off state to a power-on state, it is necessary to verify whether the turnstile can operate normally. The turnstile is controlled to operate according to the preset functions. Video information at the turnstile is acquired and analyzed to determine whether the turnstile is operating according to the preset functions, thereby determining whether the turnstile is operating normally. Therefore, it is easier to know the operating status of the turnstile.
[0186] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0187] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for detecting the status of a turnstile, characterized in that, include: When a power restoration signal is detected, a wake-up signal containing the corresponding MAC address of the gate is sent to the gate. Determine whether the gate has been successfully woken up; If the wake-up is successful, the gate will be controlled to operate according to the preset functions; Obtain video information from the turnstile; Based on the video information, determine whether the turnstile is operating normally; The step of determining whether the gate has been successfully woken up includes: Determine whether a feedback signal sent by the gate is received within a preset time period; If received, it is determined that the gate has been successfully woken up; If no signal is received, it is determined that the gate wake-up has failed; The acquisition of video information at the turnstile includes: Obtain the identity information of the gate, which is the gate's MAC address; The corresponding camera device is determined based on the identity information; Obtain the start time of the gate operating according to the preset function, and the duration of the preset function; The video information at the gate is obtained based on the start time and the duration of the preset function. The step of determining whether the gate is operating normally based on the video information includes: The video information is subjected to feature recognition to obtain the features of at least one component on the gate; Determine the target component feature corresponding to the preset function from the at least one component feature; The video information is segmented to obtain the region video corresponding to the feature of the target component; Based on the video of the area, determine whether the turnstile is operating normally; The step of determining whether the gate is operating normally based on the regional video includes: Obtain the baseline video of the target component when it is operating normally; Based on the characteristics of the target component, the key frames corresponding to the characteristics of the target component are determined. The key frames of the regional video and the key frames of the reference video are represented as vectors respectively. The cosine distance between the vectors is calculated to determine the similarity between the regional video and the reference video. If the similarity reaches a preset similarity threshold, then the gate is determined to be operating normally; If the similarity does not reach the preset similarity threshold, the gate is determined to be malfunctioning. If the gate is determined to be malfunctioning, the video information is displayed on the display screen device.
2. The method for detecting the status of a turnstile according to claim 1, characterized in that, The step of determining whether the turnstile is operating normally based on the regional video includes: Determine the trained target network model corresponding to the features of the target component; The video information corresponding to the features of the target component is input into the trained target network model to identify the running status and obtain the running status result.
3. The method for detecting the status of a turnstile according to claim 1, characterized in that, The method further includes: If wake-up fails, a prompt message will be output.
4. A gate status detection device, characterized in that, include: The sending module is used to send a wake-up signal containing the MAC address of the gate when a power restoration signal is detected. The first judgment module is used to determine whether the gate has been successfully woken up; The control module is used to control the gate to operate according to preset functions when the wake-up is successful; The acquisition module is used to acquire video information at the turnstile. The second judgment module is used to determine whether the gate is operating normally based on the video information; Specifically, the first judgment module, when determining whether the gate has been successfully woken up, is used for: Determine whether a feedback signal sent by the gate is received within a preset time period; If received, it is determined that the gate has been successfully woken up; If no signal is received, it is determined that the gate wake-up has failed; When acquiring video information at the turnstile, the acquisition module is specifically used for: Obtain the identity information of the gate, which is the gate's MAC address; The corresponding camera device is determined based on the identity information; Obtain the start time of the gate operating according to the preset function, and the duration of the preset function; The video information at the gate is obtained based on the start time and the duration of the preset function. The second judgment module, when determining whether the turnstile is operating normally based on video information, is specifically used for: The video information is subjected to feature recognition to obtain the features of at least one component on the gate; Determine the target component feature corresponding to the preset function from the at least one component feature; The video information is segmented to obtain the region video corresponding to the feature of the target component; Based on the video of the area, determine whether the turnstile is operating normally; The second judgment module, when determining whether the turnstile is operating normally based on the regional video, is specifically used for: Obtain the baseline video of the target component when it is operating normally; Based on the characteristics of the target component, the key frames corresponding to the characteristics of the target component are determined. The key frames of the regional video and the key frames of the reference video are represented as vectors respectively. The cosine distance between the vectors is calculated to determine the similarity between the regional video and the reference video. If the similarity reaches a preset similarity threshold, then the gate is determined to be operating normally; If the similarity does not reach the preset similarity threshold, the gate is determined to be malfunctioning. If the gate is determined to be malfunctioning, the video information is displayed on the display screen device.
5. An electronic device, characterized in that, It includes: At least one processor; Memory; At least one application, wherein the at least one application is stored in the memory and configured to be executed by the at least one processor, the at least one application being used to execute a gate status detection method according to any one of claims 1 to 3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed in the computer, the computer is instructed to perform a gate status detection method according to any one of claims 1 to 3.