Method, system and electronic device for processing video stream data
By generating ID value identifier recognition algorithms in a preset algorithm library, the problem of a single algorithm calling mode in video stream data analysis is solved, realizing the unified calling of multiple algorithms and the integration of results, thus improving the flexibility and efficiency of data analysis.
Patent Information
- Application Number
- CN202210497486.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-09
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-05-09
AI Technical Summary
In existing technologies, the algorithm calling mode in the video stream data analysis process is singular, making it difficult to integrate the data mining results of different algorithms, which affects the flexibility and efficiency of subsequent data analysis.
By generating a unique ID value in the preset algorithm library to identify the recognition algorithm, the system enables free calling of the recognition algorithms connected to the preset algorithm library and saves the recognition results in the database according to the ID value, supporting flexible parsing and integration of multiple algorithms.
It enables flexible parsing and recognition of video stream data, solves the problem of a single algorithm calling mode, and supports unified calling of multiple algorithms and comprehensive judgment of results.
Smart Images

Figure CN114821437B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of video data processing, in particular to a video stream data processing method, system and electronic device. BACKGROUND
[0002] With the rapid development of artificial intelligence, various recognition algorithms have emerged. Different algorithms are used for data analysis and data mining on the same stream data. However, one algorithm basically corresponds to one system architecture, and placing one stream data in multiple systems for data analysis is not only cumbersome, but the results of algorithm data mining are also separated from each other, which is not conducive to subsequent data integration analysis.
[0003] The prior art mainly performs single recognition and data mining on stream data based on various algorithms, and the recognized target data is summarized in a related management system for data display or data analysis. However, such a management system can only analyze stream data for a single algorithm, and lacks means for analyzing and calling other algorithms. SUMMARY
[0004] Therefore, the purpose of the present application is to provide a video stream data processing method, system and electronic device. The method can freely call the recognition algorithms in the preset algorithm library by using the ID (Identity document, exclusive number) value generated by the recognition algorithms in the preset algorithm library, and can flexibly analyze and recognize various video stream data, thereby solving the problem of single algorithm calling mode in the video stream data analysis process in the prior art.
[0005] In a first aspect, an embodiment of the present application provides a video stream data processing method, which comprises:
[0006] determining a data processing rule based on a single frame image of a video stream;
[0007] determining a recognition algorithm according to the data processing rule, and generating an ID value corresponding to the recognition algorithm from a preset algorithm library;
[0008] applying the corresponding recognition algorithm to the video stream for recognition processing by using the ID value, to obtain a recognition result of the video stream;
[0009] saving the recognition result of the video stream in an initialized database according to the ID value.
[0010] In some embodiments, the step of determining a data processing rule based on a single frame image of a video stream comprises:
[0011] extracting a single frame image from the video stream, and determining a position coordinate system of the single frame image;
[0012] According to a scene contained in a single frame image, a scene processing rule corresponding to the scene is determined;
[0013] At least one sub-region is selected in the single frame image, and a position coordinate of the sub-region is determined by using the determined position coordinate system;
[0014] According to the scene processing rule and the position coordinate of the sub-region, a data processing rule is determined.
[0015] In some embodiments, before the step of determining the data processing rule based on the single frame image of the video stream, the method further comprises:
[0016] A type of the video stream is obtained; wherein the type of the video stream at least comprises: a real-time video stream, an offline video stream, and a local video stream.
[0017] In some embodiments, the determining the recognition algorithm according to the data processing rule comprises:
[0018] According to the scene processing rule in the data processing rule and the position coordinate of the sub-region, a scene processing object of the recognition algorithm is determined;
[0019] A recognition algorithm corresponding to the scene processing object is determined.
[0020] In some embodiments, the generating an ID value corresponding to the recognition algorithm from a preset algorithm library comprises:
[0021] A basic parameter of the recognition algorithm is obtained; wherein the basic parameter at least comprises: an algorithm name, an input parameter, an output parameter, and a calling address;
[0022] The basic parameter of the recognition algorithm is formatted into a data request instruction according to a data request format of the preset algorithm library;
[0023] The preset algorithm library is queried by using the data request instruction, and the ID value corresponding to the recognition algorithm is obtained from a data query result of the preset algorithm library.
[0024] In some embodiments, the querying the preset algorithm library by using the data request instruction, and obtaining the ID value corresponding to the recognition algorithm from the data query result of the preset algorithm library comprises:
[0025] All recognition algorithms contained in the preset algorithm library are iteratively queried by using the data request instruction, and a data query result is obtained;
[0026] If the recognition algorithm is not contained in the data query result, a temporary ID value is set, and the temporary ID value is set as the ID value corresponding to the recognition algorithm; wherein the temporary ID value is different from all ID values corresponding to the recognition algorithms in the preset algorithm library;
[0027] The temporary ID value is stored in a preset algorithm library.
[0028] In some embodiments, the step of applying the corresponding identification algorithm to the video stream for identification processing by using the ID value to obtain the identification result of the video stream comprises:
[0029] An ID value corresponding to the identification algorithm is obtained.
[0030] The video stream is subjected to pattern identification according to the identification algorithm corresponding to the ID value to determine a real-time result of the pattern identification.
[0031] The real-time result of the pattern identification is subjected to structured processing to obtain the identification result of the video stream.
[0032] In some embodiments, the step of storing the identification result of the video stream in the initialized database according to the ID value comprises:
[0033] The structured identification result of the video stream is sent to a preset data warehousing script.
[0034] The data warehousing script determines the identification result corresponding to the ID value and performs data cleaning operation on the identification result according to the ID value respectively.
[0035] The identification result after the data cleaning operation is stored in the initialized database corresponding to the ID value respectively.
[0036] In a second aspect, an embodiment of the present application provides a video stream data processing system, which comprises:
[0037] A data processing rule determination module is configured to determine a data processing rule based on a single frame image of the video stream.
[0038] An identification algorithm determination module is configured to determine an identification algorithm according to the data processing rule and generate an ID value corresponding to the identification algorithm from a preset algorithm library.
[0039] An identification result determination module is configured to apply the corresponding identification algorithm to the video stream for identification processing by using the ID value to obtain the identification result of the video stream.
[0040] An identification result storage module is configured to store the identification result of the video stream in an initialized database according to the ID value.
[0041] In a third aspect, an embodiment of the present application further provides an electronic device, which comprises a processor and a memory, and the memory stores a computer program which, when executed by the processor, implements the steps of the video stream data processing method mentioned in any possible embodiment of the first aspect.
[0042] In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium, and the computer readable storage medium stores a computer program, wherein the computer program is run by a processor to implement the steps of the video stream data processing method mentioned in any possible implementation manner of the first aspect.
[0043] The embodiments of the present application bring the following beneficial effects:
[0044] The present application provides a video stream data processing method, system and electronic equipment, the method first determines the data processing rule based on the single frame image of the video stream, then determines the recognition algorithm according to the data processing rule, and generates the ID value corresponding to the recognition algorithm from the preset algorithm library; then the corresponding recognition algorithm is applied to the video stream for recognition processing by using the ID value, and the recognition result of the video stream is obtained; finally, the recognition result of the video stream is saved in the initialized database according to the ID value. The method can freely call the recognition algorithm accessed in the preset algorithm library by using the ID value generated by the recognition algorithm in the preset algorithm library, and flexibly analyzes and identifies various video stream data, and solves the problem of single algorithm calling mode in the video stream data analysis process in the prior art.
[0045] Other features and advantages of the present application will be described in the following description, or can be known or determined without doubt from the description, or can be known by implementing the above-mentioned technologies of the present application.
[0046] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the following preferred embodiments are described in detail below, and the accompanying drawings are described as follows. BRIEF DESCRIPTION OF DRAWINGS
[0047] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0048] Figure 1 A flowchart of a video stream data processing method provided by the embodiments of the present application;
[0049] Figure 2 A flowchart of step S101 in a video stream data processing method provided by the embodiments of the present application;
[0050] Figure 3 A flowchart of determining a recognition algorithm according to a data processing rule in a video stream data processing method provided by the embodiments of the present application;
[0051] Figure 4 A flowchart of generating an ID value corresponding to an identification algorithm from a preset algorithm library in a video stream data processing method provided by an embodiment of the present application is shown in Figure 8;
[0052] Figure 5 A flowchart of step S403 in a video stream data processing method provided by an embodiment of the present application is shown in Figure 9;
[0053] Figure 6 A flowchart of step S103 in a video stream data processing method provided by an embodiment of the present application is shown in Figure 10;
[0054] Figure 7 A flowchart of step S104 in a video stream data processing method provided by an embodiment of the present application is shown in Figure 11;
[0055] Figure 8 A structural schematic diagram of a video stream data processing system provided by an embodiment of the present application is shown in Figure 12;
[0056] Figure 9 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown in Figure 13.
[0057] Icon:
[0058] 810 - data processing rule determination module; 820 - identification algorithm determination module; 830 - identification result determination module; 840 - identification result saving module; 101 - processor; 102 - memory; 103 - bus; 104 - communication interface. DETAILED DESCRIPTION
[0059] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be described below in connection with the drawings, obviously, the described embodiments are some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without any creative effort fall within the scope of protection of the present application.
[0060] With the rapid development of artificial intelligence, various identification algorithms have emerged, and different algorithms are used to analyze and mine data for the same stream data. However, one algorithm basically corresponds to one system, and placing one stream data in multiple systems for data analysis is not only cumbersome, but also the results of algorithm data mining are separated from each other, which is not conducive to subsequent data integration and analysis.
[0061] The prior art is mainly based on single identification and data mining of streaming data by various algorithms, and the identified target data is summarized into a related management system for data display or data analysis, but such a management system can only analyze streaming data for a single algorithm, and lacks means for analyzing and calling other algorithms.
[0062] Therefore, the embodiments of the present application provide a video streaming data processing method, system and electronic device, which can freely call the identification algorithms accessed in the preset algorithm library by using the ID values generated by the identification algorithms in the preset algorithm library, and flexibly analyze and identify various video streaming data, thereby solving the problem of single algorithm calling mode in the prior art video streaming data analysis process.
[0063] To facilitate the understanding of the embodiments, first, a video streaming data processing method disclosed by the embodiments of the present application is described in detail.
[0064] Referring to Figure 1 the flowchart of the video streaming data processing method, the method comprises the following steps:
[0065] Step S101, determining a data processing rule based on a single frame image of a video stream.
[0066] Since the data volume of the video stream is relatively large, one frame image in the video stream is generally selected for related data operation. The single frame image of the video stream can be directly captured by a related capture tool, and then the data processing rule is determined by the content in the single frame image. For example, the data processing rule can be determined according to the road portal contained in the single frame image, which is mainly used for pedestrian and vehicle identification at the portal. It can be seen that the data processing rule is mainly used to determine the actual use scene of the algorithm.
[0067] Step S102, determining an identification algorithm according to the data processing rule, and generating an ID value corresponding to the identification algorithm from a preset algorithm library.
[0068] After the data processing rule is determined, the related identification algorithm can be determined according to the actual use scene thereof. For example, when the data processing rule is used for pedestrian and vehicle identification at the portal, the algorithm involved can include pedestrian identification related algorithm, vehicle identification related algorithm, etc.; after the identification is completed, the behavior attribute thereof can be judged, at this time, the algorithm involved can be, for example, whether the pedestrian wears a helmet, vehicle license plate identification related algorithm, etc. During the determination of the identification algorithm, the related front page can also be used to achieve this, specifically, after the user determines the video streaming data to be processed, the front page automatically provides the related identification algorithm options, and the user can directly complete the determination process of the identification algorithm by manually selecting on the front page.
[0069] After the identification algorithm is determined, the identification algorithm is transmitted to a preset algorithm library to determine an ID value. It is worth mentioning that the ID value uniquely corresponds to the identification algorithm, and the ID values corresponding to different algorithms are necessarily different. Therefore, the ID value can be understood as a unique number of the identification algorithm, which is used as attribute data to represent the identification algorithm. The setting process of the ID value is not limited to numbers, letters, symbols, and other character strings, and can also be a combination of the above character strings.
[0070] In step S103, the corresponding identification algorithm is applied to the video stream for identification processing by using the ID value, and an identification result of the video stream is obtained.
[0071] Since the ID value corresponds to a unique identification algorithm, in an actual scenario, the ID value can be called by a related automatic script to process the video stream, so as to obtain the identification result of the identification algorithm corresponding to the ID value. For example, when identifying pedestrians and vehicles at a card hole, two algorithms are included, which are a pedestrian helmet identification algorithm and a vehicle license plate identification algorithm, and their ID values are ID_1 and ID_2, respectively. When identifying pedestrians and vehicles in the video stream, a related background server can be used to automatically implement the identification, and in the implementation process, ID_1 and ID_2 are called to execute the pedestrian helmet identification and the vehicle license plate identification, respectively, and then the corresponding identification results are obtained.
[0072] In step S104, the identification result of the video stream is saved in the initialized database according to the ID value.
[0073] The database serves as a video stream identification result saving library, and is used to save real-time identification results of the video stream. A user can query the database to display the identification results. Specifically, the same video stream data can be analyzed by using different identification algorithms in a related page, so that the analysis results of different identification algorithms can be comprehensively analyzed in the page, thereby solving the problem of single algorithm calling mode in the video stream data analysis process in the prior art.
[0074] As can be seen from the video stream data processing method provided in the above embodiments, the ID value generated by using the identification algorithm in the preset algorithm library can be used to freely call the identification algorithm connected to the preset algorithm library, and various video stream data can be flexibly analyzed and identified, thereby solving the problem of single algorithm calling mode in the video stream data analysis process in the prior art.
[0075] In some embodiments, the step S101 of determining the data processing rule based on the single frame image of the video stream includes: Figure 2 as shown, comprising:
[0076] In step S201, a single frame image is intercepted from the video stream, and a position coordinate system of the single frame image is determined.
[0077] The acquisition process of the video stream is mainly realized by the related camera. The camera in some scenes is usually fixed, such as a monitoring camera at a road portal, an indoor monitoring camera, etc. Therefore, some scenes in the video stream captured by these cameras are also fixed, such as a road at a road portal, a door in indoor monitoring, etc. Therefore, when determining the position coordinate system, the establishment of the coordinate system can be realized in combination with these fixed scenes.
[0078] In step S202, a scene processing rule corresponding to a scene is determined according to the scene contained in the single-frame image.
[0079] After the coordinate system is determined, the data processing rule is determined by the content in the single-frame image. For example, when the single-frame image contains a portal road, the determined data processing rule is used to judge pedestrians and vehicles; when the single-frame image contains a door in indoor monitoring, the determined data processing rule is used to judge whether a person enters the door within a specific time.
[0080] In step S203, at least one sub-region is selected in the single-frame image, and the position coordinates of the sub-region are determined by using the determined position coordinate system.
[0081] The acquisition of the sub-region is mainly to extract the key region in the fixed scene. For example, when the single-frame image contains a portal road, the road region is taken as the sub-region; when the single-frame image contains a door in indoor monitoring, the region near the door is taken as the sub-region. The shape of these sub-regions is irregular, so the position coordinate data corresponding to the outline of the sub-region is obtained in combination with the established position coordinate system.
[0082] In step S204, a data processing rule is determined according to the scene processing rule and the position coordinates of the sub-region.
[0083] After the position coordinates of the sub-region are determined, the data is combined with the obtained scene processing rule, so as to obtain the data processing rule.
[0084] In some embodiments, before the step of determining the data processing rule based on the single-frame image of the video stream, it is also necessary to judge the type of the video stream, which specifically includes:
[0085] The type of the video stream is obtained, wherein the type of the video stream at least includes: a real-time video stream, an offline video stream and a local video stream.
[0086] Different types of video streams correspond to different recognition algorithms, so it is necessary to judge the type of the video stream before analyzing the single-frame data of the video stream, and then select the related recognition algorithm corresponding to the type.
[0087] In some embodiments, the recognition algorithm is determined according to the data processing rule, such as Figure 3As shown, comprising:
[0088] Step S301, according to the scene processing rule in the data processing rule and the position coordinates of the sub-region, determine the scene processing object of the recognition algorithm.
[0089] The determination process of the scene processing object is realized in the sub-region, and the corresponding scene processing object is determined through the specific use scene in the sub-region. For example, when the data processing rule is used for pedestrian and vehicle recognition at the card hole, the scene processing object involved is pedestrian and vehicle.
[0090] Step S302, determine the recognition algorithm corresponding to the scene processing object.
[0091] After the scene processing object is determined, the corresponding recognition algorithm can be determined according to the related characteristics of the scene processing object. For example, when the scene processing object is pedestrian and vehicle, the corresponding recognition algorithm is: whether the pedestrian wears a helmet, vehicle license plate recognition and other related algorithms.
[0092] In some embodiments, an ID value corresponding to the recognition algorithm is generated from a preset algorithm library, such as Figure 4 As shown, comprising:
[0093] Step S401, obtain the basic parameters of the recognition algorithm; wherein the basic parameters at least include: algorithm name, input parameter, output parameter and calling address.
[0094] The basic parameters are necessary parameters for the recognition algorithm in the identification process. Specifically, the algorithm name is used for preliminary identification of the recognition algorithm; the input parameter and the output parameter are the input and output of the recognition algorithm; the calling address can be understood as an interaction point for externally calling the recognition algorithm, which can be understood as a key of the recognition algorithm. The recognition algorithm can be used for corresponding identification through the calling address.
[0095] Step S402, format the basic parameters of the recognition algorithm into data request instructions according to the data request format of the preset algorithm library.
[0096] When data is requested from the preset algorithm library, the data request instruction also needs strict format requirements, so the basic parameters are formatted according to the data request format of the preset algorithm library. The formatted basic parameters can be understood as structured data, and the structured data is used as the data request instruction, so that the data request of the preset algorithm library can be realized. At this time, the request process is to obtain the ID value corresponding to the recognition algorithm through the data request instruction.
[0097] Step S403, use the data request instruction to query the preset algorithm library, and obtain the ID value corresponding to the recognition algorithm from the data query result of the preset algorithm library.
[0098] The preset algorithm library contains ID values corresponding to various algorithms, and the ID value corresponding to the recognition algorithm can be obtained by querying data through a data request instruction. Since the algorithm name may contain combinations of Chinese, numbers, letters and other characters, its calling process is difficult to unify, and therefore the ID value is used to represent the recognition algorithm.
[0099] In the actual query process, the preset algorithm library may not contain the required recognition algorithm, in which case an ID value needs to be set again. At this time, step S403, as shown in Figure 5 , includes:
[0100] Step S501, all recognition algorithms contained in the preset algorithm library are queried using a data request instruction to obtain a data query result.
[0101] The data query result at this time is the result after traversal, and at this time all recognition algorithms in the preset algorithm library have been queried, and the query result contains the query result of the corresponding recognition algorithm in the data request instruction. The query result at this time may or may not contain the recognition algorithm. If it contains the recognition algorithm, the ID value corresponding to the algorithm is directly obtained; if it does not contain the recognition algorithm, step S502 is performed.
[0102] Step S502, if the data query result does not contain the recognition algorithm, a temporary ID value is set, and the temporary ID value is set as the ID value corresponding to the recognition algorithm; wherein the temporary ID value is different from the ID values corresponding to all recognition algorithms in the preset algorithm library.
[0103] The temporary ID value at this time is different from the ID values corresponding to all recognition algorithms, and in the actual operation process, the format of the ID value can be used to unify the naming. For example, the ID value corresponding to the recognition algorithm contains numbers, and the numbers are accumulated, at this time the maximum value in the ID value is obtained, and the value is added by 1, which can complete the setting of the temporary ID value.
[0104] Step S503, save the temporary ID value in the preset algorithm library.
[0105] After obtaining the temporary ID value, it is saved in the preset algorithm library together with the recognition algorithm, which realizes the supplement of the preset algorithm library. Subsequently, when the recognition algorithm is used, the ID value can be directly queried in the preset algorithm library.
[0106] In some embodiments, the corresponding recognition algorithm is applied to the video stream for recognition processing using the ID value to obtain the recognition result of the video stream, step S103, as shown in Figure 6 , includes:
[0107] Step S601, obtain the ID value corresponding to the recognition algorithm.
[0108] Since the ID value corresponds to a unique recognition algorithm, in actual scenarios, the ID value can be called by a related automatic script to process the video stream, so as to obtain the recognition result of the recognition algorithm corresponding to the ID value.
[0109] Step S602, according to the recognition algorithm corresponding to the ID value, the mode recognition of the video stream is carried out, and the real-time result of the mode recognition is determined.
[0110] For example, when recognizing pedestrians and vehicles at the lens, two algorithms are included, which are respectively a pedestrian helmet recognition algorithm and a vehicle license plate recognition algorithm, and their ID values are respectively ID_1 and ID_2. When recognizing pedestrians and vehicles in the video stream, a related background server can be automatically implemented, and in the implementation process, ID_1 and ID_2 are called respectively to execute the pedestrian helmet recognition and the vehicle license plate recognition, and then the corresponding recognition results are obtained respectively.
[0111] Step S603, the real-time result of the mode recognition is structured, and the recognition result of the video stream is obtained.
[0112] The structured processing can be understood as formatting, for example, the real-time result of the mode recognition is formatted according to the format requirement of the structure. The structure at this time includes different recognition algorithms and corresponding recognition results.
[0113] In some embodiments, the recognition result of the video stream is saved in the initialized database according to the ID value in step S104, as shown in Figure 7 , including:
[0114] Step S701, the structured recognition result of the video stream is sent to the preset data warehousing script.
[0115] At this time, the recognition result of the video stream has completed the recognition process of the recognition algorithm, and the structured recognition result is sent to the data warehousing script to automatically execute the warehousing operation.
[0116] Step S702, the data warehousing script determines the recognition result corresponding to the ID value, and carries out data cleaning operation on the recognition result according to the ID value respectively.
[0117] The data warehousing script can distinguish the related data in the recognition result from which algorithm according to the ID value, and then carry out data cleaning operation on these data according to the ID value. The data cleaning operation can be understood as data error correction, including checking data consistency, processing invalid values and missing values, etc.
[0118] Step S703, the identification result of the completed data cleaning operation is saved in the initialized database corresponding to the ID value respectively.
[0119] In the actual scene, the above-mentioned video stream data processing method executes the process, first needs to obtain the access document of the identification algorithm, understands the input and output parameters, etc., and fills in the identification algorithm information in the background preset algorithm library according to the specified format. At this time, the preset algorithm library generates a unique ID value, which is used as the unique identifier of the identification algorithm. Then operate in the front page, select the video stream data to be analyzed and determine the corresponding identification algorithm, and then give the video stream data, identification algorithm and required parameters to the background for pattern recognition. The identification result after identification is obtained after the structured operation corresponding to the structured data, and the structured data is pushed back to the data warehouse script. The data warehouse script distinguishes the data from which algorithm by the ID of the identification algorithm, and then stores the data in the database corresponding to the algorithm after data cleaning. The user displays the identification result by querying the database, which can be used to analyze the same video stream data using different identification algorithms in the related page, so as to comprehensively analyze the analysis results of different identification algorithms in the page, thereby solving the problem of single algorithm calling mode in the video stream data analysis process in the prior art.
[0120] Through the video stream data processing method provided in the above embodiment, the ID value generated by the identification algorithm in the preset algorithm library can be used to freely call the identification algorithm accessed in the preset algorithm library, and various video stream data can be flexibly analyzed and identified, so as to realize unified calling of multiple algorithms and solve the problem of single algorithm calling mode in the video stream data analysis process in the prior art.
[0121] Corresponding to the above-mentioned method embodiment, the embodiment of the application also provides a video stream data processing system, the structure diagram of which is shown as Figure 8 The system comprises:
[0122] The data processing rule determination module 810 is configured to determine the data processing rule based on the single frame image of the video stream.
[0123] The identification algorithm determination module 820 is configured to determine the identification algorithm according to the data processing rule, and generate the ID value corresponding to the identification algorithm from the preset algorithm library.
[0124] The identification result determination module 830 is configured to apply the corresponding identification algorithm to the video stream for identification processing by using the ID value, and obtain the identification result of the video stream.
[0125] The recognition result storage module 840 is configured to save the recognition result of the video stream in the initialized database according to the ID value.
[0126] The video stream data processing system provided by the embodiments of the present application has the same technical features as the video stream data processing method provided by the above embodiments, and can solve the same technical problems and achieve the same technical effects. For brevity, the part of the embodiments not mentioned in the description can refer to the corresponding content in the foregoing method embodiments.
[0127] The embodiments also provide an electronic device, and a schematic structural diagram of the electronic device is as shown in Figure 9 The device includes a processor 101 and a memory 102; the memory 102 is configured to store one or more computer instructions, and the one or more computer instructions are executed by the processor to implement the video stream data processing method.
[0128] Figure 9 The electronic device shown in the figure also includes a bus 103 and a communication interface 104, and the processor 101, the communication interface 104 and the memory 102 are connected through the bus 103.
[0129] The memory 102 can include a high-speed random access memory (RAM), and can also include a non-volatile memory, for example, at least one disk memory. The bus 103 can be an ISA bus, a PCI bus or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, Figure 9 Only one bidirectional arrow is used to represent the bus in the figure, but it does not mean that there is only one bus or only one type of bus.
[0130] The communication interface 104 is configured to connect with at least one user terminal and other network units through a network interface, and send the encapsulated IPv4 packet or IPv4 packet to the user terminal through the network interface.
[0131] The processor 101 can be an integrated circuit chip having a processing capability of signals. In the implementation process, each step of the above method can be completed by the integrated logic circuit of hardware in the processor 101 or the instruction in the form of software. The processor 101 described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. Each method, step and logic block diagram disclosed in the embodiments of the present disclosure can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present disclosure can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory 102, and the processor 101 reads the information in the memory 102 and combines the hardware to complete the steps of the method of the above embodiments.
[0132] The embodiments of the present application also provide a computer readable storage medium, and the computer readable storage medium stores a computer program. When the computer program is run by a processor, the steps of the method of the above embodiments are executed.
[0133] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented by other ways. The above-described device embodiments are only schematic, for example, the division of the units is only a logical function division, and other division manners can be used in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some communication interfaces, devices or units, and can be electrical, mechanical or other forms.
[0134] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e. may be located in one place, or may be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0135] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit.
[0136] If the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present application or the part of the present application that essentially contributes to the prior art or the part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and various program code storage media.
[0137] Finally, it should be noted that: the above-described embodiments are only specific embodiments of the present application, used to illustrate the technical solutions of the present application, and not to limit them, the protection scope of the present application is not limited thereto, although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand: any skilled person in the art within the technical range disclosed by the present application, they can still modify or easily think of changes to the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part of the technical features; and these modifications, changes or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and all should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for processing video stream data, characterized in that, The method includes: Data processing rules are determined based on single-frame images from a video stream; wherein the data processing rules are determined based on the content of the single-frame image. The recognition algorithm is determined according to the data processing rules, and an ID value corresponding to the recognition algorithm is generated from a preset algorithm library; The corresponding recognition algorithm is applied to the video stream using the ID value to perform recognition processing, thereby obtaining the recognition result of the video stream; The recognition results of the video stream are stored in the initialized database according to the ID value; The steps for determining data processing rules based on a single frame of a video stream include: Extract a single frame image from the video stream and determine the position coordinate system of the single frame image; Based on the scene contained in the single frame image, determine the scene processing rules corresponding to the scene; At least one sub-region is selected in the single-frame image, and the position coordinates of the sub-region are determined using the established position coordinate system. The data processing rules are determined based on the scene processing rules and the location coordinates of the sub-region.
2. The method according to claim 1, characterized in that, Before the step of determining data processing rules based on single-frame images from a video stream, the following steps are also included: Obtain the type of the video stream; wherein, the type of the video stream includes at least: real-time video stream, offline video stream, and local video stream.
3. The method according to claim 1, characterized in that, The recognition algorithm is determined according to the data processing rules, including: Based on the scene processing rules and the location coordinates of the sub-regions in the data processing rules, the scene processing object of the recognition algorithm is determined; Determine the recognition algorithm corresponding to the scene processing object.
4. The method according to claim 1, characterized in that, Generating an ID value corresponding to the recognition algorithm from a preset algorithm library includes: Obtain the basic parameters of the recognition algorithm; wherein, the basic parameters include at least: algorithm name, input parameters, output parameters, and calling address; The basic parameters of the recognition algorithm are formatted into a data request instruction according to the data request format of the preset algorithm library; The data request command is used to query the preset algorithm library, and the ID value corresponding to the recognition algorithm is obtained from the data query results of the preset algorithm library.
5. The method according to claim 4, characterized in that, The steps of querying the preset algorithm library using a data request command and obtaining the ID value corresponding to the recognition algorithm from the data query results of the preset algorithm library include: The data request command is used to iterate and query all the recognition algorithms contained in the preset algorithm library to obtain the data query results. If the data query results do not contain the recognition algorithm, a temporary ID value is set and set as the ID value corresponding to the recognition algorithm; wherein, the temporary ID value is different from the ID values corresponding to all recognition algorithms in the preset algorithm library; The temporary ID value is stored in the preset algorithm library.
6. The method according to claim 1, characterized in that, The step of applying the corresponding recognition algorithm to the video stream using the ID value to perform recognition processing and obtain the recognition result of the video stream includes: Obtain the ID value corresponding to the recognition algorithm; The video stream is subjected to pattern recognition based on the recognition algorithm corresponding to the ID value, and the real-time result of the pattern recognition is determined. The real-time results of the pattern recognition are structured to obtain the recognition results of the video stream.
7. The method according to claim 6, characterized in that, The step of saving the recognition result of the video stream in the initialized database according to the ID value includes: The recognition results of the structured video stream are sent to a preset data entry script; The data entry script determines the recognition result corresponding to the ID value, and performs data cleaning operations on the recognition result according to the ID value; The identification results after the data cleaning operation has been completed are stored in the initialized database corresponding to the ID value.
8. A video stream data processing system, characterized in that, The system includes: A data processing rule determination module is used to determine data processing rules based on a single frame image of a video stream; wherein the data processing rules are determined based on the content of the single frame image; The recognition algorithm determination module is used to determine the recognition algorithm according to the data processing rules, and generate an ID value corresponding to the recognition algorithm from a preset algorithm library; The recognition result determination module is used to apply the corresponding recognition algorithm to the video stream using the ID value for recognition processing, so as to obtain the recognition result of the video stream; The recognition result storage module is used to store the recognition result of the video stream in an initialized database according to the ID value; The data processing rule determination module is further configured to: extract a single frame image from the video stream and determine the position coordinate system of the single frame image; determine a scene processing rule corresponding to the scene contained in the single frame image; select at least one sub-region in the single frame image and determine the position coordinates of the sub-region using the determined position coordinate system; and determine the data processing rule based on the scene processing rule and the position coordinates of the sub-region.
9. An electronic device, characterized in that, include: A processor and a storage device; the storage device stores a computer program that, when executed by the processor, implements the steps of the video stream data processing method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
A method and apparatus for flower identification based on augmented reality
CN109359204A
Real-time asynchronous video analysis method and system
CN111010534A