Protection cabin monitoring method and device
By adopting the computing power time slice rotation and queue allocation mechanism in the protective cabin, the problem of reduced security caused by limited resources is solved, effective monitoring and exception handling of the protective cabin are achieved, and the overall security is improved.
Patent Information
- Application Number
- CN202410810910.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-09-03
AI Technical Summary
Due to limited system resources, it is difficult for the protective cabin to allocate sufficient computing resources during peak hours, resulting in reduced security and the inability to effectively monitor and respond to abnormal behaviors in the protective cabin.
Adopt the computing power time slice rotation method to maintain the slow queue and fast queue of the protective cabin, and allocate computing power resources according to the adequacy of computing resources to ensure that key protection tasks are prioritized in computing power, and at the same time, general tasks are equally allocated to the protective cabin. The fast queue is used to store identifiers for identifying abnormalities, and the slow queue is used to store identifiers for unrecognized exceptions, and computing resources are reasonably allocated through the queue mechanism.
It effectively improves the safety of the protective cabin, ensures that even when resources are limited, the protective cabin can evenly obtain computing resources, prevents security risks caused by abnormal behavior that is not handled in a timely manner, and improves the system's response capabilities.
Smart Images

Figure CN118585337A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automated processing technology, and in particular to a protection cabin monitoring method and device. Background Art
[0002] Many service companies have set up protection cabins. The protection cabins are equipped with self-service facilities, which can flexibly provide business services to users during non-business hours. For example, many banks have set up protection cabins, and the protection cabins are equipped with ATMs (Automated Teller Machines). Users can withdraw or deposit money at any time through the protection cabins.
[0003] In order to ensure the safety of users when using the protection cabin, it is necessary to monitor the protection cabin, such as identifying hijacking and fighting in the protection cabin, and push abnormal situations to the monitoring command center personnel for emergency response. However, due to limited system resources, during the peak hours of protection cabin use, many protection cabins cannot be allocated computing resources, thereby reducing the safety of the protection cabin. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a protection cabin monitoring method and device, which can effectively improve the safety of the protection cabin.
[0005] In a first aspect, an embodiment of the present invention provides a protection cabin monitoring method, comprising:
[0006] Determine whether the computing power resources in the computing power pool are sufficient; wherein the computing power resources are used to identify abnormalities in the protection cabins corresponding to the protection cabin identifiers in the protection cabin slow queue and the protection cabin fast queue;
[0007] In response to insufficient computing resources in the computing power pool, allocating computing resources to the protection cabin slow queue and the protection cabin fast queue according to an allocation ratio;
[0008] In response to sufficient computing power resources in the computing power pool, computing power resources are allocated to the protection cabin slow queue according to the number of protection cabin identifiers in the protection cabin slow queue; computing power resources are allocated to the protection cabin fast queue according to the number of protection cabin identifiers in the protection cabin fast queue.
[0009] Optionally, it also includes:
[0010] When a person enters the current protection cabin, an identifier of the current protection cabin is added to the end of the protection cabin slow queue;
[0011] Taking out the identifier of the current protection cabin from the head of the slow queue of the protection cabin, and allocating computing resources to the current protection cabin to identify abnormalities of the current protection cabin;
[0012] In response to the identification result indicating that the current protection cabin is abnormal, adding the identifier of the current protection cabin to a protection cabin fast queue;
[0013] In response to the identification result indicating that no abnormality occurs in the current protection cabin, the identifier of the current protection cabin is added to a protection cabin slow queue.
[0014] Optionally, determining whether the computing power resources in the computing power pool are sufficient includes:
[0015] Determine the total number of protection cabin identifiers in the protection cabin slow queue and the protection cabin fast queue;
[0016] Determining the number of computing resources in the computing pool;
[0017] Determining whether the number of resources is not less than the total number of protection cabins;
[0018] In response to the number of resources being not less than the total number of protection cabins, determining that the computing resources in the computing power pool are sufficient;
[0019] In response to the number of resources being less than the total number of protection cabins, it is determined that the computing resources in the computing power pool are insufficient.
[0020] Optionally, after computing resources are allocated to the protection cabin slow queue, the following steps are included:
[0021] Taking out the identification of the first protection cabin from the head of the slow queue of protection cabins;
[0022] Using the first computing power resource allocated to the slow queue of the protection cabin, identifying anomalies of the first protection cabin;
[0023] In response to the allocation time of the first computing power resource reaching a first duration, releasing the first computing power resource and obtaining a first identification result;
[0024] In response to the first recognition result indicating that an abnormality occurs in the first protection cabin, adding an identifier of the first protection cabin to the end of a protection cabin fast queue;
[0025] In response to the first identification result indicating that no abnormality occurs in the first protection cabin, the identifier of the first protection cabin is added to the end of a protection cabin slow queue.
[0026] Optionally, after obtaining the first recognition result, the method further includes:
[0027] In response to the first recognition result indicating that an abnormality occurs in the first protection cabin, generating an abnormal node corresponding to the first protection cabin according to the first recognition result;
[0028] Put the abnormal node into the abnormal event list;
[0029] According to the abnormal node in the abnormal event list, an abnormal processing task corresponding to the first protection cabin is generated.
[0030] Optionally, after allocating computing resources to the protection cabin fast queue, the method further includes:
[0031] Taking out the identification of the second protection cabin from the head of the protection cabin fast queue;
[0032] Using the second computing power resource allocated to the protection cabin fast queue, identifying abnormalities in the second protection cabin;
[0033] In response to the allocation time of the second computing power resource reaching a second duration, releasing the second computing power resource, and obtaining a second identification result;
[0034] The identifier of the second protection cabin is added to the end of the protection cabin fast queue.
[0035] Optionally, after obtaining the second recognition result, the method further includes:
[0036] In response to the second recognition result indicating that an abnormality occurs in the second protection cabin, generating an abnormal node corresponding to the second protection cabin according to the second recognition result;
[0037] Put the abnormal node into the abnormal event list;
[0038] According to the abnormal node in the abnormal event list, an abnormal processing task corresponding to the second protection cabin is generated.
[0039] Optionally, it also includes:
[0040] It is detected that a person leaves the current protection cabin, and the current protection cabin is in an unmanned state, and the identifier of the current protection cabin is in the protection cabin slow queue;
[0041] The identifier of the current protection cabin is deleted from the protection cabin slow queue.
[0042] Optionally, it also includes:
[0043] In response to an abnormality occurring in the current protection cabin, an abnormal node corresponding to the target protection cabin is generated, and the abnormal node is placed in an abnormal event list;
[0044] Taking out the abnormal node from the abnormal event list, and generating an abnormal processing task corresponding to the target protection cabin according to the abnormal node;
[0045] Receive a processing result corresponding to the exception handling task;
[0046] In response to the processing result indicating that the abnormal processing is finished, the identifier of the current protection cabin is deleted from the protection cabin fast queue, and the identifier of the current protection cabin is added to the end of the protection cabin slow queue.
[0047] In a second aspect, an embodiment of the present invention provides a protective cabin monitoring device, including:
[0048] A resource determination module, used to determine whether the computing power resources in the computing power pool are sufficient; wherein the computing power resources are used to identify abnormalities in the protection cabin corresponding to the protection cabin identifier in the protection cabin slow queue and the protection cabin fast queue;
[0049] A first allocation module, configured to allocate computing resources to the protection cabin slow queue and the protection cabin fast queue according to an allocation ratio in response to insufficient computing resources in the computing power pool;
[0050] The second allocation module is used to allocate computing power resources to the protection cabin slow queue according to the number of protection cabin identifiers in the protection cabin slow queue in response to sufficient computing power resources in the computing power pool; and allocate computing power resources to the protection cabin fast queue according to the number of protection cabin identifiers in the protection cabin fast queue.
[0051] Optionally, it also includes:
[0052] A monitoring module, used for detecting an entry event of a person into the current protection cabin, and adding the identifier of the current protection cabin to the end of the protection cabin slow queue;
[0053] Taking out the identifier of the current protection cabin from the head of the slow queue of the protection cabin, and allocating computing resources to the current protection cabin to identify abnormalities of the current protection cabin;
[0054] In response to the identification result indicating that the current protection cabin is abnormal, adding the identifier of the current protection cabin to a protection cabin fast queue;
[0055] In response to the identification result indicating that no abnormality occurs in the current protection cabin, the identifier of the current protection cabin is added to a protection cabin slow queue.
[0056] Optionally, the resource determination module is specifically used to:
[0057] Determine the total number of protection cabin identifiers in the protection cabin slow queue and the protection cabin fast queue;
[0058] Determining the number of computing resources in the computing pool;
[0059] Determining whether the number of resources is not less than the total number of protection cabins;
[0060] In response to the number of resources being not less than the total number of protection cabins, determining that the computing resources in the computing power pool are sufficient;
[0061] In response to the number of resources being less than the total number of protection cabins, it is determined that the computing resources in the computing power pool are insufficient.
[0062] In a third aspect, an embodiment of the present invention provides an electronic device, including:
[0063] one or more processors;
[0064] a storage device for storing one or more programs,
[0065] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above embodiments.
[0066] In a fourth aspect, an embodiment of the present invention provides a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the above embodiments.
[0067] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, which implements the method described in any of the above embodiments when executed by a processor.
[0068] An embodiment of the above invention has the following advantages or beneficial effects: the system maintains a fast queue and a slow queue for protection cabins. The fast queue for protection cabins is used to store the identification of protection cabins with identified abnormalities, and the slow queue for protection cabins is used to store the identification of protection cabins without identified abnormalities. Computing resources are used to perform abnormal identification on the protection cabins corresponding to the protection cabin identifications in the slow queue for protection cabins and the fast queue for protection cabins.
[0069] In the case of insufficient computing resources, computing resources are allocated to the protection cabin slow queue and the protection cabin fast queue according to the allocation ratio, and computing resources are evenly allocated to the protection cabins in the protection cabin fast queue while giving priority to the protection cabins in the protection cabin slow queue. In the case of sufficient computing resources, computing resources are allocated to each protection cabin in the protection cabin fast queue and the protection cabin slow queue. The method of the embodiment of the present invention can reasonably allocate computing resources and effectively improve the safety of the protection cabin.
[0070] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0072] Figure 1It is a schematic flow chart of a protection cabin monitoring method provided by the first embodiment of the present invention;
[0073] Figure 2 is a flow chart of a protection cabin monitoring method provided by the second embodiment of the present invention;
[0074] Figure 3 is a flow chart of a protection cabin monitoring method provided by the third embodiment of the present invention;
[0075] Figure 4 is a schematic structural diagram of a protection cabin monitoring device provided by an embodiment of the present invention;
[0076] Figure 5 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0077] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0078] It should be noted that in the technical solution of the present invention, the collection, analysis, use, transmission, storage and other aspects of user personal information involved are in compliance with the provisions of relevant laws and regulations, are used for legal and reasonable purposes, are not shared, leaked or sold outside of these legal uses, and are subject to supervision and management by regulatory authorities. Necessary measures should be taken for user personal information to prevent illegal access to such personal information data, ensure that persons who have access to personal information data comply with the provisions of relevant laws and regulations, and ensure the security of user personal information. Once these user personal information data are no longer needed, the risks should be minimized by limiting or even prohibiting data collection and / or deleting data.
[0079] In view of the situation where computing power resources are limited, the solution of the embodiment of the present invention rotates computing power time slices while maintaining the slow queue and the fast queue of the protection cabin, so as to achieve the purpose of prioritizing computing power for key protection tasks while equally allocating computing power to general tasks. Figure 1 FIG. 1 is a flow chart of a protection cabin monitoring method provided by the first embodiment of the present invention. Figure 1 As shown, the method includes:
[0080] Step 101: Determine whether the computing power resources in the computing power pool are sufficient; wherein the computing power resources are used to identify abnormalities in the protection cabins corresponding to the protection cabin identifiers in the protection cabin slow queue and the protection cabin fast queue.
[0081] All computing resources are pooled and a single computing resource that provides AI (Artificial Intelligence) computing services is abstracted. One computing resource can correspond to an anomaly identification process. One computing resource can only provide video or image-based anomaly identification for one protection cabin at a time. Multiple computing resources can provide anomaly identification for multiple protection cabins in parallel.
[0082] Establish two protection cabin queues to which computing resources need to be allocated, namely the protection cabin fast queue and the protection cabin slow queue. Establish a list of protection cabins for abnormal events. When someone enters a protection cabin, add the identification of the protection cabin to the end of the protection cabin slow queue.
[0083] The protection cabin slow queue is used to store the identification of the protection cabins that have not identified abnormalities. For the protection cabin that has not currently experienced an abnormality and has received a personnel entry event, the identification of the protection cabin is added to the tail of the protection cabin slow queue.
[0084] The protection cabin fast queue is used to store the identification of the protection cabin with abnormalities. For the protection cabin with abnormalities, when each time slice expires, the identification of the protection cabin is returned to the end of the protection cabin fast queue. After the abnormality is handled by the on-duty personnel of the monitoring center, the protection cabin is deleted from the protection cabin fast queue and inserted into the end of the protection cabin slow queue.
[0085] Step 102: In response to insufficient computing resources in the computing power pool, computing resources are allocated to the protection cabin slow queue and the protection cabin fast queue according to the allocation ratio.
[0086] When the computing power resources in the computing power pool are insufficient, the fast and slow queues of the protection cabin obtain computing power resources according to the allocation ratio. For example, if the allocation ratio is 3:1, 3 computing power resources are allocated to each protection cabin corresponding to the fast queue of the protection cabin, and 1 computing power resource is allocated to each protection cabin corresponding to the slow queue of the protection cabin.
[0087] It should be noted that the allocation ratio is greater than 1:1, so that computing resources are allocated preferentially to the protection cabins corresponding to the protection cabin fast queue, so as to focus on monitoring the protection cabins where abnormalities have occurred.
[0088] After allocating computing resources to the protection cabin slow queue and the protection cabin fast queue, check whether there are free computing resources in the computing pool. If there are free computing resources, get an identifier from the head of the protection cabin fast queue and allocate computing resources to the protection cabin corresponding to the identifier. If the protection cabin fast queue is empty, get an identifier from the head of the protection cabin slow queue and allocate computing resources to the protection cabin corresponding to the identifier.
[0089] Step 103: In response to sufficient computing resources in the computing power pool, computing resources are allocated to the protection cabin slow queue according to the number of protection cabin identifiers in the protection cabin slow queue.
[0090] The slow queue of the protection cabin corresponds to the protection cabins that have not found any abnormalities. These protection cabins have a shorter first duration of occupying computing resources, so that they can obtain computing resources multiple times in a short period of time. For example, the average operation time of the protection cabin is 3 minutes, and the first duration of the single occupation of the protection cabin is set to 5 seconds. In this case, one computing resource can provide abnormality identification for only one protection cabin in an average of 3 minutes, but can provide abnormality identification for up to 36 protection cabins in 3 minutes, which greatly improves the coverage of computing resources provided to the protection cabins.
[0091] Step 104: Allocate computing resources to the protection cabin fast queue according to the number of protection cabin identifiers in the protection cabin fast queue.
[0092] When there are sufficient computing resources in the computing power pool, computing resources are allocated to all protection cabins corresponding to the protection cabin slow queue and the protection cabin fast queue, and all protection cabins corresponding to the protection cabin slow queue and the protection cabin fast queue are monitored in parallel.
[0093] In the scheme of the embodiment of the present invention, when computing power resources are insufficient, computing power resources are allocated to the protection cabin slow queue and the protection cabin fast queue according to the allocation ratio, so as to prioritize the allocation of computing power resources to the protection cabins in the protection cabin fast queue, while allocating computing power to the protection cabins in the protection cabin slow queue as much as possible. When computing power resources are sufficient, computing power resources are allocated to each protection cabin in the protection cabin fast queue and the protection cabin slow queue. The method of the embodiment of the present invention can effectively improve the safety of the protection cabin.
[0094] Figure 2 FIG. 1 is a flow chart of a protective cabin monitoring method provided by the second embodiment of the present invention. Figure 2 As shown, the method includes:
[0095] Step 201: When a person enters the current protection cabin, an identifier of the current protection cabin is added to the end of the protection cabin slow queue.
[0096] Each protection cabin is equipped with a protection cabin sensor, which is used to monitor whether a person enters or leaves the protection cabin. When a person enters or leaves the protection cabin, the protection cabin sensor triggers a corresponding event.
[0097] Step 202: Take the identifier of the current protection cabin from the head of the slow queue of the protection cabin, and allocate computing resources to the current protection cabin to identify abnormalities in the current protection cabin.
[0098] The protection cabin slow queue and the protection cabin slow queue are both stored in the queue data structure. The protection cabin slow queue and the protection cabin slow queue only allow the protection cabin identifier to be inserted at the end of the queue and obtain the protection cabin identifier from the opposite end, so only the protection cabin identifier that enters the queue earliest can be obtained from the opposite end first.
[0099] Step 203: In response to the identification result indicating that an abnormality has occurred in the current protection cabin, the identifier of the current protection cabin is added to the protection cabin fast queue.
[0100] Step 204: In response to the identification result indicating that no abnormality occurs in the current protection cabin, the identifier of the current protection cabin is added to the protection cabin slow queue.
[0101] Step 205: Determine whether the computing power resources in the computing power pool are sufficient; wherein the computing power resources are used to identify abnormalities in the protection cabins corresponding to the protection cabin identifiers in the protection cabin slow queue and the protection cabin fast queue;
[0102] Step 206: In response to insufficient computing resources in the computing power pool, computing resources are allocated to the protection cabin slow queue and the protection cabin fast queue according to the allocation ratio.
[0103] Step 207: In response to sufficient computing power resources in the computing power pool, computing power resources are allocated to the protection cabin slow queue according to the number of protection cabin identifiers in the protection cabin slow queue.
[0104] Step 208: Allocate computing resources to the protection cabin fast queue according to the number of protection cabin identifiers in the protection cabin fast queue.
[0105] In the scheme of the embodiment of the present invention, when someone enters the protection cabin, the identifier of the current protection cabin is added to the end of the protection cabin slow queue. The current protection cabin is identified for abnormalities. If the identification result indicates that an abnormality has occurred in the current protection cabin, the identifier of the current protection cabin is added to the protection cabin fast queue. If the identification result indicates that no abnormality has occurred in the current protection cabin, the identifier of the current protection cabin is added to the protection cabin slow queue. When computing power resources are insufficient, computing power resources are allocated to the protection cabin slow queue and the protection cabin fast queue according to the allocation ratio. This technical solution ensures that protection cabins that require computing power resources, that is, protection cabins with people in them, have the opportunity to obtain computing power resources services.
[0106] Figure 3FIG. 1 is a flow chart of a protective cabin monitoring method provided by a third embodiment of the present invention. Figure 3 As shown, the method includes:
[0107] Step 301: Determine the total number of protection cabin identifiers in the protection cabin slow queue and the protection cabin fast queue; determine the number of computing resources in the computing power pool.
[0108] The sum of the number of protection cabin identifiers in the protection cabin slow queue and the protection cabin fast queue is the number of protection cabins with personnel entering at the current moment.
[0109] Step 302: Determine whether the number of resources is not less than the total number of protection cabins.
[0110] Step 303: In response to the number of resources being not less than the total number of protection cabins, it is determined that the computing resources in the computing power pool are sufficient.
[0111] If the number of resources is not less than the total number of protection cabins, the computing resources in the resource pool can be used to provide parallel anomaly identification services for all protection cabins that have people entering at the current moment.
[0112] Step 304: Allocate computing resources to the protection cabin slow queue according to the number of protection cabin identifiers in the protection cabin slow queue.
[0113] Step 305: Allocate computing resources to the protection cabin fast queue according to the number of protection cabin identifiers in the protection cabin fast queue.
[0114] Step 306: In response to the number of resources being less than the total number of protection cabins, it is determined that the computing resources in the computing power pool are insufficient.
[0115] Step 307: Allocate computing resources to the protection cabin slow queue and the protection cabin fast queue according to the allocation ratio.
[0116] If the number of resources is less than the total number of protection cabins, the computing resources in the resource pool cannot provide parallel anomaly identification services for all protection cabins with personnel entering at the current moment. Computing resources need to be allocated to the slow queue of protection cabins and the fast queue of protection cabins according to the allocation ratio.
[0117] In the solution of the embodiment of the present invention, according to the sum of the number of protection cabin identifiers in the protection cabin slow queue and the protection cabin fast queue, and the number of computing resources in the computing power pool, it is possible to accurately determine whether the computing power resources in the computing power pool are sufficient. And according to whether the computing power resources in the computing power pool are sufficient, a reasonable resource allocation strategy is formulated to provide comprehensive and safe intelligent monitoring for multiple protection cabins.
[0118] In one embodiment of the present invention, after computing power resources are allocated to the protection cabin slow queue, the method includes: taking out the identifier of the first protection cabin from the head of the protection cabin slow queue; using the first computing power resources allocated to the protection cabin slow queue to identify abnormalities in the first protection cabin; in response to the allocation time of the first computing power resources reaching a first duration, releasing the first computing power resources to obtain a first identification result; in response to the first identification result indicating that an abnormality has occurred in the first protection cabin, adding the identifier of the first protection cabin to the tail of the protection cabin fast queue; in response to the first identification result indicating that no abnormality has occurred in the first protection cabin, adding the identifier of the first protection cabin to the tail of the protection cabin slow queue.
[0119] For the protection cabin that obtains computing power resources, if it is obtained from the protection cabin slow queue, and the allocation time of the first computing power resource exceeds the first time length (such as 5 seconds), and no abnormality is identified, and the number of remaining computing power resources is less than the sum of the lengths of the protection cabin fast queue and the protection cabin slow queue, then the computing power resources are recovered and the identifier of the protection cabin is added to the end of the protection cabin slow queue.
[0120] In one embodiment of the present invention, after obtaining the first recognition result, it also includes: in response to the first recognition result indicating that an abnormality has occurred in the first protection cabin, generating an abnormal node corresponding to the first protection cabin according to the first recognition result; placing the abnormal node in an abnormal event list; and generating an abnormal processing task corresponding to the first protection cabin according to the abnormal node in the abnormal event list.
[0121] For the protection cabin that obtains computing power, if it is obtained from the protection cabin slow queue, if an abnormality occurs within the first time period, the first identification result is pushed to the on-duty personnel of the monitoring center. If the allocation time of the first computing power resource exceeds the first time period, the computing power resource is recovered, the identification of the protection cabin is added to the end of the protection cabin fast queue, and the identification of the protection cabin is put into the abnormal event protection cabin list.
[0122] In one embodiment of the present invention, after allocating computing power resources to the protection cabin fast queue, it also includes: taking out the identifier of the second protection cabin from the head of the protection cabin fast queue; using the second computing power resources allocated to the protection cabin fast queue to identify abnormalities in the second protection cabin; in response to the allocation time of the second computing power resources reaching a second duration, releasing the second computing power resources to obtain a second identification result; and adding the identifier of the second protection cabin to the tail of the protection cabin fast queue.
[0123] For the protection cabin that obtains computing power, if it is obtained from the protection cabin fast queue, if an abnormality occurs within the second time period (such as 8 seconds), the second identification result will be pushed to the on-duty personnel of the monitoring center. If the allocation time of the second computing power resource exceeds the second time period, the computing power resource will be recovered and the identification of the protection cabin will be added to the end of the protection cabin fast queue.
[0124] In one embodiment of the present invention, after obtaining the second recognition result, it also includes: in response to the second recognition result indicating that an abnormality has occurred in the second protection cabin, generating an abnormal node corresponding to the second protection cabin according to the second recognition result; placing the abnormal node in an abnormal event list; and generating an abnormal processing task corresponding to the second protection cabin according to the abnormal node in the abnormal event list.
[0125] For the protection cabin that obtains computing power, if it is obtained from the protection cabin fast queue, if an abnormality occurs within the second time period, the second identification result will be pushed to the on-duty personnel of the monitoring center. And the computing power resources can be continuously occupied to identify the abnormality until the on-duty personnel of the monitoring center finish the processing, then the computing power resources will be released, and the protection cabin will be placed at the end of the protection cabin fast queue.
[0126] In one embodiment of the present invention, the method further includes: when it is detected that a person leaves the current protection cabin, the current protection cabin is unoccupied, and the identifier of the current protection cabin is in the protection cabin slow queue; the identifier of the current protection cabin is deleted from the protection cabin slow queue. When all the people in a certain protection cabin leave the protection cabin, and the identifier of the protection cabin is in the protection cabin slow queue, the identifier of the protection cabin is deleted from the protection cabin slow queue.
[0127] In one embodiment of the present invention, the method further includes: in response to an abnormality occurring in the current protection cabin, generating an abnormal node corresponding to the target protection cabin, and placing the abnormal node in an abnormal event list; taking out the abnormal node from the abnormal event list, and generating an abnormal processing task corresponding to the target protection cabin according to the abnormal node; receiving a processing result corresponding to the abnormal processing task; in response to the processing result indicating that the abnormal processing is completed, deleting the identifier of the current protection cabin from the protection cabin fast queue, and adding the identifier of the current protection cabin to the end of the protection cabin slow queue. For a protection cabin where an abnormal event has occurred, when the on-duty personnel of the monitoring center complete the abnormal processing, the identifier of the protection cabin is deleted from the protection cabin fast queue, and the identifier of the protection cabin is added to the end of the protection cabin slow queue.
[0128] The protection cabin monitoring system of the embodiment of the present invention is used to avoid the situation where a large number of protection cabins are refused to allocate computing resources due to insufficient computing resources during business peak periods. The protection cabin monitoring system includes: a protection cabin sensor module, a protection cabin queue and exception list module, and an AI computing power pool module.
[0129] Protection cabin sensor module: deployed inside the protection cabin, used to detect whether there is anyone entering or exiting the protection cabin, and trigger corresponding events when someone enters or exits.
[0130] Protection cabin queue and exception list module: used to save the protection cabin fast queue and protection cabin slow queue that need to allocate computing resources. If the allocation ratio of fast and slow queues is M:N, that is, M protection cabin identifiers are taken from the protection cabin fast queue for exception identification, and N protection cabin identifiers are taken from the protection cabin slow queue for exception identification.
[0131] AI computing power pool module: A computing power cluster composed of AI computing power resources, used to process video recognition tasks. Assume that the allocation ratio of fast and slow queues is M:N. Whenever there are M fast queues of protection cabins obtaining computing power resources, there are N slow queues of protection cabins obtaining computing power resources. By adjusting the values of M and N, the allocation priority can be adjusted.
[0132] The protection cabins that need to be allocated computing resources are managed in a first-in-first-out queue to ensure that each protection cabin in the slow queue has an equal opportunity to obtain computing resources, and each protection cabin in the fast queue also has an equal opportunity to obtain allocated computing resources.
[0133] When the number of computing resources is greater than or equal to the sum of the number of protection cabins in the two protection cabin queues, it indicates that there are sufficient computing resources to provide continuous computing support for each protection cabin. At this time, the computing resources will not be actively released before receiving relevant instructions such as personnel leaving the protection cabin or the abnormality of the abnormal protection cabin is processed.
[0134] When computing power resources are insufficient, for a protection cabin that has not been identified as abnormal, that is, a protection cabin corresponding to the protection cabin slow queue, if the computing power resources are occupied for a first period of time, the computing power resources will be released and the corresponding protection cabin identifier will be placed at the end of the protection cabin slow queue.
[0135] If the protection cabin corresponding to the slow queue of the protection cabin has an abnormality in the first time period, the first identification result will be pushed to the on-duty personnel of the monitoring center. When the computing resources occupied by the protection cabin reach the first time period, the computing resources will be released and the corresponding protection cabin resource identifier will be placed at the end of the fast queue of the protection cabin.
[0136] For an abnormal protection cabin, that is, a protection cabin obtained from the fast protection cabin queue, if the computing power resources are occupied for the second time, the computing power resources will be released and the corresponding protection cabin identifier will be placed at the end of the protection cabin fast queue. The limited computing power resources will be used in turn by time slicing.
[0137] The solution provided by the embodiment of the present invention ensures that the protection cabins in each queue have equal opportunities to obtain computing resources. The protection cabin fast queue is used to ensure that the protection cabins that are identified as abnormal have priority in obtaining computing resources until the on-duty personnel of the monitoring center handle the abnormality. This prevents the protection cabins where abnormalities occur from monopolizing computing resources, resulting in the protection cabins that have not yet detected abnormalities not being able to be allocated computing resources for a long time. It can also avoid extreme situations where the protection cabin that first has an abnormality occupies all computing resources, and other protection cabins where abnormalities occur cannot be allocated computing resources.
[0138] Figure 4 FIG. 1 is a schematic diagram of a protective cabin monitoring device provided by an embodiment of the present invention. Figure 4 As shown, the device comprises:
[0139] The resource determination module 401 is used to determine whether the computing power resources in the computing power pool are sufficient; wherein the computing power resources are used to identify abnormalities of the protection cabins corresponding to the protection cabin identifiers in the protection cabin slow queue and the protection cabin fast queue;
[0140] The first allocation module 402 is used to allocate computing resources to the protection cabin slow queue and the protection cabin fast queue according to the allocation ratio in response to insufficient computing resources in the computing pool;
[0141] The second allocation module 403 is used to allocate computing resources to the protection cabin slow queue according to the number of protection cabin identifiers in the protection cabin slow queue in response to sufficient computing resources in the computing power pool; and allocate computing resources to the protection cabin fast queue according to the number of protection cabin identifiers in the protection cabin fast queue.
[0142] Optionally, it also includes:
[0143] A monitoring module is used to detect the entry of a person into the current protection cabin and add the identifier of the current protection cabin to the end of the slow queue of the protection cabin;
[0144] Take the identifier of the current protection cabin from the head of the slow queue of the protection cabin, and allocate computing resources to the current protection cabin to identify abnormalities in the current protection cabin;
[0145] In response to the identification result indicating that an abnormality occurs in the current protection cabin, adding the identifier of the current protection cabin to the protection cabin fast queue;
[0146] In response to the identification result indicating that no abnormality occurs in the current protection cabin, the identifier of the current protection cabin is added to the protection cabin slow queue.
[0147] Optionally, the resource determination module 401 is specifically configured to:
[0148] Determine the total number of protection cabin identifiers in the protection cabin slow queue and the protection cabin fast queue;
[0149] Determine the number of computing resources in the computing pool;
[0150] Determine whether the number of resources is not less than the total number of protection cabins;
[0151] In response to the number of resources being not less than the total number of protection cabins, determining that the computing power resources in the computing power pool are sufficient;
[0152] In response to the number of resources being less than the total number of protection cabins, it is determined that the computing resources in the computing power pool are insufficient.
[0153] Optionally, the first allocation module 402 is further configured to:
[0154] Take out the identification of the first protection cabin from the head of the slow queue of protection cabins;
[0155] Using the first computing power resource allocated to the slow queue of the protection cabin, an abnormality is identified for the first protection cabin;
[0156] In response to the allocation time of the first computing power resource reaching a first duration, releasing the first computing power resource and obtaining a first identification result;
[0157] In response to the first recognition result indicating that an abnormality occurs in the first protection cabin, adding an identifier of the first protection cabin to the end of the protection cabin fast queue;
[0158] In response to the first identification result indicating that no abnormality occurs in the first protection cabin, the identifier of the first protection cabin is added to the end of the protection cabin slow queue.
[0159] Optionally, the first allocation module 402 is further configured to:
[0160] In response to the first recognition result indicating that an abnormality occurs in the first protection cabin, generating an abnormal node corresponding to the first protection cabin according to the first recognition result;
[0161] Put the abnormal nodes into the abnormal event list;
[0162] According to the abnormal nodes in the abnormal event list, an abnormal processing task corresponding to the first protection cabin is generated.
[0163] Optionally, the first allocation module 402 is further configured to:
[0164] Take out the identification of the second protective cabin from the head of the protective cabin fast queue;
[0165] Use the second computing power resources allocated to the fast queue of the protection cabin to identify abnormalities in the second protection cabin;
[0166] In response to the allocation time of the second computing power resource reaching a second duration, releasing the second computing power resource, and obtaining a second identification result;
[0167] The identifier of the second protection cabin is added to the end of the protection cabin fast queue.
[0168] Optionally, the first allocation module 402 is further configured to:
[0169] In response to the second recognition result indicating that an abnormality occurs in the second protection cabin, generating an abnormal node corresponding to the second protection cabin according to the second recognition result;
[0170] Put the abnormal nodes into the abnormal event list;
[0171] According to the abnormal nodes in the abnormal event list, an abnormal processing task corresponding to the second protection cabin is generated.
[0172] Optionally, it also includes:
[0173] The monitoring module is used to detect that a person leaves the current protection cabin, and the current protection cabin is unmanned, and the identification of the current protection cabin is in the protection cabin slow queue;
[0174] Delete the ID of the current protection cabin from the protection cabin slow queue.
[0175] Optionally, it also includes:
[0176] The exception handling module is used to generate an exception node corresponding to the target protection cabin in response to an exception in the current protection cabin, and put the exception node into the exception event list;
[0177] Take out the abnormal node from the abnormal event list, and generate the abnormal processing task corresponding to the target protection cabin according to the abnormal node;
[0178] Receive the processing result corresponding to the exception handling task;
[0179] In response to the processing result indicating that the abnormal processing is finished, the identifier of the current protection cabin is deleted from the protection cabin fast queue, and the identifier of the current protection cabin is added to the end of the protection cabin slow queue.
[0180] An embodiment of the present invention provides an electronic device, including:
[0181] one or more processors;
[0182] a storage device for storing one or more programs,
[0183] When one or more programs are executed by one or more processors, the one or more processors implement the method of any of the above embodiments.
[0184] An embodiment of the present invention provides a computer program product, including a computer program. When the computer program is executed by a processor, the protection cabin monitoring method in the embodiment of the present invention is implemented.
[0185] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device suitable for implementing an embodiment of the present invention. Figure 5 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0186] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0187] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.
[0188] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.
[0189] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0190] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0191] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor, for example, they may be described as: a resource determination module, a first allocation module, and a second allocation module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the resource determination module may also be described as a "module for determining whether the computing resources in the computing power pool are sufficient."
[0192] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:
[0193] Determine whether the computing power resources in the computing power pool are sufficient; wherein the computing power resources are used to identify abnormalities in the protection cabins corresponding to the protection cabin identifiers in the protection cabin slow queue and the protection cabin fast queue;
[0194] In response to insufficient computing resources in the computing power pool, allocating computing resources to the protection cabin slow queue and the protection cabin fast queue according to an allocation ratio;
[0195] In response to sufficient computing power resources in the computing power pool, computing power resources are allocated to the protection cabin slow queue according to the number of protection cabin identifiers in the protection cabin slow queue; computing power resources are allocated to the protection cabin fast queue according to the number of protection cabin identifiers in the protection cabin fast queue.
[0196] According to the technical solution of the embodiment of the present invention, the system maintains a fast queue and a slow queue for protection cabins. The fast queue for protection cabins is used to store the identification of protection cabins with identified abnormalities, and the slow queue for protection cabins is used to store the identification of protection cabins without identified abnormalities. Computing resources are used to perform abnormal identification on the protection cabins corresponding to the protection cabin identifications in the slow queue for protection cabins and the fast queue for protection cabins.
[0197] In the case of insufficient computing resources, computing resources are allocated to the protection cabin slow queue and the protection cabin fast queue according to the allocation ratio, with a focus on allocating computing resources to the protection cabins in the protection cabin fast queue, while allocating computing resources to the protection cabins in the protection cabin slow queue as much as possible. In the case of sufficient computing resources, computing resources are allocated to each protection cabin in the protection cabin fast queue and the protection cabin slow queue. The method of the embodiment of the present invention can effectively improve the safety of the protection cabin.
[0198] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A protection cabin monitoring method, characterized in that: include: Determine whether the computing power resources in the computing power pool are sufficient; wherein the computing power resources are used to identify abnormalities in the protection cabins corresponding to the protection cabin identifiers in the protection cabin slow queue and the protection cabin fast queue; In response to insufficient computing resources in the computing power pool, allocating computing resources to the protection cabin slow queue and the protection cabin fast queue according to an allocation ratio; In response to sufficient computing power resources in the computing power pool, computing power resources are allocated to the protection cabin slow queue according to the number of protection cabin identifiers in the protection cabin slow queue; computing power resources are allocated to the protection cabin fast queue according to the number of protection cabin identifiers in the protection cabin fast queue.
2. The method according to claim 1, characterized in that Also includes: When a person enters the current protection cabin, an identifier of the current protection cabin is added to the end of the protection cabin slow queue; Taking out the identifier of the current protection cabin from the head of the slow queue of the protection cabin, and allocating computing resources to the current protection cabin to identify abnormalities of the current protection cabin; In response to the identification result indicating that the current protection cabin is abnormal, adding the identifier of the current protection cabin to a protection cabin fast queue; In response to the identification result indicating that no abnormality occurs in the current protection cabin, the identifier of the current protection cabin is added to a protection cabin slow queue.
3. The method according to claim 1, characterized in that: Determining whether the computing power resources in the computing power pool are sufficient includes: Determine the total number of protection cabin identifiers in the protection cabin slow queue and the protection cabin fast queue; Determining the number of computing resources in the computing pool; Determining whether the number of resources is not less than the total number of protection cabins; In response to the number of resources being not less than the total number of protection cabins, determining that the computing resources in the computing power pool are sufficient; In response to the number of resources being less than the total number of protection cabins, it is determined that the computing resources in the computing power pool are insufficient.
4. The method according to claim 1, characterized in that After computing resources are allocated to the protection cabin slow queue, the following steps are included: Taking out the identification of the first protection cabin from the head of the slow queue of protection cabins; Using the first computing power resource allocated to the slow queue of the protection cabin, identifying anomalies of the first protection cabin; In response to the allocation time of the first computing power resource reaching a first duration, releasing the first computing power resource and obtaining a first identification result; In response to the first recognition result indicating that an abnormality occurs in the first protection cabin, adding an identifier of the first protection cabin to the end of a protection cabin fast queue; In response to the first identification result indicating that no abnormality occurs in the first protection cabin, the identifier of the first protection cabin is added to the end of a protection cabin slow queue.
5. The method according to claim 4, characterized in that After obtaining the first recognition result, the method further includes: In response to the first recognition result indicating that an abnormality occurs in the first protection cabin, generating an abnormal node corresponding to the first protection cabin according to the first recognition result; Put the abnormal node into the abnormal event list; According to the abnormal node in the abnormal event list, an abnormal processing task corresponding to the first protection cabin is generated.
6. The method according to claim 1, characterized in that After computing resources are allocated to the protection cabin fast queue, the method further includes: Taking out the identification of the second protection cabin from the head of the protection cabin fast queue; Using the second computing power resource allocated to the protection cabin fast queue, identifying abnormalities in the second protection cabin; In response to the allocation time of the second computing power resource reaching a second duration, releasing the second computing power resource, and obtaining a second identification result; The identifier of the second protection cabin is added to the end of the protection cabin fast queue.
7. The method according to claim 6, characterized in that After obtaining the second recognition result, the method further includes: In response to the second recognition result indicating that an abnormality occurs in the second protection cabin, generating an abnormal node corresponding to the second protection cabin according to the second recognition result; Put the abnormal node into the abnormal event list; According to the abnormal node in the abnormal event list, an abnormal processing task corresponding to the second protection cabin is generated.
8. The method according to claim 1, characterized in that: Also includes: It is detected that a person leaves the current protection cabin, and the current protection cabin is in an unmanned state, and the identifier of the current protection cabin is in the protection cabin slow queue; The identifier of the current protection cabin is deleted from the protection cabin slow queue.
9. The method according to claim 1, characterized in that: Also includes: In response to an abnormality occurring in the current protection cabin, an abnormal node corresponding to the target protection cabin is generated, and the abnormal node is placed in an abnormal event list; Taking out the abnormal node from the abnormal event list, and generating an abnormal processing task corresponding to the target protection cabin according to the abnormal node; Receive a processing result corresponding to the exception handling task; In response to the processing result indicating that the abnormal processing is finished, the identifier of the current protection cabin is deleted from the protection cabin fast queue, and the identifier of the current protection cabin is added to the end of the protection cabin slow queue.
10. A protective cabin monitoring device, characterized in that: include: A resource determination module, used to determine whether the computing power resources in the computing power pool are sufficient; wherein the computing power resources are used to identify abnormalities in the protection cabin corresponding to the protection cabin identifier in the protection cabin slow queue and the protection cabin fast queue; A first allocation module, configured to allocate computing resources to the protection cabin slow queue and the protection cabin fast queue according to an allocation ratio in response to insufficient computing resources in the computing power pool; The second allocation module is used to allocate computing power resources to the protection cabin slow queue according to the number of protection cabin identifiers in the protection cabin slow queue in response to sufficient computing power resources in the computing power pool; and allocate computing power resources to the protection cabin fast queue according to the number of protection cabin identifiers in the protection cabin fast queue.
11. The device according to claim 10, characterized in that Also includes: A monitoring module, used for detecting an entry event of a person into the current protection cabin, and adding the identifier of the current protection cabin to the end of the protection cabin slow queue; Taking out the identifier of the current protection cabin from the head of the slow queue of the protection cabin, and allocating computing resources to the current protection cabin to identify abnormalities of the current protection cabin; In response to the identification result indicating that the current protection cabin is abnormal, adding the identifier of the current protection cabin to a protection cabin fast queue; In response to the identification result indicating that no abnormality occurs in the current protection cabin, the identifier of the current protection cabin is added to a protection cabin slow queue.
12. The device according to claim 10, characterized in that The resource determination module is specifically used for: Determine the total number of protection cabin identifiers in the protection cabin slow queue and the protection cabin fast queue; Determining the number of computing resources in the computing pool; Determining whether the number of resources is not less than the total number of protection cabins; In response to the number of resources being not less than the total number of protection cabins, determining that the computing resources in the computing power pool are sufficient; In response to the number of resources being less than the total number of protection cabins, it is determined that the computing resources in the computing power pool are insufficient.
13. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 9.
14. A computer readable medium having a computer program stored thereon, characterized in that When the program is executed by a processor, the method described in any one of claims 1 to 9 is implemented.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
