Structured management method for food processing image sample dataset and medium

By employing a multi-schema definition mechanism and logical encoding mapping rules, the problem of managing food processing image data across multiple formats and sources was solved, enabling efficient data storage and retrieval, reducing management costs, and improving the system's scalability and maintainability.

CN122153089APending Publication Date: 2026-06-05SHANGHAI XIXI INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI XIXI INTELLIGENT TECH CO LTD
Filing Date
2026-01-12
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively manage multi-format, multi-source food processing image data, resulting in rigid data structures, high maintenance costs, and difficulties in achieving unified retrieval and data reuse across food categories, production lines, and batches.

Method used

By adopting a scalable multi-schema definition mechanism and constructing a unified data structure protocol through mapping rules between business coding and logical coding, the structured management of image data is realized, and the data is stored and retrieved in the cloud.

Benefits of technology

It achieves unified and standardized management of multi-format image data, reduces data integration and management costs, ensures the consistency of data storage links, supports efficient cross-category retrieval, and improves the maintainability and scalability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122153089A_ABST
    Figure CN122153089A_ABST
Patent Text Reader

Abstract

The application provides a kind of structured management method and medium for food processing image sample data set, the method is for the management problem of food image data multi-source heterogeneous, structure variable, unified modeling is carried out to data by dynamic extensible multi-schema mechanism;Formulate the multi-format unified storage protocol containing logical coding and check rule, realize standardization warehousing;Adopt data and file separation reporting and cloud consistency check, guarantee link reliability;And based on the unified protocol, build multidimensional index, support efficient retrieval of cross-class, multi-condition.The application realizes flexible definition, unified storage and intelligent retrieval of food image data, significantly improves the data management efficiency and quality, and provides a solid data foundation for food industry visual detection and AI training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image data management technology, and more specifically, to a structured management method and medium for food processing image sample datasets. Background Technology

[0002] In the food processing industry, image acquisition and visual inspection have been widely applied in various stages, including raw material screening, processing monitoring, finished product quality inspection, and packaging integrity inspection. With the increasing automation and intelligence of the food industry, food image sample data exhibits the following significant characteristics: 1. There are many food SKUs with significant differences in attributes. Different food categories (such as fruits and vegetables, fresh meat, pre-prepared foods, and packaged foods) differ significantly in appearance, testing targets, and quality attributes, and the required descriptive fields are not uniform.

[0003] 2. The acquisition equipment and data sources are highly diverse. Food image data may come from industrial cameras, line scan cameras, RGB cameras, depth cameras, X-ray cameras, AI edge devices, or manual acquisition terminals. The image formats and additional attribute structures generated by different devices vary greatly.

[0004] 3. Frequent changes in business requirements and testing rules. In food processing scenarios, the requirements for image attributes constantly change for different production lines, batches, and testing tasks, requiring data structures to have good scalability and evolution capabilities.

[0005] In existing technologies, relational data tables with fixed fields or customized data tables for a single food category are typically used. 1. The data structure is fixed, and the table structure needs to be frequently adjusted when adding new food categories or testing attributes; 2. Difficult to support unified management of image data from multiple formats and sources; 3. The front-end display, algorithm analysis, and data management system are highly coupled, resulting in high maintenance costs; 4. It is difficult to achieve unified retrieval and data reuse across food categories, production lines, and batches.

[0006] Therefore, there is an urgent need for a structured management method for image sample data that is suitable for the characteristics of the food processing industry, supports multiple schemas, and can be dynamically evolved. Summary of the Invention

[0007] To address the shortcomings of existing technologies, the purpose of this invention is to provide a structured management method and medium for food processing image sample datasets.

[0008] A structured management method for food processing image sample datasets provided by the present invention includes: Step S1: Based on an extensible multi-schema definition mechanism, construct a protocol specification for uniformly describing the data structure of food image samples; Each schema has a unique identifier and version information, and is distinguished in the protocol specification into a business coding field that expresses business semantics and a logical coding field that is used for unified system processing; Step S2: According to the field mapping rules in the protocol specification, convert the food image data from different acquisition devices and their associated business coding fields into structured reporting data containing unified logical coding fields; Step S3: Upload the food image data to the cloud storage system and send the structured reporting data to the cloud data service; Step S4: The cloud data service receives the structured reported data, stores it in the form of raw data, and performs existence verification and status update on the image files in the cloud storage system based on the storage location information in the logical encoding field. Step S5: Based on the protocol specifications and logical encoding fields, establish a multidimensional index. After receiving the search request, map the search conditions to the corresponding index fields to perform the search and return the structured search results.

[0009] Preferably, in step S1, the design principles followed by the schema definition mechanism include at least one of the following: supporting field hierarchical structure and path-based description, supporting field mandatory and optional definitions, supporting field type normalization, supporting field derivation and automatic generation, supporting content summary calculation, supporting unified storage location rules, supporting multiple schemas coexisting and dynamic loading, and supporting schema evolution and compatible parsing.

[0010] Preferably, in step S2, the logical encoding field includes at least: Schema identifier and version information, content type identifier, unique identifier of sample object, device identifier, tenant identifier, event time, content summary, and storage resource location information.

[0011] Preferably, in step S2, the conversion process includes: automatically generating a logical encoding field based on the value of the business encoding field according to a preset generation rule; The generation rules include at least one of the following: normalization rules, derivation rules, digest calculation rules, and storage path generation rules.

[0012] Preferably, step S2 further includes: establishing a mapping relationship table from business code fields to logical code fields, wherein the mapping relationship includes at least one of field synonym mapping, data type conversion, unit conversion, enumeration value mapping and default value filling, and recording version and traceability information for each mapping relationship.

[0013] Preferably, in step S3, the structured reporting data is encapsulated in JSON format and includes at least the storage path of the image file, the file hash value, the acquisition time, the device identifier, and a set of attributes consisting of business code fields.

[0014] Preferably, in step S4, the existence check is performed through a timed task and / or a reporting-triggered task, specifically including: For records in the database whose file status is unconfirmed, a query is initiated to the cloud storage system based on their storage location information, and the file status identifier of the record is updated according to the query results.

[0015] Preferably, in step S4, after receiving the structured reported data, the cloud data service first parses its basic metadata and stores the complete original reported data in the database; The parsing of business attribute fields is delayed until retrieval or processing, and is performed as needed.

[0016] Preferably, in step S5, the multidimensional index system includes: a business logic index based on the business coding field, a metadata index based on the collection time and device information, and a physical index based on the storage location information; The search request supports combined queries based on one or more of the following conditions: food category, business type, time range, equipment source, image processing results, or quality indicators. The system loads the corresponding protocol specification based on the schema identifier specified in the search request to map the search conditions to specific business code fields and index fields.

[0017] According to the present invention, a computer-readable storage medium storing a computer program is provided, wherein when the computer program is executed by a processor, the steps of the structured management method for food processing image sample datasets are implemented.

[0018] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention solves the problem of frequent adjustments to the structure of food processing image data due to changes in business by introducing a multi-schema mechanism that can be dynamically defined and version managed, and realizes unified and standardized management of multi-source and multi-format image data.

[0019] 2. This invention employs a dual-channel reporting and cloud-based verification mechanism to ensure the consistency and integrity of the data storage chain. The multi-dimensional index, built based on a unified protocol, supports efficient millisecond-level retrieval across categories and multiple conditions.

[0020] 3. The present invention significantly reduces the cost of integrating and managing AI training data, and improves the maintainability and scalability of the system by decoupling the data model from the front-end display, providing an efficient and reliable data foundation for the intelligentization of the food industry. Attached Figure Description

[0021] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a flowchart illustrating the structured management process of food processing image sample data in an embodiment of the present invention. Figure 2 This is a diagram illustrating the message processing and storage interaction of cloud data services in an embodiment of the present invention. Detailed Implementation

[0022] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.

[0023] This invention proposes a structured management method for food processing image sample datasets. Its core lies in: using a scalable multi-schema structure definition method to uniformly model image sample data from different food categories, acquisition devices, and business scenarios; and achieving unified storage, indexing, and retrieval of image sample data without relying on a fixed data structure, through a set of schema design principles and business coding and logical coding mapping rules. (Refer to...) Figure 1 and Figure 2 As shown below, this method will be explained in further detail.

[0024] Step S1: Development and implementation of a multi-format unified storage protocol.

[0025] This invention first defines and implements a unified storage protocol for multiple formats. Its core is the establishment of a scalable and dynamically loadable data structure definition specification (Schema) for uniformly describing food processing image sample data from different sources and formats. The specific method is as follows: Step S101: Define the schema specification; Define a schema specification for describing and validating the structure of image sample data. The schema describes the field structure, field types, and field constraints.

[0026] Step S102: Distinguishing between business code fields and logical code fields; The schema specification explicitly distinguishes between two types of fields: 1. Business Code Field: This field carries the specific semantics of food processing business. Its field name and value directly reflect the business attributes, for example: "food_names": "Kung Pao Chicken". The business code field can be freely defined and extended in its own independent schema according to the needs of different food categories, production lines, and testing tasks.

[0027] 2. Logical Encoded Fields: These fields are used to implement unified data processing, storage, and retrieval logic across all schemas. Their field names and generation rules remain consistent across all schemas. Logical encoded fields do not directly express business semantics but rather serve the underlying system's consistency management, location, and indexing.

[0028] Step S103: Detailed definition of logical encoding fields and their rules; The set of logically encoded fields and their generation, mapping, and verification rules are key to protocol uniformity.

[0029] Step S1031: Define the set of logical encoding fields; Based on the schema definition and business requirements, a fixed set of logically encoded fields is formed, which includes at least: schema_id and schema_version: Unique identifiers of the schema followed by the current data and their versions.

[0030] content_type: Identifies the type of data content, such as original image, thumbnail, annotation file, analysis report, etc.

[0031] object_id: A globally unique identifier for the sample object within the system.

[0032] device_id: A unique identifier for the data acquisition device.

[0033] tenant_id: Identifier of the tenant (such as a company or factory).

[0034] event_time and ingestion_time: These represent the time when the image acquisition event occurred and the time when the data was entered into the database system, respectively.

[0035] encoding_format: The encoding format of the data or file, such as JPEG, PNG, JSON, etc.

[0036] content_hash: The hash digest value (such as MD5, SHA256) calculated from the image file or key business field set, used for unique identification and consistency verification.

[0037] storage_uri: The Uniform Resource Locator for image files in a cloud storage system.

[0038] index_key: The index key used for fast retrieval.

[0039] Step S1032: Define the rules for generating logical encoding fields; The values ​​of logical encoding fields are automatically generated from business encoding fields and system context according to preset rules: Normalization rules: Standardize the case sensitivity, null values ​​(convert to default values ​​or empty strings), timestamps (unified to ISO8601 format), and numerical units (unified to international standard units) in the source data.

[0040] Derivation rules: For example, object_id can be generated by combining device_id, event_time and sequence number; schema_id is directly taken from the schema configuration associated with the current data.

[0041] Summary rule: Read the image file or select a set of key business fields, and calculate content_hash using a hash algorithm.

[0042] Path rules: Combine tenant_id, the date portion of event_time, schema_id, content_type and other logical fields to generate a structured storage_uri, for example: {bucket name} / tenantA / 2023-10-27 / schema_produce / raw_image / object_123.jpg.

[0043] Step S1033: Establish a mapping table from business fields to logical fields. Construct a configurable mapping table to record how business code fields map to or contribute to the generation of logical code fields. For example: The business field "collection station" can be mapped to a part of the logical field device_id.

[0044] The business field "Detection Time" needs to be converted and formatted to map to the logical field event_time.

[0045] For enumerated values ​​in business fields (such as "apple" and "banana"), they can be mapped to standard classification codes used in logical retrieval.

[0046] This mapping table contains traceability information such as version, creation / update time, and operator, and supports dynamic updates.

[0047] Step S1034: Define consistency verification and conflict resolution mechanisms The system performs consistency checks on received data, primarily based on content_hash and object_id. If data with the same object_id or the same content_hash is reported multiple times (potentially from different devices or retry mechanisms), conflict handling is initiated. 1. Compare key fields such as event_time (take the latest) and schema_version (take the highest) of the data.

[0048] 2. Determine the final data version to be retained based on preset priority rules (such as "latest time priority", "highest version schema priority", "specific device source priority").

[0049] 3. Record information such as the overwritten data version, conflict cause, and processing result to the audit log.

[0050] Step S1035: Output protocol description file The aforementioned schema specifications (including business field definitions), logical field generation rules, mapping relationship tables, and validation and conflict handling strategies are encapsulated into a machine-readable protocol description file (such as an enhanced JSON Schema file or a configuration file in a specific format). This file serves as a contract for collaborative work among data producers (collection devices), data consumers (retrieval systems), and data managers (cloud services), supporting version management and compatibility upgrades.

[0051] Step S2: Structured reporting of data from food image acquisition equipment.

[0052] Step S201: Local Image Acquisition and Temporary Storage Food image acquisition equipment (such as industrial cameras and X-ray machines) acquires images of target food according to a preset acquisition task plan or trigger signal. The acquired raw image files (such as JPEG, PNG, and RAW formats) along with metadata automatically generated by the device (such as exposure parameters and timestamps) are temporarily stored in the device's local storage or the cache of the edge computing node.

[0053] Step S202: Upload image files to cloud storage The device-side upload service module, based on the storage_uri rule generated in step S103, uploads the temporarily stored image file to the designated cloud storage system (such as object storage service) via a secure network transmission protocol (such as HTTPS). After successful upload, the cloud storage system returns the final access address of the file.

[0054] Step S203: Sending structured reporting messages Simultaneously with successful file upload or synchronization, the device constructs an image reporting message. This message uses a structured data format (such as JSON), whose data structure strictly adheres to the schema specification associated with the current task and includes pre-generated logically encoded fields. The message body must contain at least: file_params: contains file-related information such as storage_uri, encoding_format, and file_size.

[0055] business_attributes: Contains all business-coded fields defined according to the schema and their values, such as food category, test results, production line number, etc.

[0056] logical_fields: Contains generated logically encoded fields, such as object_id, device_id, content_hash, schema_id, etc.

[0057] The message is sent to the cloud data service via a message queue or API interface.

[0058] Step S3: Cloud data service message parsing and database storage.

[0059] Step S301: Message Reception and Basic Parsing After receiving the reported message, the access layer of the cloud data service first performs basic parsing to extract basic metadata from the message, including message ID, reporting timestamp, message source (device ID), protocol version, etc. This step does not delve into the specific food-related business attribute fields within the message body.

[0060] Step S302: Asynchronous message forwarding and raw storage The received complete report message (including header and message body) is treated as a whole and asynchronously forwarded to the data processing pipeline via a message middleware (such as Kafka or RabbitMQ). Simultaneously, the message is persistently stored in the raw message table of a database (such as a NoSQL database) in its original format (such as JSON text) or in a slightly serialized form. During storage, the extracted basic metadata and message status (such as "received") are correlated.

[0061] Step S4: File existence verification mechanism.

[0062] Step S401: Verify task triggering The system sets up two tasks to trigger file existence checks: 1. Scheduled tasks: Start periodically at fixed time intervals (e.g., every minute).

[0063] 2. Triggered task: Triggered immediately after a new image reporting message is successfully stored in step S302.

[0064] Step S402: Obtaining the data to be verified After the verification task is started, the image sample record table or the original message table in the database is queried to filter out records whose file status is marked as "unknown", "pending confirmation" or "reported" but have not received file confirmation after a preset time (such as 30 seconds).

[0065] Step S403: Cloud Storage File Status Inquiry For each selected record, extract its storage_uri logical field and directly send a query request to the corresponding cloud storage system to confirm whether the image file pointed to by the URI exists and is accessible.

[0066] Step S404: File Status Update According to the query results from the cloud storage system: If the file is confirmed to exist, the file status flag of that record in the database will be updated to "confirmed".

[0067] If a file does not exist or access fails, the status will be updated to "file missing," potentially triggering an alarm or retransmission mechanism. This verification mechanism ensures the consistency between image files and database records in the storage chain.

[0068] Step S5: A unified search method for food images Step S501: Establish a multidimensional indexing system During the data import process, the system automatically builds multi-dimensional indexes for food image data based on a unified storage protocol: 1. Business Logic Index: Indexes are built based on key business coding fields such as food_category and detection_task, supporting quick filtering by business dimensions such as food type and detection items.

[0069] 2. Metadata Attribute Index: Indexes are built based on logically encoded fields such as event_time, device_id, tenant_id, and fields such as camera_params in the business, supporting retrieval by time range, device source, shooting conditions, etc.

[0070] 3. Physical storage index: An index is built based on storage_uri and object_id for accurate matching and fast location of physical files.

[0071] Step S502: Parsing and Mapping of Retrieval Requests The system provides a unified search interface. When a search request is received: 1. The interface parses the conditions carried in the request (such as "find all images of fruit foreign objects detected on production line A on October 27, 2023") into a set of structured search condition descriptions.

[0072] 2. Based on the field names involved in the search criteria, associate them with their respective schema definitions to understand their business semantics.

[0073] 3. Map search criteria to corresponding index fields. For example, map "fruit category" to the food_category field of the business logic index, and map "production line A on October 27, 2023" to the event_time range and device_id of the metadata index (or a business field associated through a mapping table).

[0074] Step S503: Perform the search and return the results. 1. Based on the mapped conditions, the retrieval engine performs a query operation in the corresponding multidimensional index to efficiently obtain a list of image sample record IDs that meet all conditions.

[0075] 2. Retrieve complete structured data (including business attributes, logical fields, and storage_uri) from the database based on the record ID.

[0076] 3. Encapsulate the search results according to a predefined unified data format (such as JSON containing total and list fields). Each item in the list contains all the structured fields that can be used for dynamic rendering on the front end, as well as a storage_uri that can be directly used to access or download images.

[0077] 4. Return the encapsulated results to the upper-layer application that initiated the request (such as an AI training platform, quality traceability system, or management backend). The front-end system can dynamically select a display template based on the schema identifier in the returned data and flexibly render each field, thereby achieving a unified and personalized data display across different food categories and business scenarios.

[0078] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.

Claims

1. A structured management method for food processing image sample datasets, characterized in that, include: Step S1: Based on an extensible multi-schema definition mechanism, construct a protocol specification for uniformly describing the data structure of food image samples; Each schema has a unique identifier and version information, and is distinguished in the protocol specification into a business coding field that expresses business semantics and a logical coding field that is used for unified system processing; Step S2: According to the field mapping rules in the protocol specification, convert the food image data from different acquisition devices and their associated business coding fields into structured reporting data containing unified logical coding fields; Step S3: Upload the food image data to the cloud storage system and send the structured reporting data to the cloud data service; Step S4: The cloud data service receives the structured reported data, stores it in the form of raw data, and performs existence verification and status update on the image files in the cloud storage system based on the storage location information in the logical encoding field. Step S5: Based on the protocol specifications and logical encoding fields, establish a multidimensional index. After receiving the search request, map the search conditions to the corresponding index fields to perform the search and return the structured search results.

2. The structured management method for food processing image sample datasets according to claim 1, characterized in that, In step S1, the design principles followed by the schema definition mechanism include at least one of the following: supporting field hierarchical structure and path-based description, supporting field mandatory and optional definition, supporting field type normalization, supporting field derivation and automatic generation, supporting content summary calculation, supporting unified storage location rules, supporting multiple schemas coexisting and dynamic loading, and supporting schema evolution and compatible parsing.

3. The structured management method for food processing image sample datasets according to claim 1, characterized in that, In step S2, the logical encoding field includes at least: Schema identifier and version information, content type identifier, unique identifier of sample object, device identifier, tenant identifier, event time, content summary, and storage resource location information.

4. The structured management method for food processing image sample datasets according to claim 3, characterized in that, In step S2, the conversion process includes: automatically generating logical encoding fields based on the values ​​of business encoding fields according to preset generation rules; The generation rules include at least one of the following: normalization rules, derivation rules, digest calculation rules, and storage path generation rules.

5. The structured management method for food processing image sample datasets according to claim 1, characterized in that, Step S2 further includes: establishing a mapping relationship table from business code fields to logical code fields, wherein the mapping relationship includes at least one of field synonym mapping, data type conversion, unit conversion, enumeration value mapping and default value filling, and recording version and traceability information for each mapping relationship.

6. The structured management method for food processing image sample datasets according to claim 1, characterized in that, In step S3, the structured reporting data is encapsulated in JSON format and includes at least the storage path of the image file, the file hash value, the acquisition time, the device identifier, and a set of attributes consisting of business code fields.

7. The structured management method for food processing image sample datasets according to claim 1, characterized in that, In step S4, the existence check is performed through a scheduled task and / or a reporting-triggered task, specifically including: For records in the database whose file status is unconfirmed, a query is initiated to the cloud storage system based on their storage location information, and the file status identifier of the record is updated according to the query results.

8. The structured management method for food processing image sample datasets according to claim 1, characterized in that, In step S4, after receiving the structured reported data, the cloud data service first parses its basic metadata and stores the complete original reported data in the database. The parsing of business attribute fields is delayed until retrieval or processing, and is performed as needed.

9. The structured management method for food processing image sample datasets according to claim 1, characterized in that, In step S5, the multidimensional index system includes: a business logic index based on the business coding field, a metadata index based on the collection time and device information, and a physical index based on the storage location information; The search request supports combined queries based on one or more of the following conditions: food category, business type, time range, equipment source, image processing results, or quality indicators. The system loads the corresponding protocol specification based on the schema identifier specified in the search request to map the search conditions to specific business code fields and index fields.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the structured management method for food processing image sample datasets as described in any one of claims 1 to 9.