Extraction method and generation method of time information, electronic equipment and system

By adopting preset time representation rules and reverse counting methods in the AI ​​model, the problem of inaccurate time information representation in the AI ​​model is solved, and accurate extraction and representation of time information is achieved, thereby improving the accuracy of data processing.

CN121145801APending Publication Date: 2025-12-16HANGZHOU HIKVISION SYST TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511236186.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

Existing AI models struggle to accurately represent time information when processing data, impacting the accuracy of data processing.

Method used

By adopting preset time expression rules, time text is converted into time information and represented by time ordinal numbers in reverse order, avoiding complex time logic reasoning.

Benefits of technology

It improves the accuracy of time information, saves computing power, avoids time inference errors, and ensures the accuracy of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121145801A_ABST
    Figure CN121145801A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a time information extraction method, a time information generation method, electronic equipment and a time information system. Relates to the technical field of artificial intelligence. The to-be-processed information is input into a preset big data processing model, so that the preset big data processing model extracts a time text included in the to-be-processed information, the time text is converted according to a preset time expression rule, and time information obtained through conversion is output; wherein the preset time expression rule at least comprises that the time corresponding to the time length expressed by the time text in a preset time unit is expressed by adopting a reverse counting mode of a time ordinal number in a time period to which the preset time unit belongs, and the time period to which the preset time unit belongs is a time period corresponding to the date expression mode. In this way, the preset big data processing model can accurately represent the time indicated by the time text.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, in particular to a time information extraction method, a time information generation method, an electronic device and a system. BACKGROUND

[0002] AI (Artificial Intelligence) models are widely used in natural language processing, intelligent manufacturing and industrial fields, medical and health fields, and other fields, and are important tools for helping users solve problems and improve efficiency.

[0003] Users can usually use AI models to perform data processing tasks. In the process of processing data, AI models often need to extract time information in the data processing task, and perform subsequent data processing according to the extracted time information.

[0004] The accuracy of the AI model in representing time information will affect the accuracy of data processing, so a method is needed to accurately represent time information to ensure the accuracy of data processing. SUMMARY

[0005] The purpose of the embodiments of the present application is to provide a time information extraction method, a time information generation method, an electronic device and a system, so that a big data processing model can accurately represent the proposed time information. The specific technical solutions are as follows:

[0006] In a first aspect, the embodiments of the present application provide a time information extraction method, which comprises:

[0007] Obtaining to-be-processed information;

[0008] Inputting the to-be-processed information into a preset big data processing model, so that the preset big data processing model extracts time text included in the to-be-processed information, converts the time text according to a preset time expression rule, and outputs the converted time information;

[0009] The preset time expression rule at least includes representing the time length of the time text in the time unit corresponding to the preset time expression rule, using the reverse order counting method of the time sequence in the time period to which the preset time unit belongs, and the time period to which the preset time unit belongs is the time period corresponding to the date representation method.

[0010] In a second aspect, the embodiments of the present application provide a time information generation method applied to a task processing system, the system comprising a preset large language model, the method comprising:

[0011] Obtaining to-be-processed information;

[0012] The preset large language model is used to extract time text included in the to-be-processed information, and convert the time text according to a preset time expression rule to output converted time information.

[0013] The preset time expression rule at least includes representing a time length indicated by the time text as a reverse order count of time ordinal numbers in a time period to which a preset time unit belongs, and the time period to which the preset time unit belongs is a time period corresponding to a date representation manner.

[0014] In a third aspect, an electronic device is provided, and the electronic device comprises:

[0015] A memory for storing a computer program;

[0016] A processor for executing the program stored in the memory, and implementing the method of any one of the first aspect.

[0017] In a fourth aspect, an execution system is provided, and the system comprises a preset large language model, and at least one of a terminal device, a software platform and a server; the system is used to implement the method of any one of the second aspect.

[0018] In a fifth aspect, an execution system is provided, and the system comprises a preset large language model, and the preset large language model is used to implement the method of extracting time information of any one of the first aspect.

[0019] The system further comprises at least one of a terminal device, a software platform and a server; the at least one of the terminal device, the software platform and the server is used to execute a data search task indicated by the to-be-processed information by using the time information extracted by the preset large language model.

[0020] In a sixth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method of any one of the above aspects.

[0021] In a seventh aspect, a computer program product comprising instructions which, when executed on a computer, cause the computer to carry out the method of any one of the above aspects.

[0022] The embodiments of the present application have the following beneficial effects:

[0023] In the scheme provided by the embodiments of the present application, the electronic device can obtain to-be-processed information; input the to-be-processed information into a preset big data processing model, so that the preset big data processing model extracts time text included in the to-be-processed information, converts the time text according to a preset time expression rule, and outputs time information obtained by conversion; wherein the preset time expression rule at least includes that a time length represented by the time text is a time corresponding to a preset time unit, and the time length is represented by a reverse counting manner of time ordinal numbers in a time period to which the preset time unit belongs, and the time period to which the preset time unit belongs is a time period corresponding to a date representation manner.

[0024] By setting the preset time expression rule, the preset big data processing model can accurately represent the time indicated by the time text according to the preset time expression rule. Moreover, by using the reverse counting manner of time ordinal numbers, the preset big data processing model can accurately represent the time ordinal numbers in the time extraction and representation process without complex time logical reasoning, which not only saves computing power, but also avoids the influence of time reasoning errors on the accuracy of the output time information, thereby ensuring the accuracy of the time information extracted by the model. Of course, any product or method implementing the present application does not necessarily need to achieve all the advantages described above. BRIEF DESCRIPTION OF DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other embodiments can also be obtained by those skilled in the art based on these drawings.

[0026] Figure 1 A flowchart of the time information extraction method provided by the embodiments of the present application;

[0027] Figure 2 Another flowchart of the time information extraction method provided by the embodiments of the present application;

[0028] Figure 3 A flowchart of the time information generation method provided by the embodiments of the present application;

[0029] Figure 4 A flowchart of the data search task execution example provided by the embodiments of the present application;

[0030] Figure 5 A structural schematic diagram of a time information extraction device provided by the embodiments of the present application;

[0031] Figure 6 A structural schematic diagram of a time information generation device provided by the embodiments of the present application;

[0032] Figure 7 This is a schematic diagram of the structure of a task execution system provided in an embodiment of this application;

[0033] Figure 8 This is a schematic diagram of another task execution system provided in an embodiment of this application;

[0034] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0035] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.

[0036] In order for AI models to accurately represent time information, this application provides a method for extracting time information, a method for generating time information, an apparatus, an electronic device, a system, a computer-readable storage medium, and a computer program product. The following is a description of a method for extracting time information provided by this application.

[0037] The time information extraction method provided in this application can be applied to any electronic device that can use a big data processing model for time extraction, such as a server equipped with a big data processing model. This server can be a cloud server or a local server; the server can be a single electronic device or a cluster of multiple electronic devices, etc., without specific limitations. For clarity, it will be referred to as an electronic device below.

[0038] like Figure 1 As shown, a method for extracting time information includes:

[0039] S101: Obtain information to be processed.

[0040] S102: Input the information to be processed into a preset big data processing model so that the preset big data processing model extracts the time text included in the information to be processed, converts the time text according to a preset time expression rule, and outputs the converted time information.

[0041] The preset time expression rule includes at least the following: the time length represented by the time text is represented by the time corresponding to the preset time unit, and the time is represented by the time ordinal number of the time within the time period to which the preset time unit belongs, which is the time period corresponding to the date representation method.

[0042] In the solution provided in this application embodiment, the electronic device can acquire information to be processed; input the information to be processed into a preset big data processing model, so that the preset big data processing model extracts the time text included in the information to be processed, converts the time text according to a preset time expression rule, and outputs the converted time information; wherein, the preset time expression rule includes at least the following: the time length represented by the time text is the time corresponding to a preset time unit, and the time is represented by the time ordinal number of the time within the time period to which the preset time unit belongs, which is the time period corresponding to the date representation method.

[0043] By setting preset time representation rules, the preset big data processing model can accurately represent the time indicated by the time text according to these rules. Furthermore, by employing a reverse time ordinal counting method, the preset big data processing model can accurately represent the time ordinal number without performing complex time logic reasoning during time extraction and representation. This saves computing power and avoids errors in time reasoning affecting the accuracy of the output time information, ensuring the accuracy of the time information extracted by the model.

[0044] When a user wants an electronic device to perform a data processing task, the user can input information to instruct the electronic device to perform the data processing task. The electronic device can obtain the information input by the user and extract relevant parameters such as the time and processing requirements of the data processing task through a big data processing model, so as to accurately execute the data processing task instructed by the user.

[0045] For example, when a user wants to search for records using an application's record search function, they can enter text information in the application's text input box instructing the electronic device to search for records. The electronic device can obtain the user's input text information, use a big data processing model to extract relevant search parameters such as the search time range and the person(s) from the user's input text information, and perform subsequent search tasks based on the search parameters extracted by the big data processing model.

[0046] Time information is an important parameter in data processing. Accurately extracting time information using big data processing models is a crucial prerequisite and guarantee for ensuring that electronic devices can accurately execute subsequent data processing tasks.

[0047] When performing data processing tasks, the electronic device can perform the above step S101, that is, obtain the information to be processed.

[0048] The to-be-processed information can be user input information or a prompt word determined by the electronic device based on the user input information using a prompt word technology after the user input information is obtained. The user input information can be text information or a file such as a picture, a document, a video, and the like, and the type of the user input information is not limited.

[0049] In an implementation manner, the user can input text information in an information input box of a display interface of the electronic device, and the electronic device can obtain the user input text information and directly take the text information as the to-be-processed information.

[0050] In an implementation manner, the user can input text information in an information input box of a display interface of the electronic device, and the electronic device can obtain the user input text information and directly take the text information as the to-be-processed information.

[0051] The prompt word (Prompt) is a key term in the field of artificial intelligence (especially natural language processing), which refers to an instruction or question input by a user to an AI model to guide the AI model to generate a specific type of response.

[0052] For example, when the user wants to search for a data record, the user can input text information “search for the attendance record of Zhang Cai on last Saturday” in an information input box displayed on the display interface of the electronic device, and the electronic device can obtain the user input text information, determine a prompt word at least including the system prompt word “search for the attendance record of Zhang Cai on last Saturday”, and take the prompt word as the to-be-processed information.

[0053] As can be seen from the above, whether the user input information is directly taken as the to-be-processed information or the prompt word generated based on the user input information is taken as the to-be-processed information, the to-be-processed information includes the user input information. For example, in the case of text information, the to-be-processed information includes the user input text information; in the case of a picture, the to-be-processed information includes the user input picture, and the text information in the picture can be extracted using an OCR technology; in the case of voice or video, the to-be-processed information includes the user input voice or video, and the voice information or video information of the user can be converted into text information.

[0054] After obtaining the to-be-processed information, the electronic device can be configured to extract time information in the to-be-processed information by using a preset big data processing model. The electronic device can perform step S102, that is, inputting the to-be-processed information into the preset big data processing model, so that the preset big data processing model extracts time text included in the to-be-processed information, converts the time text according to a preset time expression rule, and outputs the converted time information.

[0055] The preset big data processing model can be various types of models that can extract time, such as a large language model, a big data model, and the like, which are not limited here.

[0056] In order to enable the preset big data processing model to extract time text in the to-be-processed information and accurately represent the time information corresponding to the time text, the present embodiment provides a preset time expression rule, which at least includes converting the time length represented by the time text into a time corresponding to a preset time unit, and representing the time in a reverse order counting manner of time ordinal numbers in a time period to which the preset time unit belongs. The time period to which the preset time unit belongs is a time period corresponding to a date representation manner.

[0057] The date representation manner is a representation form of a date, for example, year-month-day, year-quarter, year-week, and the like. For each date representation manner, each time unit in the date representation manner corresponds to a time period, for example, in the date representation manner of year-month-day, the year, month, and day correspond to a time period, respectively; in the date representation manner of year-quarter, the year and quarter correspond to a time period, respectively.

[0058] In addition, for each time unit, the time unit belongs to a time period corresponding to a previous time unit in a dimension of time units from high to low. For example, according to the date representation manner of year-month-day, the time unit day belongs to the time period corresponding to the time unit month; according to the date representation manner of week-day, the time unit day belongs to the time period corresponding to the time unit week. The dimension of time units includes but is not limited to: century, decade, year (y), quarter (q), month (m), decade, bi-week, week (w), day (d), hour (h), minute (m), second (s), millisecond (ms), microsecond (μs), nanosecond (ns), frame, and the like.

[0059] For each time period, the time sequence number of the time in the time period can be represented in a forward counting manner or in a reverse counting manner. The forward counting manner is a manner of calculating the time sequence number of the time in the time period in the order from early to late time, i.e., the time sequence number of the time passing first in the time period is small. The reverse counting manner is a manner of calculating the time sequence number of the time in the time period in the order from late to early time, i.e., the time sequence number of the time passing last in the time period is small.

[0060] The starting time sequence number in the forward counting manner and the reverse counting manner can be set according to actual representation needs, for example, the starting time sequence number in the forward counting manner can be 1, and the starting time sequence number in the reverse counting manner can be 0, for example, the starting time sequence number in the forward counting manner can be 1, and the starting time sequence number in the reverse counting manner can be 1, and the like, which are not specifically limited herein. For the sake of clear writing, the following is an example of the starting time sequence number in the forward counting manner being 1 and the starting time sequence number in the reverse counting manner being 0.

[0061] For example, the time period is a week, and a week includes 7 days. According to the forward counting manner, the time sequence number of Monday is 1, and the time sequence number of Sunday is 7. According to the reverse counting manner, the time sequence number of Monday is 6, and the time sequence number of Sunday is 0.

[0062] The time length represented by the time text includes at least the time corresponding to a time unit, for example, the time text is April 1, 2025, and the time length represented by the time text is April 1, 2025. Among them, 2025 is the time corresponding to the year time unit, April is the time corresponding to the month time unit, and 1 is the time corresponding to the day time unit.

[0063] In order to avoid complex time logic reasoning of the preset big data processing model, the preset big data processing model can represent the time length represented by the time text in the time corresponding to the preset time unit in the reverse counting manner of the time sequence number according to the preset time expression rule.

[0064] The preset time unit can be set according to the date representation manner and actual application needs, for example, in the case of the date representation manner being year-month-day, the preset time unit can be day, month; in the case of the date representation manner being year-week-day, the preset time unit can be day, week, and the like, which are not specifically limited herein.

[0065] In this way, when the time corresponding to a preset time unit included in the time text is close to the end time of the time period to which the preset time unit belongs, according to the preset time expression rule, the time corresponding to the preset time unit can be represented in a reverse counting manner of time ordinal numbers, compared with representing the time in a forward counting manner of time ordinal numbers, the preset big data processing model does not need to infer the period length of the time period to which the preset time unit belongs, thereby avoiding the preset big data processing model from making mistakes in a complex time inference process, saving computing power, and avoiding affecting the accuracy of time information expression.

[0066] For example, the time text is "the last day of last month", the preset big data processing model converts the time text according to the preset time expression rule, the current time is July, and the preset time unit is day, then the period length of the time period of last month can be 28 days, 29 days, 30 days or 31 days, and the time ordinal number of the last day is 0 in a reverse counting manner of time ordinal numbers.

[0067] In an implementation manner, due to the same time ordinal number, the specific time corresponding to the time ordinal number in a time period is different in the forward counting manner of time ordinal numbers and the reverse counting manner of time ordinal numbers, for example, when the time period is a week, the time of time ordinal number 1 is the first day of the week (i.e., Monday) in the forward counting manner, and the time of time ordinal number 1 is the second last day of the week (i.e., Saturday) in the reverse counting manner. Based on this, in order to distinguish the counting manner of the time ordinal number, the representation manner of the time ordinal number can be identified by using the forward counting identifier and the reverse counting identifier, so as to distinguish whether the time ordinal number is represented in the forward counting manner or the reverse counting manner.

[0068] The reverse counting identifier is used to connect two time information units, the time unit of the former time information unit is higher in dimension than the time unit of the latter time information unit, and the time unit of the former time information unit contains several time units of the latter time information unit; the reverse counting identifier is used to represent that, from the time unit of the former time information unit, the time parameter of the latter time information unit is counted in the time unit of the latter time information unit.

[0069] The forward counting identifier and the reverse counting identifier can be set according to actual application needs, for example, the forward counting identifier can not be set, and the reverse counting identifier is set as "~"; for another example, the forward counting identifier can be set as "#", and the reverse counting identifier is set as "##", and the like, which are all reasonable and are not limited here.

[0070] For example, the reverse counting identifier can be set as "~", and the start number of the reverse counting is 0, then the time number of the last day of a month in the reverse counting mode is 0, and the last day can be represented as ~0, or 0~, or (~0); for example, December 31st is represented as 12m~0d; November 29th is represented as 11m~1d, and the like.

[0071] For another example, the reverse counting identifier is set as "~", the time text is "the first week of last month", and the preset big data processing model can convert the time text into time information -1m1w1d to -1m1w~0d according to the preset time expression rule, where the start time is -1m1w1d, and the end time is -1m1w~0d. In the end time, 1w is the time unit of the previous time information unit, 0d is the time unit of the subsequent time information unit, and 1w~0d means that from the time unit of 1w in the week, the time unit of 0d in the day is taken as a unit, and the time parameter 0 of the reverse 0d in the day is counted.

[0072] For another example, the time text is "4Month", and the time length indicated by the time text is from the first day of the fourth month to the last day of the fourth month. The preset time unit is day, the forward counting identifier can not be set, and the reverse counting identifier is set as "~", and then the preset big data processing model can convert the time text into time information 4m1d-4m~0d according to the preset time expression rule.

[0073] For another example, the time text is "This Year", and in the case of date representation mode of year-month-day, the time length indicated by the time text is from the first day of January 2025 to the last day of December 2025. The preset time unit is month and day, the forward counting identifier can be set as "#", and the reverse counting identifier can be set as "~", and then the preset big data processing model can convert the time text into time information 2025y#1m#1d-2025y~0m~0d according to the preset time expression rule.

[0074] In order to make the writing clear, in the following text, the setting of the forward counting identifier can not be set, and the reverse counting identifier is set as "~" is taken as an example to explain the scheme, and of course the setting mode of the forward counting identifier and the reverse counting identifier is only an example and not limited.

[0075] Based on the preset time expression rule provided in the present application, after the electronic device obtains the to-be-processed information, the to-be-processed information can be input into the preset big data processing model, the preset big data processing model can extract the time text included in the to-be-processed information, and convert the time text according to the preset time expression rule, and output the converted time information, so that the electronic device can obtain the time information extracted by the preset big data processing model, and the time information is expressed according to the preset time expression rule.

[0076] In an implementation manner, after inputting the to-be-processed information into the preset big data processing model, the electronic device can further input the preset time expression rule into the preset big data processing model, so that the preset big data processing model extracts the time text included in the to-be-processed information, converts the time text according to the preset time expression rule, and outputs the converted time information.

[0077] In an implementation manner, the electronic device can embed the preset time expression rule into a prompt word, and input the prompt word as the to-be-processed information into the preset big data processing model, so that the preset big data processing model extracts the time text included in the to-be-processed information, converts the time text according to the preset time expression rule, and outputs the converted time information. The prompt word at least includes text information input by the user, a system prompt word, and the preset time expression rule.

[0078] In an implementation manner, the electronic device can also obtain a training sample about the preset time expression rule, and train the preset big data processing model by using the training sample. Thus, after obtaining the to-be-processed information, the electronic device can input the to-be-processed information into the preset big data processing model, the preset big data processing model can extract the time text included in the to-be-processed information, convert the time text according to the preset time expression rule, and output the converted time information.

[0079] In an implementation manner, if the preset big data processing model extracts the time text in the to-be-processed information, and no time text is extracted, the preset big data processing model can output an empty string at the output position of the time information.

[0080] In an implementation manner, in a case where the time text is an accurate time expressed in an ISO (International Organization for Standardization) 8601 standard format, the preset big data processing model can convert the time text in the ISO 8601 standard format according to the preset time expression rule provided in the embodiments of the present application, and input the time information corresponding to the time text in the ISO 8601 standard format. In this way, the time extraction and expression of the accurate time in the ISO 8601 standard format input by the user can be implemented by using the preset time expression rule, and the time expressed in the ISO 8601 standard format cannot be processed, so that the accuracy of the time extraction result is ensured.

[0081] For example, the time text includes a start time and an end time expressed in a combination of date and time in the ISO8601 standard format, and the start time is 2025-05-03T10:01:20+08:00 and the end time is 2025-05-03T11:02:20+08:00, where T is a symbol used in the ISO8601 standard format to combine the date part and the time part, and +8:00 is the time zone offset, indicating that the time zone (East Eight Zone) corresponding to the time is 8 hours faster than the Universal Time Coordinated (UTC).

[0082] The preset big data processing model can convert the time text in the ISO8601 standard format according to the preset time expression rule provided by the embodiment of the present application, that is, convert the start time 2025-05-03T10:01:20+08:00 and the end time 2025-05-03T11:02:20+08:00 according to the preset time expression rule to obtain the converted start time 2025y5m3dT10:01:20 and the end time 2025y5m3dT11:02:20.

[0083] As can be seen, in the embodiment, by setting the preset time expression rule, the preset big data processing model can accurately express the time indicated by the time text according to the preset time expression rule. Moreover, by using the reverse counting manner of the time ordinal, the preset big data processing model can accurately express the time ordinal without complex time logical reasoning in the time extraction and expression process, which not only saves computing power, but also avoids the influence of time reasoning errors on the accuracy of the output time information, thereby ensuring the accuracy of the time information extracted by the model.

[0084] As an implementation manner of the embodiment of the present application, the preset time expression rule can include:

[0085] In the case where the length of time indicated by the time text is uncertain, the length of time indicated by the time text is expressed in the reverse counting manner of the time ordinal within the time period to which the preset time unit belongs at the time corresponding to the preset time unit; and / or,

[0086] In the case where the length of time indicated by the time text is certain, the length of time indicated by the time text is expressed in the forward counting manner of the time ordinal within the time period to which the preset time unit belongs, or in the reverse counting manner of the time ordinal within the time period to which the preset time unit belongs, or in the manner with smaller data amount between the forward counting manner and the reverse counting manner.

[0087] In the embodiments of the present application, the time length of the time indicated by the time text can be determined or not determined. For example, in the case that the time indicated by the time text includes February, since the time length of February is not determined in different years (28 days or 29 days), the time length of the time indicated by the time text is also not determined.

[0088] In this case, the preset big data processing model needs to make time inference to accurately represent the time indicated by the extracted time text. In order to avoid the time inference error and the inaccurate time represented by the time text output by the preset big data processing model, the preset time expression rule can include: in the case that the time length of the time indicated by the time text is not determined, the time length of the time indicated by the time text in the time corresponding to the preset time unit can be represented by using the reverse order counting manner of the time sequence in the time period to which the preset time unit belongs.

[0089] For example, the information to be processed is "search all data records from the last day of February to the last day of April", the start time and the end time indicated by the time text are the last day of February and the last day of April respectively, and the time corresponding to the time unit day in the start time and the end time can be represented by using the reverse order counting manner of the time sequence in the time period to which the time unit day belongs. Then, the start time is converted to 2m-0d, and the end time is converted to 4m-0d.

[0090] Correspondingly, the preset time expression rule can include: in the case that the time length of the time indicated by the time text is determined, the time length of the time indicated by the time text in the time corresponding to the preset time unit is represented by using the forward order counting manner of the time sequence in the time period to which the preset time unit belongs, or the reverse order counting manner of the time sequence in the time period to which the preset time unit belongs, or the manner with smaller data amount between the forward order counting manner and the reverse order counting manner.

[0091] In the case that the time length of the time indicated by the time text is determined, the time length of the time indicated by the time text in the time corresponding to the preset time unit can be represented by using the forward order counting manner of the time sequence in the time period to which the preset time unit belongs; or the time length of the time indicated by the time text in the time corresponding to the preset time unit can be represented by using the reverse order counting manner of the time sequence in the time period to which the preset time unit belongs.

[0092] For example, the time text is "April 1st to 30th", the time length indicated by the time length determines the time length, the preset time unit is day, then the preset big data processing model can adopt the ascending order counting manner of the time sequence number in the time period to which the preset time unit belongs to convert the time text into time information 4m1d-4m30d, or adopt the descending order counting manner of the time sequence number in the time period to which the preset time unit belongs to convert the time text into time information 4m1d to 4m-0d.

[0093] Of course, in the case where the time length indicated by the time text is determined, the data amount occupied by the time information obtained by representing the time length indicated by the time text in the time corresponding to the preset time unit in the ascending order counting manner of the time sequence number in the time period to which the preset time unit belongs and the data amount occupied by the time information obtained by representing the time length indicated by the time text in the descending order counting manner of the time sequence number in the time period to which the preset time unit belongs can also be determined respectively, and the representation manner with smaller data amount is selected from the ascending order counting manner and the descending order counting manner, and the time length indicated by the time text is represented in the representation manner with smaller data amount, thereby saving memory space.

[0094] For example, the time text is "Last 10minutes", the current time is 11:50, the date in the time text is represented in the ascending order counting manner as 11h40M to 11h50M, and the date in the time text is represented in the descending order counting manner as -10M to -0M. Obviously, the data amount occupied by the representation of the date in the time text in the descending order counting manner is smaller, therefore, the time text is converted into time information -10M to -0M in the descending order counting manner.

[0095] In the embodiment, the preset time expression rule includes: in the case that the time length represented by the time text is uncertain, the time length represented by the time text at the time corresponding to the preset time unit is represented by using the reverse counting manner of the time sequence in the time period to which the preset time unit belongs; in the case that the time length represented by the time text is certain, the time length represented by the time text at the time corresponding to the preset time unit is represented by using the forward counting manner of the time sequence in the time period to which the preset time unit belongs, or represented by using the reverse counting manner of the time sequence in the time period to which the preset time unit belongs, or represented by using the manner with smaller data amount between the forward counting manner and the reverse counting manner. The preset time expression rule specifies the representation manner of the time length represented by the time text at the time corresponding to the preset time unit in the case that the time length represented by the time text is uncertain and in the case that the time length represented by the time text is certain, so that the preset big data processing model can accurately and quickly convert the time text into the time information according to the preset time expression rule.

[0096] As an implementation manner of the embodiment, the preset time expression rule can include:

[0097] The time information converted from the time text includes at least one time information unit, each time information unit includes a time unit corresponding to the time information unit and a time parameter corresponding to the time unit, and the at least one time information unit is arranged according to the arrangement order of each time unit in the date representation manner, wherein the time parameter includes at least one of the time sequence represented by the forward counting manner, the time sequence represented by the reverse counting manner, the offset relative to the current time, and the time sequence represented by the date representation manner.

[0098] The preset time expression rule provided by the embodiment includes the representation manner of the time information converted from the time text. When the time information is represented, each time unit included in the time information and a time parameter corresponding to the time unit are taken as a time information unit, wherein the time parameter corresponding to the time unit is the time of the time unit corresponding to the time information.

[0099] The time information includes at least one time information unit, and the at least one time information unit is arranged according to the arrangement order of each time unit in the date representation manner.

[0100] That is, according to the date representation manner, the time information includes how many time units, and then the time information includes how many time information units, and each time information unit is arranged according to the arrangement order of the time unit in the date representation manner, and each time information unit includes the time unit and a time parameter corresponding to the time unit.

[0101] For example, if the date representation is year-month-day, and the time information is three time units of year, month and day, the time information includes three time information units, and the representation of the time information is X year X month X day, where X year is a time information unit, year is the time unit corresponding to the time information unit, and X is the time parameter corresponding to the time unit; X month is a time information unit, month is the time unit corresponding to the time information unit, and X is the time parameter corresponding to the time unit; X day is a time information unit, day is the time unit corresponding to the time information unit, and X is the time parameter corresponding to the time unit.

[0102] The time parameter includes at least one of a time ordinal represented in a forward counting manner, a time ordinal represented in a reverse counting manner, an offset relative to a current time, and a time ordinal represented in a date representation.

[0103] Since the representation of the time parameter corresponding to different time units can be different, for each time unit, according to the representation of the time parameter corresponding to the time unit, the time parameter corresponding to the time unit can be a time ordinal represented in a forward counting manner, a time ordinal represented in a reverse counting manner, an offset relative to a current time, or a time ordinal represented in a date representation.

[0104] For example, the time text is “tomorrow”, the time information obtained by converting the time text is 1d, the text information includes one time information unit, the time unit of the time information unit is d (day), and the time parameter is 1, which is an offset relative to today.

[0105] For example, the time text is “tomorrow”, the time information obtained by converting the time text is 1d, the text information includes one time information unit, the time unit of the time information unit is d (day), and the time parameter is 1, which is an offset relative to today.

[0106] For example, the time text is “the 15th of last month”, the time information obtained by converting the time text is -1m15d, the text information includes two time information units, the time unit of the first time information unit is m (month), and the time parameter is -1, which is an offset relative to this month; the time unit of the second time information unit is d (day), and the time parameter is 15, which is a time ordinal represented in a date representation / forward counting manner.

[0107] For example, the time text is "August 30th". The time information obtained by converting the time text is 8m30d. This text information includes two time information units. 8m is a time information unit. The time unit of this time information unit is m (month) and the time parameter is 8. This time parameter is a time ordinal number expressed in date format. 30d is a time information unit. The time unit of this time information unit is d (day) and the time parameter is 30. This time parameter is a time ordinal number expressed in date format.

[0108] For example, the time text is "April 2024". The time information obtained by converting this time text includes the start time 2024y4m1d and the end time 2024y4m~0d.

[0109] The start time includes three time information units: 2024y is a time information unit with a time unit of y (year) and a time parameter of 2024, which is a time ordinal number expressed in date format; 4m is a time information unit with a time unit of m (month) and a time parameter of 4, which is a time ordinal number expressed in date format; and 1d is a time information unit with a time unit of d (day) and a time parameter of 1, which is a time ordinal number expressed in ascending order.

[0110] The end time includes three time information units: 2024y is a time information unit with the time unit being y (year) and the time parameter being 2024, which is a time ordinal number expressed in date format; 4m is a time information unit with the time unit being m (month) and the time parameter being 4, which is a time ordinal number expressed in date format; ~0d is a time information unit with the time unit being d (day) and the time parameter being 0, which is a time ordinal number expressed in reverse order.

[0111] In the embodiment, the preset time expression rule includes time information converted from the time text, the time information includes at least one time information unit, each time information unit includes a time unit corresponding to the time information unit, and a time parameter corresponding to the time unit; and the at least one time information unit is arranged according to an arrangement order of each time unit in the date expression mode, wherein the time parameter includes at least one of a time ordinal in a positive order counting mode, a time ordinal in a reverse order counting mode, an offset relative to a current time, and a time ordinal in the date expression mode. The preset time expression rule specifies the expression mode of the time information, so that the big data processing model can accurately and quickly convert the time text into the time information according to the preset time expression rule, and express the time information according to the expression mode.

[0112] As an implementation of the embodiment, in the case where the time parameter is the time ordinal in the reverse order counting mode, the time information unit corresponding to the time parameter further includes a reverse order counting identifier, the reverse order counting identifier is used to connect two time information units, a time unit of a former time information unit has a higher dimension than a time unit of a latter time information unit, and the time unit of the former time information unit contains a plurality of time units of the latter time information unit; the reverse order counting identifier is used to represent that, from the time unit of the former time information unit, the time parameter of the latter time information unit is counted in the time unit of the latter time information unit; or, in the case where the time parameter is the offset relative to the current time, the time information unit corresponding to the time parameter further includes a first symbol or a second symbol, wherein the first symbol represents that a time represented by the time text is before the current time, and the second symbol represents that the time represented by the time text is after the current time.

[0113] Due to the same time ordinal, in the case of the positive order counting mode of the time ordinal and the reverse order counting mode of the time ordinal, the corresponding specific time in the time period is different, for example, the time information is 7m1d, in the positive order counting mode, the time ordinal 1 represents the first day of July, i.e. July 1; and in the reverse order counting mode, in the case where the reverse order counting mode is 0, the time ordinal 1 represents the second last day of July, i.e. July 30.

[0114] Then, in order to distinguish, the positive order counting identifier and the reverse order counting identifier can be used to identify the expression mode of the time ordinal, in the case where the time parameter is the time ordinal in the reverse order counting mode, the time information unit corresponding to the time parameter further includes the reverse order counting identifier.

[0115] For example, the time text is "April 2024", the time information obtained by converting the time text includes a start time 2024y4m1d and an end time 2024y4m~0d. The end time includes three time information units, ~0d is a time information unit corresponding to a time unit day, and the time parameter corresponding to the time unit is a time ordinal in a reverse counting manner, so the time information unit also includes a reverse counting identifier ~.

[0116] Since a time offset with respect to the current time should be both directional and quantitative, the direction of the time with respect to the current time cannot be indicated only according to the offset with respect to the current time, that is, the time cannot be accurately determined only according to the time offset with respect to the current time.

[0117] For example, the offset of tomorrow and yesterday with respect to today is 1 day, and the time is tomorrow or yesterday cannot be determined only according to the offset 1 day of the time with respect to today, and the time is before today or after today, that is, the offset direction with respect to today needs to be determined.

[0118] Therefore, in the case where the time parameter is an offset with respect to the current time, the time information unit corresponding to the time parameter also includes a first symbol or a second symbol.

[0119] The first symbol indicates that the time represented by the time text is before the current time, and the second symbol indicates that the time represented by the time text is after the current time.

[0120] The first symbol and the second symbol can be set according to actual needs, for example, the second symbol can not be set, and the first symbol can be set as "-"; for example, the second symbol can be set as "+", and the first symbol can be set as "-", and the like, which are all reasonable, and are not limited herein. In order to make the text clear, in the following text, the second symbol can be set as "+" and the first symbol can be set as "-" as an example to explain the scheme, and the above setting of the first symbol and the second symbol is only an example and not a limitation.

[0121] For example, the time text is "Last 10minutes", the start time in the time information obtained by converting the time text is -10M, and the end time is -0M. The start time and the end time both include a time information unit, and the time parameters of the time information units are both offsets with respect to the current time. According to the semantics of the time text, the start time and the end time are both before the current time, so the time information units of the start time and the end time both include the first symbol "-" indicating that the time represented by the time text is before the current time.

[0122] For another example, the time text is "Last 1 hour", the start time in the time information obtained by converting the time text is -1h, and the end time is -0h; both the start time and the end time are located before the current time, and both the time information units of the start time and the end time include the first symbol "-" indicating that the time represented by the time text is before the current time.

[0123] For another example, the time text is "Last Monday", the start time in the time information obtained by converting the time text is -1w1d, and the end time is -1w1d; both the start time and the end time are located before the current time, and both the time information units of the start time and the end time include the first symbol "-" indicating that the time represented by the time text is before the current time.

[0124] For another example, the time text is "First week of last month", the time length represented by the time text is from the first day of the first week of last month to the last day of the first week of last month. The start time in the time information obtained by converting the time text is -1m1w1d, and the end time in the time information is converted into time information -1m1w~0d.

[0125] The start time includes three time information units, -1m is a time information unit, the time unit of the time information unit is m (month), and the time parameter is 1, which is an offset relative to the current time; 1w is a time information unit, the time unit of the time information unit is w (week), and the time parameter is 1, which is a time ordinal represented in a positive sequence counting manner; 1d is a time information unit, the time unit of the time information unit is d (day), and the time parameter is 1, which is a time ordinal represented in a positive sequence counting manner.

[0126] The end time includes three time information units, -1m is a time information unit, the time unit of the time information unit is m (month), and the time parameter is 1, which is an offset relative to the current time; 1w is a time information unit, the time unit of the time information unit is w (week), and the time parameter is 1, which is a time ordinal represented in a positive sequence counting manner; ~0d is a time information unit, the time unit of the time information unit is d (day), and the time parameter is 0, which is a time ordinal represented in a reverse sequence counting manner.

[0127] In an implementation manner, in a case that the time text is in an ISO 8601 standard format to identify an accurate time represented, and the time includes a symbol of the ISO 8601 standard format, the preset big data processing model converts the time text according to a preset time expression rule, and the position of the time information corresponding to the symbol of the ISO 8601 standard format includes the symbol of the ISO 8601 standard format.

[0128] For example, the time text is in an ISO 8601 standard format to represent a time 2025-05-03T10:01:20+08:00, wherein T is a symbol of the ISO 8601 standard format, and is located between a date part and a time part. The preset big data processing model converts the time text according to a preset time expression rule, and obtains time information 2025y5m3dT10:01:20, wherein the time information unit corresponding to a time unit day and the time information unit corresponding to a time unit hour include the symbol T of the ISO 8601 standard format.

[0129] In the embodiment, in a case that the time parameter is in a time ordinal represented in a reverse counting manner, the time information unit corresponding to the time parameter further includes a reverse counting identifier; or, in a case that the time parameter is an offset relative to a current time, the time information unit corresponding to the time parameter further includes a first symbol or a second symbol, wherein the first symbol indicates that the time represented by the time text is before the current time, and the second symbol indicates that the time represented by the time text is after the current time. By adding the reverse counting identifier, the first symbol or the second symbol corresponding to the representation manner and the parameter meaning of the time parameter in the time information unit according to the specific situation of the time parameter, the time information represented by the text information can be more accurate.

[0130] As an implementation manner of the embodiment, before the step of outputting the converted time information by the preset big data processing model in the step S102, the time information extraction method provided by the embodiment can further include:

[0131] In a case that the time information converted from the time text includes a time parameter with a value of 0, the preset big data processing model retains at least a time information unit of the time information that can represent the time indicated by the time text, and obtains time information for output.

[0132] The preset big data processing model converts the time text according to the preset time expression rule, and the obtained time information can include a time parameter with a value of 0.

[0133] In example one, the time text is "this month today", the time text is converted according to the preset time expression rule, and the obtained time information is -0y-0m-0d, the values of the time parameters of the three time information units of the time information are all 0.

[0134] In example two, the time text is "the last day of the last month of this year", the time text is converted according to the preset time expression rule, and in the case that the time ordinal in the reverse counting mode starts from 0, the obtained time information is -0y-1m~0d, the time information includes two time information units with time parameters of value 0.

[0135] However, in some cases, the time information unit including the time parameter with value 0 does not play a substantial role in representing the time indicated by the time text. For example, in the time information -0y-0m-0d of example one, the time information unit representing the time "today" indicated by the time text is actually -0d, and the two time information units -0y-0m do not play a substantial role in time expression; in the time information -0y-1m~0d of example two, the time information unit representing the time "the last day of the last month" indicated by the time text is actually -1m~0d, and the time information unit -0y does not play a substantial role in time expression.

[0136] In this case, removing the time information unit that does not play a substantial role in time expression does not affect the representation of the time indicated by the time text. Therefore, in order to reduce the output of the preset big data processing model, improve the response speed of the preset big data processing model, and reduce the cost, the preset big data processing model can at least retain the time information unit that can accurately represent the time indicated by the time text, delete the time information unit that does not affect the accurate representation of the time indicated by the time text, and take the processed time information as the time information for output.

[0137] For example, for the time information -0y-0m-0d of example one, the preset big data processing model can at least retain -0d, that is, the preset big data processing model can retain -0m-0d and delete -0y, or can retain only -0d and delete -0y-0m, to obtain the time information for output.

[0138] For example, for the time information -0y-1m~0d of example two, the preset big data processing model can at least retain -1m~0d, that is, the preset big data processing model can retain -1m~0d and delete -0y, to obtain the time information for output.

[0139] It can be seen that the above processing process actually realizes the omission expression of the time information unit that does not affect the accurate expression of the time information according to the time actually represented by the time text. After processing the time information unit in the time information, the data amount of the time information obtained for output is obviously smaller than the data amount of the time information directly obtained by converting the time text. While realizing the accurate expression of the time, the actual output of the preset big data processing model is reduced.

[0140] In the embodiment, in the case that the time information converted from the time text includes a time parameter with a value of 0, the preset big data processing model at least retains the time information unit in the time information that can represent the time indicated by the time text to obtain the time information for output. In this way, the preset big data processing model retains the time information unit in the time information converted from the time text that can represent the time indicated by the time text, deletes the time information unit that does not affect the expression of the time, realizes the omission expression of the time information while accurately expressing the time, reduces the data amount output by the preset big data processing model, thereby improving the response speed of the preset big data processing model and reducing the cost.

[0141] As an embodiment of the present application, as shown in Figure 2 The step of retaining at least the time information unit in the time information that can represent the time indicated by the time text can include:

[0142] S201: The preset big data processing model sequentially traverses each time information unit of the time information in the order from high to low according to the dimension of the time unit.

[0143] S202: In the case that the time parameter of the time information unit with the highest time dimension is 0, the next time information unit of the time dimension is continuously traversed until the time information unit with the time parameter not being 0 or all the time information units are traversed, and the time information unit that can represent the time indicated by the time text is retained.

[0144] The retained time information unit includes the time information unit with the time parameter not being 0, or in the case that all the traversed time information units are the time information unit with the time parameter being 0, the time information unit corresponding to the smallest time unit is retained.

[0145] In order to process the time information converted from the time text according to the semantics of the time text, the preset big data processing model can at least retain the time information unit in the time information that can represent the time indicated by the time text.

[0146] Specifically, the preset big data processing model traverses each time information unit of the time information in descending order of time unit dimension.

[0147] When the time information unit of the highest time dimension is traversed, if the time parameter of the time information unit is not 0, the preset big data processing model can end the traversal.

[0148] When the time information unit of the highest time dimension is traversed, if the time parameter of the time information unit is 0, the preset big data processing model can continue to traverse the time information unit of the next time dimension, until the time information unit of the time parameter is not 0 or all time information units are traversed, the preset big data processing model retains the time information unit capable of representing the time indicated by the time text.

[0149] For example, the time information is -0y-0m-0d, and the preset big data processing model traverses each time information unit included in the time information in the order of year-month-day. When -0y is traversed, since the time parameter of the time information unit is 0, -0m and -0d are continued to be traversed, and after the traversal is completed, the time information unit -0d capable of representing the time indicated by the time text is retained.

[0150] For another example, the time information is -0w1d, and the preset big data processing model traverses each time information unit included in the time information in the order of week-day. When -0w is traversed, since the time parameter of the time information unit is 0, 1d is continued to be traversed, and since the time information unit of the time parameter is not 0 is traversed, the traversal can be ended, and the time information unit -0w1d capable of representing the time indicated by the time text is retained.

[0151] For another example, the time information is -0y12m~0d, and the preset big data processing model traverses each time information unit included in the time information in the order of year-month-day. When -0y is traversed, since the time parameter of the time information unit is 0, 12m is continued to be traversed, and since the time information unit of the time parameter is not 0 is traversed, the traversal can be ended, and the time information unit -0y12m~0d capable of representing the time indicated by the time text is retained.

[0152] The retained time information unit can include the time information unit of the time parameter not being 0, or, when all the traversed time information units are time information units of the time parameter being 0, the time information unit corresponding to the smallest time unit is retained.

[0153] For example, the time text is "today", and the converted time information -0y-0m-0d can retain only -0d.

[0154] For example, the time text is "April 1st to 10th of this year", the converted time information is -0y4m1d to -0y4m10d, the preset big data processing model can retain at least 4m1d to 4m10d, that is, the preset big data processing model can delete -0y, and obtain the time information for output.

[0155] Of course, the retained time information can also include each time information unit traversed in descending order of time unit dimension, the first time information unit with a time parameter not being 0, and the time information unit after the time information unit in the traversal order.

[0156] For example, the time text is "Last Month", the converted time information is -0y-1m1d to -0y-1m~0d, the preset big data processing model can traverse each time information unit in descending order of time unit dimension, the first time information unit with a time parameter not being 0 is -1m, and -1m1d to -1m~0d can be retained, that is, the preset big data processing model can delete -0y, and obtain the time information for output.

[0157] In this embodiment, the preset big data processing model traverses each time information unit of the time information in descending order of time unit dimension; in the case that the time parameter of the time information unit with the highest time dimension is 0, the time information unit of the next time dimension is continuously traversed until the time information unit with a time parameter not being 0 is traversed or all time information units are traversed, and the time information unit capable of representing the time indicated by the time text is retained. In this way, the preset big data processing model can retain the time information unit capable of representing the time indicated by the time text by traversing each time information unit of the time information, delete the redundant time information unit, accurately express the time, realize the omitted expression of the time information, reduce the data amount output by the preset big data processing model, and thus improve the response speed of the preset big data processing model and reduce the cost.

[0158] As an embodiment of the present application, the preset time expression rule can include:

[0159] In the case that the time dimension of the smallest time unit included in the time text is higher than the time dimension of the preset time unit, the time information converted from the time text includes the preset time unit as the smallest time unit.

[0160] In some cases, the expression of the time text omits a time unit of a lower time dimension in the date representation, for example, the time text is "Last Month", the time length represented by the time text is actually from the first day of last month to the last day of last month, and the expression of the time text omits the time unit day of a lower time dimension. In this case, if the preset big data processing model directly converts according to the expression of the time text, the time information obtained cannot accurately represent the time length represented by the time text, so that the time information extracted and output by the preset big data processing model is not accurate, affecting the accuracy of the processing result of the subsequent data processing task.

[0161] Therefore, in order for the preset big data processing model to accurately express the time indicated by the time text, a preset time unit corresponding to each date representation can be set in advance, for example, in the case of a date representation of year-month-day, the preset time unit is day; in the case of a date representation of year-quarter-day, the preset time unit is day; in the case of a date representation of year-week-day-hour, the preset time unit is hour, and the like.

[0162] And set a preset time expression rule: when the time dimension of the smallest time unit included in the time text is higher than the time dimension of the preset time unit, the smallest time unit included in the time information obtained by converting the time text is the preset time unit.

[0163] That is, the preset time expression rule provides that, in the case where the time dimension of the smallest time unit included in the time text is higher than the time dimension of the preset time unit, the preset big data processing model sinks the smallest time unit of the time text to the preset time unit in the process of converting the time text, so that the smallest time unit of the time information obtained by conversion is the preset time unit. For example, in the case where the preset time unit is day and the smallest time unit of the time text is quarter, the preset big data processing model sinks the smallest time unit to the preset time unit day in the process of converting the time text.

[0164] In this way, the preset big data processing model can extract the time text and determine whether the time dimension of the smallest time unit of the time text is higher than the time dimension of the preset time unit.

[0165] Further, when the time dimension of the smallest time unit included in the time text is higher than the time dimension of the preset time unit, the smallest time unit included in the time information obtained by converting the time text by the preset big data processing model is the preset time unit.

[0166] For example, the time text is "This Year", the preset time unit is day, the minimum time unit included in the time text is year, the time dimension of the time unit year is higher than that of the preset time unit day, and thus according to the preset time expression rule, the time information obtained by the preset big data processing model converting the time text is -0y1m1d to -0y12m~0d, and the minimum time unit of the time information is day (d).

[0167] For another example, the time text is "Last Week", the preset time unit is day, the minimum time unit included in the time text is week, the time dimension of the time unit week is higher than that of the preset time unit day, and thus according to the preset time expression rule, the time information obtained by the preset big data processing model converting the time text is -1w1d to -1w7d, and the minimum time unit of the time information is day (d).

[0168] In this embodiment, the preset time expression rule includes that when the time dimension of the minimum time unit included in the time text is higher than that of the preset time unit, the time information obtained by converting the time text includes the preset time unit. In this way, when the time dimension of the minimum time unit included in the time text is higher than that of the preset time unit, the preset big data processing model sinks the minimum time unit included in the time text according to the preset time expression rule when converting the time text, so that the minimum time unit included in the obtained time information is the preset time unit. Through such processing, the time information extracted and output by the preset big data processing model can more accurately express the time indicated by the time text.

[0169] As an implementation manner of the embodiment of the present application, the step of extracting the time text included in the to-be-processed information by the preset big data processing model in the step S102 can include:

[0170] The preset big data processing model extracts the time text in the to-be-processed information, determines the start time and the end time of the time length represented by the time text, and determines the dimension of the minimum time unit of the start time and the end time of the time length represented by the time text.

[0171] Correspondingly, the method for extracting time information provided by the embodiment of the present application can also include:

[0172] based on the start time and the end time included in the time information, performing a data processing task indicated by the to-be-processed information, wherein a dimension of a minimum time unit included in the start time and the end time in the time information is lowered by one time unit compared to a dimension of a minimum time unit of the start time and the end time corresponding to the time text, and at least one of the start time and the end time in the time information is represented in a reverse counting manner.

[0173] The electronic device inputs the to-be-processed information into a preset big data processing model, and the preset big data processing model can extract a time text in the to-be-processed information, determine a start time and an end time of a time length represented by the time text, and determine a dimension of a minimum time unit of the start time and the end time of the time length represented by the time text.

[0174] Specifically, the preset big data processing model can extract a time text in the to-be-processed information. In a case where a user intent indicated by semantics of the time text indicates a time as a time length (a time interval), a time length indicated by the user intent indicated by the semantics of the time text is determined, and a dimension of a minimum time unit of the start time and the end time of the time length represented by the time text is determined.

[0175] The preset big data processing model can convert the start time and the end time according to a preset time expression rule respectively, and output time information obtained by the conversion, wherein the time information obtained by the conversion includes the start time and the end time.

[0176] The dimension of the minimum time unit of the start time and the end time of the time length represented by the time text is lowered by one time unit, and the start time and the end time of the time length represented by the time text after the dimension is lowered are represented according to the preset time expression rule, wherein at least one of the start time and the end time of the time length represented by the time text is represented in a reverse counting manner.

[0177] The dimension of the minimum time unit of the start time and the end time of the time length represented by the time text is lowered by one time unit, that is, according to an order of the dimension of the time unit from high to low, the dimension of the minimum time unit of the start time and the end time of the time length represented by the time text is lowered to a dimension of one time unit after the dimension of the minimum time unit, for example, the minimum time unit is a month, according to the order of the dimension of the time unit from high to low, the next dimension of the time unit of the month is a day, and the start time and the end time of the time length represented by the time text are lowered to the time unit day for representation.

[0178] Thus, the time information obtained by converting the time text includes the start time and the end time in a dimension of a minimum time unit that is one time unit dimension lower than the dimension of the minimum time unit of the start time and the end time of the time length represented by the time text, and at least one of the start time and the end time is represented in a reverse counting manner. By sinking the dimension of the minimum time unit of the start time and the end time of the time length represented by the time text by one time unit dimension, the accuracy of the time information obtained by conversion can be improved.

[0179] For example, the time text is "Last Month", the user's intention indicated by the semantic of the time text indicates that the time length of time is the current month, and it is determined that the dimension of the time unit of the start time and the end time of the time length represented by the time text is month.

[0180] The time unit month of the start time and the end time of the time length represented by the time text is sunk by one dimension to the time unit day, i.e., the start time is the first day of the month and the end time is the last day of the week, and at least one of the start time and the end time after sinking the time dimension is represented in a reverse counting manner, obtaining the start time -1m1d and the end time -1m~0d included in the time information.

[0181] The electronic device can obtain the time information output by the preset big data processing model, and execute the data processing task indicated by the to-be-processed information based on the start time and the end time included in the time information.

[0182] For example, the preset big data processing model can extract the time text "Yesterday1pm to 2pm" in the to-be-processed information, and determine the start time "Yesterday 1pm" and the end time "Yesterday 2pm" of the time length represented by the time text. The preset big data processing model can convert the start time "Yesterday 1pm" to -1d13:00:00 and convert the end time "Yesterday 2pm" to -1d14:00:00 according to the preset time expression rule, and output the time information as -1d13:00:00 to -1d14:00:00.

[0183] The electronic device executes the data processing task about the data information between -1d13:00:00 and -1d14:00:00 according to the time information -1d13:00:00 to -1d14:00:00.

[0184] In the embodiment, the preset big data processing model extracts time text in the to-be-processed information, determines a start time and an end time of a time length represented by the time text, and determines a dimension of a minimum time unit of the start time and the end time of the time length represented by the time text; correspondingly, the electronic device can execute a data processing task indicated by the to-be-processed information based on a start time and an end time included in time information, wherein the dimension of the minimum time unit included in the start time and the end time included in the time information is one time unit lower than the dimension of the minimum time unit of the start time and the end time corresponding to the time text, and at least one of the start time and the end time of the time information is represented in a reverse counting manner. The preset big data processing model can accurately represent the start time and the end time of the time length represented by the extracted time text by determining the start time and the end time of the time length represented by the extracted time text and converting the start time and the end time by using a preset time expression rule. The electronic device can execute the data processing task according to the accurately represented start time and end time output by the preset big data processing model, so as to avoid errors caused by inaccurate extraction and expression of the time indicated by the time text, and ensure the accuracy of the execution result of the data processing task.

[0185] As an implementation manner of the embodiment of the present application, the step of converting the time text according to the preset time expression rule in the step S102 can include:

[0186] In a case where the semantics of the time text in the to-be-processed information includes time zone conversion, the preset big data processing model performs time zone conversion on the start time and the end time by using preset time zone information.

[0187] The preset big data processing model converts the start time and the end time after the time zone conversion according to the preset time expression rule respectively, to obtain converted start time and end time.

[0188] In some cases, a user can want to execute a data processing task across time zones, and then the semantics of the time text in the to-be-processed information obtained by the electronic device can include time zone conversion.

[0189] In a case where semantics of the time text in the to-be-processed information can include time zone conversion, the preset big data processing model can perform time zone conversion on the start time and the end time by using preset time zone information. The preset time zone information can include information required for time zone conversion, such as a country where the user is located, a correspondence relationship between a country and a time zone, and a time zone conversion relationship between different time zones (countries). The preset time zone information can be included in the to-be-processed information sent by the electronic device to the preset big data processing model, or can be included in parameters stored by the preset big data processing model, which is not specifically limited here.

[0190] To represent the time zone conversion relationship, a time zone conversion identifier and a time variation amount of a time unit involved in the time zone conversion during the time zone conversion are added at a time corresponding to the time unit.

[0191] For example, the text information input by the user is "calculate the time corresponding to B country from 1 pm to 2 pm yesterday in A country", the electronic device determines the to-be-processed information based on the text information input by the user, the to-be-processed information is a prompt word, and the prompt word at least includes a system prompt word, "calculate the time corresponding to B country from 1 pm to 2 pm yesterday in A country", and a conversion relationship between different time zones (countries).

[0192] The electronic device inputs the prompt word into the preset big data processing model, the preset big data processing model obtains the prompt word, extracts the time text, determines the start time 1 pm yesterday and the end time 1 pm yesterday of the time length represented by the time text, and performs time zone conversion on the start time and the end time by using the preset time zone information, that is, according to the time zone conversion relationship between A country and B country, the start time and the end time are both increased by 8 hours, to obtain the time zone converted start time 9 pm yesterday and the time zone converted end time 10 pm yesterday.

[0193] After completing the time zone conversion, the preset big data processing model converts the time zone converted start time and the time zone converted end time according to the preset time expression rule, to obtain the converted start time -1d21:00:00 and the converted end time -1d22:00:00.

[0194] In the embodiment, in the case that the semantics of the time text in the information to be processed includes time zone conversion, the preset big data processing model performs time zone conversion on the start time and the end time by using preset time zone information; and converts the start time and the end time after time zone conversion according to preset time expression rules to obtain converted start time and end time. In this way, in the case that the semantics of the time text in the information to be processed includes time zone conversion, the preset big data processing model can first perform time zone conversion on the time indicated by the time text, and then convert the time after time zone conversion according to the preset time expression rules. The time information output by the preset big data processing model can accurately represent the time represented by the time text, and the data processing task is executed according to the time information output by the preset big data processing model, avoiding the influence of incorrect time information on the data processing task, and improving the accuracy of the data task execution result.

[0195] As an embodiment of the present application, before the step of outputting the converted time information by the preset big data processing model in the step S102, the time information extraction method provided by the present application can further include:

[0196] In the case that the time corresponding to the minimum time unit of the start time included in the time information is the start time of the time range corresponding to the minimum time unit, the time corresponding to the minimum time unit is deleted; and / or in the case that the time corresponding to the minimum time unit of the end time included in the time information is the end time of the time range corresponding to the minimum time unit, the time corresponding to the minimum time unit is deleted.

[0197] In the embodiment, the time units of the start time and the end time have the same dimension, and are arranged in descending order of the dimension of the time unit; the time information of the start time and the end time includes the time parameter and the dimension of the time unit represented in an interleaved manner; the time parameter includes a number and / or a letter, the number is used to represent the digital information of the time intended to be indicated by the user in the time text relative to the current time or the standard time information of the time intended to be indicated by the user in the time text, and the letter is used to represent the standard time information of the time intended to be indicated by the user in the time text.

[0198] In some cases, according to the preset time expression rule, the preset big data processing model may exist the case that the time corresponding to the minimum time unit of the start time included in the time information obtained by converting the time text is the start time of the time range corresponding to the minimum time unit; or the case that the time corresponding to the minimum time unit of the end time included in the time information is the end time of the time range corresponding to the minimum time unit; or the case that the time corresponding to the minimum time unit of the start time included in the time information is the start time of the time range corresponding to the minimum time unit, and the time corresponding to the minimum time unit of the end time included in the time information is the end time of the time range corresponding to the minimum time unit.

[0199] For example, the minimum time unit is day, and the time range corresponding to the time unit day is 00:00:00-23:59:59, wherein 00:00:00 is the start time of the time range corresponding to the time unit day, and 23:59:59 is the end time of the time range corresponding to the time unit day.

[0200] In the case that the time corresponding to the minimum time unit of the start time is the start time of the time range corresponding to the minimum time unit, the start time does not play a substantial role in time, and deleting the start time does not affect the accurate expression of time; and in the case that the time corresponding to the minimum time unit of the end time included in the time information is the end time of the time range corresponding to the minimum time unit, the end time does not play a substantial role in time, and deleting the end time does not affect the accurate expression of time.

[0201] Therefore, in the case that the time corresponding to the minimum time unit of the start time included in the time information is the start time of the time range corresponding to the minimum time unit, the time corresponding to the minimum time unit can be deleted; and / or in the case that the time corresponding to the minimum time unit of the end time included in the time information is the end time of the time range corresponding to the minimum time unit, the time corresponding to the minimum time unit can be deleted.

[0202] For example, according to the preset time expression rule, in the case that the start time of the time information obtained by converting the time text is 2024y12m1d 00:00:00, and the end time is 2024y12n31d 23:59:59, the 00:00:00 of the start time and the 23:59:59 of the end time can be deleted to obtain the start time 2024y12m1d and the end time 2024y12n31d of the time information.

[0203] Since the start time and the end time included in the time information are obtained by representing the time length represented by the time text, for a time length, the dimensions of the time units of the start time and the end time of the time length are consistent, because the dimensions of the time units of the start time and the end time included in the time information converted from the time text are consistent, and the time information units included in the start time and the end time are arranged in order of the dimensions of the time units from high to low, for example, in the case where the start time and the end time both include the time units of year-month, the dimension of year is higher than that of month, and the time information units of the start time and the end time are also arranged in order of the time information unit corresponding to the time unit of year-the time information unit corresponding to the time unit of month.

[0204] The time information of the start time and the end time includes the time parameters and the dimensions of the time units represented in an interleaved manner, that is, the time information of the start time and the end time is represented in terms of time information units, and each time information unit includes a time parameter and a time unit, so that the time parameters and the time units are interleaved after the time information units are arranged in order of the dimensions of the time units. For example, the time text is “This Week”, the start time is -0w1d, and the end time is -0w7d, and the time information of the start time and the end time both includes the time parameters and the dimensions of the time units represented in an interleaved manner.

[0205] In addition, the time parameter can include a number and / or a letter. The number can be used to represent the number information of the time intended to be indicated by the user in the time text relative to the current time, that is, the offset relative to the current time, for example, the time offset of tomorrow relative to today is 1, and the time offset of last week relative to this week is 1. The number can also be used to represent the standard time information of the time intended to be indicated by the user in the time text, that is, at least one of the time ordinal represented in a positive counting manner, the time ordinal represented in a reverse counting manner, or the time ordinal represented in a date representation manner, for example, the time text is “2023 April”, and the start time included in the time information is “2023y4m1d”, wherein 2023, 4, and 1 are all standard time information intended to be indicated by the user in the time text represented in a date representation manner.

[0206] The letter can also be used to represent the standard time information of the time intended to be indicated by the user in the time text, for example, the time parameter in the time information unit corresponding to the month can be represented by the first letter of the English word of the month, and the time text is “2025 April”, and the time information converted is “2025yAm”, wherein the time parameter in the time information unit corresponding to April is a letter, that is, the first letter of the English word “April” of April.

[0207] For example, the time parameter in the time information unit corresponding to the month can be represented by the English word of the month, and the time text is "April 2025", and the converted time information is "2025y April m", where the time parameter in the time information unit corresponding to April is a letter, i.e., the English word "April" of April.

[0208] In addition, the time unit can be represented by the corresponding letter of the time unit.

[0209] In this embodiment, if the time corresponding to the smallest time unit of the start time included in the time information is the start time of the time range corresponding to the smallest time unit, the time corresponding to the smallest time unit can be deleted; and / or if the time corresponding to the smallest time unit of the end time included in the time information is the end time of the time range corresponding to the smallest time unit, the time corresponding to the smallest time unit can be deleted. Through the above processing, the amount of data output by the preset large data processing model can be reduced, and the response speed of the large language model can be improved while accurately representing the time range indicated by the time text.

[0210] As an implementation manner of the embodiment of the present application, the preset large data processing model is a preset large language model.

[0211] In the embodiment of the present application, the preset large data processing model can be a large language model (LLM, Large Language Model), which is a deep learning model trained based on massive text data and can understand, generate and infer natural language.

[0212] In an implementation manner, after the electronic device obtains the text input by the user, the electronic device determines the prompt word of the large language model, where the prompt word includes the system prompt word, the text input by the user, the preset time expression rule, the local time of the user, the time zone conversion information, and the information such as the country where the user is located. The electronic device inputs the prompt word into the large language model, so that the large language model extracts the time text, converts the time text according to the preset time expression rule, and outputs the converted time information. The electronic device embeds the preset time expression rule into the prompt word, so that the large language model can express the time according to the preset time expression rule.

[0213] In this embodiment, after obtaining the to-be-processed information, the electronic device can input the to-be-processed information into the preset large language model, so that the large language model extracts the time text included in the to-be-processed information, converts the time text according to the preset time expression rule, and outputs the converted time information. In this way, the large language model only needs to express the time information according to the preset time expression rule, without the large language model performing complex time inference, so that the time expressed by the time text in the to-be-processed information can be accurately expressed.

[0214] As an implementation of an embodiment of the present application, the preset time expression rule further includes: a first mapping relationship between a preset target time text and first time information.

[0215] The step of converting the time text according to the preset time expression rule and outputting the converted time information can include:

[0216] In the case that the time text hits the target time text, the first time information corresponding to the target time text is determined based on the first mapping relationship as the converted time information.

[0217] Different regions may have time expressions differentiated by the region, such as "lunar May 5th", "early", "early month", etc.

[0218] Since these differentiated time expressions are not expressed in terms of time information according to a preset time unit, the preset big data processing model cannot accurately identify the time indicated by these differentiated time expressions, thereby affecting the accuracy of the time output by the preset big data processing model.

[0219] In order to improve the accuracy of the time output by the preset big data processing model, each differentiated time expression can be taken as a target time text, and for each target time text, a first mapping relationship between the target time text and first time information is established in advance, thereby obtaining a first mapping relationship between a preset target time text and first time information.

[0220] Among them, the time information that has a first mapping relationship with each target time text, i.e. the time indicated by the target time text, is converted according to the preset time expression rule to obtain the time information.

[0221] For example, a first mapping relationship between the target time text "early" and the first time information "1d~10d" is established; a first mapping relationship between the target time text "mid" and the first time information "11d~20d" is established; and a first mapping relationship between the lunar date of each year and the solar date is established, thereby realizing a first mapping relationship between "lunar May 5th" of each year and the solar date of the year indicated by the time text.

[0222] add the first mapping relationship between the preset target time text and the first time information to the preset time expression rule. In this way, in a case where the time text extracted by the preset big data processing model hits the target time text, the preset big data processing model can determine the first time information corresponding to the target time text based on the first mapping relationship in the preset time expression rule, and take the first time information as the time information obtained by converting the target time text.

[0223] It can be seen that, in the embodiment, by adding the first mapping relationship between the preset target time text and the first time information to the preset time expression rule, the preset time expression rule is expanded to adapt to cultural differences in time expression. In a case where the time text hits the target time text, the preset big data processing model determines the first time information corresponding to the target time text based on the first mapping relationship, as the time information obtained by conversion, thereby improving the accuracy of the time output by the preset big data processing model. Moreover, only the rule base of the preset time expression rule is updated, and the core preset time expression rule syntax is not updated, thereby improving compatibility.

[0224] As an implementation manner of the embodiment, before the step of converting the time information into the search start time and the search end time in the target format by the preset time converter, the time information extraction method provided by the embodiment can further include:

[0225] performing logical compliance verification on the time information output by the preset big data processing model based on a preset time constraint condition;

[0226] in a case where the time information does not pass the verification, adding a target time constraint condition that is not met by the time information to the prompt word of the preset big data processing model, and returning to the step of inputting the to-be-processed information into the preset big data processing model until the time information output by the preset big data processing model passes the verification, and then performing the step of executing the data processing task indicated by the to-be-processed information based on the start time and the end time included in the time information.

[0227] In some cases, the time information output by the preset big data processing model can be logically contradictory, for example, the current month is March, and the time information is -1m30d, which represents February 30. However, there is no 30th day in February, which is logically contradictory.

[0228] In order to improve the reliability of the time information output by the preset big data processing model, the time information output by the preset big data processing model can be logically verified, that is, whether the time information meets each time constraint condition in the time logic is verified.

[0229] The logic compliance verification verifies whether the time information conforms to time logic by checking the unit range rationality of the time information and the existence of the date.

[0230] In the case where the time information passes the verification, a data processing task indicated by the to-be-processed information is executed based on a start time and an end time included in the time information.

[0231] In the case where the time information fails the verification, a target time constraint condition that is not met by the time information is added in a prompt word of the preset big data processing model, and the step of inputting the to-be-processed information into the preset big data processing model is returned, that is, the to-be-processed information is input into the preset big data processing model again, so that the preset big data processing model extracts a time text included in the to-be-processed information by using the updated prompt word, and converts the time text according to a preset time expression rule, and outputs new time information obtained by the conversion.

[0232] The new time information is verified again, and in the case where the new time information fails the verification, a target time constraint condition that is not met by the new time information is added in a prompt word of the preset big data processing model, and the step of inputting the to-be-processed information into the preset big data processing model is returned, until time information output by the preset big data processing model passes the verification, and a data processing task indicated by the to-be-processed information is executed based on a start time and an end time included in the time information.

[0233] In an implementation manner, a rule verifier can be added between the preset big data processing model and the preset time converter, time information output by the preset big data processing model is input into the rule verifier, and the rule verifier performs logic compliance verification on the time information. In the case where the time information passes the verification, a data processing task is executed by using the time information; and in the case where the time information fails the verification, a target time constraint condition that is not met by the time information is added in a prompt word of the preset big data processing model, and the to-be-processed information is input into the preset big data processing model again, until time information output by the preset big data processing model passes the verification, and the data processing task is executed by using the time information.

[0234] For example, the current month is March, and time information output by the preset big data processing model is -1m30d, which represents February 30. The time information is input into the rule verifier for logic compliance verification. The time information fails the verification, a target time constraint condition that is not met by the time information, that is, "the maximum is 29 days in February", is added in a prompt word of the preset big data processing model, and the to-be-processed information is input into the preset big data processing model again, until time information output by the preset big data processing model passes the logic compliance verification, and a data processing task indicated by the to-be-processed information is executed based on a start time and an end time included in the time information.

[0235] It can be seen that, in the embodiment, by performing logical compliance verification on the time information output by the preset big data processing model, if the verification fails, a time constraint condition is added to the prompt word, and the preset big data processing model is triggered to extract time again until the time information output by the preset big data processing model passes the logical compliance verification. In this way, the logical compliance verification serves as an auxiliary process, the core preset time expression rule syntax is not updated, the preset time expression rule syntax can be compatible, and the accuracy of the time information output by the preset big data processing model can be further improved through logical compliance verification feedback.

[0236] As an implementation manner of the embodiment of the present application, the preset time expression rule further includes:

[0237] In a case where the to-be-processed information input into the preset big data processing model includes a file, the time information obtained through the time text conversion includes a file type of the file;

[0238] After the step of outputting and converting the time information by the preset big data processing model, the time information extraction method provided by the embodiment of the present application can further include:

[0239] In a case where the time information includes a file type, a text extraction manner corresponding to the file type is used to extract text information in the to-be-processed information, and the text information is used to execute a data search task indicated by the to-be-processed information.

[0240] Since the information input by the user can be a file, for example, the user can upload a “meeting whiteboard photo” or a “schedule document”, the to-be-processed information input into the preset big data processing model can include the file input by the user. The preset time expression rule further includes: in a case where the to-be-processed information input into the preset big data processing model includes a file, the time information obtained through the time text conversion can include a file type of the file.

[0241] The preset big data processing model can recognize the file type of the file in the to-be-processed information and parse the time contained in the file. For example, in a case where the file is a picture, the preset big data processing model can recognize the file type AA of the picture and parse the time “3-5 pm” in the picture; in a case where the file is an XX type document, the preset big data processing model can recognize the file type XX of the document and parse the time “June 1-3, 2025” in the title of the document.

[0242] Further, the time information output by the preset big data processing model includes a file type, and the position of the file type in the time information can be set according to actual needs, which can be a prefix of the time information unit or a suffix of the time information unit, and this is reasonable, and is not limited here.

[0243] For example, the time information output by the preset big data processing model is "AA_-0d15:00:00~ -0d17:00:00"; the time information output by the preset big data processing model is 2025y6m1d~2025y6m3d_XX, and the like.

[0244] After the time information converted by the preset big data processing model is output, the electronic device can identify whether the time information includes a file type, and in the case where the time information includes the file type, a text extraction manner corresponding to the file type is used to extract the character information in the to-be-processed information.

[0245] The character information is used to execute a data search task indicated by the to-be-processed information.

[0246] For example, after the electronic device identifies that the file type is a picture type AA, the electronic device can call OCR to identify the character "meeting" in the picture and related character content; after the electronic device identifies that the file type is a document type XX, the electronic device can call a document parsing service to parse the character "plan" in the document and related character content.

[0247] Further, the extracted character and time information are used to execute a data search task.

[0248] It can be seen that in the embodiment, the preset time expression rule further includes: in the case where the to-be-processed information input into the preset big data processing model includes a file, the time information converted by the time text includes a file type of the file; and in the case where the time information includes the file type, a text extraction manner corresponding to the file type is used to extract character information in the to-be-processed information. By adding the file type in the time information, the mapping from the file time to the time information is realized, the blind area of cross-modal time extraction is solved, the character information of the data search task indicated by the to-be-processed information is extracted according to the file type, the task execution accuracy is improved, and by updating the preset time expression rule, the multi-modal model does not need to be trained, and the cost is reduced. In addition, the present application supports the user to input various types of information, and the scene adaptability and compatibility are improved.

[0249] As an implementation manner of the embodiment, the extraction method of the time information provided by the embodiment can further include:

[0250] In a case where the time text extracted by the preset big data processing model includes a first undefined time expression, a first time confirmation message about the first undefined time expression is output; second time information fed back by a user based on the first time confirmation message is acquired, a second mapping relationship between the first undefined time expression and the second time information is established, and the second mapping relationship is added to the preset time expression rule.

[0251] In some cases, the time text extracted by the preset big data processing model can include a first undefined time expression. For example, the time text can include a first undefined time expression such as “the day after tomorrow” or “the day before yesterday”, and the preset big data processing model cannot recognize the corresponding time information.

[0252] In this case, the preset big data processing model can output an unrecognized message about the first undefined time expression. For example, the preset big data processing model can output the extracted time text and identify the first undefined time expression in the time text.

[0253] The electronic device can acquire the first undefined time expression and output a first time confirmation message about the first undefined time expression.

[0254] The user can view the first time confirmation message and feed back second time information corresponding to the first undefined time expression. For example, the user can input the second time information corresponding to the first undefined time expression in a preset input area in the display interface of the electronic device. For another example, the user can select the second time information corresponding to the first undefined time expression from among various alternative time information currently displayed in the display interface of the electronic device.

[0255] The electronic device can acquire the second time information fed back by the user, establish a second mapping relationship between the first undefined time expression and the second time information, and add the second mapping relationship to the preset time expression rule. The second time information is time information obtained by representing the time represented by the first undefined time expression according to the preset time expression rule.

[0256] For example, in a case where the first undefined time expression is “the day after tomorrow”, the electronic device can output a first time confirmation message about “the day after tomorrow”. The user can input “+3d”, and the electronic device can establish a second mapping relationship of “the day after tomorrow = +3d”.

[0257] In an implementation manner, the electronic device can output an inquiry message for establishing a mapping relationship in a case where the second time information fed back by the user is acquired, and can establish a second mapping relationship between the first undefined time expression and the second time information and add the second mapping relationship to the preset time expression rule after receiving the feedback information of the user confirming the establishment of the mapping relationship.

[0258] For example, the electronic device outputs an inquiry message for whether to establish the second mapping relationship of “the day after tomorrow = +3d” in a case where the second time information “+3d” corresponding to the first undefined time expression “the day after tomorrow” input by the user is acquired, and establishes the second mapping relationship of “the day after tomorrow = +3d” and adds it to the preset time expression rule after receiving the confirmation feedback of the user.

[0259] In an implementation manner, the electronic device can acquire the region where the user is located, establish a second mapping relationship between the first undefined time expression and the second time information, and add the second mapping relationship to the regional rule library of the region where the user is located in the preset time expression rule, that is, store the second mapping relationship according to the IP home location of the user, realize the expansion of each regional rule library through the “regional rule hot updating” mechanism, and in subsequent use, the preset big data processing model can automatically load the exclusive rules of the region for different regions.

[0260] For example, the electronic device acquires the IP (Internet Protocol Address) home location of the user in a case where the second time information “+3d” corresponding to the first undefined time expression “the day after tomorrow” input by the user is acquired, and the electronic device can establish the second mapping relationship of “the day after tomorrow = +3d” and add it to the preset time expression rule in the form of “CN_the day after tomorrow = +3d”.

[0261] It can be seen that in the embodiment, in a case where the time text extracted by the preset big data processing model includes the first undefined time expression, the second time information fed back by the user is acquired by outputting the first time confirmation message about the first undefined time expression, a second mapping relationship between the first undefined time expression and the second time information is established, and the second mapping relationship is added to the preset time expression rule. In this way, the preset time expression rule is updated by the user crowdsourcing rule evolution manner, the problem that the preset time expression rule cannot cover emerging time expressions and the problem of lag in manual maintenance of the rule library are solved, and the accuracy of the time information output by the preset big data processing model is improved. Moreover, the second mapping relationship is an independent configuration file and does not affect the core rule syntax of the preset time expression rule, and the compatibility is improved.

[0262] As an implementation of the embodiment of the present application, the method for extracting time information provided by the embodiment of the present application can further include:

[0263] The second undefined time expression included in the obtained to-be-processed information is counted according to a preset period. In a case where the number of occurrences of the second undefined time expression is greater than a preset threshold, a second time confirmation message about the second undefined time expression is output. Third time information fed back by a user based on the second time confirmation message is obtained, a third mapping relationship between the second undefined time expression and the third time information is established, and the third mapping relationship is added to the preset time expression rule.

[0264] In some cases, the time text extracted by the preset big data processing model can include a second undefined time expression. For example, the time text can include a second undefined time expression such as “XX activity week” or “Christmas week”, and the preset big data processing model cannot recognize the corresponding time information.

[0265] In this case, in order to improve the accuracy of the time information output by the preset big data processing model, the second undefined time expression included in the time text of the obtained to-be-processed information can be counted according to a preset period. The preset period can be set according to actual application needs, for example, one week, one month, etc., which are all reasonable and are not limited specifically herein.

[0266] In a case where the number of occurrences of the second undefined time expression is greater than a preset threshold, the electronic device can output a second time confirmation message about the second undefined time expression. The preset threshold can be set according to actual application needs, for example, 10 times, 50 times, 100 times, etc., which are all reasonable and are not limited specifically herein.

[0267] The user can view the second time confirmation message and feed back third time information corresponding to the second undefined time expression. For example, the user can input the third time information corresponding to the second undefined time expression in a preset input area in the display interface of the electronic device. For another example, the user can select the third time information corresponding to the second undefined time expression from the candidate time information currently displayed in the display interface of the electronic device.

[0268] The electronic device can obtain the third time information fed back by the user, establish a third mapping relationship between the second undefined time expression and the third time information, and add the third mapping relationship to the preset time expression rule. The third time information is time information obtained by representing the time represented by the second undefined time expression according to the preset time expression rule.

[0269] Exemplarily, in a case where the second undefined time expression is "Christmas week", the electronic device can output a second time confirmation message about "Christmas week". The user can input "12m18d~12m24d", and the electronic device can establish a third mapping relationship of "Christmas week=12m18d~12m24d".

[0270] In an implementation manner, in a case where the electronic device acquires third time information fed back by the user, the electronic device can acquire a region where the user is located, establish a third mapping relationship between the second undefined time expression and the third time information, and add the third mapping relationship to a regional rule base of a region where the user is located in the preset time expression rule, that is, store the third mapping relationship according to the user IP home location, realize expansion of each regional rule base through a "regional rule hot update" mechanism, and in subsequent use, the preset big data processing model can automatically load the exclusive rules of the region for different regions.

[0271] It can be seen that, in the embodiment, the second undefined time expression included in the acquired to-be-processed information is counted according to a preset period; in a case where the number of occurrences of the second undefined time expression is greater than a preset threshold, third time information fed back by the user is acquired by outputting a second time confirmation message about the second undefined time expression, a third mapping relationship between the second undefined time expression and the third time information is established, and the third mapping relationship is added to the preset time expression rule. In this way, the second undefined time expression is counted periodically, and the preset time expression rule is updated in a user crowdsourcing rule evolution manner, the hysteresis problem of manual maintenance of the rule base is solved, and the accuracy of the time information output by the preset big data processing model is improved. Moreover, the third mapping relationship is an independent configuration file, and does not affect the core rule syntax of the preset big data processing model, and the compatibility is improved.

[0272] Exemplarily, Table 1 is a start time and an end time included in the time information obtained by the preset big data processing model converting each time text according to the preset time expression rule.

[0273] Table 1

[0274]

[0275] The time text is "This Year", the preset big data processing model converts the time text into a start time of -0y1m1d and an end time of -0y12m~0d according to the preset time expression rule; the time text is "Last 1hour", the preset big data processing model converts the time text into a start time of -1h and an end time of -0h according to the preset time expression rule; the time text is "From 1th to 3th of last month", the preset big data processing model converts the time text into a start time of -1m1d and an end time of -1m3d according to the preset time expression rule; the time text is "April 1st to10th of this year", the preset big data processing model converts the time text into a start time of -0y4m1d and an end time of -0y4m10d according to the preset time expression rule; the conversion results of the remaining time texts have been described above and will not be repeated here.

[0276] The application provides a time information generation method.

[0277] As shown in Figure 3 A time information generation method is applied to a task processing system, the task processing system includes a preset large language model, and the method includes the following steps.

[0278] S301: obtaining to-be-processed information;

[0279] S302: using the preset large language model, extracting time text included in the to-be-processed information, converting the time text according to a preset time expression rule, and outputting time information obtained by conversion.

[0280] The preset time expression rule at least includes that a time length represented by the time text is represented by a reverse counting manner of a time ordinal in a time period to which a preset time unit belongs, and the time period to which the preset time unit belongs is a time period corresponding to a date representation manner.

[0281] When it is desired to execute a task by using a task processing system, information related to the task can be input into the task processing system, so that the task processing system can obtain the information input by a user, determine to-be-processed information, and input the to-be-processed information into a preset large language model, so that the preset large language model can obtain the to-be-processed information, extract time text included in the to-be-processed information, convert the time text according to a preset time expression rule, and output time information obtained by conversion.

[0282] In an implementation manner, the preset large language model can obtain the to-be-processed information, extract the time text included in the to-be-processed information by itself, convert the time text according to a preset time expression rule, and output the converted time information.

[0283] In an implementation manner, the task processing system can further include at least one of a terminal device, a software platform or a server, the at least one of the terminal device, the software platform or the server can obtain the to-be-processed information; and input the to-be-processed information into the preset large language model, extract the time text included in the to-be-processed information by using the preset large language model, convert the time text according to a preset time expression rule, and output the converted time information, and the method for generating the time information.

[0284] In an implementation manner, the preset large language model extracts the time text and converts the time text according to the preset time expression rule to output the time information, which is similar to the implementation manner of extracting the time text and converting the time text according to the preset time expression rule to output the time information in the method for extracting the time information provided in the present application, and thus will not be described herein.

[0285] In the scheme provided in the embodiments of the present application, the task processing system can obtain the to-be-processed information, extract the time text included in the to-be-processed information by using the preset large language model, convert the time text according to a preset time expression rule, and output the converted time information; wherein the preset time expression rule at least includes converting the time length represented by the time text into a time corresponding to a preset time unit, representing the time in a reverse counting manner of a time ordinal in a time period to which the preset time unit belongs, and the time period to which the preset time unit belongs is a time period corresponding to a date representation manner.

[0286] By setting the preset time expression rule, the preset large language model can accurately represent the time indicated by the time text according to the preset time expression rule. Moreover, by using the reverse counting manner of the time ordinal, the preset large language model can accurately represent the time ordinal in the time extraction and representation process without complex time logical reasoning on the time, which not only saves the computing power, but also avoids the influence of time reasoning errors on the accuracy of the output time information, thereby ensuring the accuracy of the time information extracted by the model.

[0287] As an implementation manner of the embodiments of the present application, the task processing system can further include at least one of a terminal device, a software platform or a server; and the at least one of the terminal device, the software platform or the server is deployed with the preset time converter.

[0288] The above method can further include:

[0289] The time information output by the preset large language model is taken as a time calculation formula;

[0290] The preset large language model is used to generate a search time according to the time calculation formula and a current time; and / or,

[0291] The preset time converter is used to generate a search time according to the time calculation formula and a current time.

[0292] Since the time information output by the preset large language model is a time expression obtained by converting the time text by using the preset time expression rule, in order to improve the execution efficiency of the data search task, the time information needs to be taken as a time calculation formula, and the search time needs to be further generated by using the time calculation formula and the current time.

[0293] In an implementation manner, the preset large language model is used to generate a search time according to the time calculation formula and a current time.

[0294] After the time information is obtained by converting the time text by using the preset large language model, the time information is taken as a time calculation formula. Since the time parameter of at least one time information unit in the time information includes an offset relative to the current time, in order to generate a search time, the current time needs to be determined, and then the preset large language model is used to generate the search time based on the time calculation formula and the current time. The search time is a time in a preset time representation format. The preset time representation format can be determined according to a time representation format in which data is stored in a data system or a time representation format supported by a search interface. For example, the preset time representation format is a time representation format in which each time information is arranged in a time unit dimension from high to low, that is, a time representation format of year-month-day or month-day.

[0295] In the case of generating a search time according to a time calculation formula by using the preset large language model, as an implementation manner, the time calculation formula can be embedded into the preset large language model as a prompt word. According to the prompt word, the preset large language model can generate a search time according to the time calculation formula and a current time.

[0296] For example, the time information is “-1d”, the time information is taken as a time calculation formula, the current time is February 2, 2024, and then the preset large language model is used to generate a search time of February 1, 2024 according to the time calculation formula and the current time.

[0297] In an implementation manner, the task processing system can further include at least one of a terminal device, a software platform or a server, and the at least one of the terminal device, the software platform or the server is deployed with the preset time converter. That is, the at least one of the terminal device, the software platform or the server included in the task processing system is deployed with the preset time converter, and the task processing system can use the preset time converter to process a time task. For example, when the task processing system includes a terminal device, a software platform and a server, at least one of the terminal device, the software platform and the server included in the task processing system is deployed with the preset time converter; when the task processing system includes a terminal device, the terminal device included in the task processing system is deployed with the preset time converter.

[0298] Based on this, the search time can be generated according to the time calculation formula and the current time by using the preset time converter.

[0299] For example, the time information is “-1m”, the time information is used as the time calculation formula, the current time is February 2, 2024, and then the search time February 2, 2024 is generated according to the time calculation formula and the current time by using the preset time converter.

[0300] It can be seen that, in the embodiment, the time information output by the preset large language model is used as the time calculation formula, the search time is generated according to the time calculation formula by using the preset large language model, and / or the search time is generated according to the time calculation formula by using the preset time converter. In this way, the search information corresponding to the time information can be quickly and accurately generated, and the execution efficiency of the data search task is improved.

[0301] As an implementation manner of the embodiment of the present application, the search time includes a search start time and a search end time, and the step of generating the search time according to the time calculation formula and the current time can include:

[0302] The search start time and the search end time in a target format are generated according to the time calculation formula and the current time, wherein the target format is a format of time information supported by the preset search interface.

[0303] The method can further include:

[0304] Based on the search start time and the search end time, the preset search interface is called to execute the data search task indicated by the to-be-processed information.

[0305] When the user wants to perform a data search task, the obtained to-be-processed information is to-be-processed information for instructing the electronic device to perform a data search task. In the case of extracting time information related to the data search task by using the preset large language model, a preset search interface also needs to be called to perform the data search task indicated by the to-be-processed information according to the time information extracted by the preset large data processing model.

[0306] Since the time information extracted by the preset large language model is expressed according to a preset time expression rule, in order to facilitate the time information to be recognized by the preset search interface, the time information also needs to be converted into a target format of time information supported by the preset search interface.

[0307] Based on this, after the preset large language model outputs the time information, the time information can be used as a time calculation formula, and the preset large language model and / or the preset time converter are used to generate search start time and search end time in a target format according to the time calculation formula and the current time, where the target format is the format of the time information supported by the preset search interface.

[0308] Further, the task processing system can call the preset search interface based on the search start time and the search end time in the target format to perform the data search task indicated by the to-be-processed information.

[0309] For example, the time text is "This Month", the start time included in the time information output by the preset large language model is -0m1d, and the end time is -0m~0d. The time information and the current time of the user 2024-12-31 16:30:30 can be input into the preset time converter. The time converter can generate search start time 2024-12-01 00:00:00 and search end time 2024-12-3123:59:59 in combination with the current time of the user (2024-12-31 16:30:30). The task processing system calls the preset search interface according to the search start time and the search end time to perform the data search task indicated by the to-be-processed information.

[0310] In a specific example, during the process of performing a data search task by the user using the task processing system, the steps performed by the task processing system are as shown in Figure 4

[0311] S401: obtaining text input by the user;

[0312] S402: determining a prompt word (preset time expression rule) and inputting the prompt word into a preset large language model;

[0313] S403: calling a time rule converter; ​

[0314] S404: calling a search interface to search and show the result.

[0315] The user can input text through an information input box displayed by the display interface of the application software, and the task processing system can acquire the text input by the user, determine a prompt word according to the text input by the user, wherein the prompt word at least includes a preset time expression rule, a system prompt word and the text input by the user. The prompt word is taken as the to-be-processed information, and is input into a preset large language model. The preset large language model extracts time text in the text input by the user according to the prompt word, converts the time text according to the preset time expression rule, and outputs the time information converted.

[0316] After the task processing system acquires the time information output by the preset large language model, the time information is taken as a time calculation formula, and through a preset time converter, the search start time and the search end time in the target format of the time information supported by the preset search interface are generated according to the time calculation formula and the current time.

[0317] The task processing system calls the preset search interface based on the search start time and the search end time, and executes the data search task indicated by the to-be-processed information.

[0318] In this embodiment, the search start time and the search end time in the target format are generated according to the time calculation formula and the current time through the preset large language model and / or the preset time converter, and the preset search interface is called based on the search start time and the search end time, and the data search task indicated by the to-be-processed information is executed. In this way, through the conversion of the time format, the execution efficiency of the subsequent data search task can be improved, the smooth progress of the data search task is guaranteed, and the accuracy of the search result of the data search task is guaranteed.

[0319] As an implementation manner of the embodiment of the present application, the step of calling the preset search interface based on the search start time and the search end time, and executing the data search task indicated by the to-be-processed information can include at least one of the following manners:

[0320] The preset search interface is called based on the search start time and the search end time generated by the preset large language model, and the data search task indicated by the to-be-processed information is executed;

[0321] The preset search interface is called based on the search start time and the search end time generated by the preset time converter, and the data search task indicated by the to-be-processed information is executed;

[0322] determine whether a first time range constituted by the search start time and the search end time generated based on the preset large language model is consistent with a second time range constituted by the search start time and the search end time generated based on the preset time converter; in the case where the first time range is consistent with the second time range, based on the first time range or the second time range, call the preset search interface to execute the data search task indicated by the to-be-processed information; in the case where the first time range is inconsistent with the second time range, calculate a time union of the first time range and the second time range, based on the time union, call the preset search interface to execute the data search task indicated by the to-be-processed information to obtain a data search result; in the case where the data search result is multiple, sort the multiple data search results in a preset order, and display the multiple data search results after sorting, wherein the preset order is to arrange the data search result whose corresponding target time is in the time intersection of the first time range and the second time range before the data search result whose corresponding target time is not in the time intersection.

[0323] In one case, in the case where the search time calculation accuracy of the preset large language model is higher, in the case where the search start time and the search end time are generated based on the preset large language model and / or the preset time converter, the search start time and the search end time generated based on the preset large language model are called to execute the data search task indicated by the to-be-processed information.

[0324] That is, in the case where the search start time and the search end time are generated based on the preset large language model, the search start time and the search end time generated based on the preset large language model are called to execute the data search task indicated by the to-be-processed information. In the case where the search start time and the search end time are generated based on the preset time converter, the search start time and the search end time generated based on the preset large language model are called to execute the data search task indicated by the to-be-processed information.

[0325] In one case, in the case where the search time calculation accuracy of the preset time converter is higher, in the case where the search start time and the search end time are generated based on the preset large language model and / or the preset time converter, the search start time and the search end time generated based on the preset time converter are called to execute the data search task indicated by the to-be-processed information.

[0326] That is, in the case of generating the search start time and the search end time based on the preset large language model, the search start time and the search end time generated based on the preset time converter are used to call the preset search interface and execute the data search task indicated by the to-be-processed information. In the case of generating the search start time and the search end time based on the preset time converter, the search start time and the search end time generated based on the preset time converter are used to call the preset search interface and execute the data search task indicated by the to-be-processed information.

[0327] In another case, in the case of generating the search start time and the search end time based on the preset large language model and the preset time converter respectively, a first time range constituted by the search start time and the search end time generated based on the preset large language model can be determined, and a second time range constituted by the search start time and the search end time generated based on the preset time converter can be determined.

[0328] It is determined whether the first time range and the second time range are consistent.

[0329] In the case where the first time range and the second time range are consistent, the preset search interface can be called based on the first time range or the second time range to execute the data search task indicated by the to-be-processed information.

[0330] In the case where the first time range and the second time range are inconsistent, a time union of the first time range and the second time range can be calculated. Based on the time union, the preset search interface is called to execute the data search task indicated by the to-be-processed information to obtain a data search result.

[0331] In the case where the data search result is multiple, since the first time range and the second time range can be affected by calculation errors, there is at least one time range that is deviated, that is, the boundaries of the first time range and the second time range can be inconsistent due to errors, but the time intersection of the first time range and the second time range is a time range that exists in both calculation manners, and the accuracy of the time intersection is higher.

[0332] Based on this, the data search result corresponding to the target time located in the time intersection of the first time range and the second time range has a higher possibility of meeting the user's demand, and therefore the data search result corresponding to the target time located in the time intersection of the first time range and the second time range can be arranged in front of the data search result corresponding to the target time not located in the time intersection as a preset order, and the plurality of data search results can be sorted according to the above-mentioned preset order, and the plurality of sorted data search results are displayed. In this way, the data search result corresponding to the target time located in the time intersection of the first time range and the second time range is displayed in a position in front, which can improve the possibility of the search result meeting the user's search demand.

[0333] It can be seen that in the embodiment, various cases of performing the data search task indicated by the to-be-processed information are provided, which are suitable for various scenarios. The task execution system can perform the data search task in a corresponding manner to quickly and accurately perform the data search task.

[0334] As an implementation manner of the embodiment of the present application, the above-mentioned preset time expression rule can further include:

[0335] In the case where the semantic meaning of the time text in the to-be-processed information includes a time zone, the time information converted by the preset large language model from the time text can include a time zone identifier corresponding to the time zone.

[0336] In some cases, the semantic meaning of the time text in the to-be-processed information can include a time zone. For example, in the case where the user inputs the text information "search for a meeting at 14 o'clock in A country next week and 16 o'clock in B country", the time in A country and the time in B country belong to different time zones, the semantic meaning of the time text in the to-be-processed information input by the preset large language model includes a time zone, and the time text involves a mixed expression of multiple time zones.

[0337] In this case, to avoid confusion in time expression, the preset time expression rule can include that in the case where the semantic meaning of the time text in the to-be-processed information includes a time zone, the time information converted by the preset large language model from the time text can include a time zone identifier corresponding to the time zone.

[0338] The time zone identifier can be various identifiers capable of distinguishing different time zones, which are not limited here.

[0339] And, the position of the time zone identifier in the time information can be set according to actual time representation needs, and the time zone identifier can be located after the time information unit corresponding to the time zone time, for example, as a suffix of the time information unit corresponding to the time zone time, as a suffix of each time information unit, etc.; the time zone identifier can also be located before the time information unit corresponding to the time zone time, for example, as a prefix of the time information unit corresponding to the time zone time, as a prefix of each time information unit, etc., which are all reasonable and are not specifically limited here.

[0340] For example, the time text of the information to be processed extracted by the preset large language model is "next Wednesday 14:00 A country time to 16:00 B country time", and the preset large language model can convert the time text into time information "+1w3d14h[aaa]~+1w3d16h[bbb]" according to the preset time expression rule, where [aaa] is the time zone identifier of the time zone to which the A country time belongs; [bbb] is the time zone identifier of the time zone to which the B country time belongs.

[0341] Correspondingly, in the step of taking the time information output by the preset large language model as a time calculation formula, the step can include:

[0342] Converting the time information into time information in the current time zone of the user by using the time zone identifier and preset time zone information, and taking the time information after time zone conversion as the time calculation formula.

[0343] Since the time information output by the preset large language model includes a time zone identifier, in order to avoid errors in generating a search time when taking the time information as a time calculation formula, the time information can be converted into time information in the current time zone of the user according to the time zone identifier and preset time zone information before taking the time information as a time calculation formula, and the time information after time zone conversion is taken as the time calculation formula. In this way, the time information after time zone conversion can be used as the time calculation formula and the current time to generate the search time.

[0344] The preset time zone information can include information required for time zone conversion, such as the country where the user is located, the correspondence between the country and the time zone, and the time zone conversion relationship between different time zones.

[0345] In an implementation manner, at least one of the terminal device, the software platform, and the server included in the system is deployed with a time normalization converter. The time information output by the preset large language model is input into the preset time normalization converter, so that the time normalization converter converts the time information into time information in the current time zone of the user by using the time zone identifier and preset time zone information, and takes the time information after time zone conversion output by the time normalization converter as the time calculation formula.

[0346] It can be seen that in the embodiment, the preset time expression rule further includes that in the case that the semantics of the time text in the to-be-processed information includes a time zone, the time information converted from the time text includes a time zone identifier corresponding to the time zone; and the time information is converted into time information in a time zone currently located by a user by using the time zone identifier and preset time zone information, as a time calculation formula. In this way, by setting the preset time expression rule, the time information output by the preset large language model includes the time zone identifier corresponding to the time zone, and then the time information is converted into the time information in the time zone currently located by the user by using the time zone identifier and the preset time zone information, so as to avoid the influence of the time expression including the time zone on the accuracy of the time information, improve the accuracy of the time expression as the time calculation formula, and further improve the accuracy of the generated search time.

[0347] As an embodiment of the present application, the method for generating time information provided by the embodiment of the present application can further include:

[0348] obtaining a verification credential corresponding to the to-be-processed information from the blockchain, wherein the verification credential includes a first verification value; the first verification value is obtained by performing an anti-tampering operation on the to-be-processed information, a target preset time expression rule, a time stamp corresponding to the search start time, and a time stamp corresponding to the search end time; and the target preset time expression rule is a preset time expression rule used for time conversion of the time text included in the to-be-processed information;

[0349] performing a hash operation on the to-be-processed information, the target preset time expression rule, a time stamp corresponding to the current search start time, and a time stamp corresponding to the current search end time to obtain a second verification value;

[0350] determining whether the search start time and / or the search end time is tampered based on the first verification value and the second verification value.

[0351] In the medical and company cooperation scenarios, the time information of the related files can be used as proof materials. However, the time information can be tampered, so that the time information is not reliable. Before the time information is used as the proof material, it is necessary to prove that the time information is not tampered.

[0352] In order to facilitate the judgment of whether the time information of the to-be-processed information is tampered, after obtaining the search start time and the search end time of the to-be-processed information by using the preset large language model and the preset time converter, a first verification value obtained by anti-tampering operation on the to-be-processed information, the target preset time expression rule, the timestamp corresponding to the search start time and the timestamp corresponding to the search end time can be obtained. Wherein, the anti-tampering operation can be various types of operations that can generate verification, such as hash operation, etc.; accordingly, in the case of hash operation, the first verification value and the second verification value are both hash values.

[0353] Wherein, the target preset time expression rule is a preset time expression rule used for time conversion of the time text included in the to-be-processed information.

[0354] The first verification value is written into the blockchain, and the blockchain can generate a verification credential corresponding to the to-be-processed information based on the first verification value, wherein the verification credential includes the first verification value. In an implementation manner, the verification credential further includes the search start time, the search end time and the transaction identifier, such as transaction code, etc.

[0355] In response to the time information verification instruction about the to-be-processed information, the electronic device can obtain the verification credential corresponding to the to-be-processed information from the blockchain, so as to obtain the first verification value included in the verification credential.

[0356] Anti-tampering operation is performed on the to-be-processed information, the target preset time expression rule, the timestamp corresponding to the current search start time and the timestamp corresponding to the current search end time, to obtain a second verification value.

[0357] Determine whether the first verification value and the second verification value are consistent, if it is determined that the first verification value and the second verification value are consistent, the current search start time and the current search end time are consistent with the search start time and the search end time respectively, and the time information has not been tampered; if it is determined that the first verification value and the second verification value are inconsistent, the current search start time is inconsistent with the search start time, and / or the current search end time is inconsistent with the search end time, and the time information has been tampered.

[0358] Wherein, the first verification value and the second verification value can be a preset number of hash values obtained by using a preset hash algorithm. For example, the first hash value = SHA256(to-be-processed information + target preset time expression rule + search start time corresponding timestamp + search end time corresponding timestamp).

[0359] It can be seen that, in the embodiment of the present application, the first verification value is calculated by using the search start time, the search end time, the to-be-processed information and the target preset time expression rule obtained by initial conversion, and the first verification value is written into the blockchain, and the verification credential is generated by using the blockchain, and then the time verification can be performed by using the verification credential and the second verification value corresponding to the current search start time and the current search end time, and the fusion scheme of time extraction and blockchain storage is used to realize time chain encryption anchoring, and the demand for time credibility in compliance scenarios is met. And, creatively, the preset time expression rule is used as a tamper-proof source instead of only using time as a tamper-proof source, ensuring the full-link credibility of time information extraction.

[0360] As an embodiment of the present application, the above-mentioned preset time expression rule can further include:

[0361] In the case that the semantic of the time text in the to-be-processed information includes an anchor word, the time information obtained by converting the time text includes the anchor word, wherein the anchor word is a fuzzy time expression word that the preset large language model cannot recognize the corresponding time range of.

[0362] Correspondingly, the step of taking the time information output by the preset large language model as the time calculation formula can include:

[0363] In the case that the time information includes a target anchor word, the preset time converter calls a preset anchor word library, and determines the fourth time information corresponding to the target anchor word based on a fourth mapping relationship between the anchor words included in the preset anchor word library and the fourth time information.

[0364] The time text of the to-be-processed information input by the user can include "early morning", "late afternoon" and other fuzzy time expression words that the preset large language model cannot recognize the corresponding time range, thereby affecting the accuracy of the time information output by the preset large language model.

[0365] For example, the time text of the to-be-processed information is "today early morning", and since the preset large language model cannot recognize the time range corresponding to "early morning", the time information obtained by converting the time text is "-0d", which only expresses "today" and does not express "early morning", and the time information is inaccurate.

[0366] In order to improve the accuracy of the time information output by the preset large language model, the fuzzy time expression word can be used as an anchor word. The preset time expression rule can further include that in the case that the semantic of the time text in the to-be-processed information includes an anchor word, the time information obtained by converting the time text by the preset large language model includes the anchor word.

[0367] For example, the time text of the information to be processed is "today early morning", the anchor word is "early morning", and the time information converted from the time text is "-0d[early morning]".

[0368] In addition, in order to accurately convert the time information output by the preset large language model into the time information in the target format, the anchor word and the fourth time information corresponding to the anchor word can be determined in advance, a fourth mapping relationship between the anchor word and the fourth time information can be established, and the fourth mapping relationship can be stored in the preset anchor word library.

[0369] The semantic anchor point analysis layer is added to detect whether the time information output by the preset large language model includes the anchor word.

[0370] Further, in the case where it is detected that the time information output by the preset large language model includes the target anchor word, the preset anchor word library can be called, the fourth time information corresponding to the target anchor word can be determined based on the fourth mapping relationship between the anchor word and the fourth time information included in the preset anchor word library, and the anchor word can be converted into a specific time range.

[0371] The preset anchor word library is an independent component, and the rule library of the preset time expression rule is not updated.

[0372] For example, the preset anchor word library can include a second mapping relationship between the anchor word "early morning" and the second time information "04:00-06:00" corresponding thereto, and a second mapping relationship between the anchor word "late evening" and the second time information "17:00-19:00" corresponding thereto. The time information converted from the time text is "-0d[early morning]", and "-0d[early morning]" can be converted into "-0d04:00~ -0d06:00" by using the second mapping relationship between the anchor word "early morning" and the second time information "04:00-06:00" corresponding thereto included in the preset anchor word library.

[0373] After the target anchor word is converted into the fourth time information corresponding thereto, the time information after the anchor word is converted is used as a time calculation formula, and the search time is calculated by using the time calculation formula.

[0374] It can be seen that, in the embodiment, the preset time expression rule further includes that the time information converted from the time text in the information to be processed includes the anchor word in the case where the semantics of the time text in the information to be processed includes the anchor word. In the case where it is detected that the time information includes the target anchor word, the preset time converter calls the preset anchor word library, and determines the fourth time information corresponding to the target anchor word based on the fourth mapping relationship between the anchor word and the fourth time information included in the preset anchor word library. Therefore, the accuracy of the time information output by the preset large language model and the accuracy of the calculated search time are improved.

[0375] As an implementation of an embodiment of the present application, the step of taking the time information output by the preset large language model as a time calculation formula can include:

[0376] Based on the preset time constraint condition, the time information output by the preset large language model is logically checked for compliance;

[0377] In the case where the time information fails to pass the check, the target time constraint condition that the time information fails to satisfy is added to the prompt word of the preset large language model, and the step of extracting the time text included in the to-be-processed information using the preset large language model is returned until the time information output by the preset large language model passes the check, and the step of taking the time information output by the preset large language model as a time calculation formula is executed.

[0378] In some cases, the time information output by the preset large language model can be logically inconsistent with the time logic, for example, the current month is March, and the time information is -1m30d, which represents February 30. However, there is no 30th day in February, which is logically inconsistent with the time.

[0379] In order to improve the reliability of the time information output by the preset large language model, the time information output by the preset large language model can be logically checked for compliance, i.e. whether the time information satisfies each time constraint condition in the time logic.

[0380] The logical compliance check verifies whether the time information conforms to the time logic by checking the rationality of the unit range of the time information and the existence of the date.

[0381] In the case where the time information passes the check, the time information output by the preset large language model is taken as a time calculation formula.

[0382] In the case where the time information fails to pass the check, the target time constraint condition that the time information fails to satisfy is added to the prompt word of the preset large language model, and the step of extracting the time text included in the to-be-processed information using the preset large language model is returned, i.e. the time text included in the to-be-processed information is extracted based on the updated prompt word using the preset large language model, and the time text is converted according to the preset time expression rule, and the new time information obtained by the conversion is output.

[0383] The new time information is checked again for logical compliance, and in the case that the new time information does not pass the check, a target time constraint condition that the new time information does not satisfy is added in the preset prompt word of the large language model, and the step of extracting the time text included in the to-be-processed information by using the preset large language model is returned until the time information output by the preset large language model passes the check, and the time information can be used as the time calculation formula.

[0384] In an implementation manner, a rule checker can be added in at least one of the preset large language model and / or a terminal device, a software platform or a server, and the time information output by the preset large language model is input into the rule checker to make the rule checker perform logical compliance checking on the time information. In the case that the time information passes the check, the time information is used as the time calculation formula; and in the case that the time information does not pass the check, a target time constraint condition that the time information does not satisfy is added in the prompt word of the preset large language model, and the time text included in the to-be-processed information is extracted again by using the preset large language model until the time information output by the preset large language model passes the check, and the time information is used as the time calculation formula.

[0385] For example, the current month is March, the time information output by the preset large language model is -1m30d, which represents February 30, the time information is input into the rule checker for logical compliance checking. The time information does not pass the check, a target time constraint condition that the time information does not satisfy, that is, "the maximum date in February is 29", is added in the prompt word of the preset large language model, and the to-be-processed information is input into the preset large language model again until the time information output by the preset large language model passes the logical compliance checking and is used as the search time.

[0386] It can be seen that in the embodiment, the time information output by the preset large language model is checked for logical compliance, in the case that the time information does not pass the check, a time constraint condition is added in the prompt word, and the preset large language model is triggered to extract the time again until the time information output by the preset large language model passes the logical compliance checking. In this way, the logical compliance checking serves as an auxiliary process, the core preset time expression rule syntax is not updated, the preset time expression rule syntax can be compatible, and the accuracy of the time information output by the preset large language model can be further improved through logical compliance checking feedback.

[0387] As an implementation manner of the embodiment of the present application, the preset time expression rule further includes:

[0388] In the case that the to-be-processed information input into the preset large language model includes a file, the time information obtained by converting the time text includes a file type of the file;

[0389] After the step of converting the time text according to the preset time expression rule and outputting the converted time information, the method for extracting time information provided by the embodiment of the application can further include:

[0390] In the case that the time information includes a file type, a text extraction method corresponding to the file type is used to extract the character information in the to-be-processed information, wherein the character information is used to execute a data search task indicated by the to-be-processed information.

[0391] Since the information input by the user can be a file, for example, the user can upload a "meeting whiteboard photo" or a "schedule document", the to-be-processed information input by the preset large language model can include the file input by the user. The preset time expression rule further includes that in the case that the to-be-processed information input by the preset large language model includes a file, the time information converted from the time text can include a file type of the file.

[0392] The preset large language model can recognize the file type of the file in the to-be-processed information and parse the time contained in the file. For example, in the case that the file is a picture, the preset large language model can recognize the file type AA of the picture and parse the time "3-5 pm" in the picture; in the case that the file is a XX type document, the preset large language model can recognize the file type XX of the document and parse the time "June 1-3, 2025" in the title of the document.

[0393] Further, the time information output by the preset large language model includes the file type, and the position of the file type in the time information can be set according to actual needs, which can be a prefix of a time information unit or a suffix of a time information unit, which are all reasonable and are not limited here.

[0394] For example, the time information output by the preset large language model is "AA_-0d15:00:00~-0d17:00:00"; the time information output by the preset large language model is 2025y6m1d~2025y6m3d_XX, and the like.

[0395] After the preset large language model outputs the converted time information, the electronic device can recognize whether the time information includes a file type, and in the case that the time information includes a file type, a text extraction method corresponding to the file type is used to extract the character information in the to-be-processed information.

[0396] The character information is used to execute a data search task indicated by the to-be-processed information.

[0397] For example, after identifying that the file type is picture type AA, the electronic device can call OCR to identify the text "meeting" and related text content in the picture; after identifying that the file type is document type XX, the electronic device can call a document parsing service to parse the text "plan" and related text content in the document.

[0398] Further, the data search task is performed using the extracted text and time information.

[0399] In the present application, the order of execution of the step of extracting text information in the to-be-processed information using a text extraction method corresponding to the file type in the case where the time information includes the file type and the step of taking the time information as a time calculation formula and generating a search time is limited. In the case where the time information includes the file type, the step of extracting text information in the to-be-processed information using a text extraction method corresponding to the file type can be executed first, or the step of taking the time information as a time calculation formula and generating a search time can be executed first.

[0400] As can be seen, in the present embodiment, the preset time expression rule further includes: in the case where the to-be-processed information input by the preset large language model includes a file, the time information obtained by converting the time text includes the file type of the file; and in the case where the time information includes the file type, text information in the to-be-processed information is extracted using a text extraction method corresponding to the file type. By adding the file type to the time information, the mapping from the file time to the time information is realized, the blind area of cross-modal time extraction is solved, the text information of the data search task indicated by the to-be-processed information is extracted according to the file type, the task execution accuracy is improved, and by updating the preset time expression rule, the multi-modal model does not need to be trained, and the cost is reduced. In addition, the present application supports user input of various types of information, improving the scene adaptability and compatibility.

[0401] Corresponding to the above-mentioned time information extraction method, the present application embodiment further provides a time information extraction device. The time information extraction device provided by the present application embodiment is introduced as follows.

[0402] As shown in Figure 5 A time information extraction device includes:

[0403] The first information acquisition module 501 is configured to acquire to-be-processed information.

[0404] The model processing module 502 is configured to input the to-be-processed information into a preset large data processing model, so that the preset large data processing model extracts time text included in the to-be-processed information, converts the time text according to a preset time expression rule, and outputs converted time information.

[0405] The preset time expression rule includes at least the following: the time length represented by the time text is represented by the time corresponding to the preset time unit, and the time is represented by the time ordinal number of the time within the time period to which the preset time unit belongs, which is the time period corresponding to the date representation method.

[0406] In the solution provided in this application embodiment, the electronic device can acquire information to be processed; input the information to be processed into a preset big data processing model, so that the preset big data processing model extracts the time text included in the information to be processed, converts the time text according to a preset time expression rule, and outputs the converted time information; wherein, the preset time expression rule includes at least the following: the time length represented by the time text is the time corresponding to a preset time unit, and the time is represented by the time ordinal number of the time within the time period to which the preset time unit belongs, which is the time period corresponding to the date representation method.

[0407] By setting preset time representation rules, the preset big data processing model can accurately represent the time indicated by the time text according to these rules. Furthermore, by employing a reverse time ordinal counting method, the preset big data processing model can accurately represent the time ordinal number without performing complex time logic reasoning during time extraction and representation. This saves computing power and avoids errors in time reasoning affecting the accuracy of the output time information, ensuring the accuracy of the time information extracted by the model.

[0408] As one embodiment of this application, the preset time expression rule includes:

[0409] When the length of time represented by the time text is uncertain, the time length represented by the time text within a preset time unit is represented by a reverse counting method using the time ordinal number within the time period to which the preset time unit belongs; and / or,

[0410] When the length of time represented by the time text is determined, the time length represented by the time text corresponding to the preset time unit is represented by the forward counting method of the time ordinal number within the time period to which the preset time unit belongs, or by the reverse counting method of the time ordinal number within the time period to which the preset time unit belongs, or by the method with smaller data volume between the forward counting method and the reverse counting method.

[0411] As one embodiment of this application, the preset time expression rule includes at least one of the following:

[0412] The time information converted from the time text comprises at least one time information unit, and each time information unit comprises a time unit corresponding to the time information unit and a time parameter corresponding to the time unit.

[0413] In a case where the time parameter is a time ordinal represented in a reverse counting manner, the time information unit corresponding to the time parameter further comprises a reverse counting identifier, the reverse counting identifier is used to connect two time information units, a time unit of a former time information unit has a higher dimension than a time unit of a latter time information unit, and the time unit of the former time information unit contains a plurality of time units of the latter time information unit; and the reverse counting identifier is used to represent that the time parameter of the latter time information unit is counted in the time unit of the former time information unit in units of the time unit of the latter time information unit.

[0414] In a case where the time parameter is an offset relative to a current time, the time information unit corresponding to the time parameter further comprises a first symbol or a second symbol, wherein the first symbol indicates that a time represented by the time text is before the current time, and the second symbol indicates that the time represented by the time text is after the current time.

[0415] The at least one time information unit is arranged according to an arrangement order of each time unit in a date representation manner, and the time parameter comprises at least one of a time ordinal represented in a forward counting manner, a time ordinal represented in a reverse counting manner, an offset relative to a current time, and a time ordinal represented in the date representation manner.

[0416] In a case where a time dimension of a smallest time unit included in the time text is higher than a time dimension of a preset time unit, the time information converted from the time text comprises the preset time unit as the smallest time unit.

[0417] As an implementation of an embodiment of the present application, the apparatus further comprises:

[0418] The unit reservation module is configured to, in a case where the time information converted from the time text comprises a time parameter with a value of 0, before the step of outputting the time information converted from the time text by the preset big data processing model, the preset big data processing model at least reserves a time information unit in the time information that can represent a time indicated by the time text, to obtain time information for output.

[0419] The unit reservation module comprises:

[0420] The traversal submodule is configured to, in a sequence from high to low according to a dimension of a time unit, sequentially traverse each time information unit of the time information by the preset big data processing model.

[0421] The unit reservation submodule is configured to, in a case where a time parameter of a time information unit with the highest time dimension is 0, continue to traverse a time information unit of a next time dimension until a time information unit with a time parameter that is not 0 is reached or all time information units are traversed, and reserve a time information unit capable of representing a time indicated by the time text, wherein the reserved time information unit includes a time information unit with a time parameter that is not 0, or, in a case where all the traversed time information units are time information units with a time parameter of 0, reserve a time information unit corresponding to a minimum time unit.

[0422] As an implementation manner of the embodiment of the present application, the model processing module 502 includes:

[0423] The time determination submodule is configured to extract a time text in the to-be-processed information by using the preset big data processing model, determine a start time and an end time of a time length represented by the time text, and determine a dimension of a minimum time unit of the start time and the end time of the time length represented by the time text.

[0424] The apparatus further includes:

[0425] The task execution module is configured to execute a data processing task indicated by the to-be-processed information based on the start time and the end time included in the time information, wherein a dimension of a minimum time unit included in the start time and the end time in the time information is sunk by one time unit of dimension compared with a dimension of a minimum time unit of the start time and the end time corresponding to the time text, and at least one of the start time and the end time in the time information is represented in a reverse counting manner.

[0426] As an implementation manner of the embodiment of the present application, the model processing module 502 includes:

[0427] The time zone conversion submodule is configured to, in a case where a semantic of the time text in the to-be-processed information includes time zone conversion, perform time zone conversion on the start time and the end time by using preset time zone information by the preset big data processing model.

[0428] The first conversion submodule is configured to convert the start time and the end time after time zone conversion according to a preset time expression rule by the preset big data processing model, to obtain converted start time and end time; and / or,

[0429] The apparatus further includes:

[0430] The deleting module is configured to delete a time corresponding to a minimum time unit of a start time included in the time information before the step of outputting and converting the time information by using the preset big data processing model, if the time corresponding to the minimum time unit of the start time is a start moment of a time range corresponding to the minimum time unit; and / or delete a time corresponding to a minimum time unit of an end time included in the time information, if the time corresponding to the minimum time unit of the end time is an end moment of a time range corresponding to the minimum time unit.

[0431] The start time and the end time have consistent dimensions of time units and are arranged in a descending order of the dimensions of the time units. The time information of the start time and the end time includes time parameters and dimensions of time units in an interleaved manner. The time parameters include numbers and / or letters. The numbers are used to represent digital information of a time intended to be indicated by a user in the time text relative to a current time or standard time information of the time intended to be indicated by the user in the time text. The letters are used to represent the standard time information of the time intended to be indicated by the user in the time text.

[0432] As an implementation of an embodiment of the present application,

[0433] The preset time expression rule further includes a first mapping relationship between a preset target time text and first time information.

[0434] The model processing module 502 includes:

[0435] The first information determining sub-module is configured to, in a case where the time text hits the target time text, determine first time information corresponding to the target time text based on the first mapping relationship as the converted time information.

[0436] The device further includes:

[0437] The first message output module is configured to, in a case where the time text extracted by the preset big data processing model includes a first undefined time expression, output a first time confirmation message about the first undefined time expression.

[0438] The first relationship establishing module is configured to acquire second time information fed back by a user based on the first time confirmation message, establish a second mapping relationship between the first undefined time expression and the second time information, and add the second mapping relationship to the preset time expression rule.

[0439] And / or,

[0440] The device further includes:

[0441] The statistics module is used to statistically analyze the second undefined time representation included in the acquired information to be processed according to a preset period.

[0442] The second message output module is used to output a second time confirmation message about the second undefined time statement when the number of occurrences of the second undefined time statement is greater than a preset threshold.

[0443] The second relationship establishment module is used to obtain the third time information fed back by the user based on the second time confirmation message, establish a third mapping relationship between the second undefined time expression and the third time information, and add the third mapping relationship to the preset time expression rule.

[0444] Corresponding to the time information generation method provided in the embodiments of this application, the embodiments of this application also provide a time information generation apparatus for introduction.

[0445] like Figure 6 As shown, a time information generation device is applied to a task processing system, the system including a preset large language model, and the device includes:

[0446] The second information acquisition module 601 is used to acquire information to be processed;

[0447] Extraction module 602 is used to extract the time text included in the information to be processed using the preset large language model, convert the time text according to the preset time expression rules, and output the converted time information;

[0448] The preset time expression rule includes at least the following: the time length represented by the time text is represented by the time corresponding to the preset time unit, and the time is represented by the time ordinal number of the time within the time period to which the preset time unit belongs, which is the time period corresponding to the date representation method.

[0449] In the solution provided in this application embodiment, the task processing system can obtain information to be processed, extract the time text included in the information to be processed using a preset large language model, convert the time text according to a preset time expression rule, and output the converted time information; wherein, the preset time expression rule includes at least the following: the time length represented by the time text is the time corresponding to a preset time unit, and the time is represented by the time ordinal number of the time within the time period to which the preset time unit belongs, which is the time period corresponding to the date representation method.

[0450] By setting the preset time expression rule, the preset large language model can accurately express the time indicated by the time text according to the preset time expression rule. Moreover, by adopting the reverse counting manner of the time ordinal, the preset large language model can accurately express the time ordinal without complex time logical reasoning in the time extraction and expression process, which not only saves computing power, but also avoids the influence of time reasoning errors on the accuracy of the output time information, thereby ensuring the accuracy of the time information extracted by the model.

[0451] As an implementation manner of the embodiment of the present application, the system further comprises at least one of a terminal device, a software platform and a server; at least one of the terminal device, the software platform or the server is deployed with a preset time converter; the apparatus further comprises:

[0452] a calculation formula determination module configured to determine the time information output by the preset large language model as a time calculation formula;

[0453] a time generation module configured to generate a search time according to the time calculation formula and a current time by using the preset large language model, and / or generate a search time according to the time calculation formula and a current time by using the preset time converter.

[0454] As an implementation manner of the embodiment of the present application, the search time comprises a search start time and a search end time; the time generation module is specifically configured to:

[0455] generate the search start time and the search end time in a target format according to the time calculation formula and the current time, wherein the target format is a format of time information supported by a preset search interface;

[0456] The apparatus further comprises:

[0457] a task execution module configured to invoke the preset search interface based on the search start time and the search end time, and execute a data search task indicated by the to-be-processed information.

[0458] As an implementation manner of the embodiment of the present application, the task execution module is specifically configured to execute at least one of the following manners:

[0459] invoke the preset search interface based on the search start time and the search end time generated by the preset large language model, and execute the data search task indicated by the to-be-processed information;

[0460] invoke the preset search interface based on the search start time and the search end time generated by the preset time converter, and execute the data search task indicated by the to-be-processed information;

[0461] determine whether a first time range constituted by the search start time and the search end time generated based on the preset large language model is consistent with a second time range constituted by the search start time and the search end time generated based on the preset time converter; in the case where the first time range is consistent with the second time range, based on the first time range or the second time range, call the preset search interface to execute the data search task indicated by the to-be-processed information; in the case where the first time range is inconsistent with the second time range, calculate a time union of the first time range and the second time range, based on the time union, call the preset search interface to execute the data search task indicated by the to-be-processed information, and obtain a data search result; in the case where the data search result is multiple, sort the multiple data search results in a preset order, and display the multiple data search results after sorting, wherein the preset order is to arrange the data search result whose corresponding target time is in the time intersection of the first time range and the second time range before the data search result whose corresponding target time is not in the time intersection.

[0462] As an embodiment of the present application, the preset time expression rule further comprises:

[0463] In the case where the semantic of the time text in the to-be-processed information includes a time zone, the time information converted from the time text includes a time zone identifier corresponding to the time zone;

[0464] The calculation formula determination module comprises:

[0465] The time zone conversion submodule is configured to convert the time information into time information in a time zone currently located by the user by using the time zone identifier and preset time zone information, as a time calculation formula;

[0466] and / or,

[0467] The device further comprises:

[0468] The credential acquisition module is configured to acquire a verification credential corresponding to the to-be-processed information from a blockchain, wherein the verification credential comprises a first verification value; the first verification value is obtained by performing an anti-tampering operation on the to-be-processed information, a target preset time expression rule, a timestamp corresponding to the search start time, and a timestamp corresponding to the search end time; the target preset time expression rule is a preset time expression rule used for time conversion of the time text included in the to-be-processed information;

[0469] The computing module is configured to perform an anti-tampering operation on the to-be-processed information, the target preset time expression rule, a timestamp corresponding to the current search start time, and a timestamp corresponding to the current search end time, to obtain a second verification value.

[0470] The determining module is configured to determine whether the search start time and / or the search end time is tampered based on the first verification value and the second verification value.

[0471] And / or,

[0472] The preset time expression rule further includes:

[0473] In a case where the semantics of the time text in the to-be-processed information includes an anchor point word, the time information obtained by converting the time text includes the anchor point word, wherein the anchor point word is a fuzzy time expression word that the preset big data processing model cannot recognize a corresponding time range of.

[0474] The computing formula determining module includes:

[0475] The second information determining submodule is configured to, in a case where it is detected that the time information includes a target anchor point word, call a preset anchor point word library, determine fourth time information corresponding to the target anchor point word based on a fourth mapping relationship between anchor point words included in the preset anchor point word library and the fourth time information, and take the fourth time information as a time computing formula.

[0476] And / or,

[0477] The device further includes:

[0478] The verifying module is configured to, before taking the time information output by the preset big language model as a time computing formula, perform a logical compliance verification on the time information output by the preset big data processing model based on a preset time constraint condition, and trigger the increasing module in a case where the time information fails to pass the verification.

[0479] The increasing module is configured to, in a case where the time information fails to pass the verification, increase a target time constraint condition that the time information fails to satisfy in prompt words of the preset big language model, and trigger the extracting module 602, until the time information output by the preset big language model passes the verification, and trigger the computing formula determining module; and / or,

[0480] The preset time expression rule further includes:

[0481] In a case where the to-be-processed information input into the preset big data processing model includes a file, the time information obtained by converting the time text includes a file type of the file.

[0482] The device also includes:

[0483] The information extraction module is configured to, after converting the time text according to the preset time expression rule and outputting the converted time information, extract the character information in the to-be-processed information by using a text extraction manner corresponding to the file type in a case where the time information includes the file type, wherein the character information is used to perform a data search task indicated by the to-be-processed information.

[0484] The application also provides a task execution system, which is described below.

[0485] As shown in Figure 7 A task execution system, the system includes a preset large language model 701, and at least one of a terminal device, a software platform, and a server 702; the system is used to implement the time information generation method provided in the application.

[0486] In the scheme provided in the application, the task processing system can obtain to-be-processed information, and extract time text included in the to-be-processed information by using a preset large language model, convert the time text according to a preset time expression rule, and output the converted time information; wherein the preset time expression rule at least includes representing a time length indicated by the time text in a time corresponding to a preset time unit, using a reverse counting manner of time ordinal in a time period to which the preset time unit belongs, and the time period to which the preset time unit belongs is a time period corresponding to a date expression manner.

[0487] By setting the preset time expression rule, the preset large language model can accurately represent the time indicated by the time text according to the preset time expression rule. Moreover, by using the reverse counting manner of time ordinal, the preset large language model can accurately represent the time ordinal in the time extraction and representation process without complex time logical reasoning, which not only saves computing power, but also avoids the influence of time reasoning errors on the accuracy of the output time information, and guarantees the accuracy of the time information extracted by the model.

[0488] The application also provides another task execution system, which is described below.

[0489] As shown in Figure 8 A task execution system, the system includes a preset large language model 801, the preset large language model 801 is used to execute any of the time information extraction methods provided in the application;

[0490] The system further includes at least one of a terminal device, a software platform, and a server 802; and the at least one of the terminal device, the software platform, and the server 802 is configured to perform a data search task indicated by the to-be-processed information by using the extracted time information of the preset large language model 801.

[0491] The preset large language model in the task execution system can perform the time information extraction method provided in the embodiments of the present application, extract time text in the to-be-processed information, and convert the time text according to the preset time expression rule, thereby extracting time information expressed according to the preset time expression rule.

[0492] The at least one of the terminal device, the software platform, and the server included in the task execution system can obtain the time information extracted by the preset large language model, and perform a data search task indicated by the to-be-processed information by using the time information.

[0493] That is, the at least one of the terminal device, the software platform, and the server can directly perform a data search task indicated by the to-be-processed information according to the time information extracted by the preset large language model.

[0494] In the scheme provided in the embodiments of the present application, the preset large language model in the task processing system can extract time text included in the to-be-processed information, convert the time text according to a preset time expression rule, and output the converted time information; and the preset time expression rule at least includes representing a time length of the time text in a time corresponding to a preset time unit, using a reverse counting manner of a time ordinal in a time period to which the preset time unit belongs, and the time period to which the preset time unit belongs is a time period corresponding to a date representation manner.

[0495] By setting the preset time expression rule, the preset large language model can accurately represent the time indicated by the time text according to the preset time expression rule. Moreover, by using the reverse counting manner of the time ordinal, the preset large language model can accurately represent the time ordinal without complex time logical reasoning in the time extraction and representation process, which not only saves computing power, but also avoids the influence of time reasoning errors on the accuracy of the output time information, thereby ensuring the accuracy of the time information extracted by the model. Moreover, the at least one of the terminal device, the software platform, and the server can directly perform a data search task indicated by the to-be-processed information according to the time information extracted by the preset large language model, thereby improving the execution accuracy of the data search task.

[0496] The embodiments of the present application further provide an electronic device, as shown in Figure 9 The electronic device includes:

[0497] The memory 901 is configured to store a computer program.

[0498] The processor 902 is configured to execute the program stored in the memory 901, and implement the method steps of any of the above embodiments.

[0499] The electronic device can further include a communication bus and / or a communication interface. The processor 902, the communication interface and the memory 901 can communicate with each other through the communication bus.

[0500] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus or the like. The communication bus can be divided into an address bus, a data bus, a control bus and the like. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.

[0501] The communication interface is configured to communicate between the electronic device and other devices.

[0502] The memory can include a Random Access Memory (RAM) and can also include a Non-Volatile Memory (NVM), for example, at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.

[0503] The processor mentioned above can be a general processor, including a Central Processing Unit (CPU), a Network Processor (NP) and the like; can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0504] In another embodiment provided in the present application, a computer readable storage medium is also provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement any of the above method steps.

[0505] In yet another embodiment provided in the present application, a computer program product containing instructions, which when executed on a computer, causes the computer to implement any of the methods in the above embodiments, is also provided.

[0506] In the above embodiments, the implementation can be wholly or partially in software, hardware, firmware, or any combination thereof. When implemented in software, the implementation can be in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed by a computer, the computer program instructions cause the computer to implement the processes or functions described in the embodiments of the present application. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from a website, a computer, a server, or a data center to another website, computer, server, or data center through a wired (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. containing one or more available media integrated. The available medium can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), an optical medium (for example, DVD), or a solid state disk (SSD), etc.

[0507] It should be noted that, in this document, the terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0508] Various embodiments are described in related manner, and the same or similar parts among various embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. Especially, for the device, system, electronic device, computer readable storage medium and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.

[0509] The above only describes the preferred embodiments of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for extracting time information, characterized in that, The method includes: Obtain information to be processed; The information to be processed is input into a preset big data processing model, so that the preset big data processing model extracts the time text included in the information to be processed, converts the time text according to a preset time expression rule, and outputs the converted time information. The preset time expression rule includes at least the following: the time length represented by the time text is represented by the time corresponding to the preset time unit, and the time is represented by the time ordinal number of the time within the time period to which the preset time unit belongs, which is the time period corresponding to the date representation method.

2. The method according to claim 1, characterized in that, The preset time expression rules include: When the length of time represented by the time text is uncertain, the time length represented by the time text within a preset time unit is represented by a reverse counting method using the time ordinal number within the time period to which the preset time unit belongs; and / or, When the length of time represented by the time text is determined, the time length represented by the time text corresponding to the preset time unit is represented by the forward counting method of the time ordinal number within the time period to which the preset time unit belongs, or by the reverse counting method of the time ordinal number within the time period to which the preset time unit belongs, or by the method with smaller data volume between the forward counting method and the reverse counting method.

3. The method according to claim 2, characterized in that, The preset time expression rule includes at least one of the following: The time information obtained by the time text conversion includes at least one time information unit, and each time information unit includes a time unit corresponding to the time information unit and a time parameter corresponding to the time unit. When the time parameter is a time ordinal number represented by a reverse counting method, the time information unit corresponding to the time parameter further includes a reverse counting identifier. The reverse counting identifier is used to connect two time information units, wherein the dimension of the time unit of the earlier time information unit is higher than the dimension of the time unit of the later time information unit, and the time unit of the earlier time information unit contains several time units of the later time information unit. The reverse counting identifier is used to indicate that: from the time units of the earlier time information unit, the time parameter of the later time information unit is counted backwards using the time units of the later time information unit as the unit. When the time parameter is an offset relative to the current time, the time information unit corresponding to the time parameter further includes a first symbol or a second symbol, wherein the first symbol indicates that the time represented by the time text is before the current time, and the second symbol indicates that the time represented by the time text is after the current time; The at least one time information unit is arranged in the order of time units in the date representation method, wherein the time parameter includes at least one of the following: time ordinal number represented in ascending order, time ordinal number represented in descending order, offset relative to the current time, and time ordinal number represented in the date representation method; If the time dimension of the smallest time unit included in the time text is higher than the time dimension of the preset time unit, the smallest time unit included in the time information obtained by converting the time text is the preset time unit.

4. The method according to claim 3, characterized in that, Before the step of outputting the converted time information from the preset big data processing model, the method further includes: When the time information obtained from the time text conversion includes time parameters with a value of 0, the preset big data processing model retains at least the time information units in the time information that can represent the time indicated by the time text, and obtains the time information for output. The step of the preset big data processing model retaining at least the time information units in the time information that can represent the time indicated by the time text includes: The preset big data processing model traverses each time information unit in descending order of time unit dimension. If the time parameter of the time information unit with the highest time dimension is 0, continue to traverse the time information units of the next time dimension until a time information unit with a non-zero time parameter is encountered or all time information units are traversed. Retain the time information unit that can represent the time indicated by the time text. The retained time information units include time information units with a non-zero time parameter. Alternatively, if all the time information units traversed are time information units with a zero time parameter, retain the time information unit corresponding to the smallest time unit.

5. The method according to any one of claims 1-4, characterized in that, The steps of the preset big data processing model to extract the time text included in the information to be processed include: The preset big data processing model extracts the time text from the information to be processed, determines the start and end times of the time length represented by the time text, and determines the dimension of the smallest time unit of the start and end times of the time length represented by the time text. The method further includes: Based on the start and end times included in the time information, the data processing task indicated by the information to be processed is executed, wherein the dimension of the smallest time unit included in the start and end times in the time information is down by one time unit compared to the dimension of the smallest time unit of the start and end times corresponding to the time text, and at least one of the start and end times in the time information is represented by a reverse counting method.

6. The method according to claim 5, characterized in that, The steps of converting the time text according to the preset big data processing model and preset time expression rules include: When the semantics of the time text in the information to be processed include time zone transformation, the preset big data processing model uses preset time zone information to perform time zone transformation on the start time and the end time; the preset big data processing model then converts the time zone-transformed start time and end time according to preset time expression rules to obtain the transformed start time and end time; and / or, Before the step of outputting the converted time information from the preset big data processing model, the method further includes: If the time corresponding to the smallest time unit of the start time included in the time information is the start time of the time range corresponding to the smallest time unit, then the time corresponding to the smallest time unit is deleted; and / or, if the time corresponding to the smallest time unit of the end time included in the time information is the end time of the time range corresponding to the smallest time unit, then the time corresponding to the smallest time unit is deleted. The start time and the end time have the same time unit dimension and are arranged in descending order of time unit dimension. The time information of the start time and the end time includes interleaved time parameters and time unit dimensions. The time parameters include numbers and / or letters. The numbers are used to represent the numerical information of the user intention indicated time in the time text relative to the current time or the standard time information of the user intention indicated time in the time text. The letters are used to represent the standard time information of the user intention indicated time in the time text.

7. The method according to claim 6, characterized in that, The preset time expression rule also includes: a preset first mapping relationship between the target time text and the first time information; The step of converting the time text according to a preset time expression rule and outputting the converted time information includes: When the time text matches the target time text, the first time information corresponding to the target time text is determined based on the first mapping relationship, and is used as the converted time information; And / or, The method further includes: If the time text extracted by the preset big data processing model includes a first undefined time expression, a first time confirmation message about the first undefined time expression is output. Obtain the second time information based on the user's confirmation message feedback at the first time, establish a second mapping relationship between the first undefined time expression and the second time information, and add the second mapping relationship to the preset time expression rule; And / or, The method further includes: The second undefined time representation included in the information to be processed obtained according to the preset periodic statistics; If the number of occurrences of the second undefined time statement exceeds a preset threshold, a second time confirmation message regarding the second undefined time statement is output. Obtain the third time information fed back by the user based on the second time confirmation message, establish a third mapping relationship between the second undefined time expression and the third time information, and add the third mapping relationship to the preset time expression rule.

8. A method for generating time information, characterized in that, Applied to a task processing system, the system including a pre-defined large language model, the method includes: Obtain information to be processed; Using the preset large language model, the time text included in the information to be processed is extracted, and the time text is converted according to the preset time expression rules to output the converted time information; The preset time expression rule includes at least the following: the time length represented by the time text is represented by the time corresponding to the preset time unit, and the time is represented by the time ordinal number of the time within the time period to which the preset time unit belongs, which is the time period corresponding to the date representation method.

9. The method according to claim 8, characterized in that, The system further includes at least one of a terminal device, a software platform, and a server; at least one of the terminal device, the software platform, or the server is equipped with a preset time converter; The method further includes: The time information output by the preset large language model is used as the time calculation formula; Using the preset large language model, a search time is generated based on the time calculation formula and the current time; and / or, Using the preset time converter, a search time is generated based on the time calculation formula and the current time.

10. The method according to claim 9, characterized in that, The search time includes the search start time and the search end time; the step of generating the search time based on the time calculation formula and the current time includes: Based on the time calculation formula and the current time, generate the search start time and search end time in the target format, wherein the target format is the time information format supported by the preset search interface; The method further includes: Based on the search start time and the search end time, the preset search interface is invoked to execute the data search task indicated by the information to be processed; The step of invoking the preset search interface based on the search start time and search end time to execute the data search task indicated by the information to be processed includes at least one of the following methods: Based on the search start time and search end time generated by the preset large language model, the preset search interface is called to execute the data search task indicated by the information to be processed; Based on the search start time and search end time generated by the preset time converter, the preset search interface is called to execute the data search task indicated by the information to be processed; The system determines whether a first time range, consisting of the search start time and search end time generated based on the preset large language model, is consistent with a second time range, consisting of the search start time and search end time generated based on the preset time converter. If the first time range and the second time range are consistent, the system calls the preset search interface based on either the first or the second time range to execute the data search task indicated by the information to be processed. If the first time range and the second time range are inconsistent, the system calculates the time union of the first and second time ranges, and calls the preset search interface based on the time union to execute the data search task indicated by the information to be processed, thereby obtaining data search results. If there are multiple data search results, the system sorts the multiple data search results according to a preset order and displays the sorted multiple data search results. The preset order is to arrange data search results whose corresponding target time is located in the time intersection of the first and second time ranges before data search results whose corresponding target time is not in the time intersection.

11. The method according to claim 10, characterized in that, The preset time expression rule also includes: When the semantics of the time text in the information to be processed include a time zone, the time information obtained by converting the time text includes the time zone identifier corresponding to the time zone; The step of using the time information output by the preset large language model as a time calculation formula includes: Using the time zone identifier and preset time zone information, the time information is converted into the time information of the user's current time zone, which is then used as the time calculation formula; And / or, The method further includes: The verification credential corresponding to the information to be processed is obtained from the blockchain, wherein the verification credential includes a first verification value; the first verification value is obtained by performing anti-tampering calculation on the information to be processed, the target preset time expression rule, the timestamp corresponding to the search start time, and the timestamp corresponding to the search end time; the target preset time expression rule is a preset time expression rule used to perform time conversion on the time text included in the information to be processed. The anti-tampering operation is performed on the information to be processed, the target preset time expression rule, the timestamp corresponding to the current search start time, and the timestamp corresponding to the current search end time to obtain the second verification value; Based on the first verification value and the second verification value, determine whether the search start time or the search end time has been tampered with; And / or, The preset time expression rule also includes: When the semantics of the time text in the information to be processed includes anchor words, the time information obtained by converting the time text includes the anchor words, wherein the anchor words are fuzzy time expression words whose corresponding time range cannot be recognized by the preset large language model. The step of using the time information output by the preset large language model as a time calculation formula includes: If the time information is detected to include a target anchor word, a preset anchor word library is invoked. Based on the fourth mapping relationship between the anchor words included in the preset anchor word library and the fourth time information, the fourth time information corresponding to the target anchor word is determined, and the fourth time information is used as a time calculation formula. And / or, Before the step of using the time information output by the preset large language model as the time calculation formula, the method further includes: Based on preset time constraints, the time information output by the preset large language model is logically compliantly verified. If the time information fails the verification, a target time constraint condition that the time information does not meet is added to the prompt words of the preset large language model, and the process returns to the step of using the preset large language model to extract the time text included in the information to be processed, until the time information output by the preset large language model passes the verification, and the step of using the time information output by the preset large language model as a time calculation formula is executed. And / or, The preset time expression rule also includes: When the input information to be processed in the preset large language model includes a file, the time information obtained by the time text conversion includes the file type of the file; After the step of converting the time text according to a preset time expression rule and outputting the converted time information, the method further includes: When the time information includes a file type, the text extraction method corresponding to the file type is used to extract the text information in the information to be processed, wherein the text information is used to perform the data search task indicated by the information to be processed.

12. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method described in any one of claims 1-7.

13. A task execution system, characterized in that, The system includes a preset large language model, and at least one of a terminal device, a software platform, and a server; the system is used to implement the method described in any one of claims 8-11.

14. A task execution system, characterized in that, The system includes a preset large language model, which is used to execute the time information extraction method of any one of claims 1-7; The system further includes at least one of a terminal device, a software platform, and a server; at least one of the terminal device, software platform, and server is used to execute the data search task indicated by the information to be processed by using the time information extracted by the preset large language model.