Digital retinal camera simulation method and related equipment

By sharing video simulation and program containers, the problem of high resource occupancy when simulating a large number of camera equipment is solved, the efficiency of video simulation and algorithm operation is improved, and the system's efficient testing capabilities in large-scale device access scenarios are realized.

CN119544890BActive Publication Date: 2025-04-22PENG CHENG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510067039.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-16
Publication Date
2025-04-22
Estimated Expiration
2045-01-16

AI Technical Summary

Technical Problem

When current technology simulates a large number of camera equipment, the resource occupancy rate surges, resulting in reduced video simulation and algorithm operation efficiency, and may even cause failure, limiting the system's effective testing capabilities in large-scale device access scenarios.

Method used

By sharing video simulation and program containers, resource sharing between multiple camera simulation devices is realized, multiple program containers are created to process target video streams and generate algorithm analysis results, reducing system load and memory usage.

Benefits of technology

It improves the efficiency of video simulation and algorithm operation, effectively improves the system's testing capabilities in large-scale device access scenarios, avoids the situation where each device loads and runs the algorithm separately, thereby reducing system overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544890B_ABST
    Figure CN119544890B_ABST
Patent Text Reader

Abstract

The present application provides a digital retinal camera simulation method, apparatus, device and storage medium, including: receiving a simulation number, a simulation video identifier, a simulation mode and an algorithm parameter in a camera simulation instruction; creating multiple camera simulation devices according to the simulation number; obtaining a target video with a non-repetitive video identifier based on the simulation video identifier, and generating a target video stream according to the simulation mode; implementing a unified download and update of the algorithm based on the algorithm parameters and an algorithm database to obtain a target algorithm package; forming a container identifier according to the simulation video identifier and the algorithm identifier in the algorithm parameters, creating a program container with a non-repetitive container identifier, and using the target algorithm package in the container to process the target video stream to obtain an analysis result; the camera simulation device subscribes to the analysis result according to the simulation video identifier and the algorithm identifier. The entire process reduces system overhead and effectively improves the simulation capability of the system by sharing video simulation and program containers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of camera simulation technology, and in particular to a digital retinal camera simulation method and related equipment. Background Art

[0002] Traditional centralized data processing methods based on cloud computing face problems such as limited network bandwidth, high data transmission costs, and real-time applications that cannot tolerate high latency. To address these problems, digital retina technology came into being. Digital retina technology moves computing power and data processing capabilities from the cloud to the end side close to the data source, which can achieve real-time analysis and processing of visual big data to reduce latency, bandwidth requirements and transmission costs. Among them, due to the cost and efficiency issues of a large number of hardware devices actually deployed in digital retinas, the simulator is mainly used for the development and testing of digital retina algorithms.

[0003] However, current technical means involve simulating each test device in an isolated container. Each container is set up as an independent virtual environment, which integrates the operating environment and video data for result analysis and processing. However, when a large number of devices need to be simulated at the same time, this approach of multiple independent containers will cause a surge in resource utilization, which will significantly reduce the efficiency of video simulation and algorithm operation, and may even cause failures, limiting the system's effective testing capabilities in large-scale device access scenarios. Summary of the invention

[0004] The embodiment of the present application provides a digital retinal camera simulation method, which can enable multiple camera simulation devices to obtain corresponding algorithm analysis results by sharing video simulation and program containers, thereby improving the efficiency of video simulation and algorithm operation, and effectively improving the system's testing capabilities in large-scale device access scenarios.

[0005] To achieve the above-mentioned purpose, the first aspect of an embodiment of the present application provides a digital retinal camera simulation method, including: receiving a camera simulation instruction, the camera simulation instruction including a simulation quantity, a simulation video identifier, a simulation mode and an algorithm parameter; creating multiple camera simulation devices according to the simulation quantity; obtaining multiple target videos with non-repetitive video identifiers based on the multiple simulation video identifiers, and generating multiple target video streams according to the multiple target videos and the corresponding simulation modes; performing unified download and update processing of the algorithm based on the algorithm parameters and a preset algorithm database to obtain target algorithm packages corresponding to the multiple camera simulation devices; forming a container identifier according to the simulation video identifier and the algorithm identifier in the algorithm parameters, creating multiple program containers with non-repetitive container identifiers, and using the target algorithm package in the multiple program containers to process the target video stream to obtain an algorithm analysis result, so that the camera simulation device subscribes to the algorithm analysis result according to the simulation video identifier and the algorithm identifier.

[0006] In some embodiments, after obtaining multiple target videos with non-repetitive video identifiers based on multiple simulated video identifiers, and generating multiple target video streams according to the multiple target videos and the corresponding simulation methods, it also includes: pushing the multiple target video streams to preset streaming media.

[0007] In some embodiments, the unified download and update processing of the algorithm is performed based on the algorithm parameters and the preset algorithm database to obtain the target algorithm packages corresponding to the multiple camera simulation devices, including: obtaining the algorithm identifiers and algorithm version information of the multiple camera simulation devices according to the algorithm parameters; searching the local algorithm database for the corresponding algorithm data packets for the multiple algorithm identifiers; when the corresponding algorithm data packet cannot be found from the local algorithm database according to the algorithm identifier, downloading the corresponding algorithm data packet from the remote algorithm database to the local algorithm database; or, when the version information of the found algorithm data packet does not match the algorithm version information, updating the algorithm data packet corresponding to the current algorithm identifier in the local algorithm database.

[0008] In some embodiments, forming a container identifier according to the simulated video identifier and the algorithm identifier in the algorithm parameters, and creating multiple program containers with non-repeating container identifiers include: obtaining multiple container identifiers according to the simulated video identifiers of multiple camera simulation devices and the algorithm identifier in the algorithm parameters, traversing all existing program containers, and creating multiple program containers with non-repeating container identifiers; wherein the process of creating multiple program containers with non-repeating container identifiers is as follows: determining whether the algorithm identifiers are the same, and if the algorithm identifiers are different, creating a program container according to the algorithm identifier and the simulated video identifier; if the algorithm identifiers are the same, determining whether the simulated video identifiers are the same, and if they are different, creating a program container according to the algorithm identifier and the simulated video identifier; and if the algorithm identifier and the simulated video identifier are the same, using an existing program container.

[0009] In some embodiments, the use of the target algorithm package in multiple program containers to process the target video stream to obtain an algorithm analysis result includes: in multiple program containers, pulling multiple target video streams through the algorithm program constructed by the target algorithm package; extracting visual data features of the target video stream based on a deep learning model, and obtaining an algorithm analysis result based on the visual data features.

[0010] In some embodiments, the camera simulation device subscribes to the algorithm analysis result according to the simulated video identifier and the algorithm identifier, including: the program container publishes the algorithm analysis result to a memory message queue; the camera simulation device subscribes to the algorithm analysis result in the memory message queue according to the simulated video identifier and the algorithm identifier.

[0011] In some embodiments, the video identifiers of the multiple target videos are different, the algorithm identifiers of the multiple target algorithm packages are different, the container identifiers of the multiple program containers are different, and the number of the target videos, the number of the target algorithm packages, and the number of the program containers are equal to or less than the number of the camera simulation devices.

[0012] To achieve the above-mentioned purpose, the second aspect of an embodiment of the present application provides a digital retinal camera simulation device, including: a camera simulation module, used to receive a camera simulation instruction, the camera simulation instruction including a simulation quantity, a simulation video identifier, a simulation mode and an algorithm parameter; create multiple camera simulation devices according to the simulation quantity; a target video stream simulation module, used to obtain multiple target videos with non-repeating video identifiers based on multiple simulated video identifiers, and generate multiple target video streams according to the multiple target videos and the corresponding simulation modes; an algorithm management module, used to perform unified download and update processing of algorithms based on the algorithm parameters and a preset algorithm database, and obtain target algorithm packages corresponding to the multiple camera simulation devices; an algorithm program execution module, used to form a container identifier according to the simulated video identifier and the algorithm identifier in the algorithm parameters, create multiple program containers with non-repeating container identifiers, and use the target algorithm package in the multiple program containers to process the target video stream to obtain an algorithm analysis result, so that the camera simulation device subscribes to the algorithm analysis result according to the simulated video identifier and the algorithm identifier.

[0013] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application provides an electronic device, comprising: at least one processor; at least one memory for storing at least one program; when at least one of the programs is executed by at least one of the processors, a digital retinal camera simulation method as described in any one of the first aspects is implemented.

[0014] To achieve the above-mentioned purpose, a fourth aspect of an embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the digital retinal camera simulation method as described in any one of the first aspects.

[0015] The embodiment of the present application provides a digital retinal camera simulation method and related equipment, which can receive a camera simulation instruction, which includes a simulation number, a simulation video identifier, a simulation method and algorithm parameters; create multiple camera simulation devices according to the simulation number; obtain multiple target videos with non-repetitive video identifiers based on the multiple simulation video identifiers, and generate multiple target video streams according to the multiple target videos and the corresponding simulation methods; perform unified download and update processing of the algorithm based on the algorithm parameters and a preset algorithm database to obtain target algorithm packages corresponding to the multiple camera simulation devices; form a container identifier according to the simulation video identifier and the algorithm identifier in the algorithm parameters, create multiple program containers with non-repetitive container identifiers, and use the target algorithm package in the multiple program containers to process the target video stream to obtain algorithm analysis results, so that the camera simulation device can generate a target video stream according to the simulation video identifier. Identification and algorithm identification subscribe to algorithm analysis results; wherein, the present application can create a specified number of camera simulation devices according to test needs, and load target videos for multiple camera simulation devices based on the simulated video identification, reuse the loaded target videos, realize the sharing of video simulation, reduce system load and memory usage, and thus improve simulation efficiency; further, after uniformly downloading and updating the target algorithm package obtained by the processing, the present application can create multiple program containers with non-repeated container identifications, so that the same simulated video and the same algorithm only need to run the target algorithm package once in the corresponding container to process the target video stream, thereby realizing the sharing of program containers and avoiding the situation where each device loads and runs the algorithm separately, thereby reducing system overhead, improving the efficiency of video simulation and algorithm operation, and effectively improving the system's testing capabilities in large-scale device access scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A method flow chart of a digital retinal camera simulation method provided in one embodiment of the present application;

[0017] Figure 2 A flow chart of a method for loading a corresponding target video in a digital retinal camera simulation method provided in an embodiment of the present application;

[0018] Figure 3 A flow chart of a method for obtaining a target algorithm package in a digital retinal camera simulation method provided in an embodiment of the present application;

[0019] Figure 4 A flowchart of a method for creating a program container in a digital retinal camera simulation method provided in an embodiment of the present application;

[0020] Figure 5 A flowchart of a method for subscribing to an algorithm analysis result in a digital retinal camera simulation method provided in an embodiment of the present application;

[0021] Figure 6 An example flow chart of a digital retinal camera simulation method provided in an embodiment of the present application in the stage of simulating a target video stream;

[0022] Figure 7 An example flow chart of a digital retinal camera simulation method provided in an embodiment of the present application in the simulation and sending update algorithm stage;

[0023] Figure 8 An example flow chart of a digital retinal camera simulation method provided in an embodiment of the present application at the simulation operation algorithm stage;

[0024] Fig. 9 A schematic diagram of system modules corresponding to the digital retinal camera simulation method provided in one embodiment of the present application;

[0025] Fig.10 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0027] In some embodiments, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms first, second, etc. in the specification, claims and the above drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0028] In addition, unless otherwise clearly specified and limited, the term "connected" should be understood in a broad sense. For example, it can be a fixed connection or a movable connection, a detachable connection or a non-detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection, or the two can communicate with each other; it can be a direct connection or an indirect connection through an intermediate medium.

[0029] In the description of the embodiments of the present application, the description of reference terms "one embodiment / implementation", "another embodiment / implementation" or "certain embodiments / implementations", "in the above embodiments / implementations", etc. means that the specific features, structures, materials or characteristics described in combination with the implementation or example are included in at least two embodiments or implementations disclosed in the present application. In the disclosure of this application, the schematic representation of the above terms does not necessarily refer to the same embodiment or implementation. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that in the flowchart.

[0030] The traditional centralized data processing method based on cloud computing faces problems such as limited network bandwidth, high data transmission costs, and real-time applications cannot tolerate high latency. To address these problems, digital retina technology came into being. By moving computing power and data processing capabilities from the cloud to the end side close to the data source, digital retina technology can realize real-time analysis and processing of visual big data to reduce latency, bandwidth requirements and transmission costs. Among them, due to the cost and efficiency issues of a large number of hardware devices actually deployed for digital retina, simulators are mainly used for the development and testing of digital retina algorithms. However, the current technical means involve simulating each test device in an isolated container. Each container is set up as an independent virtual environment, which integrates the operating environment and video data for result analysis and processing. However, when a large number of devices need to be simulated at the same time, this approach of multiple independent containers will lead to a surge in resource usage, which significantly reduces the efficiency of video simulation and algorithm operation, and may even cause failures, limiting the system's effective testing capabilities in large-scale device access scenarios.

[0031] Based on this, an embodiment of the present application provides a digital retinal camera simulation method, which can enable multiple camera simulation devices to obtain corresponding algorithm analysis results by sharing video simulation and program containers, thereby improving the efficiency of video simulation and algorithm operation, and effectively improving the system's testing capabilities in large-scale device access scenarios.

[0032] refer to Figure 1 , Figure 1 A method flow chart of a digital retinal camera simulation method provided in an embodiment of the present application; a first aspect of an embodiment of the present application provides a digital retinal camera simulation method, including but not limited to the following steps:

[0033] Step S110, receiving a camera simulation instruction, the camera simulation instruction including a simulation quantity, a simulation video identifier, a simulation mode and an algorithm parameter;

[0034] Step S120, creating multiple camera simulation devices according to the simulation quantity;

[0035] Step S130, obtaining a plurality of target videos with non-repeated video identifiers based on the plurality of simulated video identifiers, and generating a plurality of target video streams according to the plurality of target videos and corresponding simulation modes;

[0036] Step S140, performing unified download and update processing of the algorithm based on the algorithm parameters and the preset algorithm database to obtain target algorithm packages corresponding to the multiple camera simulation devices;

[0037] Step S150, forming a container identifier according to the simulated video identifier and the algorithm identifier in the algorithm parameters, creating multiple program containers with non-repeating container identifiers, and using the target algorithm package in the multiple program containers to process the target video stream to obtain an algorithm analysis result, so that the camera simulation device subscribes to the algorithm analysis result according to the simulated video identifier and the algorithm identifier.

[0038] Among them, the camera simulation instruction is an instruction for starting a virtual camera in a simulated environment, which includes various parameter information required to create a simulated camera. The simulation quantity can be the number of virtual cameras that need to be created; the simulated video identifier is the source information of the target video stream used for simulation, which can be a pre-recorded video clip or a target video stream generated in real time; the simulation method is how to generate the target video stream, such as whether to use real-time rendering, whether to read from a file, etc.; the algorithm parameters are used to adjust and configure the algorithm applied to the target video stream, which can include requirements for detection accuracy, processing speed, etc.; the camera simulation device is a virtual camera instance object, which represents a real camera in the simulated environment; the target video is each The target video stream source is assigned by the camera simulation device; the target video stream is a continuous sequence of image frames, which can be captured in real time or read from a storage medium; the algorithm database is a collection of stored algorithm codes and configurations, which are used to perform video analysis tasks. The target algorithm package is a collection of algorithms assigned to each camera simulation device to perform specific video processing tasks; the program container is an independent program running environment, in which the algorithm is run without affecting the rest of the system, for example, a Docker container; the algorithm analysis result is the data or conclusion obtained after the algorithm is processed, which can be used for recognition, classification or other forms of decision support, and can be used to implement the functions of digital retinal cameras, which can imitate certain characteristics of the human visual system to process video information.

[0039] According to the digital retinal camera simulation method provided in the embodiment of the present application, by receiving instructions including simulation quantity, simulation video identification, simulation mode and algorithm parameters, it is possible to accurately create a camera simulation environment that meets specific testing requirements, so as to test various scenarios and ensure the accuracy and reliability of the simulation environment.

[0040] It should be noted that, by creating multiple camera simulation devices according to the simulation quantity, that is, creating a specified number of camera simulation devices according to test needs, the present application can simulate different types of camera devices according to actual application scenarios, thereby being closer to the actual usage environment; further, based on multiple simulated video identifiers, multiple target videos with non-repetitive video identifiers are obtained, and multiple target video streams are generated according to multiple target videos and corresponding simulation methods. At the same time, some camera simulation devices corresponding to the same target video can share and reuse the loaded target videos after the target video is loaded for the first time, so as to load the target video for multiple camera simulation devices, thereby generating target video streams that meet the test requirements according to multiple target videos and corresponding simulation methods, so as to reduce the time and resource consumption of video loading, and effectively improve the efficiency of video simulation.

[0041] It should be noted that by uniformly downloading and updating the algorithms based on the algorithm parameters and the preset algorithm database, target algorithm packages corresponding to multiple camera simulation devices can be obtained. This can realize unified updating and management of the algorithms, and enable some camera simulation devices corresponding to the same algorithm program to share and reuse the loaded target algorithm packages after the target algorithm packages are loaded for the first time, thereby reducing the time and resource consumption of program loading.

[0042] It should be noted that by forming a container identifier based on the simulated video identifier and the algorithm identifier in the algorithm parameters, and creating multiple program containers with non-duplicate container identifiers, the algorithm program can be separated while achieving resource sharing and isolation, so that multiple digital retinal camera simulation devices can share the same algorithm program. For multiple devices, the same simulated video and the same algorithm only need to run the algorithm once in the same program container, and then the processed data can be directly read from the memory message queue to obtain the algorithm analysis results for realizing the digital retinal camera function, thereby effectively reducing the number of independent containers generated in large-scale device access scenarios, reducing their memory usage, and improving system resource utilization to meet the needs of single-machine simulation of a large number of test devices, so that multiple devices can share the same set of target algorithm packages and program containers, avoiding the situation where each device loads and runs the algorithm separately, thereby improving the efficiency of video simulation and algorithm operation, and effectively improving the system's testing capabilities in large-scale device access scenarios.

[0043] It should be noted that the container identifier is a unique identifier generated based on the simulated video identifier and the algorithm identifier in the algorithm parameters. This identifier is used to ensure that there is no duplication between the multiple program containers created, so that the algorithm program can be shared between different camera simulation devices. In other words, when multiple devices need to use the same target video and the same algorithm, they only need to run the algorithm processing in one program container, which can reduce memory usage as much as possible and improve system resource utilization to meet the needs of simulating a large number of test devices on a single machine.

[0044] In some embodiments, a target algorithm package is used in multiple program containers to process a target video stream to obtain an algorithm analysis result, including: in each program container, the target video stream read in real time is input into an algorithm program constructed by a corresponding target algorithm package, so that the algorithm program extracts visual data features of the target video stream based on a preset deep learning model during real-time processing of the target video stream, and obtains an algorithm analysis result based on the visual data features.

[0045] In some embodiments, the video identifiers of multiple target videos are different, the algorithm identifiers of multiple target algorithm packages are different, the container identifiers of multiple program containers are different, the number of target videos, the number of target algorithm packages, and the number of program containers are equal to or less than the number of camera simulation devices. It can be understood that since some camera simulation devices can share the same target video, the number of target videos can be less than the number of camera simulation devices. Multiple camera simulation devices can use the same algorithm package and program container. If multiple devices need to process the same target video stream and use the same algorithm, only one target algorithm package and one program container are needed, thereby reducing overall resource consumption. When multiple devices process the same video and use the same algorithm, the execution logic of the algorithm can be optimized so that the algorithm only needs to be run once to serve all related devices, which can significantly improve the utilization of system resources, reduce memory usage, and meet the needs of simulating a large number of test devices on a single machine.

[0046] It should be noted that the present application performs unified download and update processing of the algorithm based on the algorithm parameters and the preset algorithm database to obtain the target algorithm packages corresponding to multiple camera simulation devices. That is, by separating the newly added algorithm management components, the algorithm model can be centrally managed and updated, avoiding separate algorithm maintenance operations for each individual simulation device, simplifying the maintenance process and improving management efficiency. The entire process reduces system overhead and effectively improves the simulation capabilities of the system by sharing video simulation and program containers.

[0047] refer to Figure 2 , Figure 2A flowchart of a method for loading a corresponding target video in a digital retinal camera simulation method provided in an embodiment of the present application; in some embodiments, a plurality of target videos with non-repeating video identifiers are obtained based on a plurality of simulation video identifiers, and a plurality of target video streams are generated according to the plurality of target videos and the corresponding simulation methods, including but not limited to the following steps:

[0048] Step S210, obtaining a plurality of target videos with non-repeated video identifiers based on a plurality of simulated video identifiers;

[0049] Step S220, generating multiple target video streams according to multiple target videos and corresponding simulation methods;

[0050] Step S230: Push multiple target video streams to a preset streaming media.

[0051] In some embodiments, the simulated video identifier includes specific information about the simulated target video stream, such as the type of video, the identifier of the video, etc.; the simulation method is the specific mode or method of simulating the target video stream, such as whether to simulate a local file, a real-time target video stream or a remote file, etc.

[0052] In some embodiments, multiple target video streams are generated according to multiple target videos and corresponding simulation methods to push the multiple target video streams to preset streaming media. It can be understood that the system generates target video streams according to the target videos and corresponding simulation methods for use by simulation devices, and pushes the target video streams to preset streaming media for the algorithm program to pull and process. For example, before performing algorithmic analysis and processing on the target video stream based on the corresponding target algorithm package in each program container, the system can pull the stream from the streaming media according to the pull address of each target video stream to read multiple target video streams in real time.

[0053] refer to Figure 3 , Figure 3 A flowchart of a method for obtaining a target algorithm package in a digital retinal camera simulation method provided in an embodiment of the present application; in some embodiments, a unified download and update process of the algorithm is performed based on the algorithm parameters and a preset algorithm database to obtain a target algorithm package corresponding to multiple camera simulation devices, including but not limited to the following steps:

[0054] Step S310, obtaining algorithm identifiers and algorithm version information of multiple camera simulation devices according to algorithm parameters;

[0055] Step S320, searching for corresponding algorithm data packets from a local algorithm database for multiple algorithm identifiers;

[0056] Step S330, when the corresponding algorithm data packet cannot be found from the local algorithm database according to the algorithm identifier, the corresponding algorithm data packet is downloaded from the remote algorithm database to the local algorithm database; or, when the version information of the found algorithm data packet does not match the algorithm version information, the algorithm data packet corresponding to the current algorithm identifier is updated in the local algorithm database.

[0057] In some embodiments, the system can generate a corresponding algorithm identifier and determine the algorithm version information based on the algorithm parameters of each camera simulation device. The algorithm identification data can include information such as the algorithm name and configuration parameters, which is used to uniquely identify an algorithm and its configuration; further, based on the generated algorithm identification data, the matching algorithm data packet is searched in the local algorithm database. If a matching algorithm data packet is found, then these data packets will be used for algorithm processing of the corresponding camera simulation device. If a matching algorithm data packet is not found in the local algorithm database, the system downloads the corresponding algorithm data packet from the remote algorithm database to the local algorithm database; alternatively, when the version information of the found algorithm data packet does not match the algorithm version information, the system will update the algorithm data packet corresponding to the current algorithm identifier in the local algorithm database to ensure that the algorithm is up to date and meets the requirements of the current camera simulation device, thereby ensuring that each device can obtain the algorithm version that best suits its needs.

[0058] It can be understood that through the above steps, the algorithm can be separated from the specific camera simulation device and standardized in the form of algorithm identification data and algorithm data packet, so that multiple devices can reference the same algorithm instance, instead of each device maintaining an independent algorithm implementation; and when the algorithm needs to be updated, the system can update it in the local algorithm database without modifying each device one by one. This can simplify the maintenance of the algorithm and ensure that all devices use the latest version of the algorithm.

[0059] It should be noted that after the target algorithm package obtained by unified downloading and updating processing is obtained, the present application can create multiple program containers with non-duplicate container identifiers, so that the same simulated video and the same algorithm only need to run the target algorithm package once in the corresponding container to process the target video stream, thereby realizing the sharing of the program container. Therefore, when multiple camera simulation devices need to use the same target video stream and algorithm, and the algorithm identifier in the simulated video identifier and the algorithm parameter is the same, multiple camera simulation devices can share the same algorithm program instead of loading and running the same algorithm separately, so as to reduce memory usage and improve the resource utilization of the system, effectively improving the system's testing capabilities in large-scale device access scenarios.

[0060] refer to Figure 4 , Figure 4A flowchart of a method for creating a program container in a digital retinal camera simulation method provided in an embodiment of the present application; in some embodiments, a container identifier is formed according to a simulated video identifier and an algorithm identifier in an algorithm parameter, and multiple program containers with non-duplicate container identifiers are created, including: obtaining multiple container identifiers according to simulated video identifiers of multiple camera simulation devices and algorithm identifiers in algorithm parameters, traversing all existing program containers, and creating multiple program containers with non-duplicate container identifiers; wherein the process of creating multiple program containers with non-duplicate container identifiers includes but is not limited to the following steps:

[0061] Step S410, determining whether the algorithm identifiers are the same, and if the algorithm identifiers are different, creating a program container according to the algorithm identifier and the simulated video identifier;

[0062] Step S420, when the algorithm identifiers are the same, determining whether the simulated video identifiers are the same; if the simulated video identifiers are different, creating a program container according to the algorithm identifier and the simulated video identifier;

[0063] Step S430: When the algorithm identifier and the simulated video identifier are the same, the existing program container is used.

[0064] In some embodiments, multiple container identifiers are obtained based on the simulated video identifiers of multiple camera simulation devices and the algorithm identifier in the algorithm parameters, where the algorithm identifier may include configurations such as library files, dependencies, and environment variables required for the algorithm to run, and it will check whether the existing program container can meet the algorithm environment requirements of the current camera simulation device. By traversing all existing program containers, it is determined whether the algorithm identifier and the simulated video identifier match. If they do not match, a new program container is created to meet the needs of the specific device. If a camera simulation device finds that an existing program container can meet its algorithm environment requirements and the target video stream processed is also the same, then the device can directly use the existing program container to obtain the algorithm analysis results from the memory message queue of the container without repeatedly running the algorithm.

[0065] It can be understood that in the above steps, the newly added algorithm management component separated by the unified download and update processing of the algorithm based on the algorithm parameters and the preset algorithm database can conveniently realize the unified management and update of the algorithm model, so that the camera simulation device can automatically obtain the updated algorithm, and share the same set of algorithm programs and video simulations according to the simulated video identifier and the algorithm identifier in the algorithm parameters, and use the existing program container to achieve the technical effect of "one simulation, multiple uses", which can improve the utilization rate of system resources, reduce server investment costs, and meet the needs of single-machine simulation of a large number of test equipment. Moreover, the more similar the video streams and algorithms to be simulated are, the more server resources and costs can be saved.

[0066] refer to Figure 5 , Figure 5 A flowchart of a method for subscribing to an algorithm analysis result in a digital retinal camera simulation method provided in an embodiment of the present application; in some embodiments, a camera simulation device subscribes to an algorithm analysis result according to a simulated video identifier and an algorithm identifier, including but not limited to the following steps:

[0067] Step S510, the program container publishes the algorithm analysis result to the memory message queue;

[0068] Step S520: the camera simulation device subscribes to the algorithm analysis result in the memory message queue according to the simulation video identifier and the algorithm identifier.

[0069] It is understandable that when the algorithm identifier and the simulated video identifier are the same, the program container can publish the algorithm analysis results to the memory message queue, thereby enabling the camera simulation device to subscribe to the algorithm analysis results in the memory message queue according to the simulated video identifier and the algorithm identifier.

[0070] Figure 6 This is an example flow chart of a digital retinal camera simulation method provided in an embodiment of the present application in the stage of simulating a target video stream; in some embodiments, based on the specified simulation mode and video information, the present application loads the corresponding target video for each camera simulation device. Subsequently, based on these simulation modes and target videos, the target video stream of each camera simulation device is simulated and generated.

[0071] Among them, Figure 6 As shown, after receiving the camera simulation instruction, the video simulator will parse the corresponding data format according to the simulation instruction and extract the video ID from it. Then, check whether the same target video stream is being simulated. If no duplicate target video stream is found, execute branch step 1; otherwise, execute branch step 2.

[0072] In branch step 1, multiple target video streams are generated according to multiple target videos and corresponding simulation methods. Then, branch step 2 is continued.

[0073] In branch step 2, the simulated target video stream is pushed to the streaming media, and the video ID and the stream pulling address are saved for subsequent use and management.

[0074] refer to Figure 7 , Figure 7An example flow chart of the digital retinal camera simulation method provided in an embodiment of the present application in the simulation and update algorithm stage; in some embodiments, a unified download and update process of the algorithm is performed to obtain the target algorithm package corresponding to multiple camera simulation devices, which may include: the control server as the host computer sends an algorithm instruction to the digital retinal camera simulator device, and explicitly specifies the AI ​​algorithm model to be run to drive the algorithm program to efficiently process the visual data. The device sets the algorithm ID and video ID as the Topic name for subscription to ensure that the simulator can accurately execute the corresponding AI algorithm for a specific video. At the same time, the device passes the algorithm instruction parameters and the video ID to the algorithm management component.

[0075] Among them, after the control server sends the algorithm instruction to the device, the device subscribes to the message queue and forwards the instruction to the algorithm management component, the algorithm management component first searches the local algorithm database for an algorithm package with the same ID through the algorithm ID in the instruction parameter. If the target algorithm package already exists locally, go to branch step 1, otherwise go to branch step 2.

[0076] In branch step 1, the management component will determine whether the algorithm needs to be updated based on the version information in the instruction parameter and the version information of the algorithm package in the local algorithm database. If an update is required, go to branch step 3; otherwise, directly execute branch step 4.

[0077] In branch step two, if the algorithm package does not exist in the local algorithm database, the algorithm management component will download the latest version of the algorithm package from the remote algorithm database and continue to execute branch step four.

[0078] In branch step three, the algorithm management component downloads the differential upgrade package from the remote algorithm database through the algorithm ID, updates the algorithm package, ensures that the algorithm package in the local directory is the latest version, and continues to execute branch step four.

[0079] In branch step four, the algorithm program module is notified to execute corresponding algorithm operations.

[0080] refer to Figure 8 , Figure 8The example flow chart of the digital retinal camera simulation method provided in the simulation operation algorithm stage of an embodiment of the present application corresponds to the process of real-time analysis and processing of the target video stream through machine learning algorithms such as parallel computing and deep learning technology, and publishing the results to the memory message queue; in some embodiments, a program container corresponding to multiple camera simulation devices is created according to the target algorithm package and the simulated video identifier, and the target video stream is algorithmically analyzed and processed based on the corresponding target algorithm package in each program container to obtain the algorithm analysis results corresponding to multiple camera simulation devices, which may include: when the algorithm program module receives an instruction to run the AI ​​algorithm, it will parse the instruction parameters to obtain the algorithm ID and video ID. Subsequently, it will check whether there is an algorithm program container that matches the required algorithm environment running (this process is filtered by the algorithm_id in the dockerlabel). If there is already a qualified container, branch step one is executed; otherwise, branch step two will be performed.

[0081] In branch step 1, the module will further determine whether the target video stream to be processed is the same as the target video stream being processed (this determination also depends on the video_source_id in the dockerlabel). If the two are the same, the program will maintain the status quo, and the device can directly read the processed data from the memory message queue, and the entire process will end. If the target video streams are different, the program will go to branch step 2.

[0082] In branch step 2, a new container is started, which will be configured according to the specific framework and environment parameters that the algorithm depends on. During the startup process, the module specifies the labels of the container, including algorithm_id (set to the algorithm ID) and video_source_id (set to the video ID). Subsequently, the corresponding algorithm program is run inside the container. In addition, the program needs to obtain the streaming address of the video to be simulated from the streaming media, and use the target video stream as the input source of the algorithm. After the algorithm program is started, it will process the target video stream in real time, extract the features of the visual data through the deep learning model, and perform in-depth analysis and reasoning calculations. Finally, the analysis results are written immediately to the memory message queue for subsequent use.

[0083] In some embodiments, the present application provides a digital retinal camera simulation device, including: a camera simulation module, used to receive camera simulation instructions, the camera simulation instructions including simulation quantity, simulation video identification, simulation mode and algorithm parameters; create multiple camera simulation devices according to the simulation quantity; a target video stream simulation module, used to obtain multiple target videos with non-repeating video identifications based on multiple simulation video identifications, and generate multiple target video streams according to multiple target videos and corresponding simulation modes; an algorithm management module, used to perform unified download and update processing of algorithms based on algorithm parameters and a preset algorithm database, and obtain target algorithm packages corresponding to multiple camera simulation devices; an algorithm program execution module, used to form a container identification according to the simulation video identification and the algorithm identification in the algorithm parameters, create multiple program containers with non-repeating container identifications, and use the target algorithm package in the multiple program containers to process the target video stream to obtain an algorithm analysis result, so that the camera simulation device subscribes to the algorithm analysis result according to the simulation video identification and the algorithm identification.

[0084] In some embodiments, the target video stream simulation module is further used to push multiple target video streams to preset streaming media.

[0085] In some embodiments, the algorithm management module is also used to obtain the algorithm identification and algorithm version information of multiple camera simulation devices according to the algorithm parameters; for multiple algorithm identifications, search for corresponding algorithm data packets from the local algorithm database; when the corresponding algorithm data packet cannot be found from the local algorithm database according to the algorithm identification, download the corresponding algorithm data packet from the remote algorithm database to the local algorithm database; or, when the version information of the found algorithm data packet does not match the algorithm version information, update the algorithm data packet corresponding to the current algorithm identification in the local algorithm database.

[0086] In some embodiments, the algorithm program execution module is also used to obtain multiple container identifiers based on the simulated video identifiers of multiple camera simulation devices and the algorithm identifier in the algorithm parameters, traverse all existing program containers, and create multiple program containers with non-repeating container identifiers; wherein, the process of creating multiple program containers with non-repeating container identifiers is as follows: determine whether the algorithm identifiers are the same, and if the algorithm identifiers are different, create a program container based on the algorithm identifier and the simulated video identifier; if the algorithm identifiers are the same, determine whether the simulated video identifiers are the same, and if the simulated video identifiers are different, create a program container based on the algorithm identifier and the simulated video identifier; if the algorithm identifier and the simulated video identifier are the same, use the existing program container.

[0087] In some embodiments, the algorithm program execution module is also used to pull multiple target video streams in multiple program containers through the algorithm program constructed by the target algorithm package; extract the visual data features of the target video stream based on the deep learning model, and obtain the algorithm analysis results based on the visual data features.

[0088] In some embodiments, the program container is used to publish the algorithm analysis result to the memory message queue, and the camera simulation device is used to subscribe to the algorithm analysis result in the memory message queue according to the simulation video identifier and the algorithm identifier.

[0089] refer to Fig. 9 , Fig. 9 A schematic diagram of a system module corresponding to the digital retinal camera simulation method provided in an embodiment of the present application, corresponding to Figures 6 to 8 Example process in; in some embodiments, the embodiment of the present application provides a digital retinal camera simulation system, the digital retinal camera simulation system includes a digital retinal camera simulation server and a control server, the digital retinal camera simulation device in the above embodiment is deployed on the digital retinal camera simulation server, the control server is responsible for communicating with the digital retinal camera simulation server, sending camera simulation instructions corresponding to the creation of camera simulation devices and issuing algorithm instructions, so that the digital retinal camera simulation server executes the above digital retinal camera simulation method according to the camera simulation instructions.

[0090] Among them, the control server is responsible for communicating with the digital retinal camera simulation server, sending instructions for creating camera simulation devices and issuing algorithms, and receiving algorithm analysis results from the simulator.

[0091] The digital retinal camera simulation server contains multiple digital retinal camera simulation programs, each of which is responsible for processing a group of camera devices. The digital retinal camera simulation program is used to receive instructions from the control server to create camera simulator devices, create a corresponding number of camera simulator devices, and receive and forward algorithm running instructions issued by the control server. After obtaining the algorithm running results, it is reported to the control server.

[0092] The video simulator is used to accept video simulation requests from the simulation program, simulate local files, real-time target video streams, remote files, etc. as target video stream inputs through runtime mounting configuration, and push the simulated video to the streaming service.

[0093] The streaming media is used to receive the target video stream (Video1, Video2, Video3...) pushed by the video simulator, so that the algorithm program can pull the target video stream.

[0094] The algorithm management component is used to uniformly manage and run multiple algorithm programs, such as algorithm program 1, algorithm program 2...algorithm program N. It is responsible for receiving the algorithm execution commands of the digital retinal camera simulation device, managing the download and update of the algorithm package, and controlling the startup and operation of the algorithm program. Different AI algorithm models are sent by the server to achieve the function customization of the digital retinal camera. The algorithm program is used to receive algorithm running instructions, can extract features of the input target video stream, perform real-time analysis, and publish the running results to the memory message queue. It supports multiple algorithm frameworks, such as tensorflow, pytorch, mindspore, etc., and can switch different algorithm framework environments to start and run algorithms.

[0095] The memory message queue is used for the algorithm program to publish analysis results and store the results of various algorithms (Alg1-V1, Alg1-V2, Alg2-V3...) for the digital retinal camera simulation device to subscribe to the analysis results.

[0096] It is understandable that, by executing the process of creating a device, simulating a target video stream, simulating the sending of an update algorithm, simulating the running algorithm, and simulating the reporting of analysis results through the above-mentioned system, the present application can separate the algorithm program and the video simulator, so that multiple digital retinal camera simulation devices can share the same set of algorithm programs and video simulations, and achieve the technical effect of one simulation and multiple uses, which can improve the utilization rate of system resources, reduce the server investment cost, and meet the needs of a single machine to simulate a large number of test equipment. And if the target video stream and algorithm to be simulated are more similar, the more server resources and costs are saved. In addition, this solution separates the newly added algorithm management component, which can easily realize the unified management and update of the algorithm model, and avoid multiple algorithm maintenance operations on a single simulation device.

[0097] refer to Fig.10 , Fig.10 This is a structural diagram of an electronic device provided in an embodiment of the present application. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the digital retinal camera simulation method of any of the above embodiments is implemented. For example, the above described Figure 1 Steps S110 to S150 of the method described above are performed. Figure 2 Steps S210 to S230 of the method, Figure 3 Steps S310 to S330 of the method, Figure 4 Steps S410 to S430 of the method, Figure 5 Method steps S510 to S520.

[0098] The electronic device 1000 of the embodiment of the present application includes one or more processors 1010 and a memory 1020. Fig.10 In the figure, a processor 1010 and a memory 1020 are taken as an example.

[0099] The processor 1010 and the memory 1020 may be connected via a bus or other means. Fig.10 The example of connecting through bus is taken in the following.

[0100] The memory 1020, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory 1020 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 1020 may optionally include a memory 1020 remotely disposed relative to the processor 1010, and these remote memories may be connected to the electronic device 1000 via a network. At the same time, 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.

[0101] In some embodiments, when the processor executes the computer program, the digital retinal camera simulation method of any one of the above embodiments is performed at a preset interval.

[0102] Those skilled in the art will understand that Fig.10 The device structure shown in the figure does not constitute a limitation on the electronic device 1000, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0103] exist Fig.10 In the electronic device 1000 shown, the processor 1010 can be used to call the digital retinal camera simulation method stored in the memory 1020, so as to implement the digital retinal camera simulation method.

[0104] Based on the hardware structure of the above-mentioned electronic device 1000, various embodiments of the digital retinal camera simulation device of the present application are proposed. At the same time, the non-transient software program and instructions required to implement the digital retinal camera simulation method of the above-mentioned embodiment are stored in the memory. When executed by the processor, the digital retinal camera simulation method of the above-mentioned embodiment is executed.

[0105] The present application also provides a computer-readable storage medium storing computer-executable instructions for executing the digital retinal camera simulation method described above, which can enable the one or more processors to execute the digital retinal camera simulation method of any of the above embodiments, for example, to execute the above described Figure 1 Steps S110 to S150 of the method described above are performed. Figure 2 Steps S210 to S230 of the method, Figure 3 Steps S310 to S330 of the method, Figure 4 Steps S410 to S430 of the method, Figure 5 Method steps S510 to S520.

[0106] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network nodes. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0107] It will be appreciated by those skilled in the art that all or some of the steps and systems in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer-readable storage medium (or non-transitory medium) and a communication medium (or transient medium). As known to those skilled in the art, the term computer-readable storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer-readable storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD to ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0108] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above implementation mode. Technical personnel familiar with the field can also make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.

Claims

1. A digital retinal camera simulation method, characterized in that: include: Receiving a camera simulation instruction, wherein the camera simulation instruction includes a simulation quantity, a simulation video identifier, a simulation mode, and an algorithm parameter; creating a plurality of camera simulation devices according to the simulation quantity; Based on the multiple simulated video identifiers, a plurality of target videos with non-repeated video identifiers are obtained, and a plurality of target video streams are generated according to the multiple target videos and the corresponding simulation methods; Performing unified download and update processing of the algorithm based on the algorithm parameters and a preset algorithm database to obtain target algorithm packages corresponding to the multiple camera simulation devices; A container identifier is formed according to the simulated video identifier and the algorithm identifier in the algorithm parameters, a plurality of program containers with non-repeating container identifiers are created, and the target algorithm package is used in the plurality of program containers to process the target video stream to obtain an algorithm analysis result, so that the camera simulation device subscribes to the algorithm analysis result according to the simulated video identifier and the algorithm identifier.

2. The digital retinal camera simulation method according to claim 1, characterized in that: After obtaining a plurality of target videos with non-repeated video identifiers based on the plurality of simulated video identifiers, and generating a plurality of target video streams according to the plurality of target videos and the corresponding simulation methods, the method further includes: Push the multiple target video streams to the preset streaming media.

3. The digital retinal camera simulation method according to claim 1, characterized in that: The unified download and update processing of the algorithm based on the algorithm parameters and the preset algorithm database to obtain the target algorithm packages corresponding to the multiple camera simulation devices includes: Obtaining algorithm identifications and algorithm version information of the plurality of camera simulation devices according to the algorithm parameters; For multiple algorithm identifiers, search for corresponding algorithm data packets from a local algorithm database; When the corresponding algorithm data packet cannot be found in the local algorithm database according to the algorithm identifier, the corresponding algorithm data packet is downloaded from the remote algorithm database to the local algorithm database; or, when the version information of the found algorithm data packet does not match the algorithm version information, the algorithm data packet corresponding to the current algorithm identifier is updated in the local algorithm database.

4. The digital retinal camera simulation method according to claim 1, characterized in that: The forming of a container identifier according to the simulated video identifier and the algorithm identifier in the algorithm parameter, and creating a plurality of program containers whose container identifiers are not repeated, comprises: According to the simulated video identifiers of the multiple camera simulation devices and the algorithm identifier in the algorithm parameters, multiple container identifiers are obtained, all existing program containers are traversed, and multiple program containers with non-repeated container identifiers are created; The process of creating multiple program containers with non-duplicate container identifiers is as follows: Determine whether the algorithm identifiers are the same, and if the algorithm identifiers are different, create a program container according to the algorithm identifier and the simulated video identifier; When the algorithm identifiers are the same, determine whether the simulated video identifiers are the same; if the simulated video identifiers are different, create a program container according to the algorithm identifier and the simulated video identifier; When the algorithm identifier and the simulated video identifier are the same, the existing program container is used.

5. The digital retinal camera simulation method according to claim 1, characterized in that: The using the target algorithm package in the plurality of program containers to process the target video stream to obtain an algorithm analysis result includes: In the plurality of program containers, the plurality of target video streams are pulled by the algorithm program constructed by the target algorithm package; Visual data features of the target video stream are extracted based on a deep learning model, and algorithm analysis results are obtained according to the visual data features.

6. The digital retinal camera simulation method according to claim 1, characterized in that: The camera simulation device subscribes to the algorithm analysis result according to the simulated video identifier and the algorithm identifier, including: The program container publishes the algorithm analysis result to a memory message queue; The camera simulation device subscribes to the algorithm analysis result in the memory message queue according to the simulated video identifier and the algorithm identifier.

7. The digital retinal camera simulation method according to any one of claims 1 to 6, characterized in that: The video identifiers of the multiple target videos are different, the algorithm identifiers of the multiple target algorithm packages are different, the container identifiers of the multiple program containers are different, and the number of the target videos, the number of the target algorithm packages, and the number of the program containers are equal to or less than the number of the camera simulation devices.

8. A digital retinal camera simulation device, characterized in that: include: A camera simulation module, used for receiving a camera simulation instruction, wherein the camera simulation instruction includes a simulation quantity, a simulation video identifier, a simulation mode and an algorithm parameter; creating a plurality of camera simulation devices according to the simulation quantity; A target video stream simulation module, used for obtaining a plurality of target videos with non-repeated video identifiers based on the plurality of simulated video identifiers, and generating a plurality of target video streams according to the plurality of target videos and the corresponding simulation methods; An algorithm management module, used to perform unified download and update processing of algorithms based on the algorithm parameters and a preset algorithm database, and obtain target algorithm packages corresponding to the multiple camera simulation devices; An algorithm program execution module is used to form a container identifier based on the simulated video identifier and the algorithm identifier in the algorithm parameters, create multiple program containers with non-repeating container identifiers, and use the target algorithm package in the multiple program containers to process the target video stream to obtain an algorithm analysis result, so that the camera simulation device subscribes to the algorithm analysis result based on the simulated video identifier and the algorithm identifier.

9. An electronic device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When at least one of the programs is executed by at least one of the processors, the digital retinal camera simulation method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the digital retinal camera simulation method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Video monitoring method and device, electronic equipment and readable storage medium

    CN116506572A

  • Algorithm test method, algorithm test platform and computer readable storage medium

    CN118475920A