Time element extraction method and system
By combining pre-trained language models and context-aware parsing algorithms with domain rules and dynamically calibrating time windows, we solve the problems of insufficient temporal context awareness and poor domain adaptability of existing time element extraction systems, and achieve efficient extraction and accurate parsing of multi-granularity time elements.
Patent Information
- Application Number
- CN202511159394.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2025-09-16
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing time element extraction system lacks temporal context awareness, poor domain adaptability, limited multi-granularity extraction capabilities and lacks domain knowledge fusion, resulting in low accuracy in time parsing across paragraphs and long texts, and is unable to meet the needs of complex businesses for multi-level time information.
A pre-trained language model is used to extract temporal semantic features in text, and the context-aware parsing algorithm is combined with domain rules for semantic fusion. Multi-granularity joint extraction is achieved through an end-to-end model, and the time window is dynamically calibrated to adapt to the time rules of different fields.
It effectively solves the problems of insufficient temporal context awareness and poor domain adaptability, improves multi-granularity extraction capabilities, improves the accuracy and applicability of time analysis, and supports cross-domain multi-granularity time element extraction.
Smart Images

Figure CN120653757A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of natural language processing technology, and more specifically, relates to a time element extraction method and system. Background Art
[0002] In the field of natural language processing, temporal feature extraction is a core task in information structuring. Existing temporal feature extraction systems typically employ rule-based approaches or statistical learning models. Rule-based approaches use manually written regular expressions or domain-specific grammar rules to match temporal expressions (e.g., \d{4}year\d{2}month) and define time types based on a fixed knowledge base to extract temporal features. Statistical learning models typically employ models such as CRF and HMM, using manual feature engineering to annotate temporal feature boundaries and types, thereby enabling temporal feature extraction.
[0003] However, the existing time element extraction system has the following main defects: 1. Insufficient temporal context awareness: Existing temporal element extraction systems have difficulty capturing implicit temporal dependencies in text (such as dynamic time expressions such as "in the past X months" and "since the nth quarter"). They lack a deep understanding of contextual semantics, resulting in low temporal parsing accuracy across paragraphs and long texts.
[0004] 2. Poor domain adaptability: Existing time factor extraction schemes do not take into account the differences in time rules in different fields (such as the treatment cycle in medical scenarios, the statute of limitations in legal scenarios, and the production cycle in industrial scenarios). They cannot dynamically calibrate the time calculation logic according to domain characteristics and lack universality.
[0005] 3. Limitations of multi-granularity extraction capabilities: Most time element extraction systems only support the identification of single-granularity time elements and are unable to simultaneously extract time points (such as "2025-06-03"), time periods (such as "2025 Q2"), and relative time expressions (such as "the next two weeks"), making it difficult to meet the needs of complex businesses for multi-level time information.
[0006] 4. Lack of domain knowledge integration: Failure to integrate domain-specific knowledge bases (such as industry time standards and special calendar rules) results in poor parsing of professional time expressions (such as "construction period of 30 days" and "warranty period of 1 year"). Summary of the Invention
[0007] The purpose of the present invention is to solve the problems of insufficient temporal context perception, poor domain adaptability, limited multi-granularity extraction capabilities and lack of domain knowledge fusion in existing time element extraction methods.
[0008] According to a first aspect of the present invention, a time element extraction method is provided, the method comprising the following steps: Extract temporal semantic features from the target text in a general domain based on the pre-trained language model to obtain a context vector containing temporal semantics. Based on the context-aware parsing algorithm, the context vector containing temporal semantics is semantically fused with the time rules of the domain to which the target text belongs to obtain a context vector fused with domain knowledge; According to the time rules of the domain to which the target text belongs, determining the absolute time expression corresponding to the relative time expression contained in the context vector fused with the domain knowledge, and obtaining the context vector calibrated by the dynamic time window; According to the context vector calibrated by the dynamic time window, the start position, end position, granularity type and normalized value of the time element are simultaneously predicted based on the end-to-end model.
[0009] Optionally, before the step of extracting temporal semantic features of the target text in a general domain based on the pre-trained language model to obtain a context vector containing temporal semantics, the method further includes: The target text is preprocessed, and the preprocessing includes performing word segmentation, part-of-speech tagging, entity recognition and candidate time expression recognition on the target text, and adding a domain label to the target text.
[0010] Optionally, before the step of adding a domain label to the target text, the method further includes: The domain to which the target text belongs is determined according to a domain classification model, where the domain classification model is a deep learning classification model or a domain recognition model based on text keywords.
[0011] Optionally, before the step of semantically fusing the context vector containing temporal semantics with the time rules of the domain to which the target text belongs based on the context-aware parsing algorithm to obtain the context vector fused with domain knowledge, the step further includes: The corresponding domain time rule base is loaded according to the domain label of the target text, and the domain time rule base is a structured rule base or a time relationship model based on a knowledge graph.
[0012] Optionally, after the step of calibrating the context vector according to the dynamic time window and simultaneously predicting the start position, end position, granularity type, and normalized value of the time element based on the end-to-end model, the method further includes: Output a structured time element list, which includes text fragments, parsing results, domain labels, time types and granularity information. The time types include time points, time periods and relative time expressions.
[0013] According to a second aspect of the present invention, a time element extraction system is provided, the method comprising the following functional modules: The temporal semantic feature extraction module is used to extract temporal semantic features in general domains from target texts based on a pre-trained language model to obtain a context vector containing temporal semantics. A domain knowledge fusion module is used to semantically fuse the context vector containing temporal semantics with the time rules of the domain to which the target text belongs based on a context-aware parsing algorithm to obtain a domain knowledge fused context vector; A dynamic time window calibration module is used to determine the absolute time expression corresponding to the relative time expression contained in the context vector of the domain knowledge fusion according to the time rules of the domain to which the target text belongs, and obtain the context vector of the dynamic time window calibration; A multi-granularity joint extraction module is used to simultaneously predict the start position, end position, granularity type and normalized value of the time element based on the context vector calibrated according to the dynamic time window and based on the end-to-end model.
[0014] Optionally, the time element extraction system further includes: The text preprocessing module is used to preprocess the target text, wherein the preprocessing includes word segmentation, part-of-speech tagging, entity recognition and candidate time expression recognition for the target text, and adding a domain label to the target text.
[0015] Optionally, the text preprocessing module is configured to determine the domain to which the target text belongs based on a domain classification model, where the domain classification model is a deep learning classification model or a domain recognition model based on text keywords.
[0016] Optionally, the time element extraction system further includes: The domain knowledge base module is used to load the corresponding domain time rule base according to the domain label of the target text. The domain time rule base is a structured rule base or a time relationship model based on a knowledge graph.
[0017] Optionally, the time element extraction system further includes: The time element output module is used to output a structured time element list, which includes text fragments, parsing results, field labels, time types and granularity information. The time types include time points, time periods and relative time expressions.
[0018] The beneficial effects of the present invention are: The present invention uses a pre-trained language model to extract temporal semantic features in text, identifies dynamic time expressions that are irrelevant to the fields of "near X cycles" and "since the nth stage", and can then capture the dependency between temporal expressions and contexts, thereby solving the problem of insufficient temporal context awareness in existing time element extraction implementations. Based on a context-aware parsing algorithm, the present invention semantically fuses the temporal semantic features extracted by the pre-trained language model with the temporal rules of the corresponding field, and dynamically calibrates the time window of the semantically fused temporal semantic features according to the temporal rules of the corresponding field, thereby effectively solving the problems of poor domain adaptability and lack of domain knowledge fusion in existing time element extraction implementations. The present invention uses an end-to-end model to achieve multi-granularity joint extraction of time elements, thereby effectively solving the problem of limited multi-granularity extraction capabilities in existing time element extraction implementations.
[0019] The time element extraction system of the present invention and the above-mentioned time element extraction method belong to a general inventive concept, and have at least the same beneficial effects as the above-mentioned time element extraction method, and its beneficial effects are not repeated here.
[0020] Other features and advantages of the present invention will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The present invention may be better understood by referring to the following description taken in conjunction with the accompanying drawings, in which the same or similar reference numerals are used throughout the drawings to designate the same or similar parts.
[0022] Figure 1 shows a flow chart of an implementation method of a time element extraction method according to an embodiment of the present invention; Figure 2 A principle block diagram of a time element extraction system according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to more fully understand the technical solution of the present invention, the exemplary embodiments of the present invention will be described in more comprehensive and detailed in conjunction with the accompanying drawings below. Obviously, the one or more embodiments of the present invention described below are only one or more of the specific ways of implementing the technical solution of the present invention, and are not exhaustive. It should be understood that other ways belonging to a general inventive concept can be used to implement the technical solution of the present invention, and should not be limited by the exemplary embodiments described. Based on one or more embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present invention.
[0024] Example: Figure 1 FIG1 shows a flow chart of the implementation of the time element extraction method of the embodiment of the present invention. Figure 1 The time element extraction method of the embodiment of the present invention includes the following steps: Step S100: preprocessing the target text, wherein the preprocessing includes performing word segmentation, part-of-speech tagging, entity recognition, and candidate time expression recognition on the target text, and adding a domain label to the target text; Step S200: extracting temporal semantic features in a general domain from the pre-processed target text based on the pre-trained language model to obtain a context vector containing temporal semantics; Step S300: Load the corresponding domain time rule library according to the domain label of the target text to obtain the time rules of the domain to which the target text belongs; Step S400: Based on a context-aware parsing algorithm, semantically fuse the context vector containing temporal semantics with the time rules of the domain to which the target text belongs to obtain a context vector fused with domain knowledge; Step S500: Determine the absolute time expression corresponding to the relative time expression contained in the context vector fused with the domain knowledge according to the time rules of the domain to which the target text belongs, and obtain the context vector calibrated by the dynamic time window; Step S600: Based on the context vector calibrated by the dynamic time window, the start position, end position, granularity type and normalized value of the time element are simultaneously predicted based on the end-to-end model; Step S700: Output a structured time element list, wherein the structured time element list includes text segments, parsing results, domain labels, time types and granularity information, wherein the time types include time points, time periods and relative time expressions.
[0025] Specifically, in an embodiment of the present invention, step S100 identifies candidate time expressions based on preprocessing of the target text, such as "since Q2" and "nearly three months"; step S200 generates a context vector containing temporal semantics through a pre-trained language model to capture the dependency between the time expression and the context. For example, "the past three months" needs to be associated with "stock price fluctuations" in the following text to determine the time base. Step S400 combines the time series feature vector with the domain knowledge base (such as the financial report quarterly mapping table and the trading day list) to enhance the parsing capability of professional time expressions. Step S500 calculates the actual time range of the relative time expression based on the current date and the trading calendar in the domain knowledge base. For example, "last week" → if the current date is 2025-06-03 (Tuesday), it is calibrated to 2025-05-26 to 2025-05-30 (trading days). Step S600 uses the end-to-end model to simultaneously predict the start / end position, granularity type, and normalized value of the time element. For example, "since Q2" → time period, [2025-04-01, 2025-06-03].
[0026] Specifically, in an embodiment of the present invention, a language model is trained through domain-independent time series modeling, and a general time series expression template is designed (such as "nearly [X][time unit]", "since the [X][cycle unit]"), and time units in different fields are adapted through variable replacement (for example, "time unit" can be replaced with "treatment day" in medical care and "shift" in industry).
[0027] Furthermore, in step S100 of the embodiment of the present invention, the domain to which the target text belongs is determined according to a domain classification model, and the domain classification model is a deep learning classification model or a domain recognition model based on text keywords.
[0028] Furthermore, in step S300 of the embodiment of the present invention, the domain time rule base is a structured rule base or a time relationship model based on a knowledge graph, and the time relationship model adopts the triple form of "time unit-domain-conversion rule".
[0029] Specifically, in step S500 of an embodiment of the present invention, when determining the absolute time expression corresponding to the relative time expression, if it involves a field with periodic time rules (such as semesters in education and radiotherapy cycles in medicine), a period matching algorithm can be introduced to optimize the time window calculation.
[0030] The following is a more detailed description of the time element extraction method according to an embodiment of the present invention based on a specific example: Specific example 1 (medical scenario - analysis of postoperative recovery time): Enter the text: "The patient underwent surgery on June 1, 2025, and was required to complete three follow-up examinations within 30 treatment days after surgery, with the first follow-up scheduled on the seventh treatment day after surgery."
[0031] S1 preprocessing stage: Word segmentation and NER: Using a medical-specific word segmenter, we correctly segmented "30 days of treatment after surgery" and "June 1, 2025," identifying "surgery" as an event entity and "2025-06-01" as the reference time point. Field classification: The medical field tag is triggered by the keywords "postoperative" and "treatment day" (confidence level 98%).
[0032] S2 temporal feature encoding: The BERT-medical model uses the input sequence [CLS], which indicates that the patient underwent surgery on June 1, 2025 and was required to complete three follow-up examinations [SEP] within 30 postoperative treatment days. When generating word vectors, the cosine similarity between the vectors for "postoperative" and "2025-06-01" reaches 0.92, establishing a strong temporal dependency.
[0033] Dependency graph construction: Through the medical knowledge graph, determine the "treatment day" and the "hospital suspension calendar" entity for subsequent calibration.
[0034] S3 domain knowledge integration: Load the medical rule library: Get the definition of "treatment day" (Monday to Friday, not the hospital's closed days), and call the hospital API to obtain the closed dates in June 2025 (June 10th and 17th).
[0035] Feature fusion: Encode the “treatment day” rule into a one-hot vector (1000, assuming 4 domains) and concatenate it with the “30” and “treatment day” vectors output by BERT.
[0036] S4 Dynamic Time Alignment: Determination of the benchmark point: Extract the specific time "2025-06-01" as the operation date.
[0037] Window calculation: Natural day range: 2025-06-0 to 2025-07-01 (30 days); Excluding closed days and weekends: the actual treatment days are 22 days, which needs to be extended to 2025-07-10 (a total of 30 treatment days).
[0038] S5 multi-granularity extraction: Time period: "30 treatment days after surgery" → Medical field - duration, [2025-06-02, 2025-07-10] (treatment days); Time point: "7th treatment day after surgery" → Medical field-point, 2025-06-12 (surgery day + 7 treatment days, skipping the closed day).
[0039] S6 output: json [ { "text": "30 days after treatment", "domain": "medical", "type": "duration", "granularity": "treatment_day", "value": "2025-06-02 / 2025-07-10", "calibration_rule": "Exclude hospital closure days and weekends" }, { "text": "7th treatment day after surgery", "domain": "medical", "type": "point", "granularity": "specific_day", "value": "2025-06-12" } ] Specific Example 2 (Legal Scenario - Contract Breach Time Analysis): Enter text: "If Party B fails to deliver the goods on time, it must pay liquidated damages within 15 working days from the date of breach of contract. The date of breach of contract shall be the date of Party A's receipt."
[0040] S1 preprocessing stage: Word segmentation and NER: Identify "15 working days" and "date of breach of contract" and use the legal NER model to label "working day" as a legal-specific time unit.
[0041] Field classification: Determined to be a legal field through "liquidated damages" and "date of receipt" (95% confidence level).
[0042] S2 temporal feature encoding: BERT-legal model: When encoding “15 working days from the date of breach of contract,” the attention weight of “15” and “working days” reaches 0.85, highlighting the quantitative modification relationship.
[0043] Dependency graph construction: Establish the equivalence relationship of "Date of Breach of Contract" → "Date of Receipt" (defined according to the contract terms).
[0044] S3 domain knowledge integration: Load the legal rule library: obtain the definition of "working day" (excluding holidays in 2025: New Year's Day (1 day), Spring Festival (3 days), National Day (3 days), etc.), and generate a holiday list.
[0045] Feature fusion: The “working day” rule and the “default date” vector are concatenated and input into the calibration module.
[0046] S4 Dynamic Time Alignment: Determination of reference point: Assume that the receipt date is "2025-05-20" (non-holiday).
[0047] Window calculation: Natural day range: 2025-05-21 to 2025-06-09 (15 days); Excluding weekends (May 25, 26, June 1, and 2) and the Dragon Boat Festival (June 10): the actual number of working days is 12, which needs to be extended to June 14, 2025 (a total of 15 working days).
[0048] S5 multi-granularity extraction: Time period: "15 working days" → Legal field-duration, [2025-05-21, 2025-06-14] (working days).
[0049] S6 output: json [ { "text": "15 working days", "domain": "legal", "type": "duration", "granularity": "working_day", "value": "2025-05-21 / 2025-06-14", "calibration_rule": "Exclude statutory holidays and weekends" } ] Specific example 3 (education scenario - course time analysis): Enter the text: "Examination week will be from Friday of the 3rd teaching week to Monday of the 6th teaching week of the spring semester of 2025. During this period, subject assessments will be held at 9:00 am every day."
[0050] S1 preprocessing stage: Word segmentation and NER: Identify "2025 Spring Semester," "3rd Teaching Week," and "Exam Week." The education NER model labels "semester" and "teaching week" as education-specific time units.
[0051] Field classification: Determined as education field by “semester” and “teaching week” (99% confidence level).
[0052] S2 temporal feature encoding: BERT-education model: Encodes "Friday of the 3rd teaching week" and assigns an attention weight of 0.88 to "teaching week" and "semester," establishing a semester-week hierarchical relationship.
[0053] Dependency graph construction: Through the education knowledge base, it is determined that the start date of the "2025 Spring Semester" is 2025-02-20, and the first teaching week is 2.20-2.24.
[0054] S3 domain knowledge integration: Load the education rule library: Obtain the definition of the "teaching week" (Monday to Friday are teaching days) and the semester week mapping table (week n = start date + (n-1) * 7 days).
[0055] Feature fusion: Embed the "semester start date" and "week number" rules into the time series vector to enhance the mapping ability from week to date.
[0056] S4 Dynamic Time Alignment: Determine the benchmark point: Get the start date of 2025-02-20 through "2025 Spring Semester".
[0057] Window calculation: Friday of the third teaching week: 2025-02-20 + 2*7 days + 4 days (Friday) = 2025-03-06; Monday of the 6th teaching week: 2025-02-20 + 5*7 days = 2025-03-30.
[0058] S5 multi-granularity extraction: Time period: "Friday of the 3rd teaching week to Monday of the 6th teaching week" → Education field - duration, [2025-03-06, 2025-03-30] (teaching days); Time point: "9:00 am every day" → Education field - point set, including 9:00 am on all teaching days within the interval.
[0059] S6 output: json [ { "text": "Friday of the 3rd teaching week to Monday of the 6th teaching week", "domain": "education", "type": "duration", "granularity": "teaching_week", "value": "2025-03-06T09:00:00Z / 2025-03-30T09:00:00Z", "calibration_rule": "Calculate according to the semester week mapping table" } ] The time element extraction method of the embodiment of the present invention proposes a parsing algorithm that combines domain-independent temporal feature extraction with domain-specific knowledge injection. By dynamically loading rule libraries from different domains, it achieves the generalization capability of "universal temporal framework + domain-specific calibration", overcoming the limitation of traditional methods that rely on single-domain rules. For the first time, a time window correction method based on a domain rule library is established, which supports automatic adaptation of time units (such as natural days, working days, and treatment days) according to the domain to which the text belongs, ensuring accurate parsing of expressions such as "near X time" in different scenarios (such as excluding holidays in legal scenarios and excluding non-treatment days in medical scenarios). An end-to-end model is designed to simultaneously process the extraction of time points, time periods, and relative time expressions in multiple domain scenarios, and output structured time elements containing domain attributes, breaking through the traditional extraction limitations of single granularity and single domain.
[0060] Accordingly, based on the time element extraction method of the embodiment of the present invention, the embodiment of the present invention also proposes a time element extraction system. Figure 2 FIG2 shows a principle block diagram of a time element extraction system according to an embodiment of the present invention. Figure 2 The time element extraction system of the embodiment of the present invention includes the following functional modules: The temporal semantic feature extraction module is used to extract temporal semantic features in general domains from target texts based on a pre-trained language model to obtain a context vector containing temporal semantics. A domain knowledge fusion module is used to semantically fuse the context vector containing temporal semantics with the time rules of the domain to which the target text belongs based on a context-aware parsing algorithm to obtain a domain knowledge fused context vector; A dynamic time window calibration module is used to determine the absolute time expression corresponding to the relative time expression contained in the context vector of the domain knowledge fusion according to the time rules of the domain to which the target text belongs, and obtain the context vector of the dynamic time window calibration; A multi-granularity joint extraction module is used to simultaneously predict the start position, end position, granularity type and normalized value of the time element based on the context vector calibrated according to the dynamic time window and based on the end-to-end model.
[0061] Specifically, in an embodiment of the present invention, the temporal semantic feature extraction module extracts temporal semantic features from text based on a pre-trained language model (such as BERT), and identifies dynamic time expression frameworks that are irrelevant to the field such as "nearly X cycles" and "since the nth stage"; the domain knowledge fusion module fuses temporal features with domain knowledge based on a context-aware parsing algorithm, constructs a cross-domain temporal dependency model, and parses the semantics of time expressions in specific contexts. For example, "nearly 30 cycles" corresponds to "nearly 30 treatment days" in a medical scenario, and "nearly 30 cycles" corresponds to "nearly 30 working days" in an industrial scenario; the dynamic time window calibration module calls the corresponding domain rule library to automatically correct the time window boundary based on the domain label and time reference point of the input text; the multi-granularity joint extraction module uses an end-to-end model to simultaneously identify time points, time periods, and relative time expressions, and outputs time elements containing domain attributes, such as the annotations "education field-semester time period" and "legal field-statute of limitations time point").
[0062] Furthermore, the time element extraction system of the embodiment of the present invention further includes: The text preprocessing module is used to preprocess the target text, wherein the preprocessing includes word segmentation, part-of-speech tagging, entity recognition and candidate time expression recognition for the target text, and adding a domain label to the target text.
[0063] Specifically, in the embodiment of the present invention, the processing object of the text preprocessing module is unstructured text in various fields, including customer service conversations, industry reports, and legal documents.
[0064] Furthermore, in an embodiment of the present invention, the text preprocessing module is configured to determine the domain to which the target text belongs based on a domain classification model, and the domain classification model is a deep learning classification model or a domain recognition model based on text keywords.
[0065] Furthermore, the time element extraction system of the embodiment of the present invention further includes: The domain knowledge base module is used to load the corresponding domain time rule base according to the domain label of the target text. The domain time rule base is a structured rule base or a time relationship model based on a knowledge graph.
[0066] Specifically, in this embodiment of the present invention, the domain knowledge base module supports custom loading of time rule libraries for various domains (e.g., medical treatment calendars, industrial production cycle tables, and legal statutes of limitations), storing domain-specific time units (e.g., "working day," "treatment day," and "calendar day") and calibration logic. The domain knowledge base module provides a standardized domain rule input format (e.g., JSON Schema) and supports user-defined time rules for new domains (e.g., adding a "delivery cycle" calculation rule for the logistics domain).
[0067] Furthermore, the time element extraction system of the embodiment of the present invention further includes: The time element output module is used to output a structured time element list, which includes text fragments, parsing results, field labels, time types and granularity information. The time types include time points, time periods and relative time expressions.
[0068] Specifically, for the time element extraction system of the embodiment of the present invention, a domain adaptation mechanism is introduced in the training stage, which balances the cross-domain generalization capability and domain-specific parsing accuracy by sharing the underlying temporal feature extractor and forking the domain-specific calibration module.
[0069] The time element extraction system of the embodiment of the present invention has the following beneficial effects: Cross-domain generalization: Through the interchangeability of domain rule bases, the system can quickly adapt to different fields such as medicine, law, education, and industry, without the need to develop separate models for each field, reducing domain adaptation costs by more than 90%.
[0070] Multi-granularity integrity: A single extraction can cover three types of elements: time point (such as "2025-06-03"), time period (such as "2025 Q2"), and relative time (such as "3 months after surgery"), meeting the complex time query requirements of scenarios such as intelligent customer service and document review.
[0071] Dynamic calibration accuracy: A time window correction mechanism based on domain rules improves the parsing accuracy of expressions such as "nearly X days" and "previous cycle" by over 35%. This is particularly effective in areas with special time units (such as medical treatment course calculations and industrial scheduling cycles).
[0072] Knowledge scalability: The open rule base interface supports user-defined domain time specifications to adapt to the time analysis requirements of emerging fields (such as space mission cycles).
[0073] Although one or more embodiments of the present invention have been described above, it should be understood by those skilled in the art that the present invention can be implemented in any other form without departing from its spirit and scope. Therefore, the embodiments described above are illustrative and not restrictive, and many modifications and substitutions will be apparent to those skilled in the art without departing from the spirit and scope of the present invention as defined in the appended claims.
Claims
1. A time factor extraction method, characterized in that: include: Extract temporal semantic features from the target text in a general domain based on the pre-trained language model to obtain a context vector containing temporal semantics. Based on the context-aware parsing algorithm, the context vector containing temporal semantics is semantically fused with the time rules of the domain to which the target text belongs to obtain a context vector fused with domain knowledge; According to the time rules of the domain to which the target text belongs, determining the absolute time expression corresponding to the relative time expression contained in the context vector fused with the domain knowledge, and obtaining the context vector calibrated by the dynamic time window; According to the context vector calibrated by the dynamic time window, the start position, end position, granularity type and normalized value of the time element are simultaneously predicted based on the end-to-end model.
2. The time element extraction method according to claim 1, characterized in that: Before the step of extracting temporal semantic features of the target text in a general domain based on the pre-trained language model to obtain a context vector containing temporal semantics, the method further includes: The target text is preprocessed, and the preprocessing includes performing word segmentation, part-of-speech tagging, entity recognition and candidate time expression recognition on the target text, and adding a domain label to the target text.
3. The time element extraction method according to claim 2, characterized in that: Before the step of adding a domain label to the target text, the method further includes: The domain to which the target text belongs is determined according to a domain classification model, where the domain classification model is a deep learning classification model or a domain recognition model based on text keywords.
4. The time element extraction method according to claim 2, characterized in that: Before the step of semantically fusing the context vector containing temporal semantics with the time rules of the domain to which the target text belongs based on the context-aware parsing algorithm to obtain a context vector fused with domain knowledge, the method further includes: The corresponding domain time rule base is loaded according to the domain label of the target text, and the domain time rule base is a structured rule base or a time relationship model based on a knowledge graph.
5. The time element extraction method according to claim 1, characterized in that: After the step of simultaneously predicting the start position, end position, granularity type, and normalized value of the time element based on the context vector calibrated according to the dynamic time window and based on the end-to-end model, the method further includes: Output a structured time element list, which includes text fragments, parsing results, domain labels, time types and granularity information. The time types include time points, time periods and relative time expressions.
6. A time element extraction system, characterized in that: include: The temporal semantic feature extraction module is used to extract temporal semantic features in general domains from target texts based on a pre-trained language model to obtain a context vector containing temporal semantics. A domain knowledge fusion module is used to semantically fuse the context vector containing temporal semantics with the time rules of the domain to which the target text belongs based on a context-aware parsing algorithm to obtain a domain knowledge fused context vector; A dynamic time window calibration module is used to determine the absolute time expression corresponding to the relative time expression contained in the context vector of the domain knowledge fusion according to the time rules of the domain to which the target text belongs, and obtain the context vector of the dynamic time window calibration; A multi-granularity joint extraction module is used to simultaneously predict the start position, end position, granularity type and normalized value of the time element based on the context vector calibrated according to the dynamic time window and based on the end-to-end model.
7. The time element extraction system according to claim 6, characterized in that: Also includes: The text preprocessing module is used to preprocess the target text, wherein the preprocessing includes word segmentation, part-of-speech tagging, entity recognition and candidate time expression recognition for the target text, and adding a domain label to the target text.
8. The time element extraction system according to claim 7, characterized in that: The text preprocessing module is configured to determine the domain to which the target text belongs based on a domain classification model, where the domain classification model is a deep learning classification model or a domain recognition model based on text keywords.
9. The time element extraction system according to claim 7, characterized in that: Also includes: The domain knowledge base module is used to load the corresponding domain time rule base according to the domain label of the target text. The domain time rule base is a structured rule base or a time relationship model based on a knowledge graph.
10. The time element extraction system according to claim 6, characterized in that: Also includes: The time element output module is used to output a structured time element list, which includes text fragments, parsing results, field labels, time types and granularity information. The time types include time points, time periods and relative time expressions.
Citation Information
Patent Citations
Text time information extraction and standardization method based on part-of-speech analysis
CN113535898A
Wikipedia text data-oriented affair graph construction method and system
CN115858798A
Hybrid time information extraction method and system based on context awareness
CN120179713A
Industrial model optimization method based on pre-trained large model
CN120449830A
A model for event time extraction and its application to temporal question answering system
IN202041035785A