Packaging material data processing methods, apparatus, equipment, readable storage media, and products
By acquiring and parsing packaging material data and selecting matching processing strategies for editing, the problem of insufficient data processing efficiency and accuracy in existing technologies is solved, achieving more efficient and accurate data processing.
Patent Information
- Application Number
- CN202610354405.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-23
- Publication Date
- 2026-06-30
Smart Images

Figure CN122309776A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, device, readable storage medium, and product for processing packaging data. Background Technology
[0002] In the field of computer technology, with the continuous advancement of enterprise digital transformation, the demand for processing various documents and images is also increasing. Enterprise operations generate a large amount of data to be processed, such as documents and images, and the processing of this data is crucial to enterprise operations.
[0003] However, the current processing of this data is usually done manually or using file processing tools. This process suffers from problems such as inefficiency, poor accuracy, and difficulty in maintaining the original format, which urgently need to be addressed. Summary of the Invention
[0004] Therefore, it is necessary to provide a packaging material data processing method, apparatus, equipment, readable storage medium, and product that can improve the efficiency and accuracy of packaging material data processing, addressing the aforementioned technical problems.
[0005] In a first aspect, this application provides a packaging material data processing method, including:
[0006] Obtain the description data of the target packaging material and parse the description data to obtain the strategy reference data corresponding to the description data; wherein, the strategy reference data includes the data type of the description data and / or the packaging material type of the target packaging material;
[0007] Based on the strategy reference data, select the target processing strategy from different candidate processing strategies;
[0008] Based on the target processing strategy, the descriptive data is edited and processed.
[0009] In one embodiment, the data type, selecting the target processing strategy from different candidate processing strategies, includes at least one of the following:
[0010] When the data type is document, the document processing strategy is used as the target processing strategy;
[0011] When the data type is image, the image processing strategy is used as the target processing strategy.
[0012] In one embodiment, the descriptive data is edited based on a target processing strategy, including at least one of the following:
[0013] When the target processing strategy is a document processing strategy, text content recognition is performed on the descriptive data, and the packaging label in the text content recognition result is edited based on the target prompt words;
[0014] When the target processing strategy is an image processing strategy, image element recognition is performed on the descriptive data, and the packaging label in the image element recognition result is edited based on the target prompt words;
[0015] The target prompts are generated based on processing requirements.
[0016] In one embodiment, the description data includes at least one packaging description page; text content recognition of the description data includes:
[0017] For each packaging description page, page type identification is performed; page types include editable pages and non-editable pages.
[0018] If the packaging description page is an editable page, extract the text content from the corresponding packaging description page;
[0019] When the packaging description page is a non-editable page, the text content in the corresponding packaging description page is identified using a text recognition tool.
[0020] In one embodiment, the packaging material type includes paper type and non-paper type; based on the packaging material type, a target processing strategy is selected from different candidate processing strategies, including:
[0021] When the packaging material is paper, the printing resolution verification strategy is used as the target processing strategy.
[0022] When the packaging material type is not paper-based, the layout recognition strategy and / or color gamut conversion strategy corresponding to the sub-type of packaging material for non-paper-based packaging material are selected as the target processing strategy.
[0023] In one embodiment, selecting a target processing strategy from different candidate processing strategies based on strategy reference data includes:
[0024] Obtain label reference features that match the packaging type in the strategy reference data;
[0025] Extract the current label features from the descriptive data, and perform compliance verification on the current label features based on the label reference features;
[0026] If the compliance verification is passed, the target processing strategy is selected from different candidate processing strategies based on the strategy reference data.
[0027] Secondly, this application also provides a packaging material data processing apparatus, comprising:
[0028] The data parsing module is used to acquire the description data of the target packaging material and parse the description data to obtain the strategy reference data corresponding to the description data; wherein, the strategy reference data includes the data type of the description data and / or the packaging material type of the target packaging material;
[0029] The strategy selection module is used to select the target processing strategy from different candidate processing strategies based on strategy reference data;
[0030] The data processing module is used to edit and process the descriptive data based on the target processing strategy.
[0031] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0032] Obtain the description data of the target packaging material and parse the description data to obtain the strategy reference data corresponding to the description data; wherein, the strategy reference data includes the data type of the description data and / or the packaging material type of the target packaging material;
[0033] Based on the strategy reference data, select the target processing strategy from different candidate processing strategies;
[0034] Based on the target processing strategy, the descriptive data is edited and processed.
[0035] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0036] Obtain the description data of the target packaging material and parse the description data to obtain the strategy reference data corresponding to the description data; wherein, the strategy reference data includes the data type of the description data and / or the packaging material type of the target packaging material;
[0037] Based on the strategy reference data, select the target processing strategy from different candidate processing strategies;
[0038] Based on the target processing strategy, the descriptive data is edited and processed.
[0039] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0040] Obtain the description data of the target packaging material and parse the description data to obtain the strategy reference data corresponding to the description data; wherein, the strategy reference data includes the data type of the description data and / or the packaging material type of the target packaging material;
[0041] Based on the strategy reference data, select the target processing strategy from different candidate processing strategies;
[0042] Based on the target processing strategy, the descriptive data is edited and processed.
[0043] The aforementioned packaging material data processing method, apparatus, device, readable storage medium, and product acquire descriptive data of the target packaging material and parse the descriptive data to obtain strategy reference data corresponding to the descriptive data; then, based on the strategy reference data, a target processing strategy is selected from different candidate processing strategies. Since the strategy reference data includes the data type of the descriptive data and / or the packaging type of the target packaging material, the target processing strategy determined in this process matches the descriptive data and / or the packaging type of the target packaging material. This enables more efficient editing of the descriptive data based on the target processing strategy, and also makes the processing results more aligned with user needs. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is a flowchart illustrating a packaging material data processing method in one embodiment;
[0046] Figure 2 This is a flowchart illustrating the data editing and processing steps in one embodiment;
[0047] Figure 3 This is a flowchart illustrating the target processing selection step in one embodiment;
[0048] Figure 4 This is a flowchart illustrating the target processing selection step in another embodiment;
[0049] Figure 5 This is a flowchart illustrating the packaging material data processing method in another embodiment;
[0050] Figure 6 This is a structural block diagram of a packaging material data processing device in one embodiment;
[0051] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0053] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0054] In one exemplary embodiment, such as Figure 1 As shown, a packaging material data processing method is provided. Taking the application of this method to a packaging material data processing terminal as an example, the method includes the following steps:
[0055] Before introducing the embodiments of this application, it should be noted that packaging materials, also known as packaging decoration materials, refer to the materials used in manufacturing packaging containers, packaging decoration, packaging printing, packaging transportation, etc., to meet the packaging requirements of products. It is also a general term for all kinds of materials that play a role in protecting, identifying, decorating, and sealing products throughout the production, warehousing, transportation, and sales processes. There are many types of packaging materials, such as paper, plastic, metal, glass, and composite materials.
[0056] The packaging material data in this application embodiment typically includes packaging label data and packaging attribute feature data. Packaging label data may include information such as product specifications, parameters, brand, instructions for use, barcodes, and QR codes. Typically, packaging labels serve as identification carriers, printed / affixed to the surface of various packaging materials. Packaging attribute feature data can be understood as basic data used to describe the physical properties, material, process, and specifications of the packaging material. It is understood that the content and format of packaging material data may differ for different types of packaging materials.
[0057] S110: Obtain the description data of the target packaging material, parse the description data, and obtain the strategy reference data corresponding to the description data.
[0058] In this context, "target packaging material" can be understood as any packaging material for which there is a need for packaging material data processing. The descriptive data for the target packaging material can include at least one of the following: packaging material label data and packaging material attribute feature data. The data type of the descriptive data can be varied, including at least one of document type, image type, structured data type, and audio / video data type.
[0059] The strategy reference data includes the data type describing the data and / or the packaging type of the target packaging material.
[0060] In one alternative implementation, when there is a need for packaging material data processing, the user can upload description data of the target packaging material on the front-end page. At this time, the packaging material data processing terminal can obtain the description data of the target packaging material.
[0061] Optionally, users can upload the description data of the target packaging material on the front-end page in several ways. For example, they can drag and drop the description data of the target packaging material to the data upload entry, or select the description data of the target packaging material and click the upload control.
[0062] Optionally, to facilitate the packaging material data processing terminal's understanding of the user's processing intent for the packaging material data, the processing requirements for the target packaging material can be obtained before or after acquiring the descriptive data of the target packaging material. For example, a prompt for inputting processing requirements can be output for the user to input their processing needs; or, multiple processing requirement options can be displayed on the front-end page for the user to select their processing requirements.
[0063] In one alternative implementation, the strategy reference data includes the data type of the descriptive data. Accordingly, the data format features of the descriptive data can be identified, and the data type of the descriptive data can be determined based on the identified data format features.
[0064] For example, data format characteristics may include a file header or suffix describing the data, and the data type of the describing data is determined based on the data type indicated by the file header or suffix describing the data.
[0065] In another alternative implementation, the strategy reference data includes the packaging type of the target packaging material. Accordingly, packaging type reference data can be extracted from the description data, and the packaging type of the target packaging material can be determined based on the packaging type reference data.
[0066] For example, the packaging material type reference data may include packaging material data and / or packaging material usage data. Different packaging material type reference data have corresponding packaging material type comparison tables. Based on the packaging material type reference data and the corresponding comparison tables, the packaging material type of the target packaging material is determined.
[0067] In another alternative implementation, the strategy reference data includes the data type of the descriptive data and the packaging type of the target packaging material. Accordingly, the model can be determined based on the pre-trained strategy reference data to determine the strategy reference data.
[0068] For example, descriptive data is input into the strategy reference data determination model, and the output data of the strategy reference data determination model is used as the strategy reference data. The strategy reference data determination model can be built based on common neural networks, which will not be elaborated here. Further, during the training of the strategy reference data determination model, sample description data of the sample packaging material can be input into the model to predict the strategy reference data of the sample description data. Based on the prediction results and the corresponding strategy reference labels of the sample description data, the model is trained to improve its accuracy. The strategy reference labels include the data type of the sample description data and / or the packaging material type of the sample packaging material.
[0069] S120, Select the target processing strategy from different candidate processing strategies based on the strategy reference data.
[0070] Here, different candidate processing strategies can be understood as a collection of processing strategies used to process different descriptive data. The target processing strategy can be understood as the one that matches the descriptive data of the target packaging material, for example, the best-matching candidate processing strategy.
[0071] In one alternative implementation, the strategy reference data includes the data type describing the data. Accordingly, if the data type is a document type, the document processing strategy can be used as the target processing strategy; if the data type is an image type, the image processing strategy can be used as the target processing strategy.
[0072] Among them, document processing strategies and image processing strategies can be targeted processing strategies that are pre-set for document data and image data.
[0073] For example, the policy content of the document processing strategy is used to instruct page identification of different pages in the description data, and to obtain the text content of the corresponding page based on the page identification results, and then process the text content of each page based on target prompt words. Here, the target prompt words are words determined according to user needs and used to characterize the processing intent.
[0074] For example, the strategy content of the image processing strategy is used to instruct the identification of image elements in different images in the description data, and to process each image element based on the target prompt word.
[0075] In another alternative implementation, the strategy reference data includes the packaging type of the target packaging material. Accordingly, reference processing strategies corresponding to different packaging types can be predetermined, and the reference processing corresponding to the packaging type of the target packaging material can be used as the target processing strategy.
[0076] In another alternative implementation, the strategy reference data includes the data type of the descriptive data and the packaging type of the target packaging material. Accordingly, a first lookup table between the data type and the reference processing strategy, and / or a second lookup table between the packaging type and the reference processing strategy can be predetermined. The target processing strategy is determined based on the first reference processing strategy corresponding to the data type in the first lookup table, and / or the second reference processing strategy corresponding to the packaging type in the second lookup table.
[0077] For example, if the first reference processing strategy and the second reference processing strategy are the same, the first reference processing strategy or the second reference processing strategy is used as the target processing strategy; if the first reference processing strategy and the second reference processing strategy are different, one of them is selected as the target processing strategy; or, based on human experience, the target processing strategy is selected from the first reference processing strategy and the second reference processing strategy; or, the first reference processing strategy and the second reference processing strategy are combined as the target processing strategy.
[0078] S130, based on the target processing strategy, edits and processes the descriptive data.
[0079] Editing can include at least one of modification, addition, deletion and replacement.
[0080] For example, the target processing strategy can be broken down into steps to clarify the processing logic of the target processing strategy and determine the data to be processed corresponding to each processing logic. Then, based on each processing step of the target processing strategy, the corresponding data to be processed can be processed sequentially to achieve the purpose of editing the descriptive data.
[0081] It should be noted that the specific details of how the descriptive data is edited and processed based on the target processing strategy are described in detail in the following embodiments.
[0082] In the above packaging material data processing method, the descriptive data of the target packaging material is obtained and parsed to obtain the corresponding strategy reference data. Then, based on the strategy reference data, a target processing strategy is selected from different candidate processing strategies. Since the strategy reference data includes the data type of the descriptive data and / or the packaging type of the target packaging material, the target processing strategy determined in this process is matched with the descriptive data and / or the packaging type of the target packaging material. This makes the editing and processing of the descriptive data based on the target processing strategy more efficient, and also makes the processing results more in line with user needs.
[0083] Based on the technical solutions of the above embodiments, this application also provides an optional embodiment. In this optional embodiment, taking packaging labels as the object of editing processing as an example, the process of editing descriptive data based on the target processing strategy is refined.
[0084] See Figure 2 The editing and processing steps for the described data shown include:
[0085] S210, Determine the target processing strategy.
[0086] S220, when the target processing strategy is a document processing strategy, performs text content recognition on the description data, and edits the packaging label in the text content recognition result based on the target prompt words.
[0087] The target prompts are generated based on processing requirements.
[0088] Optionally, the target prompt word generation process can be as follows: receive the processing requirements (in text or audio form) corresponding to the description data; determine the processing object, processing action, and processing content based on the processing requirements; use standardized terms that the system can recognize to sort out the processing object, processing action, and processing content to form initial prompt words; if the initial prompt words pass the standard of completeness and unambiguity, use the initial prompt words as the target prompt words.
[0089] In one optional implementation, the description data includes at least one packaging material description page. Accordingly, page type identification can be performed for each packaging material description page; page types include editable pages and non-editable pages. If the packaging material description page is editable, the text content in the corresponding packaging material description page is extracted; if the packaging material description page is non-editable, the text content in the corresponding packaging material description page is identified using a text recognition tool. For the identified text content, packaging material labels are further identified, and the packaging material labels are edited accordingly based on target prompts. The text recognition tool can be any common text recognition tool, and this application does not impose any limitations on it.
[0090] For example, a tag feature library can be pre-set, and the packaging label content can be identified from all text content through tag feature matching. Furthermore, the packaging label content can be edited based on target prompts.
[0091] It should be noted that, in order to preserve the data type (i.e., document format) of the description data after editing the tag content, the following steps apply: When the editing process is a replacement, the replacement can be performed at the original text position within the tag content; when the editing process is an addition, content can be added to the blank areas of the tag content according to the original format of the description data, while maintaining consistency with the layout of the original tag data; when the editing process is a deletion, text can be deleted from the tag content, preserving the format and layout of the unedited tag data.
[0092] S230, when the target processing strategy is an image processing strategy, image element recognition is performed on the description data, and the packaging label in the image element recognition result is edited based on the target prompt words.
[0093] In one alternative implementation, descriptive data can be input into an image element recognition model to obtain the recognition results of each element and each element recognition result (including element type identifier). Elements identified as packaging material labels are taken as elements to be processed, and the elements to be processed are edited based on target prompt words.
[0094] The image element recognition model can be built based on common neural networks, which will not be elaborated here. Furthermore, when training the image element recognition model, sample data can be input into the model to predict the element recognition results. Based on the element labels of each image element in the sample data and the element recognition results predicted by the model, the image element recognition model can be trained to improve its accuracy.
[0095] In another alternative implementation, the input descriptive data can be globally parsed to identify the packaging label area in the image, and the position, format, and attribute information of core elements such as text, patterns, and barcodes within the label can be extracted. Based on the recognition results, the text within the packaging label can be extracted, and the text within the packaging label can be edited based on the target prompt words.
[0096] In another alternative implementation, the object of the editing process can also be a pattern in an image. Accordingly, semantic understanding can be performed on visual elements such as patterns / backgrounds in the description data (e.g., determining the logo position, background type, and parameter text format), and the pattern to be processed can be edited based on the target prompt words.
[0097] The above embodiments provide target processing strategies for descriptive data of document type and descriptive data of image type. Providing different processing strategies for different types of descriptive data enables higher data processing efficiency while improving data processing accuracy.
[0098] Based on the technical solutions of the above embodiments, this application also provides an optional embodiment. In this optional embodiment, packaging material types are divided into paper types and non-paper types, and based on this division, the steps of selecting a target processing strategy from different candidate processing strategies according to the packaging material type are described in detail.
[0099] See Figure 3 The target processing strategy selection steps shown include:
[0100] S310, Determine the packaging type of the target packaging material.
[0101] S320, when the packaging material type is paper, uses the printing resolution verification strategy as the target processing strategy.
[0102] Paper packaging materials can be further subdivided into different types based on the type of paper used. For example, they may include at least one of coated paper packaging materials, kraft paper packaging materials, and label paper packaging materials.
[0103] It is understandable that, in order to achieve better printing results, different paper packaging materials may require different printing processes (including offset printing, flexographic printing, or digital printing), and different elements on the same paper packaging material may also require different printing processes. Different printing processes have corresponding printing resolution thresholds. For example, the standard for the core of a pattern is 300 DPI (dots per inch), while large-format cartons can be adapted to 200-300 DPI.
[0104] In one optional implementation, when the packaging material type is paper-based, the paper type is subdivided, and a reference processing strategy corresponding to the subdivided paper packaging material is obtained as the target processing strategy. The target processing strategy is used to instruct compliance verification of the printing resolution of the target packaging material based on a corresponding printing resolution threshold.
[0105] In another alternative implementation, when the packaging material is paper-based, different elements in the description data are identified, and a target processing strategy is determined based on the reference processing strategy corresponding to each element. For example, the reference processing strategies corresponding to each element included in the description data are integrated, and the target processing strategy for the corresponding description data is retrieved from the database. The target processing strategy is used to instruct the printing resolution verification of each element in the description data based on the reference processing strategy corresponding to each element.
[0106] S330, when the packaging material type is not paper, select the layout recognition strategy and / or color gamut conversion strategy under the subdivided packaging material type corresponding to the non-paper type as the target processing strategy.
[0107] The subdivided packaging material types can include at least one of plastic, metal, glass, and composite materials.
[0108] It is understandable that, since non-paper packaging materials do not have the same unified adaptation logic as paper printing, their material characteristics, surface processes, and presentation carriers have different requirements for the layout adaptation and color reproduction of labels or patterns. Therefore, it is necessary to select the layout recognition strategy and / or color gamut conversion strategy corresponding to the specific packaging material type as the target processing strategy. The layout recognition strategy and color gamut conversion strategy corresponding to different specific packaging material types can be different.
[0109] Optionally, different layout recognition strategies are corresponding to different sub-types of packaging materials. For any sub-type of packaging material, the corresponding layout adaptation rules can be preset. Accordingly, the corresponding layout recognition strategy can be used to instruct the effective layout area recognition of non-paper type packaging materials in the description data, and adjust the layout of different elements in the description data according to the effective layout area recognition results and layout adaptation rules.
[0110] Optionally, different sub-packaging types correspond to different color gamut conversion strategies. For any sub-packaging type, its corresponding color gamut setting rules can be preset. Correspondingly, its corresponding color gamut conversion strategy can be used to instruct the color verification of the description data and to convert the colors at different positions in the description data according to the color verification results and the color gamut setting rules.
[0111] To improve the accuracy of data processing, the layout recognition strategy and color gamut conversion strategy under the subdivided packaging material types can be integrated and used as the target processing strategy.
[0112] The above embodiments provide a method for determining the target processing strategy for paper-based and non-paper-based packaging types. Setting different processing strategies for different packaging types can make the target processing strategy more compatible with the packaging type of the target packaging material, thereby achieving better data processing results.
[0113] Furthermore, to further improve the accuracy of data processing, a target processing strategy can be determined based on both the data type of the descriptive data and the packaging type of the target packaging material, so that the target processing strategy matches both the data type and the packaging material type.
[0114] Based on the technical solutions of the above embodiments, this application also provides an optional embodiment. In this optional embodiment, the selection of a target processing strategy from different candidate processing strategies according to strategy reference data is further described.
[0115] See Figure 4 The target processing strategy selection steps shown include:
[0116] S410, Obtain the label reference feature that matches the packaging type in the strategy reference data.
[0117] Different packaging material types have different label reference features. Label reference features can be understood as the features corresponding to the label setting rules for the corresponding packaging material type, which are used to constrain the label settings for the corresponding packaging material type.
[0118] For example, a label reference feature library matching different packaging material types can be pre-determined, and the packaging material types in the strategy reference data can be identified. Based on the identification results, label reference features matching the packaging material types can be obtained from the label reference feature library.
[0119] S420: Extract the current label features from the description data, and perform compliance verification on the current label features based on the label reference features.
[0120] The current label feature can be the label features included in the description data.
[0121] For example, it can be determined whether the current label feature includes all features in the corresponding label reference features, and if so, the current label feature is determined to be compliant; otherwise, the current label feature is determined to be non-compliant.
[0122] S430, if the compliance verification is passed, selects the target processing strategy from different candidate processing strategies based on the strategy reference data.
[0123] In the above embodiments, before selecting the target processing strategy from different candidate processing strategies based on the strategy reference data, the description data is verified for compliance to ensure the compliance of the processed description data.
[0124] Based on the technical solutions of the above embodiments, this application also provides an optional embodiment. In this optional embodiment, a packaging material data processing system is provided. The packaging material data processing system adopts a client-server architecture, including a front-end interaction module, a back-end processing engine, and a multi-model collaborative processing module. The front-end interaction module is used to receive the description data and processing requirements of the target packaging material uploaded by the user, and displays the processing results after processing the packaging material data. The back-end processing engine is used to identify the data type of the description data of the target packaging material, understand the intent of the processing requirements of the target packaging material, and coordinate the processing of the packaging material data by various data processing modules. The multi-model collaborative processing module includes a document processing submodule, an image processing submodule, and a content summarization submodule. The document processing submodule is used to process the description data of the target packaging material based on a document processing strategy; the image processing submodule is used to process the description data of the target packaging material based on an image processing strategy; and the content summarization submodule is used to integrate the processing results.
[0125] Taking the application of the packaging material data processing method provided in this application to the server in the aforementioned packaging material data processing system as an example, the packaging material data processing method will be described in detail.
[0126] See Figure 5 The packaging material data processing method shown includes:
[0127] S510, Obtain the description data and processing requirements of the target packaging material;
[0128] S520 performs intent understanding on the processing requirements and generates target prompts; and...
[0129] S530, parse the description data to obtain the policy reference data corresponding to the description data;
[0130] The strategy reference data includes the data type describing the data and / or the packaging type of the target packaging material;
[0131] S540, Obtain label reference features that match the packaging type in the strategy reference data;
[0132] S550: Extract the current label features from the description data and perform compliance verification on the current label features based on the label reference features;
[0133] S560, if compliance verification passes, selects the first processing strategy from different candidate processing strategies based on the data type; and,
[0134] For example, when the data type is a document, the document processing strategy is used as the first processing strategy; when the data type is an image, the image processing strategy is used as the first processing strategy.
[0135] S570, select a second processing strategy from different candidate processing strategies based on the packaging material type;
[0136] For example, when the packaging material type is paper, the printing resolution verification strategy is used as the second processing strategy; when the packaging material type is non-paper, the layout recognition strategy and / or color gamut conversion strategy under the subdivided packaging material type corresponding to the non-paper type are selected as the second processing strategy.
[0137] S580 combines the first processing strategy with the second processing strategy as the target processing strategy;
[0138] S590, based on the target processing strategy, edits and processes the descriptive data according to the target prompts.
[0139] For example, when the target processing strategy is a document processing strategy, text content recognition is performed on the descriptive data, and the packaging label in the text content recognition result is edited based on the target prompt words. For instance, when the document is in Portable Document Format (PDF), the target PDF file can be loaded using the Spire.PDF tool, all pages can be traversed and the document structure can be parsed, and format information such as font, color, position, and layout can be extracted simultaneously to construct a document structure tree. For natively editable PDFs, text content can be extracted directly using Spire.PDF. For scanned PDFs, MinerU Enhanced Optical Character Recognition (MinerU Enhanced OCR) technology is called to complete text recognition and extraction, ensuring that all types of PDF content can be accurately obtained. Based on the processing strategy generated according to user needs, text replacement, addition, and deletion operations are performed, supporting batch replacement and conditional replacement. The PdfTextReplacement function of Spire.PDF is used to complete content modification, maintaining the original PDF's font, size, color, layout, and other format attributes throughout the process, and finally outputting the processed PDF file.
[0140] For example, when the target processing strategy is an image processing strategy, image element recognition is performed on the descriptive data, and the packaging label in the image element recognition result is edited based on the target prompt words; for example, the Shusheng InternVL2-5-8B-MPO multimodal model can be called to perform content analysis on the input descriptive data (image), identify various visual and text elements such as scenes, objects, text, and people in the image, and identify the expressive content corresponding to each element, thereby generating a structured content description containing element attributes and semantic connotations; the structured content description and target prompt words are input to (Artificial Intelligence, AI), such as the doubao-seedream service of Volcano Engine, to edit the image.
[0141] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0142] Based on the same inventive concept, this application also provides a packaging material data processing apparatus for implementing the packaging material data processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more embodiments of the packaging material data processing apparatus provided below can be found in the limitations of the packaging material data processing method described above, and will not be repeated here.
[0143] In one exemplary embodiment, such as Figure 6 As shown, a packaging material data processing device is provided, including: a data parsing module 610, a strategy selection module 620, and a data processing module 630, wherein:
[0144] The data parsing module 610 is used to acquire the description data of the target packaging material and parse the description data to obtain the strategy reference data corresponding to the description data; wherein, the strategy reference data includes the data type of the description data and / or the packaging material type of the target packaging material;
[0145] The strategy selection module 620 is used to select the target processing strategy from different candidate processing strategies based on the strategy reference data;
[0146] The data processing module 630 is used to edit and process the descriptive data based on the target processing strategy.
[0147] In one embodiment, when the strategy reference data includes a data type of descriptive data, the strategy selection module 620 includes a first selection unit for selecting a document processing strategy as the target processing strategy when the data type is a document type; and a second selection unit for selecting an image processing strategy as the target processing strategy when the data type is an image type.
[0148] In one embodiment, the data processing module 630 includes at least one of the following: a first processing unit, configured to perform text content recognition on the description data when the target processing strategy is a document processing strategy, and to edit the packaging label in the text content recognition result based on the target prompt word; a second processing unit, configured to perform image element recognition on the description data when the target processing strategy is an image processing strategy, and to edit the packaging label in the image element recognition result based on the target prompt word; wherein the target prompt word is generated according to processing requirements.
[0149] In one embodiment, the description data includes at least one packaging material description page; correspondingly, the first processing unit includes a page recognition subunit for identifying the page type for each packaging material description page; the page type includes editable pages and non-editable pages; a content extraction subunit for extracting the text content in the corresponding packaging material description page when the packaging material description page is an editable page; and a content recognition subunit for recognizing the text content in the corresponding packaging material description page based on a text recognition tool when the packaging material description page is a non-editable page.
[0150] In one embodiment, when the strategy reference data includes the packaging type of the target packaging material, the packaging type includes paper type and non-paper type; accordingly, the strategy selection module 620 includes a third selection unit, used to select the printing resolution verification strategy as the target processing strategy when the packaging type is paper type; and a fourth selection unit, used to select the layout recognition strategy and / or color gamut conversion strategy under the subdivided packaging type corresponding to the non-paper type as the target processing strategy when the packaging type is non-paper type.
[0151] In one embodiment, the strategy selection module 620 includes a feature acquisition unit for acquiring label reference features that match the packaging type in the strategy reference data; a feature verification unit for extracting the current label features from the description data and performing compliance verification on the current label features based on the label reference features; and a strategy selection unit for selecting a target processing strategy from different candidate processing strategies based on the strategy reference data if the compliance verification passes.
[0152] Each module in the aforementioned packaging material data processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0153] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a packaging data processing method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0154] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0155] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0156] Obtain the description data of the target packaging material and parse the description data to obtain the strategy reference data corresponding to the description data; wherein, the strategy reference data includes the data type of the description data and / or the packaging material type of the target packaging material;
[0157] Based on the strategy reference data, select the target processing strategy from different candidate processing strategies;
[0158] Based on the target processing strategy, the descriptive data is edited and processed.
[0159] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0160] When the data type is document, the document processing strategy is used as the target processing strategy;
[0161] When the data type is image, the image processing strategy is used as the target processing strategy.
[0162] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0163] When the target processing strategy is a document processing strategy, text content recognition is performed on the descriptive data, and the packaging label in the text content recognition result is edited based on the target prompt words;
[0164] When the target processing strategy is an image processing strategy, image element recognition is performed on the descriptive data, and the packaging label in the image element recognition result is edited based on the target prompt words;
[0165] The target prompts are generated based on processing requirements.
[0166] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0167] For each packaging description page, page type identification is performed; page types include editable pages and non-editable pages.
[0168] If the packaging description page is an editable page, extract the text content from the corresponding packaging description page;
[0169] When the packaging description page is a non-editable page, the text content in the corresponding packaging description page is identified using a text recognition tool.
[0170] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0171] When the packaging material is paper, the printing resolution verification strategy is used as the target processing strategy.
[0172] When the packaging material type is not paper-based, the layout recognition strategy and / or color gamut conversion strategy corresponding to the sub-type of packaging material for non-paper-based packaging material are selected as the target processing strategy.
[0173] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0174] Obtain label reference features that match the packaging type in the strategy reference data;
[0175] Extract the current label features from the descriptive data, and perform compliance verification on the current label features based on the label reference features;
[0176] If the compliance verification is passed, the target processing strategy is selected from different candidate processing strategies based on the strategy reference data.
[0177] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0178] Obtain the description data of the target packaging material and parse the description data to obtain the strategy reference data corresponding to the description data; wherein, the strategy reference data includes the data type of the description data and / or the packaging material type of the target packaging material;
[0179] Based on the strategy reference data, select the target processing strategy from different candidate processing strategies;
[0180] Based on the target processing strategy, the descriptive data is edited and processed.
[0181] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0182] When the data type is document, the document processing strategy is used as the target processing strategy;
[0183] When the data type is image, the image processing strategy is used as the target processing strategy.
[0184] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0185] When the target processing strategy is a document processing strategy, text content recognition is performed on the descriptive data, and the packaging label in the text content recognition result is edited based on the target prompt words;
[0186] When the target processing strategy is an image processing strategy, image element recognition is performed on the descriptive data, and the packaging label in the image element recognition result is edited based on the target prompt words;
[0187] The target prompts are generated based on processing requirements.
[0188] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0189] For each packaging description page, page type identification is performed; page types include editable pages and non-editable pages.
[0190] If the packaging description page is an editable page, extract the text content from the corresponding packaging description page;
[0191] When the packaging description page is a non-editable page, the text content in the corresponding packaging description page is identified using a text recognition tool.
[0192] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0193] When the packaging material is paper, the printing resolution verification strategy is used as the target processing strategy.
[0194] When the packaging material type is not paper-based, the layout recognition strategy and / or color gamut conversion strategy corresponding to the sub-type of packaging material for non-paper-based packaging material are selected as the target processing strategy.
[0195] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0196] Obtain label reference features that match the packaging type in the strategy reference data;
[0197] Extract the current label features from the descriptive data, and perform compliance verification on the current label features based on the label reference features;
[0198] If the compliance verification is passed, the target processing strategy is selected from different candidate processing strategies based on the strategy reference data.
[0199] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0200] Obtain the description data of the target packaging material and parse the description data to obtain the strategy reference data corresponding to the description data; wherein, the strategy reference data includes the data type of the description data and / or the packaging material type of the target packaging material;
[0201] Based on the strategy reference data, select the target processing strategy from different candidate processing strategies;
[0202] Based on the target processing strategy, the descriptive data is edited and processed.
[0203] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0204] When the data type is document, the document processing strategy is used as the target processing strategy;
[0205] When the data type is image, the image processing strategy is used as the target processing strategy.
[0206] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0207] When the target processing strategy is a document processing strategy, text content recognition is performed on the descriptive data, and the packaging label in the text content recognition result is edited based on the target prompt words;
[0208] When the target processing strategy is an image processing strategy, image element recognition is performed on the descriptive data, and the packaging label in the image element recognition result is edited based on the target prompt words;
[0209] The target prompts are generated based on processing requirements.
[0210] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0211] For each packaging description page, page type identification is performed; page types include editable pages and non-editable pages.
[0212] If the packaging description page is an editable page, extract the text content from the corresponding packaging description page;
[0213] When the packaging description page is a non-editable page, the text content in the corresponding packaging description page is identified using a text recognition tool.
[0214] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0215] When the packaging material is paper, the printing resolution verification strategy is used as the target processing strategy.
[0216] When the packaging material type is not paper-based, the layout recognition strategy and / or color gamut conversion strategy corresponding to the sub-type of packaging material for non-paper-based packaging material are selected as the target processing strategy.
[0217] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0218] Obtain label reference features that match the packaging type in the strategy reference data;
[0219] Extract the current label features from the descriptive data, and perform compliance verification on the current label features based on the label reference features;
[0220] If the compliance verification is passed, the target processing strategy is selected from different candidate processing strategies based on the strategy reference data.
[0221] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0222] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0223] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0224] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for processing packaging material data, characterized in that, The method includes: Obtain description data of the target packaging material and parse the description data to obtain strategy reference data corresponding to the description data; wherein, the strategy reference data includes the data type of the description data and / or the packaging material type of the target packaging material; Based on the strategy reference data, a target processing strategy is selected from different candidate processing strategies; Based on the target processing strategy, the description data is edited.
2. The method according to claim 1, characterized in that, Based on the data type, a target processing strategy is selected from different candidate processing strategies, including at least one of the following: When the data type is a document type, the document processing strategy is used as the target processing strategy; When the data type is an image, the image processing strategy is used as the target processing strategy.
3. The method according to claim 1, characterized in that, The editing process of the descriptive data based on the target processing strategy includes at least one of the following: When the target processing strategy is a document processing strategy, the description data is subjected to text content recognition, and the packaging label in the text content recognition result is edited based on the target prompt words; When the target processing strategy is an image processing strategy, image element recognition is performed on the description data, and the packaging label in the image element recognition result is edited based on the target prompt words; The target prompt words are generated according to processing requirements.
4. The method according to claim 3, characterized in that, The description data includes at least one packaging description page; the text content recognition of the description data includes: For each packaging description page, page type identification is performed; the page type includes editable pages and non-editable pages. If the packaging description page is an editable page, extract the text content from the corresponding packaging description page; When the packaging description page is a non-editable page, the text content in the corresponding packaging description page is identified using a text recognition tool.
5. The method according to claim 1, characterized in that, The packaging material types include paper-based and non-paper-based types; Based on the packaging material type, a target processing strategy is selected from different candidate processing strategies, including: When the packaging material type is paper, the printing resolution verification strategy is used as the target processing strategy. When the packaging material type is non-paper type, the layout recognition strategy and / or color gamut conversion strategy under the sub-packaging material type corresponding to the non-paper type are selected as the target processing strategy.
6. The method according to any one of claims 1-5, characterized in that, The step of selecting a target processing strategy from different candidate processing strategies based on the strategy reference data includes: Obtain label reference features that match the packaging type in the strategy reference data; Extract the current tag features from the description data, and perform compliance verification on the current tag features based on the tag reference features; If the compliance verification is passed, the target processing strategy is selected from different candidate processing strategies based on the strategy reference data.
7. A packaging material data processing device, characterized in that, The device includes: A data parsing module is used to acquire description data of the target packaging material and parse the description data to obtain strategy reference data corresponding to the description data; wherein, the strategy reference data includes the data type of the description data and / or the packaging material type of the target packaging material; The strategy selection module is used to select a target processing strategy from different candidate processing strategies based on the strategy reference data. The data processing module is used to edit and process the descriptive data based on the target processing strategy.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-6.