Home decoration order billing method and system based on AI identification
By using AI recognition and automatic matching technology, the problem of low efficiency in manual entry of home decoration orders has been solved, and the automated processing and standardized generation of order data have been realized, which has improved the business response speed and customer satisfaction of home decoration companies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-03-03
AI Technical Summary
Traditional home decoration order processing relies on manual entry, which makes it difficult to handle complex and ever-changing order formats. Existing automated systems are insufficient in terms of format diversity and flexibility, resulting in low efficiency and difficulty in guaranteeing accuracy.
A home decoration order creation method based on AI recognition is adopted. By recognizing the file type, parsing the file content, and automatically matching and mapping it with the pre-set order template, standardized order documents are generated.
The system automates the home decoration order processing flow, improves the accuracy and efficiency of data extraction, reduces manual intervention and errors, adapts to diverse billing formats, and enhances the system's adaptability and usability.
Smart Images

Figure CN121600539A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of home decoration order processing, and in particular to a method and system for processing home decoration orders based on AI recognition. Background Technology
[0002] With the rapid development of the home decoration industry and the continuous growth of business volume, home decoration companies need to handle a large number of order processing tasks on a daily basis. These orders involve complex data from multiple dimensions such as customer information, product details, quantity, amount, and delivery time, and come from various sources, such as billing images, PDF documents, or Excel spreadsheets provided by suppliers.
[0003] Traditional home improvement order processing relies heavily on manual data entry. Staff members need to manually fill in order information, including key fields such as customer name, product code, quantity, unit price, and total amount, based on paper or electronic invoices. While this method is adequate for simple, uniformly formatted orders, it becomes inefficient and inaccurate when dealing with complex and varied scenarios in the home improvement business. For example, when processing invoices in inconsistent formats, using unstructured data (such as handwritten text in images), or using semi-structured data (such as heterogeneous column names in Excel), manual entry is prone to errors due to fatigue or negligence. For instance, manually processing image invoices requires visual recognition and transcription, a time-consuming process prone to misinterpretation. Processing PDF or Excel files necessitates repeated verification of data consistency, increasing operational complexity and time costs.
[0004] Existing automated invoicing systems are mostly based on fixed templates or rule engines, using predefined formats for data matching and extraction. However, the order formats in the home improvement industry are highly diverse and dynamic, with significant differences in billing structures between different companies, projects (such as new home renovations and old home remodeling), and even different time periods. Fixed rule systems struggle to adapt to this variability, often resulting in incomplete data extraction, incorrect field mapping, or format compatibility issues, leading to erroneous or missed extractions. Therefore, existing technologies have significant shortcomings in processing efficiency, accuracy, and flexibility, leaving room for improvement. Summary of the Invention
[0005] To address the aforementioned technical issues, this application provides a method and system for generating home decoration orders based on AI recognition.
[0006] The above-mentioned objective of this application is achieved through the following technical solution:
[0007] A method for creating home decoration orders based on AI recognition, comprising the following steps:
[0008] Obtain the invoice file uploaded by the user and identify the type of the invoice file, wherein the invoice file type is a bill image, PDF document or Excel spreadsheet;
[0009] The file to be issued is input into a pre-trained AI dialogue model, which parses the file content according to the file type and extracts the home decoration order data.
[0010] The system automatically matches and maps the home decoration order data with the corresponding fields in the preset order template. Based on the matching and mapping relationship, the extracted home decoration order data is automatically filled into the corresponding fields of the order template to generate a standardized home decoration order document with a uniform format.
[0011] By adopting the above technical solution, and by acquiring user-uploaded invoice files and intelligently identifying file types (such as bill images, PDF documents, or Excel spreadsheets), the system automates the invoicing process for home decoration orders, reducing manual intervention and initial processing time, and avoiding delays and errors caused by manual operation. The files are then input into a pre-trained AI dialogue model to parse the content and extract home decoration order data. AI technology is used to intelligently understand unstructured or semi-structured documents, improving the accuracy and efficiency of data extraction and adapting to diverse billing formats in the home decoration business. Finally, standardized home decoration order documents are generated by automatically matching, mapping, and filling invoicing templates, ensuring consistency and standardization of output, reducing manual editing errors and costs, and overall enhancing the adaptability and practicality of the invoicing system. This supports home decoration companies in quickly processing orders, improving business response speed and customer satisfaction.
[0012] In a preferred embodiment, this application can be further configured as follows: obtaining the user-uploaded invoice file and identifying the type of the invoice file specifically includes:
[0013] Receive one or more invoice files to be issued by the user through the client, obtain the file extension of the invoice files to be issued, and make a preliminary file type determination based on the file extension;
[0014] For files whose type cannot be accurately determined by their file extension or which pose a security risk, the binary header information of the file is further read, and a deep verification is performed based on a pre-built file magic number library to accurately identify the actual type of the file.
[0015] The identified file type tags are then bound to the corresponding files to be issued.
[0016] By adopting the above technical solution, preliminary file type judgment is performed based on the file extension, and deep verification is performed in conjunction with binary header information. This achieves dual protection for file type identification, improves the accuracy and security of identification, prevents malicious file uploads or format spoofing, and ensures stable system operation. By binding the finally identified file type tag with the file, accurate context is provided for subsequent AI parsing, reducing parsing failures caused by file format errors, and improving the robustness and reliability of the entire order processing process. This is especially suitable for multi-source file upload scenarios in home decoration business, reducing the burden of manual review.
[0017] In a preferred embodiment, this application can be further configured as follows: inputting the invoice file to a pre-trained AI dialogue model, parsing the file content according to the invoice file type, and extracting home decoration order data, specifically includes:
[0018] When the file type of the invoice to be issued is a bill image or a PDF document, the invoice to be issued is preprocessed to generate a processed invoice to be issued;
[0019] Based on the processed invoice file being converted into editable text data, the converted text data is input into a pre-trained AI dialogue model to identify and extract predefined basic invoice information in a structured manner.
[0020] The basic order information is stored in a structured format as key-value pairs to obtain home decoration order data, where "key" represents the information category and "value" represents the extracted content.
[0021] By adopting the above technical solution, when the file to be issued is an invoice image or PDF document, it is first preprocessed (such as image enhancement or text conversion) to generate editable text data, and then input into the AI dialogue model to extract basic information for issuing the invoice. This achieves intelligent parsing of unstructured documents and improves the accuracy and compatibility of data extraction. By storing the extracted data in a structured form of key-value pairs, the operability and consistency of the information are ensured, which facilitates subsequent template matching, reduces information loss during data conversion, and improves the overall automation level of home decoration order issuance, adapting to the processing needs of common formats such as images and PDFs.
[0022] In a preferred embodiment, this application can be further configured as follows: the step of inputting the invoice file to a pre-trained AI dialogue model, parsing the file content according to the type of the invoice file, and extracting home decoration order data further includes:
[0023] When the file type to be issued is an Excel spreadsheet, parse the file to be issued to obtain the number of worksheets it contains, their names, and the data range within each worksheet.
[0024] Identify and read the first row or specific header row containing column header names in each worksheet, perform semantic similarity matching between the identified column header names and the major category names in the preset order template, and determine the major category corresponding to each column of data in the order file.
[0025] Based on the successfully matched major category, extract all valid data rows in the same column under the column header name, and use them as the specific numerical information corresponding to that major category to form home decoration order data.
[0026] By adopting the above technical solution, when the file to be issued is an Excel spreadsheet, the worksheet structure and data range are parsed, and the column headers are matched with the template categories through semantic similarity, realizing intelligent alignment of structured data and improving the flexibility and accuracy of data mapping. By extracting the content of valid data rows to form the order data, the integrity and availability of information are ensured, the mapping failure caused by column name differences is reduced, the system's adaptability to Excel bills in home decoration business is enhanced, and batch processing and high-efficiency order issuance are supported.
[0027] In a preferred embodiment, this application can be further configured to automatically match and map the home decoration order data with corresponding fields in a preset order template, specifically including:
[0028] Retrieve all fields and their hierarchical relationships of a standard document based on a pre-set order template;
[0029] The home decoration order data is mapped to the fields in the order template based on the semantic similarity between the field name and the information key name or the category name.
[0030] For fields and information with semantic similarity exceeding a threshold, a direct mapping relationship is established, generating a complete mapping table from the source information to the fields in the invoice template.
[0031] By adopting the above technical solution, semantic similarity mapping is performed based on the field hierarchy relationship of the order template to generate a complete mapping table from source information to template fields. This achieves automation and standardization of data matching, improves the accuracy and traceability of mapping, and adapts to the diversity of field names in home decoration business through dynamic matching mechanism. This reduces the need for manual configuration, ensures the consistency between order data and template, reduces the risk of errors, and improves the efficiency of the overall process.
[0032] In a preferred example, this application can be further configured as follows: The step of automatically filling the extracted home decoration order data into the corresponding fields of the order template based on the matching mapping relationship to generate a standardized home decoration order document with a uniform format specifically includes:
[0033] Based on the complete mapping table, the extracted and mapped home decoration order data will be filled into the corresponding field positions in the order template;
[0034] For optional fields that exist in the template but whose information was not extracted from the source file, set them to empty or fill them with default values; for required fields in the template that are missing information, generate an exception log and notify the user to manually complete them.
[0035] Based on the template structure after data is filled in, a standardized home decoration order document with a uniform format is generated.
[0036] By adopting the above technical solution, data is automatically filled into template fields according to the mapping table, and exception logs are generated when optional fields are left blank or filled with default values and required fields are missing. This achieves intelligent document generation and fault tolerance, improving the integrity and reliability of output data. By generating standardized home decoration order documents, the uniformity of format is ensured, which facilitates subsequent reconciliation or auditing, reduces the workload of manual completion, and enhances the system's practicality and user experience.
[0037] In a preferred embodiment, this application can be further configured such that, after establishing a direct mapping relationship for fields and information with semantic similarity exceeding a threshold, the AI-based home decoration order creation method further includes:
[0038] When the semantic similarity of the home decoration order data is lower than the threshold or fails to match the fields of the order template, contextual reasoning is performed based on the home decoration order data to obtain the associated mapping data;
[0039] Based on the aforementioned associated mapping data, auxiliary mapping is performed on home decoration order data whose semantic similarity is below the threshold or whose fields fail to match the order template, thereby establishing an auxiliary mapping relationship.
[0040] By adopting the above technical solution, when the semantic similarity is below the threshold, auxiliary mapping is performed based on contextual reasoning, which realizes intelligent processing of low-matching data and improves the system's adaptability and robustness. By establishing auxiliary relationships through associated mapping data, the number of mapping failures is reduced, ensuring the continuity of the order processing process, adapting to the needs of marginal cases in the home decoration business, and improving the overall flexibility and coverage of the order processing system.
[0041] Secondly, the above-mentioned inventive objective of this application is achieved through the following technical solutions:
[0042] A home decoration order processing system based on AI recognition, the system comprising:
[0043] The invoice file recognition module is used to obtain the invoice file uploaded by the user and identify the type of the invoice file, wherein the invoice file type is a bill image, a PDF document or an Excel spreadsheet;
[0044] The order data acquisition module is used to input the order file to be issued into a pre-trained AI dialogue model, parse the file content according to the type of the order file to be issued, and extract the order data for home decoration orders.
[0045] The order creation module is used to automatically match and map the home decoration order creation data with the corresponding fields in the preset order creation template. Based on the matching and mapping relationship, the extracted home decoration order creation data is automatically filled into the corresponding fields of the order creation template to generate a standardized home decoration order document with a uniform format.
[0046] By adopting the above technical solution, and by acquiring user-uploaded invoice files and intelligently identifying file types (such as bill images, PDF documents, or Excel spreadsheets), the system automates the invoicing process for home decoration orders, reducing manual intervention and initial processing time, and avoiding delays and errors caused by manual operation. The files are then input into a pre-trained AI dialogue model to parse the content and extract home decoration order data. AI technology is used to intelligently understand unstructured or semi-structured documents, improving the accuracy and efficiency of data extraction and adapting to diverse billing formats in the home decoration business. Finally, standardized home decoration order documents are generated by automatically matching, mapping, and filling invoicing templates, ensuring consistency and standardization of output, reducing manual editing errors and costs, and overall enhancing the adaptability and practicality of the invoicing system. This supports home decoration companies in quickly processing orders, improving business response speed and customer satisfaction.
[0047] Thirdly, the above-mentioned objectives of this application are achieved through the following technical solutions:
[0048] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described AI-based home decoration order creation method.
[0049] Fourthly, the above-mentioned objectives of this application are achieved through the following technical solutions:
[0050] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described AI-based home decoration order creation method.
[0051] In summary, this application includes at least one of the following beneficial technical effects:
[0052] 1. By acquiring user-uploaded invoice files and intelligently identifying file types (such as bill images, PDF documents, or Excel spreadsheets), the system automates the invoicing process for home decoration orders, reducing manual intervention and initial processing time, and avoiding delays and errors caused by manual operation. The system inputs files into a pre-trained AI dialogue model to parse the content, extracting home decoration order data. Utilizing AI technology to intelligently understand unstructured or semi-structured documents improves the accuracy and efficiency of data extraction, adapting to diverse bill formats in the home decoration business. Finally, by automatically matching, mapping, and filling invoicing templates, standardized home decoration order documents are generated, ensuring consistency and standardization of output, reducing manual editing errors and costs. Overall, the system enhances its adaptability and usability, enabling home decoration companies to quickly process orders, improving business response speed and customer satisfaction.
[0053] 2. When the file to be issued is an Excel spreadsheet, the system parses the worksheet structure and data range, and matches column headers with template categories through semantic similarity. This achieves intelligent alignment of structured data, improving the flexibility and accuracy of data mapping. By extracting the content of valid data rows to form the order data, the system ensures the integrity and availability of information, reduces mapping failures caused by column name differences, enhances the system's adaptability to Excel bills in home decoration business, and supports batch processing and high-efficiency order issuance.
[0054] 3. Based on the hierarchical relationship of the fields in the order template, semantic similarity mapping is performed to generate a complete mapping table from source information to template fields, realizing the automation and standardization of data matching, improving the accuracy and traceability of mapping; through the dynamic matching mechanism, it adapts to the diversity of field names in home decoration business, reduces the need for manual configuration, ensures the consistency between order data and template, reduces the risk of errors, and improves the efficiency of the overall process.
[0055] 4. When the semantic similarity is below the threshold, auxiliary mapping is performed based on contextual reasoning, which realizes intelligent processing of low-matching data and improves the system's adaptability and robustness. By establishing auxiliary relationships through associated mapping data, the number of mapping failures is reduced, ensuring the continuity of the order process, adapting to the needs of marginal cases in the home decoration business, and improving the overall flexibility and coverage of the order system. Attached Figure Description
[0056] Figure 1 This is a flowchart of a home decoration order creation method based on AI recognition in one embodiment of this application;
[0057] Figure 2 This is a flowchart illustrating the implementation of step S10 in a home decoration order creation method based on AI recognition in one embodiment of this application.
[0058] Figure 3 This is a flowchart illustrating the implementation of step S20 in the AI-based home decoration order creation method in one embodiment of this application;
[0059] Figure 4 This is another implementation flowchart of step S20 in the AI-based home decoration order creation method in one embodiment of this application;
[0060] Figure 5 This is a flowchart illustrating the implementation of step S30 in the AI-based home decoration order creation method in one embodiment of this application;
[0061] Figure 6 This is another implementation flowchart of step S30 in the AI-based home decoration order creation method in one embodiment of this application;
[0062] Figure 7 This is another implementation flowchart of the home decoration order creation method based on AI recognition in one embodiment of this application;
[0063] Figure 8 This is a principle block diagram of a home decoration order creation system based on AI recognition in one embodiment of this application;
[0064] Figure 9 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0065] The present application will be further described in detail below with reference to the accompanying drawings.
[0066] In one embodiment, such as Figure 1 As shown, this application discloses a method for creating home decoration orders based on AI recognition, which specifically includes the following steps:
[0067] S10: Obtain the invoice file uploaded by the user and identify the type of the invoice file, wherein the invoice file type is a bill image, a PDF document, or an Excel spreadsheet.
[0068] In this embodiment, the "invoice to be issued" file refers to order-related data files provided by the user in the home decoration business, such as supplier invoices and customer order details. Its digital format includes image files (e.g., JPG, PNG), PDF documents, or Excel spreadsheets. Core data elements include basic customer information (e.g., customer name, contact information), product information (e.g., product code, product description), transaction information (e.g., quantity, unit price, total amount), and timestamps. File type identification is fundamental to subsequent processing, ensuring the system can correctly parse file content in different formats.
[0069] Specifically, the user uploads the files to be issued to the dialog box, receives one or more files uploaded by the user, obtains the file extension (such as ".pdf" or ".xlsx") to make a preliminary type judgment, and quickly classifies them using a pre-set file type mapping table.
[0070] Furthermore, for files with missing, forged, or security-risk extensions, the binary header information is read and matched against a pre-built file database to accurately identify the file's actual type and avoid misidentification. After identification, file type tags (such as "image," "PDF," and "Excel") are bound to the file for easy retrieval in subsequent processes.
[0071] S20: Input the order file to be issued into the pre-trained AI dialogue model, parse the file content according to the type of the order file to be issued, and extract the home decoration order data.
[0072] In this embodiment, the pre-trained AI dialogue model is a deep learning model based on natural language processing, capable of understanding semantic information in unstructured text and extracting key business entities. The parsing process is differentiated according to file type: for bill images or PDF documents, optical character recognition conversion is performed first; for Excel spreadsheets, structured data is parsed directly. The extracted invoice data includes fields such as customer, product, and amount, stored in key-value pairs to ensure structure and machine readability.
[0073] Specifically, different parsing modules are invoked based on the file type. When the file type is an invoice image or a PDF document, the system first preprocesses the file, including image enhancement (such as contrast adjustment and noise reduction), PDF text extraction, or OCR processing, to generate standardized, editable text data. For example, for image files, the Tesseract OCR engine is used to recognize text; for PDFs, the Apache PDFBox library is used to extract the text content. Subsequently, the text data is input into the AI dialogue model. The model uses Named Entity Recognition (NER) technology to identify predefined basic invoice information, such as the "customer name" entity and the "product code" entity, and establishes relationships between entities based on the Relation Extraction (RE) model (such as a product corresponding to a specific quantity and amount). The extracted information is stored in a structured key-value pair format, where the "key" represents the information category (such as "client_name") and the "value" is the specific content (such as "XX Decoration Company"), forming home decoration order invoice data. For Excel spreadsheet files, the system directly parses the file structure, obtains the number of worksheets, names, and data ranges, identifies column header rows, and uses semantic similarity algorithms (such as cosine similarity) to match the major categories of the order template to extract the valid data rows of the corresponding columns.
[0074] S30: Automatically match and map the home decoration order data with the corresponding fields in the preset order template. Based on the matching and mapping relationship, automatically fill the extracted home decoration order data into the corresponding fields of the order template to generate a standardized home decoration order document with a unified format.
[0075] In this embodiment, the pre-set order template is a standardized order document format used in the home decoration industry, containing fields such as "Customer Information," "Product List," and "Total Amount," as well as their hierarchical relationships (e.g., subfields "Product Code" and "Quantity" under "Product List"). Automatic matching and mapping are based on semantic similarity calculations, comparing the extracted data's key names or major categories with the template field names to ensure accurate data mapping. The population process considers field necessity: missing required fields trigger exception handling, while optional fields can be left blank or assigned default values, ultimately generating a unified format order document, improving data consistency and processability.
[0076] Specifically, the system loads the order template and retrieves all fields and their hierarchical relationships. Then, it performs a name-based semantic similarity mapping between the home improvement order data (key-value pairs or Excel column data) and the template fields, calculating similarity scores using word vector models (such as Word2Vec) or string similarity algorithms (such as Levenshtein distance). For fields with similarity scores exceeding a preset threshold (such as 0.8), a direct mapping relationship is established, generating a complete mapping table. For example, if the extracted "client_name" key matches the template field "customer name," a mapping is established. During population, the system fills the data into the corresponding positions in the template according to the mapping table; optional fields are left blank or filled with default values (such as "unknown") if no data is extracted; missing required fields generate an exception log, notifying the user to manually complete them. Finally, based on the populated template structure, the system serializes the data into standardized output (such as PDF documents or database records) to ensure consistent formatting.
[0077] In this embodiment, by acquiring user-uploaded invoice files and intelligently identifying file types (such as bill images, PDF documents, or Excel spreadsheets), an automated entry point for the home decoration order creation process is achieved, reducing manual intervention and initial processing time, and avoiding delays and errors caused by manual operation. The files are input into a pre-trained AI dialogue model to parse the content and extract home decoration order creation data. AI technology is used to intelligently understand unstructured or semi-structured documents, improving the accuracy and efficiency of data extraction and adapting to the diverse bill formats in the home decoration business. Finally, standardized home decoration order documents are generated by automatically matching, mapping, and filling invoice templates, ensuring the consistency and standardization of the output, reducing manual editing errors and costs, and enhancing the overall adaptability and practicality of the invoice creation system. This supports home decoration companies in quickly processing orders, improving business response speed and customer satisfaction.
[0078] In one embodiment, such as Figure 2 As shown, in step S10, which involves obtaining the user-uploaded invoice file and identifying the type of the invoice file, specifically includes:
[0079] S11: Receive one or more invoice files to be issued uploaded by the user through the client, obtain the file extension of the invoice files to be issued, and make a preliminary file type determination based on the file extension.
[0080] In this embodiment, file extensions are common identifiers for file formats, such as ".jpg" for images and ".pdf" for PDF documents. Initial judgment is based on a quick match between the extension and a pre-defined type list, improving processing efficiency. However, since extensions can be tampered with, deep verification is necessary.
[0081] Specifically, the process involves receiving uploaded files, parsing the request header to obtain file metadata, including the file extension, and then using a hash table or regular expressions to match the file extension with known data types (e.g., mapping ".xlsx" to Excel format) to complete the initial classification.
[0082] S12: For files whose type cannot be accurately determined by their file extension or which pose a security risk, the binary header information of the file is further read, and a deep verification is performed based on a pre-set file magic number library to accurately identify the actual type of the file.
[0083] In this embodiment, the binary header information is a specific byte sequence at the beginning of the file, such as the "‰PNG" magic number in a PNG file, which can reliably identify the file format. Deep verification enhances security by comparing the magic number database (which stores standard header information for common file types) to prevent type spoofing or malicious file uploads.
[0084] Specifically, the first few bytes (usually 4-8 bytes) of the file are read and compared byte by byte with entries in the magic number library. For example, for a suspected PDF file, the header information is checked to see if it begins with "%PDF-". If a match is found, the type is determined; otherwise, it is marked as "unknown" or a security alert is triggered.
[0085] S13: Bind the finally identified file type tags to the corresponding invoice files to be issued.
[0086] Specifically, the binding operation stores type tags (such as "PDF") as file metadata for easy retrieval by subsequent modules. Tags are associated with file IDs as key-value pairs to ensure a smooth workflow; the mapping between file IDs and type tags is stored in a database or memory cache. After binding, the file is routed to the appropriate parsing pipeline.
[0087] In one embodiment, such as Figure 3 As shown, in step S20, the order file to be issued is input into the pre-trained AI dialogue model. The file content is parsed according to the type of the order file to be issued, and the home decoration order data is extracted. Specifically, this includes:
[0088] S21 When the file type of the invoice to be issued is a bill image or a PDF document, the invoice to be issued is preprocessed to generate a processed invoice to be issued.
[0089] In this embodiment, preprocessing aims to optimize file quality and improve text extraction accuracy. This includes image correction, noise removal, and PDF structure parsing to generate a clean version of the file.
[0090] Specifically, for images, grayscale conversion, binarization, and edge detection are performed; for PDFs, tools are used to parse page objects, and the preprocessed files are temporarily stored in temporary storage for subsequent conversion.
[0091] S22: Based on the processed invoice file being converted into editable text data, the converted text data is input into a pre-trained AI dialogue model to identify and extract predefined basic invoice information in a structured manner.
[0092] In this embodiment, the converted text data is the output extracted from the order file. The AI model identifies entities and extracts relationships through sequence labeling, such as building data associations based on attention mechanisms.
[0093] Specifically, the text data is then fed into an AI dialogue model, which uses Named Entity Recognition (NER) and relation extraction techniques to identify entities and their associations. For example, from the text "Customer: Zhang San, Product: Flooring, Quantity: 10", the model extracts key-value pairs {"Customer Name": "Zhang San", "Product Name": "Flooring", "Quantity": "10"}. The AI model learns from context to adapt home decoration terminology, such as mapping "flooring" to standard product codes. The extraction process employs iterative dialogue, allowing the model to request user confirmation of ambiguous information, thus improving robustness.
[0094] S23: The basic order information is stored in a structured form as key-value pairs to obtain home decoration order data, where "key" is the information category and "value" is the extracted content.
[0095] Specifically, the extracted information is organized into JSON or a similar format, such as {"Customer Name": "Li Si", "Amount": "5000 Yuan"}. Keys are designed based on predefined invoice template fields, and values are cleaned (e.g., special characters are removed). During storage, the system adds metadata such as timestamps and file origins for easy traceability. This structured storage improves data operability and provides direct input for template matching.
[0096] In one embodiment, such as Figure 4 As shown, in step S20, the file to be issued is input into the pre-trained AI dialogue model. The file content is parsed according to the file type to be issued, and the home decoration order data is extracted. This also includes:
[0097] S24: When the file type to be issued is an Excel spreadsheet, parse the file to be issued to obtain the number of worksheets, their names, and the data range within each worksheet.
[0098] Specifically, it parses and reads Excel metadata, where the data range refers to the cell range, traverses the worksheet, obtains the range of names, row numbers, and column numbers, and identifies the valid data area.
[0099] S25: Identify and read the first row or specific header row containing column header names in each worksheet, perform semantic similarity matching between the identified column header names and the major category names in the preset order template, and determine the major category corresponding to each column of data in the order file.
[0100] In this embodiment, semantic similarity matching uses a word embedding model to align the file column headers with the template fields through semantic similarity calculation.
[0101] Specifically, the first row is read as the column header, and natural language processing techniques are used to calculate the cosine similarity between the column header and the template category (such as "Customer Information" or "Product Details"). If the similarity exceeds a threshold (e.g., 0.8), a match is successful; otherwise, the system attempts fuzzy matching or contextual reasoning. For example, the column header "Customer Name" matches the template "Customer Name" successfully. This semantic-based approach improves the flexibility of the mapping, adapting to the naming habits of different suppliers.
[0102] S26: Based on the successfully matched major category, extract the contents of all valid data rows in the same column under the column header name, and use them as the specific numerical information corresponding to that major category to form the home decoration order data.
[0103] In this embodiment, this sub-step is the final stage of data extraction, which converts the matched column data into structured order data to ensure data integrity and consistency.
[0104] Specifically, it iterates through all rows of the matching column, extracts valid data (such as non-empty values), and performs format validation (such as numeric type checks). The extracted content is grouped by major categories; for example, the major category "Product Details" contains all product row data. The data is stored in the form of a list or dictionary, forming the order dataset.
[0105] In one embodiment, such as Figure 5As shown, in step S30, the home decoration order data is automatically matched and mapped with the corresponding fields in the preset order template, specifically including:
[0106] S31: Retrieve all fields and their hierarchical relationships of a standard document based on a pre-set order template.
[0107] In this embodiment, the template field hierarchy is represented by a tree structure, such as the root node "Orders" with child nodes "Customer Information" and "Product List".
[0108] Specifically, the template configuration is loaded, and the list of fields, their types, constraints (such as required fields), and hierarchy are retrieved. For example, the template might define a root field "Order Header," which includes "Customer Details" and "Product List." This parsing supports recursive processing of complex templates, ensuring mapping accuracy.
[0109] S32: Map the home decoration order data to the fields in the order template based on the semantic similarity between the field name and the information key name or the category name.
[0110] In this embodiment, similarity calculation is used to align data keys with template fields, thus resolving terminology differences.
[0111] Specifically, the similarity between the order entry data key (e.g., "customer name") and the template field (e.g., "customer name") is calculated using edit distance or a deep learning model. Fields with successful matches are mapped directly; fields with low similarity may trigger auxiliary mappings. The mapping results are stored in a hash table to optimize filling efficiency.
[0112] S33: For fields and information with semantic similarity exceeding the threshold, establish a direct mapping relationship and generate a complete mapping table from the source information to the fields of the invoice template.
[0113] In this embodiment, the mapping table is a hash mapping structure, a blueprint for the population operation, which includes source fields, target fields, and transformation rules.
[0114] Specifically, a key-value pair mapping table is generated, for example, mapping the source data "cust_name" to the template "customerName". Threshold settings are based on business requirements to avoid over-matching.
[0115] In one embodiment, such as Figure 6 As shown, in step S30, the extracted home decoration order data is automatically filled into the corresponding fields of the order template according to the matching mapping relationship to generate a standardized home decoration order document with a uniform format. Specifically, this includes:
[0116] S34: Based on the complete mapping table, fill the extracted and mapped home decoration order data into the corresponding field positions of the order template.
[0117] In this embodiment, the filling operation is a template instantiation process, and data is inserted according to position.
[0118] Specifically, the mapping table is traversed, data values are copied to template fields, and data type conversions (such as string to number) are handled. Population is performed using a template engine to ensure formatting is preserved. For example, amount fields are automatically formatted as currency fields.
[0119] S35: For optional fields that exist in the template but whose information was not extracted from the source file, set them to empty or fill them with default values; for required fields in the template that are missing information, generate an exception log and notify the user to manually complete them.
[0120] In this embodiment, the exception log records the missing field ID and the reason.
[0121] Specifically, default values are set based on business rules (e.g., numeric fields default to 0). Missing required fields trigger workflow interruption and exception handling. Optional fields can be left blank or assigned default values. Required fields (e.g., "order ID") are checked, and if missing, an exception log is recorded and a notification (e.g., email or message) is triggered. Optional fields (e.g., "remarks") are filled with default values (e.g., "none"). This mechanism balances automation and manual intervention, improving system usability.
[0122] S36: Generate standardized home decoration order documents with uniform format based on the template structure after filling in the data.
[0123] Specifically, a document generation library is used to generate standardized home decoration order documents with a uniform format. The documents contain metadata (such as the generation time) for easy archiving.
[0124] In one embodiment, such as Figure 7 As shown, after step S33, that is, after establishing a direct mapping relationship for fields and information with semantic similarity exceeding the threshold, the AI-based home decoration order processing method further includes:
[0125] S301: When the semantic similarity of the home decoration order data is lower than the threshold or fails to match the fields of the order template, contextual reasoning is performed based on the home decoration order data to obtain the associated mapping data.
[0126] In this embodiment, this sub-step is an intelligent fallback for low similarity cases, enhancing mapping robustness through contextual reasoning. Home decoration data may have implicit associations (such as "unit price" and "quantity" deriving "amount"), and reasoning can compensate for the shortcomings of direct matching.
[0127] Specifically, analyze the data context, such as inferring relationships from adjacent fields (e.g., "quantity" often appears near "product code"). Use graph algorithms or rule engines to identify patterns and generate auxiliary mapping suggestions. For example, if the "price" field does not match, a default mapping is inferred from the data.
[0128] S302: Based on the aforementioned associated mapping data, auxiliary mapping is performed on home decoration order data whose semantic similarity is below the threshold or fails to match the fields of the order template, thereby establishing an auxiliary mapping relationship.
[0129] In this embodiment, this sub-step is an auxiliary mapping execution, which completes the mapping through the reasoning result, reducing manual intervention.
[0130] Specifically, the inferred data (such as derived field relationships) is added to the mapping table to establish auxiliary mapping relationships. For example, the source data "price" is auxiliaryly mapped to the template "unit price". The system records the inference logic for subsequent optimization.
[0131] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0132] In one embodiment, an AI-based home decoration order processing system is provided, which corresponds one-to-one with the AI-based home decoration order processing method described in the above embodiments. For example... Figure 8 As shown, this AI-based home decoration order processing system includes an order document recognition module, an order data acquisition module, and an order processing module. Detailed descriptions of each functional module are as follows:
[0133] The invoice file recognition module is used to obtain the invoice file uploaded by the user and identify the type of the invoice file, wherein the invoice file type is a bill image, a PDF document or an Excel spreadsheet;
[0134] The order data acquisition module is used to input the order file to be issued into a pre-trained AI dialogue model, parse the file content according to the type of the order file to be issued, and extract the order data for home decoration orders.
[0135] The order creation module is used to automatically match and map the home decoration order creation data with the corresponding fields in the preset order creation template. Based on the matching and mapping relationship, the extracted home decoration order creation data is automatically filled into the corresponding fields of the order creation template to generate a standardized home decoration order document with a uniform format.
[0136] Specific limitations regarding the AI-based home decoration order processing system can be found in the above section on the limitations of the AI-based home decoration order processing method, and will not be repeated here. Each module in the aforementioned AI-based home decoration order processing system 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 an electronic device, or stored in the memory of the electronic device as software, so that the processor can call and execute the corresponding operations of each module.
[0137] In one embodiment, an electronic device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9 As shown, the electronic device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores home renovation orders and invoice templates. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements an AI-based home renovation order creation method.
[0138] In one embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0139] Obtain the invoice file uploaded by the user and identify the type of the invoice file, wherein the invoice file type is a bill image, PDF document or Excel spreadsheet;
[0140] The file to be issued is input into a pre-trained AI dialogue model, which parses the file content according to the file type and extracts the home decoration order data.
[0141] The system automatically matches and maps the home decoration order data with the corresponding fields in the preset order template. Based on the matching and mapping relationship, the extracted home decoration order data is automatically filled into the corresponding fields of the order template to generate a standardized home decoration order document with a uniform format.
[0142] 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:
[0143] Obtain the invoice file uploaded by the user and identify the type of the invoice file, wherein the invoice file type is a bill image, PDF document or Excel spreadsheet;
[0144] The file to be issued is input into a pre-trained AI dialogue model, which parses the file content according to the file type and extracts the home decoration order data.
[0145] The system automatically matches and maps the home decoration order data with the corresponding fields in the preset order template. Based on the matching and mapping relationship, the extracted home decoration order data is automatically filled into the corresponding fields of the order template to generate a standardized home decoration order document with a uniform format.
[0146] 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, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0147] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0148] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for generating home decoration orders based on AI recognition, characterized in that, The AI-based home decoration order processing method includes the following steps: Obtain the invoice file uploaded by the user and identify the type of the invoice file, wherein the invoice file type is a bill image, PDF document or Excel spreadsheet; The file to be issued is input into a pre-trained AI dialogue model, which parses the file content according to the file type and extracts the home decoration order data. The system automatically matches and maps the home decoration order data with the corresponding fields in the preset order template. Based on the matching and mapping relationship, the extracted home decoration order data is automatically filled into the corresponding fields of the order template to generate a standardized home decoration order document with a uniform format.
2. The home decoration order processing method based on AI recognition according to claim 1, characterized in that, The step of obtaining the user-uploaded invoice file and identifying the type of the invoice file specifically includes: Receive one or more invoice files to be issued by the user through the client, obtain the file extension of the invoice files to be issued, and make a preliminary file type determination based on the file extension; For files whose type cannot be accurately determined by their file extension or which pose a security risk, the binary header information of the file is further read, and a deep verification is performed based on a pre-built file magic number library to accurately identify the actual type of the file. The identified file type tags are then bound to the corresponding files to be issued.
3. The method for issuing home decoration orders based on AI recognition according to claim 1, characterized in that, The step of inputting the order file to be issued into a pre-trained AI dialogue model, parsing the file content according to the type of the order file, and extracting home decoration order data specifically includes: When the file type of the invoice to be issued is a bill image or a PDF document, the invoice to be issued is preprocessed to generate a processed invoice to be issued; Based on the processed invoice file being converted into editable text data, the converted text data is input into a pre-trained AI dialogue model to identify and extract predefined basic invoice information in a structured manner. The basic order information is stored in a structured format as key-value pairs to obtain home decoration order data, where "key" represents the information category and "value" represents the extracted content.
4. The home decoration order processing method based on AI recognition according to claim 3, characterized in that, The step of inputting the order file to be issued into a pre-trained AI dialogue model, parsing the file content according to the type of the order file to be issued, and extracting home decoration order data also includes: When the file type to be issued is an Excel spreadsheet, parse the file to be issued to obtain the number of worksheets it contains, their names, and the data range within each worksheet. Identify and read the first row or specific header row containing column header names in each worksheet, perform semantic similarity matching between the identified column header names and the major category names in the preset order template, and determine the major category corresponding to each column of data in the order file. Based on the successfully matched major category, extract all valid data rows in the same column under the column header name, and use them as the specific numerical information corresponding to that major category to form home decoration order data.
5. The method for issuing home decoration orders based on AI recognition according to claim 1, characterized in that, The automatic matching and mapping of the home decoration order data with the corresponding fields in the preset order template specifically includes: Retrieve all fields and their hierarchical relationships of a standard document based on a pre-set order template; The home decoration order data is mapped to the fields in the order template based on the semantic similarity between the field name and the information key name or the category name. For fields and information with semantic similarity exceeding a threshold, a direct mapping relationship is established, generating a complete mapping table from the source information to the fields in the invoice template.
6. The method for issuing home decoration orders based on AI recognition according to claim 5, characterized in that, The step of automatically filling the extracted home decoration order data into the corresponding fields of the order template based on the matching mapping relationship to generate a standardized home decoration order document with a uniform format specifically includes: Based on the complete mapping table, the extracted and mapped home decoration order data will be filled into the corresponding field positions in the order template; For optional fields that exist in the template but whose information was not extracted from the source file, set them to empty or fill them with default values; for required fields in the template that are missing information, generate an exception log and notify the user to manually complete them. Based on the template structure after data is filled in, a standardized home decoration order document with a uniform format is generated.
7. The method for issuing home decoration orders based on AI recognition according to claim 5, characterized in that, After establishing a direct mapping relationship for fields and information with semantic similarity exceeding a threshold, the AI-based home decoration order creation method further includes: When the semantic similarity of the home decoration order data is lower than the threshold or fails to match the fields of the order template, contextual reasoning is performed based on the home decoration order data to obtain the associated mapping data; Based on the aforementioned associated mapping data, auxiliary mapping is performed on home decoration order data whose semantic similarity is below the threshold or whose fields fail to match the order template, thereby establishing an auxiliary mapping relationship.
8. A home decoration order processing system based on AI recognition, characterized in that, The AI-based home decoration order processing system includes: The invoice file recognition module is used to obtain the invoice file uploaded by the user and identify the type of the invoice file, wherein the invoice file type is a bill image, a PDF document or an Excel spreadsheet; The order data acquisition module is used to input the order file to be issued into a pre-trained AI dialogue model, parse the file content according to the type of the order file to be issued, and extract the order data for home decoration orders. The order creation module is used to automatically match and map the home decoration order creation data with the corresponding fields in the preset order creation template. Based on the matching and mapping relationship, the extracted home decoration order creation data is automatically filled into the corresponding fields of the order creation template to generate a standardized home decoration order document with a uniform format.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the AI-based home decoration order creation method as described in any one of claims 1 to 7.
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 AI-based home decoration order creation method as described in any one of claims 1 to 7.