Quick-switching parallel round-robin method and device, computer device and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2026-08-11
AI Technical Summary
[0005]在本实施例中提供了一种快速切换的并行轮巡方法、装置、计算机设备和存储介质,以解决相关技术中无法对大量的轮巡点位进行并行分析的问题
[0036]Compared with related technologies, the parallel polling method, apparatus, computer equipment, and storage medium with fast switching provided in this embodiment select multiple video channels to be polled from the polling set, add the multiple video channels to be polled to the analysis queue, and then, when the analysis queue starts the channel analysis of the next cycle, switch the analysis object of the analysis queue to the video channels to be polled in the analysis queue, and perform parallel analysis on the video channels to be polled. This solves the problem of not being able to perform parallel analysis on a large number of polling points and improves the polling efficiency of the equipment.
Smart Images

Figure CN116347032B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video surveillance technology, and in particular to a parallel polling method, apparatus, computer equipment, and storage medium with fast switching. Background Technology
[0002] As information technology drives industrial transformation, industrial enterprises are gradually building smart factories, continuously improving the level of intelligence and digitalization in industrial production. Therefore, industrial inspection needs to shift towards intelligent inspection, which is typically achieved through cloud-based inspection systems.
[0003] Current inspection methods analyze video channels corresponding to multiple inspection points using a single channel within a single device. However, many inspection scenarios involve a large number of inspection points; for example, power line inspections can have thousands. Therefore, the aforementioned methods cannot perform parallel analysis on such a large number of inspection points, resulting in excessively long inspection cycles and low equipment utilization, ultimately leading to low inspection efficiency.
[0004] There is currently no effective solution to the problem that related technologies cannot perform parallel analysis on a large number of rotating points. Summary of the Invention
[0005] This embodiment provides a fast-switching parallel polling method, apparatus, computer device, and storage medium to solve the problem in related technologies that it is impossible to perform parallel analysis on a large number of polling points.
[0006] Firstly, this embodiment provides a fast-switching parallel polling method, the method comprising:
[0007] Select multiple video channels to be cycled from the cycle set, and add the multiple video channels to be cycled to the analysis queue;
[0008] When the analysis queue starts the channel analysis for the next cycle, the analysis object of the analysis queue is switched to the video channel to be rotated in the queue to be analyzed, and the video channel to be rotated is analyzed in parallel.
[0009] In some embodiments, the method further includes:
[0010] When the analysis queue first starts the channel analysis, multiple video channels to be cycled are selected from the cycle set;
[0011] Add multiple of the video channels to be cycled to the analysis queue.
[0012] In some embodiments, adding the plurality of video channels to be polled to the analysis queue includes:
[0013] Determine whether multiple video channels to be rotated belong to the same rotation point;
[0014] When multiple video channels to be rotated do not belong to the same rotation point, the video channels to be rotated are added to the analysis queue;
[0015] When multiple video channels to be rotated belong to the same rotation point, select a single video channel to be rotated from the multiple video channels to be rotated and add it to the analysis queue.
[0016] In some embodiments, selecting multiple video channels to be polled from the polling set and adding the multiple video channels to be polled to the analysis queue includes:
[0017] Based on the number of channels analyzed in the analysis queue, multiple video channels to be cycled are selected from the cycle set;
[0018] When the video channel to be cycled is a preset point channel, it is determined whether the first point device corresponding to the video channel to be cycled is the same as the second point device corresponding to the video channel to be analyzed in the analysis queue, and based on the determination result, the video channel to be cycled is added to the analysis queue.
[0019] If the video channel to be cycled is not the preset point channel, the video channel to be cycled is added to the analysis queue.
[0020] In some embodiments, adding the video channels to be polled to the analysis queue based on the judgment result includes:
[0021] If the first point device is different from the second point device, then determine whether there is a video channel corresponding to the first point device in the analysis queue;
[0022] If the video channel corresponding to the first point device does not exist in the analysis queue, the position of the first point device is adjusted to the preset point corresponding to the video channel to be cycled, and the video channel to be cycled is added to the analysis queue.
[0023] When the video channel corresponding to the first location device exists in the analysis queue, the video channel to be cycled is added to the analysis queue.
[0024] In some embodiments, the parallel analysis of the video channels to be polled includes:
[0025] Determine whether the video channel to be patrolled is a preset point channel;
[0026] If the video channel to be cycled is not the preset point channel, then the video channel to be cycled is analyzed by the analysis algorithm;
[0027] If the video channel to be patrolled is the preset point channel, then determine whether the location of the point device corresponding to the video channel to be patrolled is the corresponding preset point, and analyze the video channel to be patrolled based on the determination result.
[0028] In some embodiments, the analysis of the video channel to be patrolled based on the judgment result includes:
[0029] If the location of the device corresponding to the video channel to be patrolled is the corresponding preset point, then the video channel to be patrolled is analyzed by the analysis algorithm.
[0030] If the location of the device corresponding to the video channel to be patrolled is not the preset point, the device corresponding to the video channel to be patrolled will be adjusted to the preset point. During the adjustment process, the video channel to be patrolled will be analyzed based on the video quality diagnosis results.
[0031] Secondly, this embodiment provides a fast-switching parallel polling device, the device comprising:
[0032] The acquisition module selects multiple video channels to be cycled from the cycle set and adds the multiple video channels to be cycled to the analysis queue.
[0033] When the analysis module starts the channel analysis of the next cycle in the analysis queue, it switches the analysis object of the analysis queue to the video channel to be rotated in the queue to be analyzed, and performs parallel analysis on the video channel to be rotated.
[0034] Thirdly, this embodiment provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the fast switching parallel polling method described in the first aspect above.
[0035] Fourthly, this embodiment provides a storage medium storing a computer program that, when executed by a processor, implements the fast-switching parallel polling method described in the first aspect above.
[0036] Compared with related technologies, the parallel polling method, apparatus, computer equipment, and storage medium with fast switching provided in this embodiment select multiple video channels to be polled from the polling set, add the multiple video channels to be polled to the analysis queue, and then, when the analysis queue starts the channel analysis of the next cycle, switch the analysis object of the analysis queue to the video channels to be polled in the analysis queue, and perform parallel analysis on the video channels to be polled. This solves the problem of not being able to perform parallel analysis on a large number of polling points and improves the polling efficiency of the equipment.
[0037] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0038] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0039] Figure 1 This is a hardware structure block diagram of a terminal device for a fast-switching parallel polling method provided in an embodiment of this application;
[0040] Figure 2 This is a flowchart of a fast-switching parallel polling method provided in an embodiment of this application;
[0041] Figure 3 This is a channel selection diagram of a fast-switching parallel polling method provided in an embodiment of this application;
[0042] Figure 4 This is a channel analysis diagram of a fast-switching parallel polling method provided in an embodiment of this application;
[0043] Figure 5 This is a time distribution diagram of a fast-switching parallel polling method provided in an embodiment of this application;
[0044] Figure 6 This is a flowchart illustrating a fast-switching parallel polling method provided in an embodiment of this application;
[0045] Figure 7 This is a preferred flowchart of a parallel polling method with fast switching provided in an embodiment of this application;
[0046] Figure 8 This is a structural block diagram of a fast-switching parallel polling device provided in an embodiment of this application.
[0047] In the diagram: 102, processor; 104, memory; 106, transmission device; 108, input / output device; 10, acquisition module; 20, analysis module. Detailed Implementation
[0048] To better understand the purpose, technical solution, and advantages of this application, the application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0049] Unless otherwise defined, the technical or scientific terms used in this application shall have the general meaning as understood by one of ordinary skill in the art to which this application pertains. Words such as “a,” “an,” “an,” “the,” “the,” and “these,” used in this application, do not indicate quantitative limitation and may be singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include steps or modules (units) not listed, or may include other steps or modules (units) inherent to such processes, methods, products, or devices. The terms “connected,” “linked,” and “coupled,” used in this application, are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. The term “multiple” used in this application refers to two or more. The "and / or" operator describes the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: A alone, A and B simultaneously, and B alone. Typically, the character " / " indicates that the objects before and after it are in an "or" relationship. The terms "first," "second," and "third," etc., used in this application are merely for distinguishing similar objects and do not represent a specific ordering of the objects.
[0050] The method embodiments provided in this example can be executed on a terminal, computer, or similar computing device. For example, it can run on a terminal. Figure 1 This is a hardware structure block diagram of the terminal for the fast-switching parallel polling method in this embodiment. For example... Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 and a memory 104 for storing data are also included. The processor 102 may be, but is not limited to, a microprocessor (MCU) or a programmable logic device (FPGA). The terminal may also include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that… Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal described above. For example, the terminal may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown are illustrated.
[0051] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the fast-switching parallel polling method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, thus implementing the aforementioned method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0052] The transmission device 106 is used to receive or send data via a network. This network includes a wireless network provided by the terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 can be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0053] This embodiment provides a parallel polling method with fast switching. Figure 2 This is a flowchart of the fast-switching parallel polling method in this embodiment, as shown below. Figure 2 As shown, the process includes the following steps:
[0054] Step S210: Select multiple video channels to be rotated from the rotation set and add the multiple video channels to be rotated to the analysis queue.
[0055] Specifically, such as Figure 3 As shown, video channel polling is enabled. It is determined whether there is a video channel in the analysis queue. If there is no video channel in the analysis queue, multiple video channels to be polled are selected from the polling set and added to the analysis queue. If there is a video channel in the analysis queue, multiple video channels to be polled are selected from the queue to be analyzed and added to the analysis queue.
[0056] Furthermore, analysis tags are added to each selected video channel to be rotated, and it is determined whether the selected video channels to be rotated are different preset point channels of the same rotation point. If so, the single video channel to be rotated at the top is added to the analysis queue, and the other video channels to be rotated wait for the next round of channel analysis. If the selected video channels to be rotated do not belong to the same rotation point, the video channels to be rotated are selected and added to the analysis queue in turn.
[0057] Step S220: When the analysis queue starts the channel analysis of the next cycle, the analysis object of the analysis queue is switched to the video channel to be rotated in the queue to be analyzed, and the video channel to be rotated is analyzed in parallel.
[0058] It is important to know that when the polling time for each cycle is reached, it is determined whether all video channels to be polled in the polling set have been analyzed. If the analysis is completed, the analysis tag of each video channel to be polled is cleared, and the polling analysis of the next cycle begins; if the analysis is not completed, the analysis of the unanalyzed video channels to be polled continues.
[0059] Current inspection methods analyze video channels corresponding to multiple inspection points using a single channel within a single device. However, many inspection scenarios involve a large number of inspection points; for example, power line inspections can have thousands. Therefore, the existing methods cannot perform parallel analysis on such a large number of inspection points, resulting in excessively long inspection cycles and low equipment utilization, leading to low inspection efficiency. This application addresses this issue by incorporating multiple analysis channels into the inspection device, enabling parallel analysis of the video channels to be inspected. Specifically, multiple video channels to be inspected are selected from the inspection set and added to an analysis queue. When the analysis queue initiates the next cycle of channel analysis, the analysis object is switched to the video channels to be inspected in the analysis queue, and parallel analysis is performed on these channels. This solves the problem of not being able to perform parallel analysis on a large number of inspection points, thus improving the inspection efficiency of the device.
[0060] In some embodiments, the method further includes the following steps:
[0061] When the analysis queue first starts channel analysis, it selects multiple video channels to be cycled from the cycle set;
[0062] Add multiple video channels to be cycled to the analysis queue.
[0063] Specifically, it determines whether there are video channels in the analysis queue. If there are no video channels in the analysis queue, that is, the analysis queue starts channel analysis for the first time, then selects multiple video channels to be rotated from the rotation set and adds the multiple video channels to be rotated to the analysis queue.
[0064] It is important to know that, according to the order of the video channels to be rotated in the rotation set, multiple video channels to be rotated are selected in sequence, it is determined whether each selected video channel to be rotated belongs to the same rotation point, and based on the determination result, the video channel to be rotated is added to the analysis queue.
[0065] In this embodiment, when the analysis queue starts channel analysis for the first time, multiple video channels to be rotated are selected from the rotation set and added to the analysis queue, thereby improving the rotation efficiency.
[0066] In some embodiments, adding multiple video channels to be cycled to the analysis queue includes the following steps:
[0067] Determine whether multiple video channels awaiting rotation belong to the same rotation point;
[0068] When multiple video channels to be rotated do not belong to the same rotation point, add the video channels to be rotated to the analysis queue;
[0069] When multiple video channels awaiting rotation belong to the same rotation point, select a single video channel from the multiple video channels awaiting rotation and add it to the analysis queue.
[0070] Specifically, it is determined whether the selected video channels to be rotated are different preset point channels of the same rotation point. If so, it indicates that each selected video channel corresponds to a preset point, and the device corresponding to the video channel to be rotated needs to be rotated to the corresponding preset point during channel analysis. Therefore, when multiple video channels to be rotated belong to the same rotation point, the single video channel at the top of the list is added to the analysis queue, and the other video channels wait for the next round of channel analysis. This avoids the need to rotate the same device to different preset points during the parallel analysis of the current round. If the selected video channels to be rotated do not belong to the same rotation point, the video channels to be rotated are selected and added to the analysis queue sequentially based on the number of channels to be analyzed in the analysis queue.
[0071] Furthermore, it is determined whether the video channel to be rotated in the analysis queue is a preset point channel. If the video channel to be rotated is a preset point channel and this is the first time the video channel to be rotated is added to the analysis queue, a command is sent to rotate the spherical camera at the corresponding rotation point to the corresponding preset point.
[0072] This embodiment determines whether multiple video channels to be cycled belong to the same cycle point. When multiple video channels to be cycled do not belong to the same cycle point, the video channels to be cycled are added to the analysis queue. When multiple video channels to be cycled belong to the same cycle point, a single video channel to be cycled is selected from the multiple video channels to be cycled and added to the analysis queue. This allows the preset point channels with the same cycle point to be analyzed sequentially.
[0073] In some embodiments, selecting multiple video channels to be polled from the polling set and adding these multiple video channels to the analysis queue includes the following steps:
[0074] Step S211: Based on the number of channels analyzed in the analysis queue, select multiple video channels to be cycled from the cycle set;
[0075] Step S212: When the video channel to be rotated is a preset point channel, determine whether the first point device corresponding to the video channel to be rotated is the same as the second point device corresponding to the video channel to be analyzed in the analysis queue, and add the video channel to be rotated to the analysis queue based on the determination result.
[0076] Step S213: When the video channel to be rotated is not a preset point channel, add the video channel to be rotated to the analysis queue.
[0077] Specifically, based on the number of channels analyzed in the analysis queue, multiple video channels to be cycled are selected from the cycle set, and it is determined whether the video channel to be cycled is a preset point channel. If the video channel to be cycled is a preset point channel, it is determined whether the first point device corresponding to the video channel to be cycled is the same as the second point device corresponding to the video channel to be analyzed in the analysis queue, and based on the determination result, the video channel to be cycled is added to the analysis queue. Furthermore, if the video channel to be cycled is not a preset point channel, it is added to the analysis queue.
[0078] It's important to understand that when a video channel to be cycled is a preset point channel, it means that the first point device corresponding to that video channel has a preset point. When performing channel analysis on a preset point channel, the first point device needs to be rotated to the corresponding preset point. Therefore, without interfering with the analysis of other channels, the position of the first point device can be adjusted while adding the video channel to be cycled to the analysis queue, reducing subsequent position adjustment time and improving channel analysis efficiency.
[0079] In this embodiment, based on the number of channels analyzed in the analysis queue, multiple video channels to be cycled are selected from the cycle set. When the point device corresponding to the video channel to be cycled is a dome camera, it is determined whether there is a video channel corresponding to the point device in the analysis queue. Based on the determination result, the video channel to be cycled is added to the analysis queue. When the point device corresponding to the video channel to be cycled is not a dome camera, the video channel to be cycled is added to the analysis queue. Thus, when the video channel to be cycled is a preset point channel, the corresponding point device is preprocessed to improve the cycle efficiency of the device.
[0080] In some embodiments, based on the judgment result, the video channels to be cycled are added to the queue to be analyzed, including the following steps:
[0081] If the first point device is different from the second point device, then determine whether the video channel corresponding to the first point device exists in the analysis queue;
[0082] If the video channel corresponding to the first point device does not exist in the analysis queue, adjust the position of the first point device to the preset point corresponding to the video channel to be cycled, and add the video channel to be cycled to the analysis queue.
[0083] If the video channel corresponding to the first point device exists in the analysis queue, add the video channel to be cycled to the analysis queue.
[0084] Specifically, it is determined whether the first point device corresponding to the video channel to be cycled is the same as the second point device corresponding to the video channel to be analyzed in the analysis queue. If the first point device and the second point device are the same, the video channel to be cycled waits for the channel analysis in subsequent cycles; if the first point device and the second point device are different, it is determined whether there is a video channel corresponding to the first point device in the analysis queue.
[0085] Furthermore, if the video channel corresponding to the first point device does not exist in the analysis queue, the first point device is adjusted to the preset point corresponding to the video channel to be cycled, and the video channel to be cycled is added to the analysis queue; if the video channel corresponding to the first point device exists in the analysis queue, the video channel to be cycled is added to the analysis queue.
[0086] It's important to know that if the video channel corresponding to the first point device exists in the analysis queue, it indicates that the first point device is waiting for analysis. Since the analysis objects in the queue are switched in rounds, meaning that video channels awaiting analysis in the same round will be added to the queue simultaneously, placing the video channel awaiting analysis in a subsequent round prevents the need for different preset point settings for the same first point device during parallel analysis in the same round, thus avoiding configuration confusion.
[0087] In this embodiment, if there is no video channel to be cycled in the queue to be analyzed, the position of the spherical camera is adjusted to a preset point, and the video channel to be cycled is added to the queue to be analyzed. If there is a video channel to be cycled in the queue to be analyzed, the video channel to be cycled is added to the queue to be analyzed, thereby improving the cycle efficiency of the device.
[0088] In some embodiments, parallel analysis of the video channels to be polled includes the following steps:
[0089] Step S221: Determine whether the video channel to be patrolled is a preset point channel;
[0090] Step S222: If the video channel to be cycled is not a preset point channel, then the video channel to be cycled is analyzed by the analysis algorithm.
[0091] Step S223: If the video channel to be patrolled is a preset point channel, determine whether the location of the point device corresponding to the video channel to be patrolled is the corresponding preset point, and analyze the video channel to be patrolled based on the judgment result.
[0092] Specifically, it is determined whether the video channel to be patrolled is a preset point channel. If the video channel to be patrolled is not a preset point channel, the video channel to be patrolled is analyzed by the analysis algorithm. If the video channel to be patrolled is a preset point channel, it is determined whether the location of the point device corresponding to the video channel to be patrolled is the corresponding preset point.
[0093] Furthermore, if the location of the device corresponding to the video channel to be cycled is a preset point, the video channel to be cycled is analyzed using an analysis algorithm; if the location of the device corresponding to the video channel to be cycled is not a preset point, the device is adjusted to the preset point, and during the adjustment process, the video channel to be cycled is analyzed based on the video quality diagnostic results. In this embodiment, the device corresponding to the preset point channel is a device with preset point functionality, such as a PTZ camera with preset point functionality.
[0094] In this embodiment, it is determined whether the video channel to be patrolled is a preset point channel. If the video channel to be patrolled is a preset point channel, it is determined whether the location of the point device corresponding to the video channel to be patrolled is the corresponding preset point. Based on the judgment result, the video channel to be patrolled is analyzed, so that when analyzing the preset point channel, the point device can be adjusted to the corresponding preset point in a timely manner, thereby improving the patrol efficiency.
[0095] In some embodiments, the analysis of the video channel to be polled, based on the judgment result, includes the following steps:
[0096] If the location of the device corresponding to the video channel to be patrolled is the corresponding preset point, then the video channel to be patrolled will be analyzed by the analysis algorithm.
[0097] If the location of the device corresponding to the video channel to be inspected is not the corresponding preset point, the device corresponding to the video channel to be inspected will be adjusted to the preset point. During the adjustment process, the video channel to be inspected will be analyzed based on the video quality diagnosis results.
[0098] Specifically, when the location of the device corresponding to the video channel to be cycled is the corresponding preset point, it indicates that the device has been adjusted to the corresponding preset point, and the analysis algorithm is activated to analyze the video channel to be cycled. However, when the location of the device corresponding to the video channel to be cycled is not the corresponding preset point, the device is rotated to the preset point, and during the rotation, the video channel to be cycled is analyzed based on the video quality diagnostic results.
[0099] Furthermore, such as Figure 4 As shown, a preset point N is set for the video channel to be cycled. When the location of the device corresponding to the video channel to be cycled is not at the preset point N, position adjustment S410 is initiated, and a rotation command is sent to adjust the device to the preset point N. During the rotation of the device, video quality diagnosis S420 and channel analysis algorithm S430 are simultaneously initiated, and video quality diagnosis results S440 and algorithm analysis results S450 are simultaneously received. Based on the video quality diagnosis results, the validity of the algorithm analysis results is evaluated S460. Specifically, the scene change and video jitter level are judged by the video quality diagnosis results, and corresponding alarm values are generated. When the alarm value reaches a preset threshold, it is determined that the current device is still in the process of rotation, indicating that the currently received algorithm analysis result is invalid, and thus the algorithm analysis result is discarded S470; when the alarm value does not reach the preset threshold, it is determined that the current device is already at the preset point N, indicating that the currently received algorithm analysis result is valid, and thus the algorithm analysis result is retained S480, and algorithm analysis continues S490.
[0100] It is important to know that, such as Figure 5 As shown, during the adjustment of the location of the monitoring devices, the time distribution of the preset point channels is optimized. This involves simultaneously enabling preset point switching and channel analysis algorithms to increase the algorithm's analysis time and prevent insufficient analysis time from identifying valid targets. Furthermore, based on the video quality diagnostic results corresponding to the video channels to be rotated, the channels are analyzed to avoid errors in the time of the monitoring devices' adjustment to the preset points when network quality is poor.
[0101] In this embodiment, when the location of the point device corresponding to the video channel to be patrolled is not the corresponding preset point, the point device corresponding to the video channel to be patrolled is adjusted to the preset point. During the adjustment process, the video channel to be patrolled is analyzed based on the video quality diagnosis results corresponding to the video channel to be patrolled. This avoids receiving invalid algorithm analysis results during the adjustment of the point device position, thereby improving the patrol efficiency of the equipment and the accuracy of the channel analysis.
[0102] Figure 6 This is a flowchart illustrating the fast-switching parallel polling method of this embodiment, as shown below. Figure 6 As shown, the specific process of this fast-switching parallel polling method is as follows:
[0103] S610 initiates video channel polling, then checks if a video channel exists in the analysis queue. S620 If no video channel exists in the analysis queue, multiple video channels to be polled are selected from the polling set and added to the analysis queue. S630 If a video channel exists in the analysis queue, multiple video channels to be polled are selected from the queue to be analyzed and added to the analysis queue. S640 Further, parallel analysis is performed on the video channels to be polled in the analysis queue. S650 Multiple video channels to be polled are selected from the polling set and added to the queue to be analyzed. S660 When the polling time is reached, the next cycle of video channel polling is initiated. S670
[0104] The present embodiment will now be described and illustrated through preferred embodiments.
[0105] Figure 7 This is a preferred flowchart of the fast-switching parallel polling method in this embodiment, as follows: Figure 7 As shown, this fast-switching parallel polling method includes the following steps:
[0106] Step S710: Based on the number of channels analyzed in the analysis queue, select multiple video channels to be cycled from the cycle set;
[0107] Step S720: When the video channel to be cycled is a preset point channel, determine whether the first point device corresponding to the video channel to be cycled is the same as the second point device corresponding to the video channel to be analyzed in the analysis queue, and add the video channel to be cycled to the analysis queue based on the determination result.
[0108] Step S730: When the video channel to be cycled is not a preset point channel, add the video channel to be cycled to the analysis queue.
[0109] Step S740: When the analysis queue starts the channel analysis of the next cycle, the analysis object of the analysis queue is switched to the video channel to be rotated in the queue to be analyzed.
[0110] Step S750: Determine whether the video channel to be patrolled is a preset point channel;
[0111] Step S760: If the video channel to be cycled is not a preset point channel, then the video channel to be cycled is analyzed by the analysis algorithm.
[0112] Step S770: If the video channel to be patrolled is a preset point channel, determine whether the location of the point device corresponding to the video channel to be patrolled is the corresponding preset point, and analyze the video channel to be patrolled based on the determination result.
[0113] This embodiment selects multiple video channels to be cycled from the cycle set based on the number of channels analyzed in the analysis queue. It then determines whether each channel is a preset point channel and adds it to the analysis queue based on the determination result. Furthermore, when the analysis queue starts the next cycle of channel analysis, the analysis object is switched to the video channels to be cycled in the analysis queue. It again determines whether each channel is a preset point channel and, based on the determination result, analyzes the video channels using an analysis algorithm. This solves the problem of not being able to perform parallel analysis on a large number of cycle points, thereby improving the cycle efficiency of the equipment.
[0114] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0115] This embodiment also provides a fast-switching parallel polling device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. The terms "module," "unit," "subunit," etc., used below refer to combinations of software and / or hardware that implement a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0116] Figure 8 This is a structural block diagram of the fast-switching parallel polling device in this embodiment, as shown below. Figure 8 As shown, the device includes: an acquisition module 10 and an analysis module 20;
[0117] The acquisition module 10 selects multiple video channels to be cycled from the cycle set and adds them to the analysis queue.
[0118] When the analysis module 20 starts the channel analysis of the next cycle, it switches the analysis object of the analysis queue to the video channel to be rotated in the queue to be analyzed, and performs parallel analysis on the video channel to be rotated.
[0119] The device provided in this embodiment selects multiple video channels to be rotated from the rotation set, adds the multiple video channels to be rotated to the analysis queue, and then, when the analysis queue starts the channel analysis of the next cycle, switches the analysis object of the analysis queue to the video channels to be rotated in the analysis queue, and performs parallel analysis on the video channels to be rotated. This solves the problem of not being able to perform parallel analysis on a large number of rotation points and improves the rotation efficiency of the device.
[0120] In some of these embodiments, in Figure 8 Based on this, the device also includes a selection module, which is used to select multiple video channels to be rotated from the rotation set when the analysis queue first starts channel analysis; and to add the multiple video channels to be rotated to the analysis queue.
[0121] In some of these embodiments, in Figure 8 Based on this, the device also includes a first judgment module, used to determine whether multiple video channels to be rotated belong to the same rotation point; when multiple video channels to be rotated do not belong to the same rotation point, add the video channels to be rotated to the analysis queue; when multiple video channels to be rotated belong to the same rotation point, select a single video channel to be rotated from the multiple video channels to be rotated and add it to the analysis queue.
[0122] In some of these embodiments, in Figure 8 Based on this, the device also includes a second judgment module, used to select multiple video channels to be rotated from the rotation set based on the number of channels to be analyzed in the analysis queue; when the video channel to be rotated is a preset point channel, it determines whether the first point device corresponding to the video channel to be rotated is the same as the second point device corresponding to the video channel to be analyzed in the analysis queue, and adds the video channel to be rotated to the analysis queue based on the judgment result; when the video channel to be rotated is not a preset point channel, it adds the video channel to the analysis queue.
[0123] In some of these embodiments, Figure 8 Based on this, the device also includes a third judgment module, used to determine whether a video channel corresponding to the first point device exists in the analysis queue if the first point device is different from the second point device; if a video channel corresponding to the first point device does not exist in the analysis queue, the position of the first point device is adjusted to the preset point corresponding to the video channel to be cycled, and the video channel to be cycled is added to the analysis queue; if a video channel corresponding to the first point device exists in the analysis queue, the video channel to be cycled is added to the analysis queue.
[0124] In some of these embodiments, Figure 8 Based on this, the device also includes a fourth judgment module, which is used to determine whether the video channel to be patrolled is a preset point channel; if the video channel to be patrolled is not a preset point channel, the video channel to be patrolled is analyzed by the analysis algorithm; if the video channel to be patrolled is a preset point channel, the device position corresponding to the video channel to be patrolled is determined to be the corresponding preset point, and the video channel to be patrolled is analyzed based on the judgment result.
[0125] In some of these embodiments, Figure 8 Based on this, the device also includes a fifth judgment module, which is used to analyze the video channel to be rotated if the location of the point device corresponding to the video channel to be rotated is the corresponding preset point; if the location of the point device corresponding to the video channel to be rotated is not the corresponding preset point, the point device corresponding to the video channel to be rotated is adjusted to the preset point, and during the adjustment process, the video channel to be rotated is analyzed based on the video quality diagnosis results of the video channel to be rotated.
[0126] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.
[0127] This embodiment also provides a computer device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0128] Optionally, the computer device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0129] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated in this embodiment.
[0130] Furthermore, in conjunction with the fast-switching parallel polling method provided in the above embodiments, this embodiment can also provide a storage medium for implementation. This storage medium stores a computer program; when executed by a processor, the computer program implements any of the fast-switching parallel polling methods described in the above embodiments.
[0131] It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. All other embodiments derived by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0132] Obviously, the accompanying drawings are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar situations based on these drawings without any creative effort. Furthermore, it is understood that although the work done in this development process may be complex and lengthy, for those skilled in the art, certain design, manufacturing, or production modifications made based on the technical content disclosed in this application are merely conventional technical means and should not be considered as insufficient disclosure of this application.
[0133] The term "embodiment" in this application refers to a specific feature, structure, or characteristic described in connection with an embodiment that may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily imply the same embodiment, nor does it imply that it is mutually exclusive with or independent of other embodiments. It will be clearly or implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0134] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the appended claims.
Claims
1. A parallel polling method with fast switching, characterized in that, The method includes: Select multiple video channels to be cycled from the cycle set, and add the multiple video channels to be cycled to the analysis queue; The step of selecting multiple video channels to be cycled from the cycle set and adding the multiple video channels to be cycled to the analysis queue includes: selecting multiple video channels to be cycled from the cycle set based on the number of channels to be analyzed in the analysis queue; when the video channel to be cycled is a preset point channel, determining whether the first point device corresponding to the video channel to be cycled is the same as the second point device corresponding to the video channel to be analyzed in the analysis queue, and adding the video channel to be cycled to the analysis queue based on the determination result; when the video channel to be cycled is not a preset point channel, adding the video channel to be cycled to the analysis queue; wherein, when the video channel to be cycled is a preset point channel, it indicates that the first point device corresponding to the video channel to be cycled has a preset point, and when performing channel analysis on the preset point channel, the first point device needs to be rotated to the corresponding preset point; The step of adding the video channel to be rotated to the queue to be analyzed based on the judgment result includes: if the first point device and the second point device are the same, then the video channel to be rotated will wait for the channel analysis of the subsequent rounds. When the analysis queue starts the channel analysis for the next cycle, the analysis object of the analysis queue is switched to the video channel to be rotated in the queue to be analyzed, and the video channel to be rotated is analyzed in parallel.
2. The parallel polling method with fast switching according to claim 1, characterized in that, The method further includes: When the analysis queue first starts the channel analysis, multiple video channels to be cycled are selected from the cycle set; Add multiple of the video channels to be cycled to the analysis queue.
3. The parallel polling method with fast switching according to claim 2, characterized in that, Adding multiple video channels to be cycled to the analysis queue includes: Determine whether multiple video channels to be rotated belong to the same rotation point; When multiple video channels to be rotated do not belong to the same rotation point, the video channels to be rotated are added to the analysis queue; When multiple video channels to be rotated belong to the same rotation point, select a single video channel to be rotated from the multiple video channels to be rotated and add it to the analysis queue.
4. The parallel polling method with fast switching according to claim 1, characterized in that, The step of adding the video channels to be cycled to the queue to be analyzed based on the judgment result includes: If the first point device is different from the second point device, then determine whether there is a video channel corresponding to the first point device in the analysis queue; If the video channel corresponding to the first point device does not exist in the analysis queue, the position of the first point device is adjusted to the preset point corresponding to the video channel to be cycled, and the video channel to be cycled is added to the analysis queue. When the video channel corresponding to the first location device exists in the analysis queue, the video channel to be cycled is added to the analysis queue.
5. The parallel polling method with fast switching according to claim 1, characterized in that, The parallel analysis of the video channels to be cycled includes: Determine whether the video channel to be patrolled is a preset point channel; If the video channel to be cycled is not the preset point channel, then the video channel to be cycled is analyzed by the analysis algorithm; If the video channel to be patrolled is the preset point channel, then determine whether the location of the point device corresponding to the video channel to be patrolled is the corresponding preset point, and analyze the video channel to be patrolled based on the determination result.
6. The parallel polling method with fast switching according to claim 5, characterized in that, The analysis of the video channels to be patrolled based on the judgment result includes: If the location of the device corresponding to the video channel to be patrolled is the corresponding preset point, then the video channel to be patrolled is analyzed by the analysis algorithm. If the location of the device corresponding to the video channel to be patrolled is not the preset point, the device corresponding to the video channel to be patrolled will be adjusted to the preset point. During the adjustment process, the video channel to be patrolled will be analyzed based on the video quality diagnosis results.
7. A parallel polling device with rapid switching, characterized in that, The device includes: The acquisition module selects multiple video channels to be cycled from the cycle set and adds the multiple video channels to be cycled to the analysis queue. The acquisition module is further configured to select multiple video channels to be cycled from the cycle set based on the number of channels analyzed in the analysis queue; when the video channel to be cycled is a preset point channel, determine whether the first point device corresponding to the video channel to be cycled is the same as the second point device corresponding to the video channel to be analyzed in the analysis queue, and add the video channel to be cycled to the analysis queue based on the determination result; when the video channel to be cycled is not a preset point channel, add the video channel to be cycled to the analysis queue; wherein, when the video channel to be cycled is a preset point channel, it indicates that the first point device corresponding to the video channel to be cycled has a preset point, and when performing channel analysis on the preset point channel, the first point device needs to be rotated to the corresponding preset point; The acquisition module is further configured to, if the first point device is the same as the second point device, then the video channel to be patrolled will wait for channel analysis in subsequent rounds; When the analysis module starts the channel analysis of the next cycle in the analysis queue, it switches the analysis object of the analysis queue to the video channel to be rotated in the queue to be analyzed, and performs parallel analysis on the video channel to be rotated.
8. A computer device, comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the steps of the fast-switching parallel polling method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the parallel polling method with fast switching as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Patrol task parallel processing method and system based on camera preset position
CN114999019A