Testing method and device of security and protection system and computer readable storage medium
By analyzing the test data, generating an alarm signal stream and recalling the real video stream to generate a multi-channel configuration video stream, solving the problem that cannot be effectively simulated in security system testing and improving testing efficiency and accuracy.
Patent Information
- Application Number
- CN202510103535.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-05-09
AI Technical Summary
The existing security system testing methods cannot deploy a large number of camera equipment and a wide variety of test scenarios, resulting in the inability to effectively simulate, affecting the testing efficiency and accuracy.
By controlling the alarm signal simulation device, analyzing the test data, generating an alarm signal stream, and using the signal and video fusion module to retrieve the real video stream, generating a multi-channel configuration video stream, and inputting it to the security system for simulation testing.
It realizes the generation of a large number of configured video streams based on a small number of real video streams, enriches the number of video streams, and improves the efficiency and accuracy of security system testing.
Smart Images

Figure CN119962232A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of security system testing, and in particular to a security system testing method and device, and a computer-readable storage medium. Background Art
[0002] In large-scale security systems, due to the multiple deployment locations, brand procurement differences, and asynchronous hardware model upgrades, the video surveillance equipment and sensor equipment in the security system are characterized by a large number of types, such as Figure 1 As shown, Figure 1 It is a schematic diagram of the deployment of security systems in the prior art.
[0003] This type of security system testing usually has the following problems: First, when testing the alarm handling process scenario, due to site safety and the wide variety of alarm types, it is impossible to support testing by actually generating fire, smoke, etc., and the data formats of different brands and alarm types are inconsistent, all of which need to be covered by the test; second, when testing multi-channel video scenarios of video surveillance, it is impossible to purchase and deploy a large number of real camera equipment of multiple brands and models; third, when an alarm is generated at a certain location, the corresponding video needs to be viewed in real time. The test of this part of the related scenarios requires manual preparation of alarm signals and video stream data respectively. The test data preparation is not simulated enough and affects the test efficiency.
[0004] In addition, in order to reduce the dependence on real hardware devices and reduce testing costs, actual hardware signals can be simulated through video streams and signal streams, so as to provide a solution for efficient and comprehensive testing without actually deploying a large number of hardware devices during the testing process of the security system; however, the existing video stream and signal stream simulation has the following main disadvantages: First, for single device simulation, the access versatility of video streams and signal streams of multiple brands and models is low, and repeated adaptation is required, which is costly; second, the existing method writes parameter logic into the code, resulting in low scalability and diversity; third, the existing simulation data format is relatively simple, and after multiple data formats are accessed, the data needs to be processed according to the diversity when docking with other related modules, and there is a lack of a unified format; fourth, the diversity of video parameters and the linkage of alarm signals cannot be automatically realized, and need to be simulated manually one by one, which is inefficient.
[0005] With regard to the above-mentioned related technologies, when testing the security system, due to the inability to deploy a large number of camera devices for data collection and the wide variety of test scenarios, effective simulation cannot be performed, which affects the test efficiency and accuracy. No effective solution has been proposed yet. Summary of the invention
[0006] The embodiments of the present invention provide a method and device for testing a security system, and a computer-readable storage medium, so as to at least solve the technical problem in the related art that when testing a security system, a large number of camera devices cannot be deployed for data collection and there are many types of test scenarios, resulting in the inability to effectively perform simulation, thereby affecting the test efficiency and accuracy.
[0007] According to one aspect of an embodiment of the present invention, a method for testing a security system is provided, comprising: controlling an alarm signal simulation device to parse received test data to obtain test keywords and preset video types corresponding to the test data, wherein the test data is data describing a preset alarm scenario, and the security system is used to monitor and warn of danger in a target monitoring area; controlling the alarm signal simulation device to generate an alarm signal stream according to the test keywords; utilizing a signal and video fusion module to transmit the alarm signal stream generated by the alarm signal simulation device to a video simulation device, so as to control the video simulation device to retrieve a real video stream matching the alarm signal stream according to the alarm signal stream, wherein the real The video stream is a video captured by an image acquisition device that has a communication connection relationship with the video simulation device; the video simulation device is controlled to generate multiple configured video streams based on the real video stream, wherein the configured video stream is a video obtained by configuring according to the real video stream using a preset algorithm; the alarm signal stream and the alarm video stream are input into the security system to simulate the preset alarm scene and obtain a test result, wherein the alarm video stream includes: the real video stream and the configured video stream; when the test result indicates that the alarm video stream retrieved by the security system based on the alarm signal stream meets the preset video type, it is determined that the security system meets the preset test requirements.
[0008] Optionally, the alarm signal simulation device is controlled to parse the received test data to obtain test keywords and preset video types corresponding to the test data, including: controlling the alarm signal simulation device to parse the received test data to obtain multiple test keywords and test tags carried by the test data, wherein the test keywords include: sensor keywords and alarm signal keywords; determining that the video type recorded in the test tag is the preset video type.
[0009] Optionally, controlling the alarm signal simulation device to generate an alarm signal stream according to the test keyword, including: determining the data format type of the target sensor according to the sensor keyword in the test keyword; determining a keyword-coding format mapping table that matches the data format type as a target mapping table, wherein the keyword-coding format mapping table is used to record the mapping relationship between the test keyword and the signal stream encoding; controlling the alarm signal simulation device to generate an original alarm signal stream according to the test keyword and the target mapping table; performing a format conversion operation on the original alarm signal stream to obtain the alarm signal stream, wherein the format conversion operation is used to convert the signal stream format of the original alarm signal stream into a preset signal stream format, so that the formats of the alarm signal streams received by the video simulation device are all the same.
[0010] Optionally, the alarm signal stream generated by the alarm signal simulation device is transmitted to the video simulation device by using the signal and video fusion module, including: determining a parameter in the alarm signal stream whose video correlation is higher than a correlation threshold as a target parameter, wherein the video correlation refers to the degree of influence of the parameter on retrieving the real video stream; controlling the alarm signal simulation device to store the target parameter in a message cache queue, and then transmitting the message cache queue to the signal and video fusion module; and controlling the signal and video fusion module to transmit the message cache queue to the video simulation device.
[0011] Optionally, the video simulation device is controlled to retrieve a real video stream matching the alarm signal stream according to the alarm signal stream, including: when the video simulation device receives a message cache queue, parsing the message cache queue to obtain video stream parameters, wherein the message cache queue is a message queue transmitted by the signal and video fusion module and contains the configured video stream; and pulling the real video stream from the image acquisition device according to the video stream parameters, wherein the configuration parameters of the real video stream correspond to the video stream parameters.
[0012] Optionally, pulling the real video stream from the image acquisition device according to the video stream parameters includes: controlling the video simulation device to send a communication connection request to the image acquisition device to establish a communication channel for data transmission with the image acquisition device based on the communication connection request; sending a video pull request and the video stream parameters to the image acquisition device based on the communication channel; and receiving the real video stream pulled by the image acquisition device according to the video stream parameters based on the communication channel when receiving a request from the image acquisition device to pull based on the video pull request.
[0013] Optionally, controlling the video simulation device to generate multiple configured video streams based on the real video stream includes: performing multiple copying operations on the real video stream to obtain multiple sample real video streams; obtaining multiple video configuration parameters of the real video stream, wherein the video configuration parameters refer to parameters whose impact on the video picture quality is higher than a preset threshold; using a weighted random algorithm to assign weights to the multiple video configuration parameters to obtain multiple weight assignment results; and changing the parameters of any one of the sample real video streams in turn according to each of the weight assignment results to generate multiple configured video streams.
[0014] According to another aspect of an embodiment of the present invention, a test device for a security system is also provided, comprising: a first acquisition unit, used to control an alarm signal simulation device to parse received test data to obtain test keywords and preset video types corresponding to the test data, wherein the test data is data describing a preset alarm scenario, and the security system is used to monitor and warn of danger in a target monitoring area; a first generation unit, used to control the alarm signal simulation device to generate an alarm signal stream according to the test keyword; a calling unit, used to transmit the alarm signal stream generated by the alarm signal simulation device to a video simulation device by using a signal and video fusion module, so as to control the video simulation device to call a real video stream matching the alarm signal stream according to the alarm signal stream, wherein the real The video stream is a video captured by an image acquisition device that has a communication connection relationship with the video simulation device; a second generation unit is used to control the video simulation device to generate multiple configured video streams based on the real video stream, wherein the configured video stream is a video obtained by configuring according to the real video stream using a preset algorithm; a second acquisition unit is used to input the alarm signal stream and the alarm video stream into the security system to simulate the preset alarm scene and obtain a test result, wherein the alarm video stream includes: the real video stream and the configured video stream; a determination unit is used to determine that the security system meets the preset test requirements when the test result indicates that the alarm video stream retrieved by the security system based on the alarm signal stream meets the preset video type.
[0015] Optionally, the first acquisition unit includes: a first acquisition module, used to control the alarm signal simulation device to parse the received test data to obtain multiple test keywords and test tags carried by the test data, wherein the test keywords include: sensor keywords and alarm signal keywords; a first determination module, used to determine that the video type recorded in the test tag is the preset video type.
[0016] Optionally, the first generating unit comprises: a second determining module, used to determine the data format type of the target sensor according to the sensor keyword in the test keyword; a third determining module, used to determine the keyword-coding format mapping table matching the data format type as the target mapping table, wherein the keyword-coding format mapping table is used to record the mapping relationship between the test keyword and the signal stream encoding; a first generating module, used to control the alarm signal simulation device to generate an original alarm signal stream according to the test keyword and the target mapping table; a second acquiring module, used to perform a format conversion operation on the original alarm signal stream to obtain the alarm signal stream, wherein the format conversion operation is used to convert the signal stream format of the original alarm signal stream into a preset signal stream format, so that the formats of the alarm signal streams received by the video simulation device are all the same.
[0017] Optionally, the calling unit includes: a fourth determination module, used to determine the parameter in the alarm signal stream whose video correlation is higher than a correlation threshold as a target parameter, wherein the video correlation refers to the degree of influence of the parameter on the calling of the real video stream; a first transmission module, used to control the alarm signal simulation device to store the target parameter in a message cache queue, and then transmit the message cache queue to the signal and video fusion module; and a second transmission module, used to control the signal and video fusion module to transmit the message cache queue to the video simulation device.
[0018] Optionally, the calling unit includes: a third acquisition module, used to parse the message cache queue to obtain video stream parameters when the video simulation device receives the message cache queue, wherein the message cache queue is a message queue transmitted by the signal and video fusion module and contains the configured video stream; a pulling module, used to pull the real video stream from the image acquisition device according to the video stream parameters, wherein the configuration parameters of the real video stream correspond to the video stream parameters.
[0019] Optionally, the pulling module includes: a first sending sub-module, used to control the video simulation device to send a communication connection request to the image acquisition device, so as to establish a communication channel for data transmission with the image acquisition device based on the communication connection request; a second sending sub-module, used to send a video pulling request and the video stream parameters to the image acquisition device based on the communication channel; and a pulling sub-module, used to receive the real video stream pulled by the image acquisition device according to the video stream parameters based on the communication channel when receiving a pull request from the image acquisition device based on the video pulling request.
[0020] Optionally, the second generation unit includes: a fourth acquisition module, used to perform multiple copy operations on the real video stream to obtain multiple sample real video streams; a fifth acquisition module, used to obtain multiple video configuration parameters of the real video stream, wherein the video configuration parameters refer to parameters whose impact on the video picture quality is higher than a preset threshold; a sixth acquisition module, used to use a weighted random algorithm to assign weights to the multiple video configuration parameters to obtain multiple weight assignment results; and a second generation module, used to change the parameters of any one of the sample real video streams in turn according to each of the weight assignment results to generate multiple configured video streams.
[0021] According to another aspect of an embodiment of the present invention, a security system testing system is further provided. The security system testing system uses any of the above-mentioned security system testing methods.
[0022] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored program, wherein the program executes any one of the above-mentioned methods for testing a security system.
[0023] According to another aspect of an embodiment of the present invention, a processor is further provided, wherein the processor is used to run a program, wherein the program executes any one of the above-mentioned security system testing methods when running.
[0024] According to another aspect of an embodiment of the present invention, a computer program product is provided, comprising computer instructions, wherein when the computer instructions are executed by a processor, any one of the above-mentioned methods for testing a security system is executed.
[0025] In an embodiment of the present invention, the alarm signal simulation device is controlled to parse the received test data to obtain the preset video type corresponding to the test keyword and the test data, wherein the test data is data describing the preset alarm scene, and the security system is used to monitor and warn the target monitoring area of danger; the alarm signal simulation device is controlled to generate an alarm signal stream according to the test keyword; the alarm signal stream generated by the alarm signal simulation device is transmitted to the video simulation device by using the signal and video fusion module, so as to control the video simulation device to retrieve the real video stream matching the alarm signal stream according to the alarm signal stream, wherein the real video stream is the video collected by the image acquisition device having a communication connection relationship with the video simulation device; the video simulation device is controlled to generate multiple configuration video streams based on the real video stream, wherein the configuration video stream is a video obtained by configuring the real video stream using a preset algorithm; the alarm signal stream and the alarm video stream are input into the security system to simulate the preset alarm scene to obtain the test result, wherein the alarm video stream includes: the real video stream and the configuration video stream; when the test result indicates that the alarm video stream retrieved by the security system based on the alarm signal stream meets the preset video type, it is determined that the security system meets the preset test requirements. Through the above technical scheme, the purpose of testing the security system by parsing the test data input by the user to obtain the alarm signal stream, and retrieving and generating the corresponding alarm video stream is achieved. The technical effect of generating a large number of configured video streams based on a small number of real video streams to enrich the number of video streams, thereby effectively simulating the security system for testing, improves the test efficiency and accuracy, and further solves the technical problem in the related technology that when testing the security system, a large number of camera devices cannot be deployed for data collection and there are many types of test scenarios, resulting in the inability to effectively simulate and affect the test efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0027] Figure 1 It is a schematic diagram of the deployment of security systems in the prior art;
[0028] Figure 2 It is a hardware structure block diagram of a mobile terminal of a security system testing method according to an embodiment of the present invention;
[0029] Figure 3 is a flow chart of a method for testing a security system according to an embodiment of the present invention;
[0030] Figure 4 is a flow chart of an optional security system testing method according to an embodiment of the present invention;
[0031] Figure 5 is a schematic diagram of a sensor signal flow according to an embodiment of the present invention;
[0032] Figure 6 is a schematic diagram of parsing an MQ message queue according to an embodiment of the present invention;
[0033] Figure 7 is a schematic diagram of video configuration parameter weight allocation according to an embodiment of the present invention;
[0034] Figure 8 is a flow chart of another optional security system testing method according to an embodiment of the present invention;
[0035] Fig. 9 is a schematic diagram of alarm type relationships according to an embodiment of the present invention;
[0036] Fig.10 is a schematic diagram of a testing device for a security system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0037] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0038] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0039] As introduced in the background technology, in the related art, when testing the security system, it is impossible to deploy a large number of camera devices for data collection and the test scenarios are too diverse, which results in the inability to effectively perform simulation, affecting the test efficiency and accuracy. In view of the above defects, a test method and device for a security system, and a computer-readable storage medium are provided in the embodiments of the present invention.
[0040] The following is an explanation of some nouns or terms involved in the embodiments of the present invention:
[0041] SDK (Software Development Kit): A software development kit is a collection of tools and resources used to develop specific software. SDK usually includes API (Application Programming Interface), sample code, documentation, etc. to help developers create applications or integrated services.
[0042] FFmpeg: FFmpeg is a cross-platform open source multimedia framework that can be used to process audio, video and streaming media data. It provides a rich set of codecs and tools for video acquisition, encoding, decoding, transcoding and other operations. FFmpeg can also be used to build custom streaming media servers and client applications.
[0043] Streaming Media Service: refers to cloud services that provide streaming media transmission, storage and processing. It can help users stream media content such as audio and video to terminal devices and provide corresponding functions (such as live broadcast, on-demand, transcoding, etc.).
[0044] Video Channel: In video communication, video channel refers to the transmission path of video data. It can be real-time transmission based on network protocol or transmission channel on other physical media.
[0045] Pull and Push Streaming: In video streaming, pull streaming refers to actively obtaining video stream data from the server and transmitting it to the client for playback. Push streaming refers to the client actively sending its own video stream data to the server for other users to watch.
[0046] RTSP (Real Time Streaming Protocol): Real-time streaming protocol is a network protocol for transmitting audio and video data. RTSP allows clients to control and transmit media streams through a request / response model, and supports real-time playback, pause, fast forward and other operations. (Message Queue): Message queue is a middleware solution for asynchronous communication between applications. MQ can send messages to a queue, and the receiver can asynchronously obtain messages from the queue for processing, decoupling the direct dependency between the message sender and the receiver. This can achieve high reliability and high scalability of message delivery and processing.
[0047] Sample video stream: One or more video streams obtained from real cameras that video stream replication relies on.
[0048] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0049] The method embodiments provided in the embodiments of the present invention can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 2 FIG. 1 is a hardware structure block diagram of a mobile terminal of a security system testing method according to an embodiment of the present invention. Figure 2 As shown, the mobile terminal may include one or more ( Figure 2 Only one is shown in the figure) a processor 202 (the processor 202 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 204 for storing data, wherein the mobile terminal may also include a transmission device 206 and an input / output device 208 for communication functions. It can be understood by those skilled in the art that Figure 2 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 2 More or fewer components as shown, or with Figure 2 Different configurations are shown.
[0050] The memory 204 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the test method of the security system in the embodiment of the present invention. The processor 202 executes various functional applications and data processing by running the computer program stored in the memory 204, that is, the above method is implemented. The memory 204 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 204 may further include a memory remotely arranged relative to the processor 202, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 206 is used to receive or send data via a network. The above-mentioned specific example of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 206 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 206 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0051] According to an embodiment of the present invention, a method embodiment of a security system testing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings 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 can be executed in an order different from that shown here.
[0052] Figure 3 is a flow chart of a method for testing a security system according to an embodiment of the present invention. Figure 3 As shown, the method comprises the following steps:
[0053] Step S302, controlling the alarm signal simulation device to parse the received test data to obtain the test keywords and the preset video type corresponding to the test data, wherein the test data is data describing the preset alarm scene, and the security system is used to monitor the target monitoring area and warn of danger.
[0054] In this embodiment, the collaborative cooperation of three modules, namely, an alarm sensor signal simulation device (i.e., an alarm signal simulation device), a camera video stream simulation device (i.e., a video simulation device), and a sensor signal and video simulation linkage simulation device (i.e., a signal and video fusion module), is mainly utilized to realize the function and performance test of the security system; firstly, the test data can be input into the alarm signal simulation device to parse it and obtain test keywords for subsequent simulation of the sensor signal stream, and the video type of the preset alarm scene corresponding to the test data (i.e., the preset video type) can also be obtained to facilitate the subsequent verification of the function and performance of the security system.
[0055] Combine the following Figure 4 The above embodiments of the present invention are described in detail. Figure 4 is a flow chart of an optional security system testing method according to an embodiment of the present invention.
[0056] According to the above embodiment of the present invention, in the above step S302, the alarm signal simulation device is controlled to parse the received test data to obtain the test keywords and the preset video type corresponding to the test data, including: controlling the alarm signal simulation device to parse the received test data to obtain multiple test keywords and test tags carried by the test data, wherein the test keywords include: sensor keywords and alarm signal keywords; determining that the video type recorded in the test tag is a preset video type.
[0057] like Figure 4 As shown, some keyword fields can be pre-set so that the subsequent alarm signal simulation device can directly parse according to the field name after receiving the test data, so as to extract the keywords therein; in order to simulate the alarm scene more realistically, the keywords here can generally be divided into two types: one is keywords related to sensor equipment, such as brand, model, etc., and the other is keywords related to the alarm scene, such as alarm location, alarm channel, alarm type, alarm level, alarm time, etc.; in addition, when parsing the test data, the preset video type can also be determined according to the video type recorded in the tag (test tag) carried by the test data, so as to provide a reference for the subsequent function and performance testing of the security system.
[0058] Step S304, controlling the alarm signal simulation device to generate an alarm signal stream according to the test keyword.
[0059] In this embodiment, the alarm signal simulation device can be controlled to generate a corresponding alarm signal stream according to the parsed test keywords, that is, to convert the format of the original test data into an alarm signal stream in the JSON message body format, so as to facilitate subsequent testing of the security system.
[0060] According to the above embodiment of the present invention, in the above step S304, the alarm signal simulation device is controlled to generate an alarm signal stream according to the test keyword, including: determining the data format type of the target sensor according to the sensor keyword in the test keyword; determining the keyword-coding format mapping table matching the data format type as the target mapping table, wherein the keyword-coding format mapping table is used to record the mapping relationship between the test keyword and the signal stream encoding; the alarm signal simulation device is controlled to generate an original alarm signal stream according to the test keyword and the target mapping table; performing a format conversion operation on the original alarm signal stream to obtain an alarm signal stream, wherein the format conversion operation is used to convert the signal stream format of the original alarm signal stream into a preset signal stream format, so that the formats of the alarm signal streams received by the video simulation device are the same.
[0061] Combine the following Figure 5 The above embodiments of the present invention are described in detail. Figure 5 is a schematic diagram of a sensor signal flow according to an embodiment of the present invention.
[0062] Specifically, most current simulation methods bypass the original sensor signal stream and directly simulate the JSON message body, without simulating the data format of the real sensor and how to standardize the original sensor data format into the JSON message body. Here, the signal stream format and format encoding content of different brands and models can be pre-configured. For example, the location uses the administrative code, and the alarm signal simulation device selects a signal stream format configuration through the previously set keyword field, and converts the parameter simulation that the user needs to simulate into the original sensor signal stream, such as Figure 4 As shown, the specific simulation process is as follows; 1) Generate the original alarm signal stream: Assume that the test data input by the staff is: the alarm sensor of brand A model a generated a first-level smoke alarm in the lobby of office building B at 2025-01-02 02:47:17; the sensor signal stream format of brand A model a in the configuration file (equivalent to the target mapping table) is composed of 28 bits. The original signal stream of the sensor is configured according to the data stream format to generate Figure 5 The original alarm signal stream shown; 2) Standardization of multiple formats of the original signal stream: Since the original alarm signal stream simulated in the test data will be different due to different format lengths corresponding to different brands and models, or different enumeration mapping relationships, but a unified format is required when interacting with the downstream, the signal streams of different formats can be standardized and mapped according to the rule configuration. The processed format is as follows: {"Alarm location": "Office building", "Alarm channel": "Stairway", "Alarm type": "Door always open", "Alarm level": "Level 1", "Alarm time": "2025-01-02 02:47:17", "Signal identification": 0-non-analog signal, 1-analog signal}; After format unification, the alarm signal stream corresponding to the test data can be obtained.
[0063] Step S306, using the signal and video fusion module to transmit the alarm signal stream generated by the alarm signal simulation device to the video simulation device, so as to control the video simulation device to retrieve the real video stream that matches the alarm signal stream according to the alarm signal stream, wherein the real video stream is the video captured by the image acquisition device that has a communication connection relationship with the video simulation device.
[0064] In this embodiment, after the alarm signal simulation device generates an alarm signal stream, the alarm signal stream can be transmitted to the video simulation device through the signal and video fusion module to control the video simulation device to retrieve a sample video stream (i.e., a real video stream) that matches the alarm signal stream according to the alarm signal stream; since a large number of identical camera devices cannot be deployed for data collection during the actual test process, a small number (one or several) of sample video streams can be retrieved here to provide a data basis and reference for the subsequent configuration to generate multiple configuration video streams, thereby avoiding large differences between the generated configuration video stream and the video required to be linked with the alarm signal stream.
[0065] According to the above embodiment of the present invention, in the above step S306, the alarm signal stream generated by the alarm signal simulation device is transmitted to the video simulation device by using the signal and video fusion module, including: determining the parameter in the alarm signal stream whose video correlation is higher than the correlation threshold as the target parameter, wherein the video correlation refers to the degree of influence of the parameter on the retrieval of the real video stream; controlling the alarm signal simulation device to store the target parameter in the message cache queue, and then transmitting the message cache queue to the signal and video fusion module; and controlling the signal and video fusion module to transmit the message cache queue to the video simulation device.
[0066] Specifically, the alarm signal simulation device usually pushes parameters such as IP, port, video channel, etc. related to the video stream to the MQ message queue (i.e., message cache queue), and then transmits the MQ message queue to the video simulation device through the signal and video fusion module, without the need to transmit the completed alarm signal stream.
[0067] According to the above embodiment of the present invention, in the above step S306, the video simulation device is controlled to retrieve the real video stream matching the alarm signal stream according to the alarm signal stream, including: when the video simulation device receives the message cache queue, the message cache queue is parsed to obtain video stream parameters, wherein the message cache queue is a message queue transmitted by the signal and video fusion module and contains the configured video stream; according to the video stream parameters, the real video stream is pulled from the image acquisition device, wherein the configuration parameters of the real video stream correspond to the video stream parameters.
[0068] Combine the following Figure 6 The above embodiments of the present invention are described in detail. Figure 6is a schematic diagram of parsing an MQ message body according to an embodiment of the present invention. After receiving the MQ message body, the video simulation device can Figure 6 The process shown is to parse and process it step by step, based on the parameters such as the IP, port, video channel, etc. of each sample video stream (i.e., video stream parameters).
[0069] In a specific embodiment of the present invention, a real video stream is pulled from an image acquisition device according to video stream parameters, including: controlling a video simulation device to send a communication connection request to the image acquisition device to establish a communication channel for data transmission with the image acquisition device based on the communication connection request; sending a video pull request and video stream parameters to the image acquisition device based on the communication channel; and receiving the real video stream pulled by the image acquisition device according to the video stream parameters based on the communication channel when a request is received to pull based on the video pull request from the image acquisition device.
[0070] Specifically, the video simulation device can obtain the video stream parameters by parsing the MQ message queue, and use a suitable SDK or tool (such as FFmpeg) to pull sample video streams from real video surveillance devices (i.e., image acquisition devices). This is to obtain video data with real visual effects and features, and can also serve as the basis for subsequent video stream replication and parameter modification.
[0071] Step S308, controlling the video simulation device to generate multiple configured video streams based on the real video stream, wherein the configured video stream is a video obtained by configuring the real video stream using a preset algorithm.
[0072] In this embodiment, in order to enrich the number of video streams to improve the accuracy of the test, the sample video streams can be copied and configured using a corresponding algorithm through a video simulation device to generate multiple configured video streams; both the real video stream and the configured video stream can be used as alarm video streams to test the security system.
[0073] According to the above embodiment of the present invention, in the above step S308, the video simulation device is controlled to generate a multi-channel configured video stream based on the real video stream, including: performing multiple copy operations on the real video stream to obtain multiple sample real video streams; obtaining multiple video configuration parameters of the real video stream, wherein the video configuration parameter refers to a parameter whose degree of influence on the video picture quality is higher than a preset threshold; using a weighted random algorithm to weight the multiple video configuration parameters to obtain multiple weight allocation results; and changing the parameters of any one of the sample real video streams in turn according to each weight allocation result to generate a multi-channel configured video stream.
[0074] Combine the following Figure 7 The above embodiments of the present invention are described in detail. Figure 74 is a schematic diagram of video configuration parameter weight allocation according to an embodiment of the present invention.
[0075] Specifically, video configuration parameters can be dynamically generated based on sample video streams. There are two main configuration processes: one is to obtain the access authentication configuration of the device based on the real sample stream; the other is to use a weighted random algorithm to generate a combination of different video parameters and different configurations for processing video parameters during multi-channel simulation, such as Figure 7 As shown, the weights of various video configuration parameters can be randomly generated first, as shown in Table 1 below, and then any parameter weights are selected for summation (assuming that the resolution weight and S = 100%), and then a random number R between (0, S] is randomly generated, and then the weight interval of R and the parameter value is traversed and compared to determine its configuration. After the dynamic loop processing is completed, the multi-channel video parameter configuration can be as follows: video channel 1 configuration (resolution = 720p, bit stream = main bit stream, saturation = 56, contrast = 78), video channel 2 configuration (resolution = 1080p, bit stream = sub-bit stream, saturation = 40, contrast = 82), video channel n configuration (resolution = 4k, bit stream = main bit stream, saturation = 77, contrast = 83).
[0076] For example, assuming that the resolution parameter values are as follows: VGA weight interval (0,14], 720p weight interval (14,60], 1080p weight interval (60,88], 4k weight interval (88,100], if a random number R=26 between (0,S], then the resolution of the configured video stream can be determined to be 720p based on the fact that 26 belongs to the weight interval (14,60].
[0077] Table 1
[0078]
[0079] When obtaining the access authentication configuration of the device based on the real sample stream, the video surveillance device usually has an access control mechanism to ensure that only authorized users or systems can access the video stream. The authentication configuration usually includes user name, password, access token, signature key, etc., which are used to establish a secure communication channel between the device and the requester; in the simulation test, in order to truly simulate the video stream pulling process, the simulation device needs to obtain these authentication information, which can usually be achieved in the following ways: 1) Configuration file reading: The system administrator or tester stores the authentication information of various devices in the configuration file in advance, such as user name and password. When it is necessary to simulate the video stream of a certain device, the simulation device reads the corresponding authentication information from the configuration file; 2) Dynamic authentication: In some cases, the authentication information may need to be dynamically generated each time the access is made. For example, when using the authentication protocol, a temporary access token needs to be generated. The simulation device needs to be able to dynamically generate the correct authentication parameters according to the actual authentication mechanism.
[0080] Step S310, input the alarm signal stream and the alarm video stream into the security system to perform a simulation test on the preset alarm scene to obtain a test result, wherein the alarm video stream includes: a real video stream and a configuration video stream.
[0081] In this embodiment, if Figure 4 As shown, the alarm signal stream and the alarm video stream can be input into the system under test (ie, the security system to be tested) so as to use the security system to perform a simulation test on the preset alarm scenario and obtain the test results.
[0082] Specifically, the test can be conducted from the following three perspectives: 1) After the alarm signal stream is input into the system under test, verify whether the system under test can quickly and accurately identify the alarm type, such as smoke, intrusion, etc., and trigger the corresponding security warning mechanism, such as sending an alarm, starting an emergency plan, etc.; 2) Based on a real video stream, copy and perform diversified configuration processing to obtain multiple video streams related to the real video stream, and then input the real video stream and the multiple video streams obtained by diversified processing into the system under test, verify whether the system under test can correctly parse and display the received video stream, including whether the video resolution, frame rate, bit rate and other parameters match the system settings, and whether the video picture is clear and smooth when previewing multiple video streams at the same time, without obvious delay or freeze; 3) After the alarm signal stream and the alarm video stream are input into the system under test, verify whether the system under test can correctly associate the alarm signal stream with the corresponding alarm video stream, and when an alarm occurs, it can automatically call the associated video surveillance to view the situation at the alarm site in real time, so as to test the system's response mechanism and information integration capabilities in emergency situations.
[0083] Step S312: when the test result indicates that the alarm video stream retrieved by the security system based on the alarm signal stream meets the preset video type, it is determined that the security system meets the preset test requirements.
[0084] Specifically, it is necessary to test the system under test from the above three perspectives. If the test results all indicate that the system under test can meet the corresponding requirements, that is, after the alarm signal stream is input into the system under test, the system under test can quickly and accurately identify the alarm type, such as smoke, intrusion, etc., and trigger the corresponding security warning mechanism, such as sending an alarm, initiating an emergency plan, etc.; after the alarm video stream is input into the system under test, the system under test can correctly parse and display the received alarm video stream, including whether the video resolution, frame rate, bit rate and other parameters match the system settings, and whether the video picture is clear and smooth without obvious delay or freeze; after the alarm signal stream and the alarm video stream are input into the system under test, the system under test can correctly associate the alarm signal stream with the corresponding alarm video stream, and when an alarm occurs, it can automatically call the associated video surveillance to view the situation at the alarm scene in real time, then it can be considered that the performance and functions of the security system meet the requirements.
[0085] From the above, it can be seen that through the technical solution provided by the above embodiment of the present invention, the alarm signal simulation device can be controlled to parse the received test data to obtain the preset video type corresponding to the test keyword and the test data, wherein the test data is data describing the preset alarm scene, and the security system is used to monitor and warn of danger in the target monitoring area; the alarm signal simulation device is controlled to generate an alarm signal stream according to the test keyword; the alarm signal stream generated by the alarm signal simulation device is transmitted to the video simulation device by using the signal and video fusion module, so as to control the video simulation device to retrieve the real video stream matching the alarm signal stream according to the alarm signal stream, wherein the real video stream is the video collected by the image acquisition device that has a communication connection relationship with the video simulation device; the video simulation device is controlled to generate a multi-channel configuration video based on the real video stream Stream, wherein the configured video stream is a video obtained by configuring according to the real video stream using a preset algorithm; the alarm signal stream and the alarm video stream are input into the security system to simulate the preset alarm scene and obtain the test result, wherein the alarm video stream includes: the real video stream and the configured video stream; when the test result indicates that the alarm video stream retrieved by the security system based on the alarm signal stream meets the preset video type, it is determined that the security system meets the preset test requirements, and the purpose of testing the security system by parsing the test data input by the user to obtain the alarm signal stream, and retrieving and generating the corresponding alarm video stream is achieved, and a large number of configured video streams are generated based on a small number of real video streams to enrich the number of video streams, thereby achieving the technical effect of effectively simulating the test of the security system, thereby improving the test efficiency and accuracy.
[0086] Therefore, the technical solution provided by the above-mentioned embodiment of the present invention solves the technical problem in the related art that when testing the security system, a large number of camera devices cannot be deployed for data collection and there are many types of test scenarios, resulting in the inability to effectively perform simulation, thereby affecting the test efficiency and accuracy.
[0087] Combine the following Figure 8 and Fig. 9 The above embodiments of the present invention are further described in detail. Figure 8 is a flowchart of another optional security system testing method according to an embodiment of the present invention, Fig. 9 Schematic diagram of alarm type relationships according to an embodiment of the present invention.
[0088] In the case where the alarm signal simulation device and the multi-channel video simulation device cooperate to test the security system, a fusion module of an alarm sensor simulation device (alarm signal simulation device) and a multi-channel video simulation device can be used to implement the analysis and generation of the alarm signal stream and the alarm video stream, such as Figure 8 As shown, the specific implementation steps are as follows: 1) Alarm sensor multi-signal joint simulation: The alarm signal simulation device uses a directed graph data structure to maintain the linkage relationship between multiple types of alarms. The alarm type linkage relationship is as follows: Fig. 9 As shown in the figure, all graph nodes are different alarm types, where A->B, weight 1 means when A alarm occurs, B alarm will also occur; A->H, weight 0 means there is no association between A and H, and A and H alarm signals will not be generated at the same time; for example, when a smoke alarm occurs, a video occlusion alarm will also occur. When the simulator simulates the alarm signal according to the key field, it finds the alarm type node that needs to be simulated, and then uses the traversal algorithm to traverse all alarm types associated with this alarm type and record the weights. At the same time, it simulates all alarm type signals with a weight of 1 in the traversal path of the current alarm type, and sends the multi-type alarm signals to the signal queue after protocol standardization; 2) Alarm signal synchronization video terminal simulation: parse the multi-type alarm signal message, and supplement the video request related parameters according to the message content, generate the video sensor simulation device request message and send it to the message queue. The video sensor simulation device receives and processes the video stream information corresponding to the generated alarm information.
[0089] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0090] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0091] According to an embodiment of the present invention, a security system testing device for implementing the above security system testing method is also provided. Fig.10 is a schematic diagram of a testing device for a security system according to an embodiment of the present invention. Fig.10 As shown, the device includes: a first acquisition unit 1001, a first generation unit 1003, a call unit 1005, a second generation unit 1007, a second acquisition unit 1009 and a determination unit 1011. The test device for the security system is described in detail below.
[0092] The first acquisition unit 1001 is used to control the alarm signal simulation device to parse the received test data to obtain the test keywords and the preset video type corresponding to the test data, wherein the test data is data describing the preset alarm scene, and the security system is used to monitor the target monitoring area and issue danger warnings.
[0093] The first generating unit 1003 is used to control the alarm signal simulation device to generate an alarm signal stream according to the test keyword.
[0094] The retrieving unit 1005 is used to transmit the alarm signal stream generated by the alarm signal simulation device to the video simulation device by using the signal and video fusion module, so as to control the video simulation device to retrieve the real video stream matching the alarm signal stream according to the alarm signal stream, wherein the real video stream is the video captured by the image acquisition device that has a communication connection relationship with the video simulation device.
[0095] The second generating unit 1007 is used to control the video simulation device to generate multiple configured video streams based on the real video stream, wherein the configured video stream is a video obtained by configuring the real video stream using a preset algorithm.
[0096] The second acquisition unit 1009 is used to input the alarm signal stream and the alarm video stream into the security system to perform a simulation test on the preset alarm scene and obtain the test result, wherein the alarm video stream includes: a real video stream and a configuration video stream.
[0097] The determination unit 1011 is used to determine that the security system meets the preset test requirements when the test result indicates that the alarm video stream retrieved by the security system based on the alarm signal stream meets the preset video type.
[0098] It should be noted here that the above-mentioned first acquisition unit 1001, first generation unit 1003, calling unit 1005, second generation unit 1007, second acquisition unit 1009 and determination unit 1011 correspond to steps S202 to S212 in the above-mentioned embodiments, and the six units are the same as the instances and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the above-mentioned embodiments.
[0099] From the above, it can be seen that in the scheme recorded in the above-mentioned embodiment of the present invention, the first acquisition unit can be used to control the alarm signal simulation device to parse the received test data to obtain the preset video type corresponding to the test keyword and the test data, wherein the test data is data describing the preset alarm scene, and the security system is used to monitor and warn of danger in the target monitoring area; then the first generation unit is used to control the alarm signal simulation device to generate an alarm signal stream according to the test keyword; then the retrieval unit is used to transmit the alarm signal stream generated by the alarm signal simulation device to the video simulation device using the signal and video fusion module, so as to control the video simulation device to retrieve the real video stream matching the alarm signal stream according to the alarm signal stream, wherein the real video stream is the video captured by the image acquisition device that has a communication connection relationship with the video simulation device; then the second generation unit is used to control the video simulation device to generate a real video stream based on the real video stream. The method comprises the following steps: forming a plurality of configured video streams, wherein the configured video stream is a video obtained by configuring the real video stream using a preset algorithm; then using the second acquisition unit to input the alarm signal stream and the alarm video stream into the security system to simulate the preset alarm scene and obtain the test result, wherein the alarm video stream includes: a real video stream and a configured video stream; finally, using the determination unit, when the test result indicates that the alarm video stream retrieved by the security system based on the alarm signal stream meets the preset video type, it is determined that the security system meets the preset test requirements, and the purpose of testing the security system by parsing the test data input by the user, obtaining the alarm signal stream, and retrieving and generating the corresponding alarm video stream is achieved, and a large number of configured video streams are generated based on a small number of real video streams to enrich the number of video streams, thereby achieving the technical effect of effectively simulating the test of the security system, thereby improving the test efficiency and accuracy.
[0100] Therefore, the technical solution provided by the above-mentioned embodiment of the present invention solves the technical problem in the related art that when testing the security system, a large number of camera devices cannot be deployed for data collection and there are many types of test scenarios, resulting in the inability to effectively perform simulation, thereby affecting the test efficiency and accuracy.
[0101] In an optional embodiment of the present invention, the first acquisition unit includes: a first acquisition module, used to control the alarm signal simulation device to parse the received test data to obtain multiple test keywords and test tags carried by the test data, wherein the test keywords include: sensor keywords and alarm signal keywords; a first determination module, used to determine that the video type recorded in the test tag is a preset video type.
[0102] In an optional embodiment of the present invention, a first generating unit comprises: a second determining module, used to determine the data format type of the target sensor according to the sensor keyword in the test keyword; a third determining module, used to determine the keyword-coding format mapping table matching the data format type as the target mapping table, wherein the keyword-coding format mapping table is used to record the mapping relationship between the test keyword and the signal stream encoding; a first generating module, used to control the alarm signal simulation device to generate the original alarm signal stream according to the test keyword and the target mapping table; a second acquiring module, used to perform a format conversion operation on the original alarm signal stream to obtain the alarm signal stream, wherein the format conversion operation is used to convert the signal stream format of the original alarm signal stream into a preset signal stream format, so that the formats of the alarm signal streams received by the video simulation device are all the same.
[0103] In an optional embodiment of the present invention, the calling unit includes: a fourth determination module, used to determine the parameter in the alarm signal stream whose video correlation is higher than the correlation threshold as the target parameter, wherein the video correlation refers to the degree of influence of the parameter on the calling of the real video stream; a first transmission module, used to control the alarm signal simulation device to store the target parameter in the message cache queue, and then transmit the message cache queue to the signal and video fusion module; a second transmission module, used to control the signal and video fusion module to transmit the message cache queue to the video simulation device.
[0104] In an optional embodiment of the present invention, the calling unit includes: a third acquisition module, which is used to parse the message cache queue to obtain video stream parameters when the video simulation device receives the message cache queue, wherein the message cache queue is a message queue transmitted by the signal and video fusion module and contains the configured video stream; a pulling module, which is used to pull the real video stream from the image acquisition device according to the video stream parameters, wherein the configuration parameters of the real video stream correspond to the video stream parameters.
[0105] In an optional embodiment of the present invention, the pulling module includes: a first sending submodule, used to control the video simulation device to send a communication connection request to the image acquisition device, so as to establish a communication channel for data transmission with the image acquisition device based on the communication connection request; a second sending submodule, used to send a video pulling request and video stream parameters to the image acquisition device based on the communication channel; a pulling submodule, used to receive the real video stream pulled by the image acquisition device according to the video stream parameters based on the communication channel when receiving the image acquisition device pulling based on the video pulling request.
[0106] In an optional embodiment of the present invention, the second generation unit includes: a fourth acquisition module, which is used to perform multiple copy operations on the real video stream to obtain multiple sample real video streams; a fifth acquisition module, which is used to obtain multiple video configuration parameters of the real video stream, wherein the video configuration parameter refers to a parameter whose degree of influence on the video picture quality is higher than a preset threshold; a sixth acquisition module, which is used to use a weighted random algorithm to assign weights to multiple video configuration parameters to obtain multiple weight assignment results; and a second generation module, which is used to change the parameters of any sample real video stream in turn according to each weight assignment result to generate a multi-channel configured video stream.
[0107] According to another aspect of an embodiment of the present invention, a security system testing system is further provided. The security system testing system uses any of the above-mentioned security system testing methods.
[0108] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, the computer-readable storage medium comprising a stored program, wherein the program executes any one of the above-mentioned security system testing methods.
[0109] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the communication devices in a communication device group.
[0110] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: controlling the alarm signal simulation device to parse the received test data to obtain a test keyword and a preset video type corresponding to the test data, wherein the test data is data describing a preset alarm scenario, and the security system is used to monitor and warn of dangers in a target monitoring area; controlling the alarm signal simulation device to generate an alarm signal stream according to the test keyword; and utilizing the signal and video fusion module to transmit the alarm signal stream generated by the alarm signal simulation device to the video simulation device, so as to control the video simulation device to retrieve a true video that matches the alarm signal stream according to the alarm signal stream. A real video stream, wherein the real video stream is a video captured by an image acquisition device that has a communication connection relationship with the video simulation device; the video simulation device is controlled to generate multiple configured video streams based on the real video stream, wherein the configured video stream is a video configured according to the real video stream using a preset algorithm; the alarm signal stream and the alarm video stream are input into the security system to simulate the preset alarm scene and obtain the test result, wherein the alarm video stream includes: a real video stream and a configured video stream; when the test result indicates that the alarm video stream retrieved by the security system based on the alarm signal stream meets the preset video type, it is determined that the security system meets the preset test requirements.
[0111] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: controlling the alarm signal simulation device to parse the received test data to obtain multiple test keywords and test tags carried by the test data, wherein the test keywords include: sensor keywords and alarm signal keywords; determining that the video type recorded in the test tag is a preset video type.
[0112] Optionally, in this embodiment, a computer-readable storage medium is configured to store program codes for executing the following steps: determining a data format type of a target sensor based on a sensor keyword in a test keyword; determining a keyword-coding format mapping table that matches the data format type as a target mapping table, wherein the keyword-coding format mapping table is used to record a mapping relationship between test keywords and signal stream encodings; controlling the alarm signal simulation device to generate an original alarm signal stream based on the test keywords and the target mapping table; performing a format conversion operation on the original alarm signal stream to obtain an alarm signal stream, wherein the format conversion operation is used to convert the signal stream format of the original alarm signal stream into a preset signal stream format so that the formats of the alarm signal streams received by the video simulation device are all the same.
[0113] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: determining a parameter in the alarm signal stream whose video correlation is higher than a correlation threshold as a target parameter, wherein the video correlation refers to the degree of influence of the parameter on retrieving the real video stream; controlling the alarm signal simulation device to store the target parameter in a message cache queue, and then transmitting the message cache queue to the signal and video fusion module; and controlling the signal and video fusion module to transmit the message cache queue to the video simulation device.
[0114] Optionally, in this embodiment, a computer-readable storage medium is configured to store program codes for executing the following steps: when the video simulation device receives a message cache queue, parsing the message cache queue to obtain video stream parameters, wherein the message cache queue is a message queue transmitted by a signal and video fusion module and contains a configured video stream; pulling a real video stream from an image acquisition device according to the video stream parameters, wherein the configuration parameters of the real video stream correspond to the video stream parameters.
[0115] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: controlling the video simulation device to send a communication connection request to the image acquisition device to establish a communication channel for data transmission with the image acquisition device based on the communication connection request; sending a video pull request and video stream parameters to the image acquisition device based on the communication channel; and receiving a real video stream pulled by the image acquisition device according to the video stream parameters based on the communication channel in the case of receiving a pull request based on the video pull request from the image acquisition device.
[0116] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: performing multiple copy operations on the real video stream to obtain multiple sample real video streams; obtaining multiple video configuration parameters of the real video stream, wherein the video configuration parameter refers to a parameter whose degree of influence on the video picture quality is higher than a preset threshold; using a weighted random algorithm to weight the multiple video configuration parameters to obtain multiple weighted allocation results; and changing the parameters of any one of the sample real video streams in turn according to each weighted allocation result to generate a multi-channel configured video stream.
[0117] According to another aspect of an embodiment of the present invention, a processor is further provided, and the processor is used to run a program, wherein when the program is run, any one of the above-mentioned security system testing methods is executed.
[0118] According to another aspect of an embodiment of the present invention, a computer program product is provided, including computer instructions, and when the computer instructions are executed by a processor, any one of the above-mentioned security system testing methods is executed.
[0119] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0120] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0121] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0122] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0123] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0124] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0125] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for testing a security system, characterized in that: include: The control alarm signal simulation device parses the received test data to obtain a test keyword and a preset video type corresponding to the test data, wherein the test data is data describing a preset alarm scenario, and the security system is used to monitor the target monitoring area and provide a danger warning; Controlling the alarm signal simulation device to generate an alarm signal stream according to the test keyword; The alarm signal stream generated by the alarm signal simulation device is transmitted to the video simulation device by using a signal and video fusion module, so as to control the video simulation device to retrieve a real video stream matching the alarm signal stream according to the alarm signal stream, wherein the real video stream is a video captured by an image acquisition device having a communication connection relationship with the video simulation device; Controlling the video simulation device to generate multiple configured video streams based on the real video stream, wherein the configured video stream is a video obtained by configuring the real video stream using a preset algorithm; Inputting the alarm signal stream and the alarm video stream into the security system to perform a simulation test on the preset alarm scenario to obtain a test result, wherein the alarm video stream includes: the real video stream and the configuration video stream; In a case where the test result indicates that the alarm video stream retrieved by the security system based on the alarm signal stream meets the preset video type, it is determined that the security system meets the preset test requirements.
2. The security system testing method according to claim 1, characterized in that: Controlling the alarm signal simulation device to parse the received test data to obtain a test keyword and a preset video type corresponding to the test data, including: Controlling the alarm signal simulation device to parse the received test data to obtain a plurality of test keywords and test tags carried by the test data, wherein the test keywords include: sensor keywords and alarm signal keywords; Determine that the video type recorded in the test tag is the preset video type.
3. The security system testing method according to claim 1, characterized in that: Controlling the alarm signal simulation device to generate an alarm signal stream according to the test keyword comprises: Determine the data format type of the target sensor according to the sensor keyword in the test keyword; Determine a keyword-coding format mapping table matching the data format type as a target mapping table, wherein the keyword-coding format mapping table is used to record a mapping relationship between the test keyword and the signal stream coding; Controlling the alarm signal simulation device to generate an original alarm signal stream according to the test keyword and the target mapping table; A format conversion operation is performed on the original alarm signal stream to obtain the alarm signal stream, wherein the format conversion operation is used to convert the signal stream format of the original alarm signal stream into a preset signal stream format so that the formats of the alarm signal streams received by the video simulation device are all the same.
4. The security system testing method according to claim 1, characterized in that: The method of transmitting the alarm signal stream generated by the alarm signal simulation device to the video simulation device by using the signal and video fusion module comprises: Determine a parameter in the alarm signal stream whose video correlation is higher than a correlation threshold as a target parameter, wherein the video correlation refers to the degree of influence of the parameter on retrieving the real video stream; Controlling the alarm signal to simulate the device to store the target parameters in a message buffer queue, and then transmitting the message buffer queue to the signal and video fusion module; The signal and video fusion module is controlled to transmit the message buffer queue to the video simulation device.
5. The security system testing method according to claim 1, characterized in that: Controlling the video simulation device to retrieve a real video stream matching the alarm signal stream according to the alarm signal stream comprises: When the video simulation device receives a message cache queue, the message cache queue is parsed to obtain a video stream parameter, wherein the message cache queue is a message queue transmitted by the signal and video fusion module and contains the configured video stream; The real video stream is pulled from the image acquisition device according to the video stream parameters, wherein the configuration parameters of the real video stream correspond to the video stream parameters.
6. The security system testing method according to claim 5, characterized in that: Pulling the real video stream from the image acquisition device according to the video stream parameter includes: Controlling the video simulation device to send a communication connection request to the image acquisition device, so as to establish a communication channel for data transmission with the image acquisition device based on the communication connection request; Sending a video pull request and the video stream parameters to the image acquisition device based on the communication channel; In case of receiving the image acquisition device pulling based on the video pulling request, the real video stream pulled by the image acquisition device according to the video stream parameters is received based on the communication channel.
7. The security system testing method according to claim 1, characterized in that: Controlling the video simulation device to generate a multi-channel configuration video stream based on the real video stream, comprising: Performing multiple copy operations on the real video stream to obtain multiple sample real video streams; Acquire multiple video configuration parameters of the real video stream, wherein the video configuration parameters refer to parameters whose influence on the video picture quality is higher than a preset threshold; Using a weight random algorithm to perform weight distribution on the plurality of video configuration parameters to obtain a plurality of weight distribution results; According to each of the weight distribution results, parameters of any one of the sample real video streams are changed in turn to generate multiple channels of the configured video streams.
8. A test device for a security system, characterized in that: include: A first acquisition unit is used to control the alarm signal simulation device to parse the received test data to obtain a test keyword and a preset video type corresponding to the test data, wherein the test data is data describing a preset alarm scene, and the security system is used to monitor the target monitoring area and provide a danger warning; A first generating unit, used for controlling the alarm signal simulation device to generate an alarm signal stream according to the test keyword; A calling unit, used for transmitting the alarm signal stream generated by the alarm signal simulation device to the video simulation device by using a signal and video fusion module, so as to control the video simulation device to call a real video stream matching the alarm signal stream according to the alarm signal stream, wherein the real video stream is a video collected by an image acquisition device having a communication connection relationship with the video simulation device; A second generating unit is used to control the video simulation device to generate multiple configured video streams based on the real video stream, wherein the configured video stream is a video obtained by configuring the real video stream using a preset algorithm; A second acquisition unit is used to input the alarm signal stream and the alarm video stream into the security system to perform a simulation test on the preset alarm scene to obtain a test result, wherein the alarm video stream includes: the real video stream and the configuration video stream; A determination unit is used to determine that the security system meets the preset test requirements when the test result indicates that the alarm video stream retrieved by the security system based on the alarm signal stream meets the preset video type.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the security system testing method according to any one of claims 1 to 7.
10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the security system testing method according to any one of claims 1 to 7 is performed.
Citation Information
Cited By
Linkage test method of security camera and alarm for cultural relics and ancient buildings
CN121999570A
Linkage test method of security camera and alarm for cultural relics and ancient buildings
CN121999570B