Image data processing method, device, computer equipment and storage medium

By selecting the cache mode and processing component set according to the size of the image data, the problem of cache resource limitations in high concurrency scenarios is solved and the image data processing efficiency is improved.

CN115861033BActive Publication Date: 2024-09-03北京远舢智能科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211643057.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-20
Publication Date
2024-09-03
Estimated Expiration
2042-12-20

AI Technical Summary

Technical Problem

Existing technologies are difficult to effectively process video image data in high-concurrency scenarios, mainly due to limitations in cache resources, resulting in low processing efficiency.

Method used

By selecting different caching modes according to the data volume of the image data, the first image data whose data volume information is greater than or equal to the preset requirements is converted into a data identifier and cached to the data channel, while the data volume is less than the preset requirements. The second image data is cached directly, and a pre-built image processing component set is used to obtain the data to be processed from the data channel for processing.

Benefits of technology

Reasonable use of cache resources improves image data processing efficiency in high concurrency scenarios and ensures that the data channel can be suitable for the transmission of massive image data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115861033B
    Figure CN115861033B
Patent Text Reader

Abstract

The present application provides an image data processing method, apparatus, computer equipment and storage medium, the method comprising: obtaining multiple image data from a target file storage system; the image data carries data volume information of the image data; caching the data identifier of the first image data whose data volume information is greater than or equal to the preset requirement and the second image data whose data volume information is less than the preset requirement into a data channel; a pre-built image processing component set obtains the data to be processed from the data channel; if the data to be processed is a data identifier, obtaining the first image data corresponding to the data identifier from the local repository according to the data identifier, and performing image processing on the first image data to obtain a first image processing result. The method described in the present application is suitable for processing image data in high-concurrency scenarios and can improve the processing efficiency of image data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image data processing method, apparatus, computer equipment and storage medium. Background Art

[0002] In the industrial and even the entire industry field, the core of the data platform is still structured or semi-structured data, and the basic capabilities provided are mathematical processing. Most video or image data are basically collected and stored within the enterprise. When needed, applications are developed separately for docking and integration, and then the acquired image data is processed.

[0003] Existing video image processing is relatively primitive, and the industry lacks mature video image data processing systems. Compared with mathematical data processing calculations, when processing video image data, the amount of video image data is obviously too large. For example, a single piece of mathematical data is basically hundreds of bytes or several kilobytes, while the data of a single image is basically several megabytes. In traditional mathematical data processing, the data channel uses memory to cache process data, and the cache capacity usually supports more than one million events. In the case of image data, a single image with more than Mb of image events supports at most about a thousand events, and short video files are usually at the level of hundreds of MB or GB. Therefore, the processing of video image data in high-concurrency scenarios is greatly limited by cache resources, resulting in the inability to process image data in high-concurrency scenarios at one time, affecting the processing efficiency of image data. Summary of the invention

[0004] In view of this, the embodiments of the present application provide an image data processing method, apparatus, computer equipment and storage medium, which can select different cache modes according to the data volume of the image data, are suitable for processing image data in high concurrency scenarios, and improve the processing efficiency of image data.

[0005] In a first aspect, an embodiment of the present application provides an image data processing method, comprising the following steps:

[0006] Acquire a plurality of image data from a target file storage system; the image data carries data volume information of the image data;

[0007] Cache the data identifier of the first image data whose data volume information is greater than or equal to the preset requirement and the data identifier of the second image data whose data volume information is less than the preset requirement into the data channel;

[0008] The pre-built image processing component set obtains the data to be processed from the data channel; the pre-built image processing component set is determined by a user from a plurality of candidate image components; the candidate image components are encapsulated by image algorithms;

[0009] If the data to be processed is a data identifier, obtaining first image data corresponding to the data identifier from a local repository according to the data identifier, and performing image processing on the first image data to obtain a first image processing result;

[0010] If the data to be processed is second image data, image processing is performed on the second image data to obtain a second image processing result.

[0011] In a possible implementation manner, caching the data identifier of the first image data whose data volume information is greater than or equal to the preset requirement and the second image data whose data volume information is less than the preset requirement into the data channel includes:

[0012] storing first image data represented by the data volume information and having a data volume greater than or equal to a preset value in a local storage repository;

[0013] generating a data identifier of the first image data according to a storage address of the first image data in the local storage repository;

[0014] Cache the data identifier of the first image data in a data channel;

[0015] The second image data whose data volume represented by the data volume information is smaller than a preset value is cached in the data channel.

[0016] In a possible implementation, if the data to be processed is a data identifier, obtaining first image data corresponding to the data identifier from a local repository according to the data identifier includes:

[0017] Determining, according to the data identifier, a storage address of the first image data in the local storage repository;

[0018] Based on the storage address, first image data corresponding to the data identifier is acquired.

[0019] In a possible implementation, the method for constructing the image processing component set includes:

[0020] In response to a user clicking or dragging a plurality of target image processing components among a plurality of candidate image processing components, moving the plurality of target image processing components to an editing area;

[0021] In response to a user drawing line connections between the plurality of target image processing components and in response to an editing operation on a property list of each target image processing component, an image processing component set is determined.

[0022] In a possible implementation, before the step of acquiring a plurality of image data from the target file storage system, the method further includes:

[0023] Extract frames from the video stream obtained from the target file storage system to obtain multiple frame images;

[0024] The multiple frames of images are respectively converted into binary format to obtain multiple image data.

[0025] In a possible implementation, the method further includes:

[0026] The target file storage system is monitored in real time to determine newly added video stream files in the target file storage system.

[0027] In a possible implementation, the method further includes determining a cache mode for the image data, where the cache mode includes:

[0028] Local cache mode, data channel cache mode, and hybrid cache mode.

[0029] In a second aspect, an embodiment of the present application provides an image data processing device, including:

[0030] A first acquisition module is used to acquire a plurality of image data from a target file storage system; the image data carries data volume information of the image data;

[0031] A cache module, used for caching the data identifier of the first image data whose data volume information is greater than or equal to the preset requirement and the second image data whose data volume information is less than the preset requirement into the data channel;

[0032] A second acquisition module is used to obtain the data to be processed from the data channel using a pre-built image processing component set; the pre-built image processing component set is determined by a user from a plurality of candidate image components; the candidate image components are encapsulated by an image algorithm;

[0033] A first processing module, configured to, if the data to be processed is a data identifier, obtain first image data corresponding to the data identifier from a local repository according to the data identifier, and perform image processing on the first image data to obtain a first image processing result;

[0034] The second processing module is used for performing image processing on the second image data to obtain a second image processing result if the data to be processed is second image data.

[0035] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the image data processing method described in any one of the first aspects when executing the computer program.

[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the image data processing method described in any one of the first aspects are executed.

[0037] The technical solution provided by the embodiment of the present application has the following beneficial effects:

[0038] The image data processing method provided by the present application first obtains multiple image data from a target file storage system, wherein the image data carries data volume information of the image data, and then, in order to reasonably utilize cache resources and make it suitable for processing image data in high-concurrency scenarios, caches data identifiers of first image data whose data volume information is greater than or equal to a preset requirement and second image data whose data volume information is less than the preset requirement into a data channel, and in order to use required image processing components to process the image data, pre-constructs an image processing component set including multiple image processing components, and uses the pre-constructed image processing component set to obtain the data to be processed from the data channel. In order to obtain different data If the data to be processed is image data of a certain amount, it is necessary to first determine whether the acquired data to be processed is a data identifier or image data; if the data to be processed is a data identifier, the first image data corresponding to the data identifier is obtained from the local repository according to the data identifier, and image processing is performed on the first image data to obtain a first image processing result; if the data to be processed is second image data, image processing is performed on the second image data to obtain a second image processing result. The technical solution of the present application selects the location of the image data cache through the data amount information of the image data, reasonably utilizes the cache resources, makes the data channel suitable for the transmission of image data in high concurrency scenarios, thereby improving the processing efficiency of the image data.

[0039] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 A schematic diagram of a flow chart of an image data processing method provided in an embodiment of the present application;

[0042] Figure 2 A flow chart of a data channel caching method provided in an embodiment of the present application;

[0043] Figure 3 A schematic diagram of a flow chart of a method for acquiring first image data provided in an embodiment of the present application;

[0044] Figure 4 A schematic diagram of an online image processing process provided by an embodiment of the present application;

[0045] Figure 5 A schematic diagram of an offline image processing process provided in an embodiment of the present application;

[0046] Figure 6 A schematic diagram of the structure of an image data processing device provided in an embodiment of the present application;

[0047] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0049] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0050] In the prior art, when executing the image data processing method, the following problems may occur:

[0051] Compared with mathematical data processing and calculation, when processing image data, the amount of image data is obviously too large. For example, a single piece of mathematical data is basically hundreds of bytes or several kilobytes, while the data of a single image is basically several megabytes. In traditional mathematical data processing, the data channel uses memory to cache process data, and the cache capacity usually supports more than one million events. In the case of image data, a single image with more than Mb of image events supports at most about a thousand, and short video files are usually at the level of hundreds of MB or GB. Therefore, the processing of video image data in high-concurrency scenarios is greatly limited by cache resources, resulting in the inability to process image data in high-concurrency scenarios at one time, affecting the processing efficiency of image data.

[0052] Based on the above defects, the present application provides an image data processing method, such as Figure 1 As shown, the following steps are included:

[0053] S101, acquiring a plurality of image data from a target file storage system; the image data carries data volume information of the image data;

[0054] S102, caching the data identifier of the first image data whose data volume information is greater than or equal to the preset requirement and the data identifier of the second image data whose data volume information is less than the preset requirement into the data channel;

[0055] S103, the pre-built image processing component set obtains the data to be processed from the data channel; the pre-built image processing component set is determined by the user from a plurality of candidate image components; the candidate image components are encapsulated by image algorithms;

[0056] S104, if the data to be processed is a data identifier, obtaining first image data corresponding to the data identifier from a local repository according to the data identifier, and performing image processing on the first image data to obtain a first image processing result;

[0057] S105: If the data to be processed is second image data, perform image processing on the second image data to obtain a second image processing result.

[0058] The above exemplary steps of the embodiments of the present application are described below respectively.

[0059] In step S101, a plurality of image data are acquired from a target file storage system; the image data carries data volume information of the image data;

[0060] In some embodiments, the address corresponding to the target file storage system may be a database, a distributed file storage system, or a service interface of a processor; the data volume information may be the data volume size of the image data.

[0061] In step S102, the data identifier of the first image data whose data volume information is greater than or equal to the preset requirement and the second image data whose data volume information is less than the preset requirement are cached in the data channel;

[0062] In some embodiments, when the data volume information is greater than or equal to the preset requirement, the corresponding first image data is saved to the local storage repository and stored in the designated server cache directory. The storage address replaces the original attribute of the first image data, and the attribute of the first image data is identified as the local cache address, that is, the data identifier of the first image data is the local cache address, and the first image data is converted into a data identifier and cached in the data channel. For subsequent image processing components, it is only necessary to load the object according to the attribute of the image data. If it is a local cache object, that is, the first image data, the file is read after addressing through the attribute to load the first image data. If it is the second image data, the object in the data channel is directly read.

[0063] In the above-mentioned method, since the data volume of the first image data is large, if it is directly cached in the data channel, it will cause a large space of the data channel to be occupied, thereby reducing the cache volume of the image data in the data channel. The present application converts the first image data whose data volume information is greater than the preset requirement into the form of a data identifier and stores it in the data channel. The data identifier occupies less cache resources, so that the cache resources can be reasonably utilized to achieve the caching of more image data.

[0064] In step S103, the pre-built image processing component set obtains the data to be processed from the data channel; the pre-built image processing component set is determined by the user from a plurality of candidate image components; the candidate image components are encapsulated by image algorithms;

[0065] In some embodiments, the pre-built image processing component set is determined based on a user's selection among a plurality of candidate image processing components, and the data to be processed is processed in sequence according to the processing logic of the image processing components.

[0066] In some embodiments, the candidate image processing components include general processing components and AI algorithm components. The general processing components include but are not limited to: image loading components, image watermark components, image coding components, image annotation components, image synthesis components, image cropping components, image special effects components, image transcoding components, video streaming components, and object dump components.

[0067] In step S104, if the data to be processed is a data identifier, first image data corresponding to the data identifier is obtained from a local repository according to the data identifier, and image processing is performed on the first image data to obtain a first image processing result;

[0068] In some embodiments, the processing object of the image processing component set is image data. If the acquired data to be processed is a data identifier, it is necessary to acquire the first image data corresponding to the data identifier based on the data identifier, and then process the first image data according to the processing logic of the image processing component set.

[0069] In step S105, if the data to be processed is second image data, image processing is performed on the second image data to obtain a second image processing result.

[0070] In some embodiments, a variety of AI image analysis and processing models can also be used to process the first image data and the second image data. In this embodiment, the AI ​​image analysis and processing model is encapsulated into a separate image processing component, namely an AI algorithm component. The AI ​​image analysis and processing model includes but is not limited to: video image classification, video image detection, video image recognition, OCR recognition and face recognition. In order to fully meet the complex and changing needs of the business, in addition to the built-in AI algorithm component, it also supports dynamic addition of external algorithms and maintenance of their service interface specifications (input parameters, output parameters), and supports the testing function of the service interface. When building an image data component set, you can drag the AI ​​algorithm component and select the corresponding external algorithm service, configure the parameters according to its interface specifications, and realize the construction of an image data component set that relies on external algorithms for drag-and-drop configuration. The specific process of parameter configuration is as follows:

[0071] (1) According to the parameters of the input parameter specification, configure the parameters one by one. You can select static constant parameters, that is, enter a constant value in the input box after the parameter for parameter transmission, or select dynamic parameter configuration, that is, select a field attribute in the event as the value of the input parameter for dynamic parameter transmission;

[0072] (2) According to the field attributes of the parameter specification (the structured attribute fields parsed from the semi-structured JS object notation) combined with the original field attributes of the event, a combination selection is performed to construct the attributes of the processed event;

[0073] (3) After the configuration is completed, when the task runs to the component, it constructs the message through the input parameter configuration and makes a request according to the interface protocol, parses the data according to the output parameter specification, and constructs the data according to the configured processed event structure and adds it to the data channel, completing the dynamic component interception and processing capability based on the external algorithm.

[0074] The above method, according to different business needs, can integrate external AI algorithm services and configure parameters according to their interface specifications, so as to realize the construction and operation of video image processing task processes that are drag-and-drop configured based on external AI algorithms, thereby meeting various business needs.

[0075] The above-mentioned image data processing method first obtains multiple image data from the target file storage system, wherein the image data carries data volume information of the image data, and then, in order to reasonably utilize cache resources and make it suitable for processing image data in high-concurrency scenarios, caches the data identifier of the first image data whose data volume information is greater than or equal to the preset requirement and the second image data whose data volume information is less than the preset requirement into a data channel, and in order to use the required image processing components to process the image data, pre-constructs an image processing component set including multiple image processing components, and uses the pre-constructed image processing component set to obtain the data to be processed from the data channel, and in order to obtain different data volumes If the data to be processed is image data, it is necessary to first determine whether the acquired data to be processed is a data identifier or image data; if the data to be processed is a data identifier, the first image data corresponding to the data identifier is obtained from the local repository according to the data identifier, and image processing is performed on the first image data to obtain a first image processing result; if the data to be processed is second image data, image processing is performed on the second image data to obtain a second image processing result. The technical solution of the present application selects the location of the image data cache through the data volume information of the image data, reasonably utilizes the cache resources, makes the data channel suitable for the transmission of image data in high-concurrency scenarios, thereby improving the processing efficiency of the image data.

[0076] In some embodiments, in order to obtain the data identifier of the first image data and cache the data identifier to the data channel, specifically, as follows Figure 2 As shown, step S102 includes the following steps:

[0077] S201, storing first image data represented by data volume information whose data volume is greater than or equal to a preset value into a local storage repository;

[0078] In some embodiments, the preset value is manually set, for example, it may be 100 kb, and the first image data with a data volume greater than or equal to 100 kb is stored in the local storage repository.

[0079] S202, generating a data identifier of the first image data according to a storage address of the first image data in the local storage repository;

[0080] In some embodiments, a specific storage address of the first image data in the local storage repository is obtained. The storage address may be a server cache directory set in advance. After the specific storage address is obtained, the storage address is used as a data identifier of the first image data.

[0081] S203, caching the data identifier of the first image data into a data channel;

[0082] The above method can determine the caching method of image data according to the data volume of the image data, cache the second image data with a data volume less than a preset value in the data channel, cache the first image data with a data volume greater than and equal to the preset value in the local storage repository, generate a data identifier according to the cache address, and only need to cache and transmit the data identifier in the data channel. Since the data volume of the data identifier is very small and occupies less cache resources, the data channel can transmit massive image data in high-concurrency scenarios, which is beneficial to the improvement of subsequent image data processing efficiency.

[0083] S204, caching the second image data whose data amount represented by the data amount information is less than a preset value into the data channel;

[0084] In some embodiments, since the data volume of the second image data is less than 100 kb and occupies a small amount of memory, and since the data channel cache mode has the characteristic of fast cache speed, the second image data is directly cached in the data channel.

[0085] In some embodiments, when the data to be processed is obtained as a data identifier, it is necessary to obtain the corresponding first image data according to the data identifier. Specifically, Figure 3 As shown, the following steps are included:

[0086] S301, determining a storage address of the first image data in the local storage repository according to the data identifier;

[0087] In some embodiments, since the data identifier is generated by the storage address of the first image data in the local repository, the specific storage address of the first image data in the local repository can be determined according to the data identifier.

[0088] S302, based on the storage address, obtaining first image data corresponding to the data identifier;

[0089] In some embodiments, according to the acquired storage address of the first image data, the first image data corresponding to the data identifier is read from the storage address.

[0090] In some embodiments, before the step of acquiring the plurality of image data from the target file storage system, the method further comprises:

[0091] Extract frames from the video stream obtained from the target file storage system to obtain multiple frame images;

[0092] The multiple frames of images are respectively converted into binary format to obtain multiple image data.

[0093] In the above-mentioned method, when extracting frames from a video stream, the frames may be extracted according to a timestamp interval or a frame frequency to generate a plurality of frame images, the plurality of frame images may be binary-converted respectively, and the binary-converted frame images may be transmitted to a data channel.

[0094] In some embodiments, the method further comprises:

[0095] The target file storage system is monitored in real time to determine newly added video stream files in the target file storage system.

[0096] The above method can realize the integration of new files in the storage directory to support subsequent transmission processing and storage.

[0097] In some embodiments, the method further comprises determining a cache mode for the image data, the cache mode comprising:

[0098] Local cache mode, data channel cache mode, and hybrid cache mode.

[0099] As an example, after the user specifies the cache mode in the global configuration, the image data is cached according to the specified cache mode. If the local cache mode is specified, both the first image data and the second image data are cached in the local storage repository. If the data channel cache mode is specified, both the first image data and the second image data are cached in the data channel. If the mixed cache mode is specified, the cache address is automatically selected according to the data volume of the image data, and the first image data with a data volume greater than or equal to a preset value is cached in the local storage repository, and the second image data with a data volume less than the preset value is cached in the data channel.

[0100] In some embodiments, the method for constructing the image processing component set includes:

[0101] In response to a user clicking or dragging a plurality of target image processing components among a plurality of candidate image processing components, moving the plurality of target image processing components to an editing area;

[0102] In response to a user drawing line connections between the plurality of target image processing components and in response to an editing operation on a property list of each target image processing component, an image processing component set is determined.

[0103] In some embodiments, the image processing component is encapsulated through image processing technology, and combined with visualization technology, the visual configuration of multiple image processing components is realized by clicking or dragging the image processing component. The required target image processing component is dragged into the editing area among the candidate image processing components, and then connected by drawing lines between the components and editing the property list, the construction of the image processing component set is completed.

[0104] In the above method, considering the continuous demands of various industries or business domains, the built-in components may not be able to meet all specific needs. When building an image processing component set, this application can develop the required image processing components, upload the component jar package after unit testing, and then build a custom image processing component set by clicking or dragging in the editing area to complete the user's customized demand response. Because it is a page componentization and visual click-and-drag mode, it can support applications in many scenarios and solve complex and changeable image data processing needs in the business. The method of only building components also reduces the requirements for development technology in the data processing process and improves the efficiency and stability of the data processing process.

[0105] In addition to supporting many scenarios, it also supports customized integration, processing, and loading components according to requirements to achieve customized responses to requirements. Combined with AI algorithm components, the following are two specific application scenario examples:

[0106] Scenario 1: Real-time video stream frame extraction and recognition based on online monitoring. The components and processing flow chart are as follows: Figure 4 shown.

[0107] (1) Drag the data integration component, i.e., the video stream frame extraction component, select the video stream type (rtsp / rtmp), fill in the video stream address, configure the frame extraction information (timestamp interval frame extraction or frame number interval frame extraction), extract the video stream frame and construct the image data event to add to the data channel. At this time, the constructed event is (event[timestamp, image byte]);

[0108] (2) Drag the data processing component - AI algorithm component, select the personnel location detection service in the algorithm library service, select the image field in the data channel as the input parameter, detect the personnel location in the image through the built-in algorithm service, and expand it to the data channel event as the algorithm output information. At this time, the event is (event [timestamp, image byte, personnel location array]);

[0109] (3) Drag the data processing component - AI algorithm component, select the face recognition service in the algorithm library service, select the image field and person position in the data channel as input parameters, and specify the face library data source table. Use the built-in algorithm service to identify the person in the image, and expand the identified person information as the algorithm output information to the data channel event. At this time, the event is (event [timestamp, image byte, person position array, person information array]);

[0110] (4) Drag the data processing component - image annotation component, select dynamic annotation, and select the area to be annotated and the annotated information (personnel position and personnel information in event) to realize intelligent annotation of the frame image, and select to replace the original image field. At this time, the event is (event [timestamp, processed image byte, personnel position array, personnel information array]);

[0111] (5) Drag the data processing component - video streaming component, select the image field for streaming, select and fill in the information of the multimedia server or video gateway to be streamed, and implement the streaming function of the annotated frame image based on the streaming platform;

[0112] (6) Drag the data processing component - object dump component, select the processed image, the distributed object storage source to be dumped, and the storage bucket, realize the dump of the image in the data channel, and replace the original image byte field with the address information, convert all the information into structured data to facilitate storage application. At this time, the event is (event [timestamp, image URL, personnel location, personnel information]);

[0113] (7) Drag the data processing component - data mapping component to map the fields in the event to the physical properties of the loading component one by one to facilitate data storage;

[0114] (8) Drag the data loading component - Jdbc loading component, select the database type, data source, and table name to be stored, and combine the above data mapping configuration to realize structured information storage; this is convenient for subsequent continuous analysis and application.

[0115] Scenario 2: Batch analysis of offline video images based on offline scenarios. The components and processing flow chart are as follows: Figure 5 shown.

[0116] This scenario supports the integration of video image files in distributed object storage such as FTP remote directories, Fastdfs, and Mino. It also implements AI analysis and mining of batch video image files through visual configuration on the interface, relying on the platform's video image processing components and built-in AI algorithm models, to mine valuable information and store data themes for subsequent continuous business analysis and application.

[0117] The following is an example of the multi-classification scenario of offline CCD cigarette package defect detection. Offline CCD cigarette package images are usually stored in the sftp directory of the server. After obtaining the directory images through integration, they are detected and classified based on the AI ​​detection algorithm, and then the information is stored in the database for subsequent statistical analysis and application. The specific process is as follows:

[0118] (1) Drag and drop data integration component - remote file integration component, configure sftp / ftp remote monitoring directory, dynamically detect new files and write them into the data channel, and construct the event (event [file name, timestamp, image byte, file size]);

[0119] (2) Drag the data processing component - AI algorithm component, select the built-in CCD offline cigarette package defect detection multi-classification algorithm service, select the image field as the input parameter, perform intelligent defect detection and multi-classification, output whether there is a defect in the image and the multi-classification information of the defect, and expand the data channel event field information. The event at this time is (event [file name, timestamp, image byte, file size, whether it is a defect, multi-classification information of the defect]);

[0120] (3) Drag the data processing component - data mapping component to map the fields in the event to the physical properties of the loading component one by one to facilitate data storage;

[0121] (4) Drag the data loading component - Jdbc loading component, select the database type, data source, and table name to be stored, and combine the above data mapping configuration to realize structured information storage; this facilitates subsequent continuous analysis and application.

[0122] In summary, the embodiments of the present application have the following beneficial effects:

[0123] First, a plurality of image data are obtained from a target file storage system, wherein the image data carries data volume information of the image data. Then, in order to reasonably utilize cache resources and make it suitable for processing image data in high-concurrency scenarios, a data identifier of first image data whose data volume information is greater than or equal to a preset requirement and a second image data whose data volume information is less than a preset requirement are cached in a data channel. In order to use the required image processing components to process the image data, an image processing component set including a plurality of image processing components is pre-constructed, and the pre-constructed image processing component set is used to obtain the data to be processed from the data channel. In order to obtain image data of different data volumes, it is necessary to first determine whether the obtained data to be processed is a data identifier or image data. If the data to be processed is a data identifier, the first image data corresponding to the data identifier is obtained from a local repository according to the data identifier, and image processing is performed on the first image data to obtain a first image processing result. If the data to be processed is a second image data, image processing is performed on the second image data to obtain a second image processing result. The technical solution of the present application selects the location of the image data cache according to the data volume information of the image data, reasonably utilizes cache resources, and makes the data channel suitable for the transmission of image data in high-concurrency scenarios, thereby improving the processing efficiency of image data.

[0124] Based on the same inventive concept, an image data processing device corresponding to the image data processing method in the first embodiment is also provided in the embodiment of the present application. Since the principle of solving the problem by the device in the embodiment of the present application is similar to that of the above-mentioned image data processing method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0125] like Figure 6 As shown, Figure 6 : is a schematic diagram of the structure of the image data processing device provided by the present application. The image data processing device includes:

[0126] The first acquisition module 601 is used to acquire a plurality of image data from a target file storage system; the image data carries data volume information of the image data;

[0127] The cache module 602 is used to cache the data identifier of the first image data whose data volume information is greater than or equal to the preset requirement and the second image data whose data volume information is less than the preset requirement into the data channel;

[0128] The second acquisition module 603 is used to obtain the data to be processed from the data channel using a pre-built image processing component set; the pre-built image processing component set is determined by a user from a plurality of candidate image components; the candidate image components are encapsulated by an image algorithm;

[0129] A first processing module 604 is configured to obtain first image data corresponding to the data identifier from a local repository according to the data identifier if the data to be processed is a data identifier, and perform image processing on the first image data to obtain a first image processing result;

[0130] The second processing module 605 is used to perform image processing on the second image data to obtain a second image processing result if the data to be processed is second image data.

[0131] Those skilled in the art should understand that Figure 6 The implementation functions of each module in the image data processing device shown can be understood by referring to the relevant description of the aforementioned image data processing method. Figure 6 The functions of each unit in the image data processing device shown can be implemented by a program running on a processor, or by a specific logic circuit.

[0132] In a possible implementation, the cache module 602 includes:

[0133] A first cache unit, configured to store first image data whose data volume represented by data volume information is greater than or equal to a preset value into a local storage repository;

[0134] a generating unit, configured to generate a data identifier of the first image data according to a storage address of the first image data in the local storage repository;

[0135] A second cache unit, used for caching the data identifier of the first image data into a data channel;

[0136] The third cache unit is used to cache the second image data whose data volume represented by the data volume information is less than a preset value into the data channel.

[0137] In a possible implementation, the first processing module 604 includes:

[0138] a determining unit, configured to determine a storage address of the first image data in the local storage repository according to the data identifier;

[0139] An acquiring unit is used to acquire the first image data corresponding to the data identifier based on the storage address.

[0140] In a possible implementation manner, the apparatus is further used to construct the image processing component set, including:

[0141] for responding to a user clicking or dragging a plurality of target image processing components among a plurality of candidate image processing components, moving the plurality of target image processing components to an editing area;

[0142] The method is used for determining an image processing component set in response to a user drawing lines to connect the plurality of target image processing components and in response to an editing operation on a property list of each target image processing component.

[0143] In a possible implementation manner, before the device is used to obtain the plurality of image data from the target file storage system, the device is further used to:

[0144] Extract frames from the video stream obtained from the target file storage system to obtain multiple frame images;

[0145] The multiple frames of images are respectively converted into binary format to obtain multiple image data.

[0146] In a possible implementation, the device further includes a monitoring module, and the monitoring module includes:

[0147] The target file storage system is monitored in real time to determine newly added video stream files in the target file storage system.

[0148] In a possible implementation manner, the apparatus is further configured to determine a cache mode for the image data, where the cache mode includes:

[0149] Local cache mode, data channel cache mode, and hybrid cache mode.

[0150] The above-mentioned image data processing device obtains multiple image data from the target file storage system through the first acquisition module 601, and the image data carries the data volume information of the image data. Then, in order to reasonably use the cache resources and make it suitable for processing image data in high-concurrency scenarios, the data identifier of the first image data whose data volume information is greater than or equal to the preset requirement and the second image data whose data volume information is less than the preset requirement are cached to the data channel through the cache module 602. In order to use the required image processing components to process the image data, an image processing component set including multiple image processing components is pre-constructed, and the pre-constructed image processing component set is used to obtain the data to be processed from the data channel through the second acquisition module 603. In order to obtain different data If the data to be processed is image data of a large amount, it is necessary to first determine whether the acquired data to be processed is a data identifier or image data. If the data to be processed is a data identifier, the first image data corresponding to the data identifier is obtained from the local repository according to the data identifier through the first processing module 604, and image processing is performed on the first image data to obtain a first image processing result. If the data to be processed is second image data, image processing is performed on the second image data through the second processing module 605 to obtain a second image processing result. The technical solution of the present application selects the location of the image data cache through the data amount information of the image data, reasonably utilizes the cache resources, and makes the data channel suitable for the transmission of image data in high concurrency scenarios, thereby improving the processing efficiency of image data.

[0151] Corresponds to Figure 1 The image data processing method in the present application embodiment also provides a computer device 700, such as Figure 7 As shown, the device includes a memory 701, a processor 702, and a computer program stored in the memory 701 and executable on the processor 702, wherein the image data processing method is implemented when the processor 702 executes the computer program.

[0152] Specifically, the above-mentioned memory 701 and processor 702 can be general-purpose memory and processor, which are not specifically limited here. When the processor 702 runs the computer program stored in the memory 701, it can execute the above-mentioned image data processing method, which solves the problem in the prior art that the data channel is not suitable for the transmission of image data in high-concurrency scenarios, affecting the subsequent processing efficiency of the image data.

[0153] Corresponds to Figure 1 The image data processing method in the embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned image data processing method are executed.

[0154] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, the above-mentioned image data processing method can be executed, thereby solving the problem in the prior art that the data channel is not suitable for the transmission of image data in high-concurrency scenarios, thereby affecting the subsequent processing efficiency of the image data.

[0155] The computer-readable storage medium, when executing the image data processing method, first obtains a plurality of image data from a target file storage system, wherein the image data carries data volume information of the image data, and then, in order to reasonably utilize cache resources and make it suitable for processing image data in high-concurrency scenarios, caches the data identifier of the first image data whose data volume information is greater than or equal to the preset requirement and the second image data whose data volume information is less than the preset requirement into a data channel, and in order to use the required image processing components to process the image data, pre-constructs an image processing component set including a plurality of image processing components, and uses the pre-constructed image processing component set to obtain the data to be processed from the data channel, In order to obtain image data of different data amounts, it is necessary to first determine whether the acquired data to be processed is a data identifier or image data. If the data to be processed is a data identifier, the first image data corresponding to the data identifier is obtained from the local repository according to the data identifier, and image processing is performed on the first image data to obtain a first image processing result. If the data to be processed is second image data, image processing is performed on the second image data to obtain a second image processing result. The technical solution of the present application selects the location of the image data cache through the data amount information of the image data, reasonably utilizes the cache resources, and makes the data channel suitable for the transmission of image data in high concurrency scenarios, thereby improving the processing efficiency of image data.

[0156] In the embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0157] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0158] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0159] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0160] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0161] It should be noted that the term "comprising" used in the embodiments of the present application is used to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0162] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0163] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A method for processing image data, characterized in that: The following steps are involved: Acquire a plurality of image data from a target file storage system; the image data carries data volume information of the image data; Cache the data identifier of the first image data whose data volume information is greater than or equal to the preset requirement and the data identifier of the second image data whose data volume information is less than the preset requirement into the data channel; The pre-built image processing component set obtains the data to be processed from the data channel; the pre-built image processing component set is determined by a user from a plurality of candidate image components; the candidate image components are encapsulated by image algorithms; If the data to be processed is a data identifier, obtaining first image data corresponding to the data identifier from a local repository according to the data identifier, and performing image processing on the first image data to obtain a first image processing result; If the data to be processed is second image data, performing image processing on the second image data to obtain a second image processing result; The step of caching the data identifier of the first image data whose data volume information is greater than or equal to the preset requirement and the second image data whose data volume information is less than the preset requirement into the data channel comprises: storing first image data represented by the data volume information and having a data volume greater than or equal to a preset value in a local storage repository; generating a data identifier of the first image data according to a storage address of the first image data in the local storage repository; Cache the data identifier of the first image data in a data channel; Cache the second image data whose data amount represented by the data amount information is less than a preset value into the data channel; The method for constructing the image processing component set includes: In response to a user clicking or dragging a plurality of target image processing components among a plurality of candidate image processing components, moving the plurality of target image processing components to an editing area; In response to a user drawing line connections between the plurality of target image processing components and in response to an editing operation on a property list of each target image processing component, an image processing component set is determined.

2. The image data processing method according to claim 1, characterized in that: If the data to be processed is a data identifier, obtaining first image data corresponding to the data identifier from a local repository according to the data identifier includes: Determining, according to the data identifier, a storage address of the first image data in the local storage repository; Based on the storage address, first image data corresponding to the data identifier is acquired.

3. The image data processing method according to claim 1, characterized in that: Before the step of acquiring a plurality of image data from the target file storage system, the method further comprises: Extract frames from the video stream obtained from the target file storage system to obtain multiple frame images; The multiple frames of images are respectively converted into binary format to obtain multiple image data.

4. The image data processing method according to claim 3, characterized in that: The method further comprises: The target file storage system is monitored in real time to determine newly added video stream files in the target file storage system.

5. The image data processing method according to claim 1, characterized in that: The method further includes determining a caching mode for the image data, the caching mode comprising: Local cache mode, data channel cache mode, and hybrid cache mode.

6. An image data processing device, characterized in that: include: A first acquisition module, used for acquiring a plurality of image data from a target file storage system; The image data carries data amount information of the image data; A cache module, used for caching the data identifier of the first image data whose data volume information is greater than or equal to the preset requirement and the second image data whose data volume information is less than the preset requirement into the data channel; The method of caching the data identifier of the first image data whose data volume information is greater than or equal to the preset requirement and the second image data whose data volume information is less than the preset requirement into the data channel comprises: storing the first image data whose data volume information represents that the data volume is greater than or equal to the preset value into the local storage repository; generating the data identifier of the first image data according to the storage address of the first image data in the local storage repository; caching the data identifier of the first image data into the data channel; caching the second image data whose data volume information represents that the data volume is less than the preset value into the data channel; The second acquisition module is used to obtain the to-be-processed data from the data channel using a pre-built image processing component set; the pre-built image processing component set is determined based on a plurality of candidate image components by a user; the candidate image components are encapsulated by an image algorithm; the image processing component set is constructed in the following manner: in response to a plurality of target image processing components clicked or dragged by a user among the plurality of candidate image processing components, the plurality of target image processing components are moved to an editing area; in response to a user drawing a line connection between the plurality of target image processing components, and in response to an editing operation on a property list of each target image processing component, the image processing component set is determined; A first processing module, configured to, if the data to be processed is a data identifier, obtain first image data corresponding to the data identifier from a local repository according to the data identifier, and perform image processing on the first image data to obtain a first image processing result; The second processing module is used for performing image processing on the second image data to obtain a second image processing result if the data to be processed is second image data.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are executed.