Mail journey analysis method and system based on template recognition and large language model recognition

By employing template recognition and large language model recognition methods, the problems of poor adaptability and insufficient attachment compatibility in existing email parsing solutions are solved, enabling efficient and accurate extraction of travel information and intelligent reminders, which are suitable for various travel scenarios.

CN121457461APending Publication Date: 2026-02-03FEIYOU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511906073.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

Existing email parsing solutions rely on fixed regular expressions/keywords or single template rules, resulting in poor adaptability. They become ineffective with slight changes in format or language, have insufficient compatibility with attachments, and often suffer from missing or mismatched fields.

Method used

It employs a template-based recognition and large language model recognition method to retrieve emails through polling, clean, filter, and extract key entity information, determine travel itineraries and provide intelligent reminders, and supports the conversion and parsing of multiple file formats.

Benefits of technology

It improves the accuracy and efficiency of itinerary analysis, and is applicable to scenarios such as flights, trains, hotels, and conferences, thus enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121457461A_ABST
    Figure CN121457461A_ABST
Patent Text Reader

Abstract

The invention discloses a mail journey analysis method and system based on template recognition and large language model recognition, and relates to the field of mail journey analysis, and the method comprises the steps: obtaining a mail sent by a preset journey mailbox address in a bound user mailbox through polling; each mail is cleaned; screening the cleaned mails according to a preset keyword group; performing information extraction on the screened mails to obtain key entity information of each mail; obtaining travel information of each mail according to the key entity information of each mail; judging whether the journey of each mail is a historical journey according to the journey information of the mail; if yes, adding the journey of the mail into journey statistics; and if not, intelligently reminding the user according to the journey of the mail. According to the method, the accuracy and the analysis efficiency of travel analysis are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, and in particular to a method and system for parsing email journeys based on template recognition and large language model recognition. Background Technology

[0002] Email is a crucial link in the current flow of travel information. Most existing email parsing solutions rely on fixed regular expressions / keywords or single template rules, resulting in poor adaptability. They become ineffective with slight changes in format or language, and they lack compatibility with attachments (PDF / Excel, etc.), often leading to missing or mismatched fields. Summary of the Invention

[0003] To address the technical problems existing in the background art, this invention proposes a method and system for parsing email journeys based on template recognition and large language model recognition.

[0004] This invention proposes an email journey parsing method based on template recognition and large language model recognition, characterized by comprising: Poll to retrieve emails sent from preset trip email addresses in the bound user's email address; Clean each email; The cleaned emails are filtered based on preset keyword groups; Extract information from the selected emails to obtain the key entity information for each email; Based on the key entity information of each email, the travel information of each email is obtained; The system determines whether the trip in each email is a historical trip based on the trip information. If it is, the trip in that email is added to the trip statistics. If not, the system provides intelligent reminders to the user based on the trip in that email.

[0005] Preferably, each email is cleaned, specifically including: Determine whether each email contains an attachment; If not, determine if the email is in HTML format; if so, convert the email to text format and retain the tables to generate a Markdown text structure; if not, determine that the email is in text format and perform data cleaning processing on the email. If yes, determine if the email is in PDF format; if yes, convert the attachment to PNG format and parse it into Markdown text structure using OCR recognition technology; if no, determine if the email is in Excel format; if yes, directly parse the attachment into Markdown text structure; if no, do not process the attachment and send the processing failure result to the user.

[0006] Preferably, information is extracted from the emails to obtain key entity information for each email, specifically including: The pre-defined named entity recognition model is used to perform named entity recognition on each selected email to obtain the key entity information of each email.

[0007] Preferably, the travel information for each email is obtained based on the key entity information of each email, specifically including: Based on the key entity information of each email, retrieve the corresponding trip status from the preset trip website; based on the trip status, determine whether the trip exists; if so, generate trip information. The trip status is divided into two types: present and canceled.

[0008] Preferably, the process involves polling to retrieve emails sent from preset trip email addresses in the bound user's email address list, specifically including: polling to retrieve all emails sent from preset trip email addresses in the bound user's email address list.

[0009] Preferably, the process involves polling to retrieve emails sent from preset trip email addresses in the bound user's email address list, specifically including: Retrieve all emails from the previous polling time to the current time by polling the preset trip email address in the bound user's email address.

[0010] Secondly, this invention also proposes an email journey parsing system based on template recognition and large language model recognition, comprising: The acquisition module is used to poll and retrieve emails sent from preset trip email addresses in the bound user's email address; The cleaning module is used to clean each email. The filtering module is used to filter the cleaned emails based on preset keyword groups; The extraction module is used to extract information from the filtered emails and obtain the key entity information of each email; The itinerary generation module is used to obtain the itinerary information for each email based on the key entity information of each email. The judgment module is used to determine whether the trip of each email is a historical trip based on the trip information of each email; The trip statistics module is used to add the trip of an email to the trip statistics when the trip of a certain email is a historical trip. The smart reminder module is used to provide intelligent reminders to users based on the email's schedule when the email's schedule is not a historical schedule.

[0011] Preferably, the cleaning process of the cleaning module specifically includes: Determine whether each email contains an attachment; If not, determine if the email is in HTML format; if so, convert the email to text format and retain the tables to generate a Markdown text structure; if not, determine that the email is in text format and perform data cleaning processing on the email. If yes, determine if the email is in PDF format; if yes, convert the attachment to PNG format and parse it into Markdown text structure using OCR recognition technology; if no, determine if the email is in Excel format; if yes, directly parse the attachment into Markdown text structure; if no, do not process the attachment and send the processing failure result to the user.

[0012] Preferably, the information extraction process of the extraction module specifically includes: The pre-defined named entity recognition model is used to perform named entity recognition on each selected email to obtain the key entity information of each email.

[0013] Preferably, the process of generating trip information in the trip generation module specifically includes: Based on the key entity information of each email, retrieve the corresponding trip status from the preset trip website; based on the trip status, determine whether the trip exists; if so, generate trip information. The trip status is divided into two types: present and canceled.

[0014] The proposed email itinerary parsing method and system based on template recognition and large language model recognition in this invention first polls for emails sent from preset itinerary email addresses in the user's bound email account to avoid missing or omitting emails sent from preset itinerary email addresses; then, each email is cleaned to obtain email information that meets the format requirements for subsequent processing; the cleaned emails are filtered according to preset keyword groups to quickly filter out absolutely irrelevant text information and improve parsing efficiency; information is extracted from the filtered emails to obtain key entity information for each email, facilitating the rapid generation of subsequent itineraries; itinerary information for each email is obtained based on the key entity information of each email; it is determined whether the itinerary of each email is a historical itinerary based on the itinerary information of each email; if so, the itinerary of the email is added to the itinerary statistics; if not, intelligent reminders are given to the user based on the itinerary of the email.

[0015] This invention effectively improves the accuracy and efficiency of itinerary analysis and can be applied to itinerary scenarios such as flights, trains, hotels, and conferences. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating an email journey parsing method based on template recognition and large language model recognition proposed in this invention. Detailed Implementation

[0017] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0018] Firstly, such as Figure 1 As shown, the email journey parsing method proposed in this invention based on template recognition and large language model recognition includes: Poll to retrieve emails sent from preset trip email addresses in the bound user's email address; Clean each email; The cleaned emails are filtered based on preset keyword groups; Extract information from the selected emails to obtain the key entity information for each email; Based on the key entity information of each email, the travel information of each email is obtained; The system determines whether the trip in each email is a historical trip based on the trip information. If it is, the trip in that email is added to the trip statistics. If not, the system provides intelligent reminders to the user based on the trip in that email.

[0019] This invention first polls for emails sent from preset trip email addresses in the user's bound email address list to avoid missing or omitting emails sent from these addresses. Then, each email is cleaned to obtain email information that meets the required format for subsequent processing. The cleaned emails are then filtered based on preset keyword groups to quickly remove irrelevant text information and improve parsing efficiency. Information is extracted from the filtered emails to obtain key entity information for each email, facilitating rapid trip generation. Trip information for each email is obtained based on its key entity information. The trip information for each email is then used to determine if the trip is a historical trip. If so, the trip is added to trip statistics; otherwise, a smart reminder is sent to the user based on the trip information.

[0020] This invention effectively improves the accuracy and efficiency of itinerary analysis, and is applicable to itinerary scenarios such as flights, trains, hotels, and conferences, effectively enhancing the user experience.

[0021] In this embodiment, each email is cleaned, specifically including: Determine whether each email contains an attachment; If not, determine if the email is in HTML format; if so, convert the email to text format and retain the tables to generate a Markdown text structure; if not, determine that the email is in text format and perform data cleaning processing on the email. If yes, determine if the email is in PDF format; if yes, convert the attachment to PNG format and parse it into Markdown text structure using OCR recognition technology; if no, determine if the email is in Excel format; if yes, directly parse the attachment into Markdown text structure; if no, do not process the attachment and send the processing failure result to the user.

[0022] With this configuration, this embodiment improves the coverage of emails, covering formats such as HTML body text, digital source / scanned PDF, and Excel.

[0023] The data cleaning logic includes removing signatures or disclaimers.

[0024] In this embodiment, the cleaned emails are filtered according to preset keyword groups, specifically including: Based on preset keyword groups, it filters out emails that are relevant to the formation from all cleaned emails, so as to quickly filter out absolutely irrelevant text information and improve parsing efficiency.

[0025] It is important to understand that this embodiment sets preset keyword groups based on users' travel habits. For example, when a user is accustomed to traveling by air, the keyword groups may include airlines, airports, and air tickets; when a user is accustomed to traveling by train or high-speed rail, the keyword groups may include train stations or high-speed rail stations, train tickets or high-speed rail tickets, etc. When users are accustomed to traveling by plane, train, or high-speed rail, keyword phrases may include airlines, airports, air tickets, train stations or high-speed rail stations, train tickets or high-speed rail tickets, etc.

[0026] During the information extraction process of the selected emails, a preset named entity recognition model is used to perform named entity recognition on each email in order to obtain the key entity information of each email.

[0027] For example, in a scenario where users are accustomed to air travel, key entity information includes: flight number, date, airport, airport code, and city.

[0028] In this embodiment, the preset named entity recognition model can also be combined with a preset rule engine to perform named entity recognition, thereby improving the accuracy of recognition.

[0029] In this embodiment, the travel information of each email is obtained based on the key entity information of each email, specifically including: Based on the key entity information of each email, the corresponding trip status is obtained from the preset trip website; based on the trip status, it is determined whether the trip exists; if so, trip information is generated.

[0030] The trip status is divided into two types: present and canceled.

[0031] This embodiment can provide intelligent reminders to users through flight status interfaces, such as check-in counters, boarding gates, telephones, and mini-programs.

[0032] Of course, before polling to obtain emails sent from the preset trip email address in the bound user's email address, this embodiment also includes: Bind to user email addresses and set preset trip email addresses for polling.

[0033] In this embodiment, the preset trip email address includes one or more email addresses.

[0034] In one specific embodiment, polling for emails sent from preset trip email addresses in the bound user's email address list specifically includes: Poll to retrieve all emails sent from the preset trip email address in the bound user's email address.

[0035] In another specific embodiment, polling for emails sent from preset trip email addresses in the bound user's email address list specifically includes: The system polls the preset travel email addresses in the bound user's email address list to retrieve all emails between the last polling time and the current time, thereby reducing computational load and enabling faster email travel parsing.

[0036] Secondly, the present invention proposes an email journey parsing system based on template recognition and large language model recognition, comprising: The acquisition module is used to poll and retrieve emails sent from preset trip email addresses in the bound user's email address; The cleaning module is used to clean each email. The filtering module is used to filter the cleaned emails based on preset keyword groups; The extraction module is used to extract information from the filtered emails and obtain the key entity information of each email; The itinerary generation module is used to obtain the itinerary information for each email based on the key entity information of each email. The judgment module is used to determine whether the trip of each email is a historical trip based on the trip information of each email; The trip statistics module is used to add the trip of an email to the trip statistics when the trip of a certain email is a historical trip. The smart reminder module is used to provide intelligent reminders to users based on the email's schedule when the email's schedule is not a historical schedule.

[0037] In this embodiment, the cleaning process of the cleaning module specifically includes: Determine whether each email contains an attachment; If not, determine if the email is in HTML format; if so, convert the email to text format and retain the tables to generate a Markdown text structure; if not, determine that the email is in text format and perform data cleaning processing on the email. If yes, determine if the email is in PDF format; if yes, convert the attachment to PNG format and parse it into Markdown text structure using OCR recognition technology; if no, determine if the email is in Excel format; if yes, directly parse the attachment into Markdown text structure; if no, do not process the attachment and send the processing failure result to the user.

[0038] In this embodiment, the information extraction process of the extraction module specifically includes: The pre-defined named entity recognition model is used to perform named entity recognition on each selected email to obtain the key entity information of each email.

[0039] The trip information generation process of the trip generation module in this embodiment specifically includes: Based on the key entity information of each email, retrieve the corresponding trip status from the preset trip website; based on the trip status, determine whether the trip exists; if so, generate trip information. The trip status is divided into two types: present and canceled.

[0040] In one specific embodiment, the process of polling for emails sent from preset trip email addresses in the bound user's email address list is as follows: poll for all emails sent from preset trip email addresses in the bound user's email address list.

[0041] In another specific embodiment, the process of polling for emails sent from a preset trip email address in the bound user's email account is as follows: poll the preset trip email address in the bound user's email account to retrieve all emails between the previous polling time and the current time.

[0042] This embodiment also supports multilingual route parsing.

[0043] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for parsing email journeys based on template recognition and large language model recognition, characterized in that, include: Poll to retrieve emails sent from preset trip email addresses in the bound user's email address; Clean each email; The cleaned emails are filtered based on preset keyword groups; Extract information from the selected emails to obtain the key entity information for each email; Based on the key entity information of each email, the travel information of each email is obtained; The system determines whether the trip in each email is a historical trip based on the trip information. If it is, the trip in that email is added to the trip statistics. If not, the system provides intelligent reminders to the user based on the trip in that email.

2. The email journey parsing method based on template recognition and large language model recognition according to claim 1, characterized in that, Each email is cleaned, specifically including: Determine whether each email contains an attachment; If not, determine if the email is in HTML format; if so, convert the email to text format and retain the tables to generate a Markdown text structure; if not, determine that the email is in text format and perform data cleaning processing on the email. If yes, determine if the email is in PDF format; if yes, convert the attachment to PNG format and parse it into Markdown text structure using OCR recognition technology; if no, determine if the email is in Excel format; if yes, directly parse the attachment into Markdown text structure; if no, do not process the attachment and send the processing failure result to the user.

3. The email journey parsing method based on template recognition and large language model recognition according to claim 1, characterized in that, Information is extracted from the emails to obtain key entity information for each email, specifically including: The pre-defined named entity recognition model is used to perform named entity recognition on each selected email to obtain the key entity information of each email.

4. The email journey parsing method based on template recognition and large language model recognition according to claim 1, characterized in that, Based on the key entity information of each email, the travel information for each email is obtained, specifically including: Based on the key entity information of each email, retrieve the corresponding trip status from the preset trip website; based on the trip status, determine whether the trip exists; if so, generate trip information. The trip status is divided into two types: present and canceled.

5. The email journey parsing method based on template recognition and large language model recognition according to claim 1, characterized in that, Polling to retrieve emails sent from preset trip email addresses in the bound user's email address list, specifically: polling to retrieve all emails sent from preset trip email addresses in the bound user's email address list.

6. The email journey parsing method based on template recognition and large language model recognition according to claim 1, characterized in that, Polling to retrieve emails sent from preset trip email addresses in the bound user's email address list, specifically including: Retrieve all emails from the previous polling time to the current time by polling the preset trip email address in the bound user's email address.

7. A mail journey parsing system based on template recognition and large language model recognition, characterized in that, include: The acquisition module is used to poll and retrieve emails sent from preset trip email addresses in the bound user's email address; The cleaning module is used to clean each email. The filtering module is used to filter the cleaned emails based on preset keyword groups; The extraction module is used to extract information from the filtered emails and obtain the key entity information of each email; The itinerary generation module is used to obtain the itinerary information for each email based on the key entity information of each email. The judgment module is used to determine whether the trip of each email is a historical trip based on the trip information of each email; The trip statistics module is used to add the trip of an email to the trip statistics when the trip of a certain email is a historical trip. The smart reminder module is used to provide intelligent reminders to users based on the email's schedule when the email's schedule is not a historical schedule.

8. The email itinerary parsing system based on template recognition and large language model recognition according to claim 7, characterized in that, The cleaning process of the cleaning module specifically includes: Determine whether each email contains an attachment; If not, determine if the email is in HTML format; if so, convert the email to text format and retain the tables to generate a Markdown text structure; if not, determine that the email is in text format and perform data cleaning processing on the email. If yes, determine if the email is in PDF format; if yes, convert the attachment to PNG format and parse it into Markdown text structure using OCR recognition technology; if no, determine if the email is in Excel format; if yes, directly parse the attachment into Markdown text structure; if no, do not process the attachment and send the processing failure result to the user.

9. The email itinerary parsing system based on template recognition and large language model recognition according to claim 7, characterized in that, The information extraction process of the extraction module specifically includes: The pre-defined named entity recognition model is used to perform named entity recognition on each selected email to obtain the key entity information of each email.

10. The email journey parsing system based on template recognition and large language model recognition according to claim 7, characterized in that, The process of generating itinerary information in the itinerary generation module specifically includes: Based on the key entity information of each email, retrieve the corresponding trip status from the preset trip website; based on the trip status, determine whether the trip exists; if so, generate trip information. The trip status is divided into two types: present and canceled.