Processing method and device of transient absorption spectrum data, equipment and medium
Patent Information
- Application Number
- CN202611057308.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-15
- Publication Date
- 2026-10-23
AI Technical Summary
[0004]然而,在实际应用中,上述数据处理方式存在数据处理执行成功率低的问题
[0010]本申请实施例的瞬态吸收光谱数据的处理方法、装置、设备及计算机存储介质,通过将用户输入的数据处理指令输入指令识别模型进行语义解析,使数据处理指令中承载的处理意图被识别为具有明确语义指向的意图类别,同时将描述中分散的参数信息提炼为结构化的参数集合,从而将原本模糊、多变、易产生歧义的自然语言表述转化为计算机可精确理解的格式化信息;在此基础上,基于该意图类别和参数集合生成结构化指令,该结构化指令以标准化的格式完整承载了数据处理任务所需的全部关键信息,使得后续数据处理过程无需依赖任何自然语言理解即可直接根据该结构化指令调用对应的处理操作。该方案从源头上降低了因专业术语表述差异、同义表达多样或参数单位混用导致的意图误判和参数抽取错误,使得任意符合习惯的表达均能够被准确映射为统一格式的执行指令,显著提升了对多样化自然语言表述的兼容能力,从而有效降低了因用户指令表述不规范而引发的执行失败,提高了数据处理任务在不同用户、不同表述习惯下的执行成功率。
Smart Images

Figure CN122965500A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of transient absorption spectral data processing technology, and particularly relates to a method, apparatus, equipment and medium for processing transient absorption spectral data. Background Technology
[0002] Transient absorption spectroscopy is an important characterization technique for studying the ultrafast dynamics of materials after photoexcitation, and it is widely used in photocatalysis, semiconductors and perovskite materials, organic optoelectronics, quantum dots, and biochemical kinetics. In transient absorption spectroscopy experiments, data acquisition typically focuses on the detection wavelength and time delay, forming a two-dimensional matrix of data that includes multiple scans and different pump conditions. Due to the influence of experimental setup, detection link, and measurement environment, the raw transient absorption spectral data often contains various non-ideal factors such as pump scattering, dark noise, wavelength axis calibration errors, time zero-point drift, and group velocity mismatch caused by dispersion. Therefore, transforming the raw measurement results into interpretable and comparable analytical conclusions usually requires a series of data processing operations, including background subtraction, time zero-point correction, dispersion correction, data cropping, and kinetic fitting.
[0003] Currently, the processing of transient absorption spectroscopy data mainly relies on commercial software, open-source tools, or lab-written scripts. These tools typically employ menu-driven interfaces or fixed-format script commands, allowing users to specify processing steps and parameters by clicking options or writing code. Some tools support combining multiple processing steps into batch processing workflows to achieve a degree of automation. Furthermore, with the development of artificial intelligence technology, there are attempts to apply general-purpose large language models to scientific data processing scenarios, assisting users in completing some operations through natural language interaction.
[0004] However, in practical applications, the above data processing methods suffer from a low success rate. Specifically, user-described processing requests in natural language often fail to accurately identify the user's true processing intent due to differences in technical terminology, diverse synonyms, or mixed use of parameter units. This results in the system generating processing instructions that do not match the user's expectations, leading to data processing task failures or incorrect results. Summary of the Invention
[0005] This application provides a method, apparatus, device, and computer storage medium for processing transient absorption spectral data, which can improve the success rate of data processing tasks under different users and different expression habits.
[0006] On one hand, embodiments of this application provide a method for processing transient absorption spectral data, the method comprising: Obtain the first data processing instruction for processing transient absorption spectral data; The first data processing instruction is input into the instruction recognition model, and the instruction recognition model performs semantic parsing on the first data processing instruction to obtain the intent category and parameter set; wherein, the intent category is used to characterize the data processing type of data processing of transient absorption spectral data; the parameter set is used to characterize at least one processing parameter required for the data processing type. Generate structured instructions based on intent categories and parameter sets; The transient absorption spectral data is processed according to structured instructions to obtain the processing results.
[0007] On the other hand, embodiments of this application provide a processing apparatus for transient absorption spectral data, the apparatus comprising: The instruction acquisition module is used to acquire the first data processing instruction for processing transient absorption spectral data; The semantic parsing module is used to input the first data processing instruction into the instruction recognition model, and perform semantic parsing on the first data processing instruction through the instruction recognition model to obtain the intent category and parameter set; wherein, the intent category is used to characterize the data processing type of data processing for transient absorption spectral data; and the parameter set is used to characterize at least one processing parameter required for the data processing type. The structured instruction module is used to generate structured instructions based on intent categories and parameter sets; The data processing module is used to process transient absorption spectral data according to structured instructions and obtain the processing results.
[0008] In another aspect, embodiments of this application provide an electronic device, the device including: a processor and a memory storing computer program instructions; a method for processing transient absorption spectral data when the processor executes the computer program instructions.
[0009] In another aspect, embodiments of this application provide a computer storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, a method for processing transient absorption spectral data is implemented.
[0010] The transient absorption spectral data processing method, apparatus, device, and computer storage medium of this application embodiment perform semantic parsing on user-inputted data processing instructions by inputting them into an instruction recognition model. This allows the processing intent carried in the data processing instructions to be identified as an intent category with a clear semantic direction. Simultaneously, scattered parameter information in the description is extracted into a structured parameter set, thereby transforming the originally vague, variable, and ambiguous natural language expression into formatted information that the computer can accurately understand. Based on this, a structured instruction is generated based on the intent category and parameter set. This structured instruction, in a standardized format, completely carries all the key information required for the data processing task, enabling subsequent data processing to directly invoke the corresponding processing operation based on the structured instruction without relying on any natural language understanding. This solution reduces, from the source, the misjudgment of intent and parameter extraction errors caused by differences in technical terminology, diverse synonyms, or mixed parameter units. It ensures that any expression conforming to convention can be accurately mapped to a unified format execution instruction, significantly improving compatibility with diverse natural language expressions. This effectively reduces execution failures caused by non-standard user instruction expressions and increases the success rate of data processing tasks under different users and different expression habits. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a flowchart illustrating a method for processing transient absorption spectral data according to an embodiment of this application; Figure 2 This is a flowchart illustrating a method for processing transient absorption spectral data according to another embodiment of this application; Figure 3 This is a flowchart illustrating a method for processing transient absorption spectral data according to another embodiment of this application; Figure 4 This is a flowchart illustrating a method for processing transient absorption spectral data according to another embodiment of this application; Figure 5 This is a schematic diagram of the structure of a transient absorption spectral data processing device provided in another embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in another embodiment of this application. Detailed Implementation
[0013] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0014] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0015] It should be noted that the acquisition, storage, use, and processing of data in this application embodiment all comply with the relevant provisions of national laws and regulations.
[0016] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.
[0017] The processing of transient absorption spectral data involves multiple steps, including background subtraction, zero-point time correction, dispersion correction, data cropping, and dynamic fitting. The parameters of each step are tightly coupled, and the execution order has a strict logical dependency, making it difficult to effectively guarantee the success rate of the data processing flow in actual execution.
[0018] The low success rate of data processing stems from a significant discrepancy between user expression and model comprehension, coupled with insufficient model orchestration and state management capabilities. When users describe their data processing needs in natural language, the terminology, sentence structure, unit expressions, and level of detail vary considerably. The same processing objective can be expressed in multiple ways, making it difficult for the model to consistently identify the user's true processing intent from these diverse expressions. Furthermore, users often provide incomplete key parameters in single commands. For example, they might only request dynamic fitting without specifying the model type or lifetime range, or provide wavelength ranges or time windows exceeding the instrument's effective measurement range. The model lacks the ability to verify these parameters and fails to implement a proactive feedback mechanism to inquire about missing or abnormal parameters. This results in downstream processing modules failing to execute or encountering errors due to incomplete parameter configurations.
[0019] When user commands involve multiple processing steps, there are strict sequential dependencies between these steps. However, the model lacks the logical orchestration ability for multi-step processes and cannot determine the reasonable execution order between steps, leading to interruptions or incorrect results during processing. In multi-turn interaction scenarios, users may gradually supplement parameters or correct previously provided values through multiple sentences, but the model lacks a mechanism to continuously track the dialogue content. It cannot correctly inherit previously confirmed parameters, identify and cover conflicting information, or merge newly added information in subsequent turns, resulting in a final processing configuration that is inconsistent with the user's complete intent, thus causing data processing execution failure.
[0020] The transient absorption spectral data processing method of this application embodiment performs semantic parsing on user-inputted data processing commands by inputting them into a command recognition model. This allows the processing intent carried in the data processing commands to be identified as an intent category with a clear semantic direction. Simultaneously, the scattered parameter information in the description is extracted into a structured parameter set, thereby transforming the originally vague, variable, and ambiguous natural language expression into formatted information that the computer can accurately understand. Based on this, a structured command is generated according to the intent category and parameter set. This structured command, in a standardized format, completely carries all the key information required for the data processing task, enabling subsequent data processing to directly invoke the corresponding processing operation based on the structured command without relying on any natural language understanding. This solution reduces, from the source, the misjudgment of intent and parameter extraction errors caused by differences in technical terminology, diverse synonyms, or mixed parameter units. It ensures that any expression conforming to common usage can be accurately mapped to a unified format execution command, significantly improving compatibility with diverse natural language expressions. This effectively reduces execution failures caused by non-standard user command expressions and increases the success rate of data processing tasks under different users and different expression habits.
[0021] To address the problems of the prior art, embodiments of this application provide a method, apparatus, device, computer storage medium, and computer program product for processing transient absorption spectral data. The method for processing transient absorption spectral data provided in this application embodiment will be described first below.
[0022] Figure 1 A schematic flowchart of a method for processing transient absorption spectral data according to an embodiment of this application is shown. Figure 1 As shown, the method includes steps S101-S104.
[0023] S101, Obtain the first data processing instruction for processing transient absorption spectral data.
[0024] As an example, the first data processing instruction can refer to information entered by the user through a natural language interface, describing the processing needs of transient absorption spectral data. This instruction is in the form of natural language text, and the user can describe their processing goals in complete sentences or phrases according to their own expression habits. For example, the user can enter a need to crop the wavelength range of the spectrum, extract the kinetic curve at a specific wavelength, or perform automatic data preprocessing.
[0025] Specifically, as an example, the text content input by the user can be received through a natural language interactive interface as the first data processing instruction, and this instruction can be completely preserved for subsequent processing. It should be noted that this first data processing instruction can be the processing request first entered by the user in the current session, or a new processing instruction entered by the user based on previous instructions during multiple rounds of interaction. For the first input instruction, its content usually independently describes a complete data processing goal; for instructions entered during multiple rounds of interaction, its content may depend on information confirmed in previous dialogues. When the first data processing instruction is entered by the user for the first time, there is no historical dialogue context or confirmed processing parameters at the current moment; only the text content of the instruction is used as the input for subsequent instruction recognition models. When the first data processing instruction is entered during multiple rounds of interaction, its expression may be more concise, containing only supplementary or corrective information for previous parameters. This step provides the most basic information input for the entire data processing flow and is the data foundation for all subsequent semantic parsing and processing operations.
[0026] S102, the first data processing instruction is input into the instruction recognition model, and the instruction recognition model performs semantic parsing on the first data processing instruction to obtain the intent category and parameter set; wherein, the intent category is used to characterize the data processing type of transient absorption spectral data; the parameter set is used to characterize at least one processing parameter required for the data processing type.
[0027] As an example, the instruction recognition model can refer to a large language model obtained after low-rank adaptive fine-tuning training, capable of semantic parsing natural language instructions in the field of transient absorption spectral data processing. The intent category characterizes the type of data processing performed on the transient absorption spectral data, such as data cropping, dynamic curve extraction, transient spectrum extraction, or automatic preprocessing. The parameter set characterizes at least one processing parameter required to perform this type of data processing, such as time window, wavelength range, fitting model type, or noise reduction strategy.
[0028] Specifically, as an example, the acquired first data processing instruction is input into the instruction recognition model. This model extracts key parameters from the current user input, such as the time window, wavelength range, fitted model type, and noise processing strategy, and identifies the data processing target type corresponding to the user instruction. It should be noted that the model's input includes not only the user instruction of the current round but also the historical dialogue context and the current dialogue content. The dialogue content is used to record all determined intent categories and parameter sets up to the current round. This step transforms the unstructured natural language text input by the user into structured intent categories and parameter sets, providing a foundation for subsequently generating structured instructions that can be called by downstream processing modules.
[0029] S103 generates structured instructions based on intent category and parameter set.
[0030] As an example, this structured instruction can refer to a standardized data format containing processing intent and relevant parameter information that can be directly parsed and invoked by downstream data processing modules. This structured instruction is presented in a hierarchical data organization form, such as using a hierarchical JSON format or a specialized instruction format for transient absorption spectroscopy data processing.
[0031] Specifically, as an example, the parsed intent category is used as the core operation type identifier of the structured instruction, and each pair of parameter keys and values in the parameter set is used as the configuration information required to execute the operation, organized and serialized according to a preset data format specification. Specifically, a corresponding instruction template can be predefined for each intent category. This template contains all available parameter key names and their data type constraints under that intent category. The actual parameter values from the parameter set are filled into the corresponding fields of the template, thus forming a complete structured instruction. This filling process does not change the parameter key names defined in the template; it only replaces the placeholders with actual values or text. This step reorganizes the discrete parsing results output by the instruction recognition model into a standard format that downstream spectral processing and analysis modules can directly read and execute, eliminating ambiguity and flexibility in natural language expression. This allows the processing intent and parameters to be transmitted to the execution layer in a deterministic manner, thereby ensuring that downstream modules can correctly call the corresponding data processing operators and complete the data processing tasks.
[0032] S104 processes the transient absorption spectral data according to the structured instructions to obtain the processing results.
[0033] As an example, the transient absorption spectral data can refer to the raw data acquired through transient absorption spectroscopy experiments, which is organized into a two-dimensional matrix with the detection wavelength and delay time as the two core dimensions, and may contain multiple sets of data accumulated from multiple scans under different pump power conditions. The processing result can refer to the output data or visualization chart obtained after performing the data processing operation specified by the structured instruction on the raw transient absorption spectral data, such as a two-dimensional spectrum after wavelength range cropping, a kinetic curve at a specified wavelength, a transient spectrum at a specified delay time, or a two-dimensional color image after automatic preprocessing.
[0034] Specifically, as an example, the downstream spectral processing and analysis module first obtains the intent target and corresponding parameter set from the structured instruction using a unified parsing method. This unified parsing method reads the intent category field and parameter field in the structured instruction according to a preset data format specification. Subsequently, based on the intent target, it calls the corresponding data processing operator or processing module. This data processing operator refers to a pre-encapsulated function or program unit used to perform specific types of data processing operations, such as a spectral cropping operator, zero-point correction operator, background noise filtering operator, and kinetic parameter fitting operator. The core parameters from the parameter set are input into the data processing operator as the execution configuration. The data processing operator then performs corresponding processing operations on the original transient absorption spectral data based on the input parameters. Taking spectral cropping as an example, if the intent category in the structured instruction is data cropping, and the parameter set includes a lower wavelength limit and an upper wavelength limit, then the spectral cropping operator is called, and the lower and upper wavelength limits are input as cropping boundaries to the operator. The operator outputs the cropped spectral data. After all processing operations are completed, the output data or visualization charts are output as the processing result, and the processing result and the corresponding structured instructions are logged for subsequent process traceability and result reproduction. This step ultimately translates natural language instructions into actual data processing actions, completing a full closed-loop mapping from user needs to analysis results, and enabling the data processing workflow to be implemented.
[0035] The transient absorption spectral data processing method of this application embodiment performs semantic parsing on user-inputted data processing commands by inputting them into a command recognition model. This allows the processing intent carried in the data processing commands to be identified as an intent category with a clear semantic direction. Simultaneously, the scattered parameter information in the description is extracted into a structured parameter set, thereby transforming the originally vague, variable, and ambiguous natural language expression into formatted information that the computer can accurately understand. Based on this, a structured command is generated according to the intent category and parameter set. This structured command, in a standardized format, completely carries all the key information required for the data processing task, enabling subsequent data processing to directly invoke the corresponding processing operation based on the structured command without relying on any natural language understanding. This solution reduces, from the source, the misjudgment of intent and parameter extraction errors caused by differences in technical terminology, diverse synonyms, or mixed parameter units. It ensures that any expression conforming to common usage can be accurately mapped to a unified format execution command, significantly improving compatibility with diverse natural language expressions. This effectively reduces execution failures caused by non-standard user command expressions and increases the success rate of data processing tasks under different users and different expression habits.
[0036] As another implementation of this application, the parameter set includes at least one pair of parameter keys and parameter values, and S103 may also include steps S103A1-S103A3.
[0037] S103A1 uses a preset intent boundary identifier to identify the start and end positions of the intent category, thereby obtaining intent category information.
[0038] As an example, the intent boundary identifier is derived from a pre-defined set of control identifiers, which is constructed by expanding upon the original vocabulary of the basic large language model. Specifically, this set of control identifiers includes several new lexical units, which correspond to structured notations specific to the field of transient absorption spectroscopy data processing, used to enhance the model's ability to recognize instruction formats. The intent boundary identifier may specifically include a start identifier and an end identifier.
[0039] Specifically, as an example, the start identifier is appended before the intent category string, and the end identifier is appended after the intent category string. This appending operation refers to the sequential concatenation of the string sequences. The continuous sequence obtained after this marking process is the intent category information. This step clarifies the physical boundaries of intent categories in structured instructions. In subsequent validity checks and instruction parsing, the parser can quickly locate the start and end positions of the intent category based on the start and end identifiers, thereby accurately extracting the intent content. Simultaneously, during model training, these boundary identifiers allow the model to allocate higher attention weights to control identifiers when calculating cross-entropy loss, and during inference, they can be combined with prefix tree constraint decoding rules to eliminate the problem of unparsable output formats at the root, ensuring the uniqueness and standardization of the parsing results in terms of topological structure.
[0040] S103A2 uses preset parameter key identifiers and parameter value identifiers to mark parameter keys and parameter values respectively, thereby obtaining parameter set information.
[0041] As an example, parameter key identifiers and parameter value identifiers also belong to the preset set of control identifiers. Parameter key identifiers are used to mark the starting position of parameter names, and parameter value identifiers are used to mark the starting position of specific parameter values.
[0042] Specifically, as an example, the parameter set contains at least one pair of parameter keys and parameter values. For any j-th key-value pair, the parameter key of that key-value pair is denoted as . The corresponding parameter value is denoted as First, append the parameter key identifier to the parameter key. Previously, the parameter value identifier was appended to the parameter value. Previously, the alternation of parameter key identifiers and parameter value identifiers naturally constituted the boundary delineation of key-value pairs. After the above processing, all marked parameter keys and parameter values are concatenated into a whole through string concatenation operations according to their original order in the parameter set, forming parameter set information. This step establishes an explicit mapping relationship between parameter names and parameter values. By introducing two identifiers with clear distinguishability, the downstream validity verification module can accurately distinguish which parts of the string sequence belong to the parameter name and which parts belong to the corresponding parameter value without relying on complex syntax rules or semantic inference. This explicit marking mechanism can effectively eliminate attribution errors caused by unit variants, synonyms, or changes in parameter order, ensuring the integrity of parameter extraction.
[0043] S103A3, based on intent category information and parameter set information, obtains structured instructions.
[0044] Given a target intent category I and a parameter set containing M key-value pairs, the j-th parameter key is denoted as... The corresponding j-th parameter value is denoted as The generated structured instruction Y follows the following serialization format:
[0045] Here, ⊕ represents the string concatenation operation, which joins the strings on the left and right sides in sequence to form a complete continuous sequence. <|intent_start|> and <|intent_end|> represent the start and end identifiers in the intent boundary identifier, respectively. <|slot_key|> represents the parameter key identifier, and <|slot_value|> represents the parameter value identifier. This indicates that the concatenation operation within the parentheses is performed sequentially on each key-value pair from j equal to 1 to M, with all key-value pairs concatenated in order. This step fuses the discrete intent recognition results and parameter extraction results into a self-contained, standardized output that strictly conforms to preset specifications. This structured instruction fully preserves all semantic elements of the data processing task, constructs a hierarchical, machine-readable data structure through control identifiers, and can be used by downstream validity verification modules for integrity and boundary range checks, providing a foundation for stable integration with the transient absorption spectroscopy data processing module.
[0046] The transient absorption spectral data processing method of this application uses intent boundary identifiers to mark the start and end positions of intent categories. It then uses parameter key identifiers and parameter value identifiers to alternately mark each pair of parameter keys and values in the parameter set. Finally, it concatenates these identifiers according to a fixed topological order, first intent category information and then parameter set information, to generate structured instructions. This sequential processing mechanism ensures that each semantic unit of the structured instruction has clear boundary locations and hierarchical relationships. Based on this clearly defined encoding structure, subsequent data processing can quickly locate and extract intent categories and parameter key-value pairs without relying on complex semantic inference, providing a reliable input foundation for subsequent boundary range checks of parameter values and integrity verification of required parameters.
[0047] As another implementation of this application, such as Figure 2 As shown, before S103, the method may also include steps S111-S114.
[0048] S111, compare the preset required parameter items corresponding to the intent category with the parameter set, and determine the parameter keys in the preset required parameter items that are not included in the parameter set as missing parameter keys.
[0049] As an example, a predefined required parameter field can refer to a predefined set of parameter keys required to execute the intent for each intent category. This set contains one or more parameter keys. The parameter set is a collection of paired parameter keys and values that have been successfully retrieved in the current round.
[0050] Specifically, as an example, the preset required parameters corresponding to the current intent category can be compared one by one with the current parameter set. For each parameter key in the preset required parameters, it is checked whether the parameter key exists in the parameter set. If a parameter key is not found in the parameter set, it is identified as a missing parameter key. If all parameter keys in the preset required parameters exist in the parameter set, the missing parameter key set is empty. This comparison operation does not involve comparing parameter values, but only checks the existence of parameter keys. In transient absorption spectroscopy data processing scenarios, different intent types correspond to different required parameter requirements. For example, a zero-point time correction intent may require specifying a time window parameter, while a kinetic fitting intent may require specifying a fitting model type and lifetime range parameter. Through this step, missing parameters can be proactively identified before processing structured instructions, thereby reducing downstream execution failures due to insufficient information.
[0051] S112, output parameter key missing prompt information containing missing parameter keys; wherein, the parameter key missing prompt information is used to prompt for the parameter value corresponding to the missing parameter key.
[0052] As an example, a missing parameter key message is a natural language feedback to the user that includes at least the name of the parameter key that has been identified as missing, indicating to the user what necessary information is currently missing.
[0053] Specifically, as an example, a prompt message is generated based on a defined set of missing parameter keys. If the set of missing parameter keys contains one or more parameter keys, each parameter key in the set is converted into a user-readable parameter name representation and assembled into a complete prompt statement. This prompt message is output to the user interface. The prompt message can take the form of a question, for example, guiding the user to provide the corresponding parameter value for a specific missing parameter key. This step guides the user to supplement information according to the preset required parameter fields by explicitly informing them of the specific missing parameter name, making subsequent rounds of input more standardized and targeted, thereby driving the multi-round dialogue towards parameter completeness.
[0054] S113, receive a second data processing instruction in response to the missing parameter key prompt message.
[0055] As an example, the second data processing instruction is the response content entered by the user through the natural language interface after receiving the parameter key missing prompt information. It carries the parameter value information supplemented by the user for the missing parameter key.
[0056] Specifically, as an example, the system continuously monitors the user interaction interface. When a missing parameter key prompt is sent to the user, it enters a waiting state until it receives a natural language input response from the user. This input constitutes the second data processing instruction. Upon receiving the second data processing instruction, the historical dialogue context is simultaneously preserved, including the content of the first data processing instruction, the determined intent category, existing parameter key-value pairs, and the state information from previous rounds. This context preservation method provides a complete historical information foundation for subsequent state updates and semantic parsing. This step obtains a new round of natural language input by receiving the user's response to the missing parameter key; this input, together with the first data processing instruction, constitutes a complete sequence of multi-round dialogues. This mechanism allows complex data processing needs that would otherwise be difficult to fully express in a single interaction to be gradually clarified and refined through multiple rounds of interaction.
[0057] S114, based on the second data processing instruction, update the intent category and parameter set.
[0058] Specifically, as an example, semantic parsing can be performed on the second data processing instruction to extract the newly added or modified parameters carried within it. Specifically, the dialogue content of the current round can be determined solely by the dialogue content of the previous round and the input of the current round:
[0059] in, This represents the dialogue content after the t-th round of updates. This represents the historical dialogue content of round t-1. This represents the user input in the current round t, which is the second data processing instruction. Extract represents the extraction operation that extracts new or modified parameters from the current round's input. This represents the state update function, which can execute conflict resolution rules, which are detailed below.
[0060] This step integrates information fragments scattered across multiple rounds of dialogue into a unified set of parameters, while handling parameter conflicts based on the latest user intent, ensuring that the dialogue content always reflects the user's latest and most complete processing needs.
[0061] S103 may also include steps S103B1-S103B2: S103B1: Identify the missing parameter key according to the preset missing parameter identifier to obtain the missing parameter key information.
[0062] As an example, the missing parameter identifier is an element of a predefined set of control identifiers. The missing parameter identifier is specifically used to mark parameter keys that exist in the predefined required parameter fields but for which the corresponding parameter value has not yet been obtained in the current parameter set.
[0063] Specifically, as an example, when the set of missing parameter keys is not empty, for each missing parameter key in the set, a missing parameter identifier is appended to the string of that parameter key. After the above marking process, all the marked missing parameter keys, together with other parameter keys, form a complete parameter key marking sequence. This step, by introducing a dedicated missing parameter identifier, allows subsequent data processing to directly identify which parameter keys are missing corresponding parameter values when parsing structured instructions, without needing to maintain an additional independent list of missing parameters. Simultaneously, this identifier also encodes the parameter missing status into the structured instructions themselves, making the structured semantic representation more complete.
[0064] S103B2, based on intent category information, parameter set information and missing parameter key information, obtains structured instructions.
[0065] Specifically, as an example, the generated intent category information is obtained, which is the intent category string surrounded by the intent start identifier and intent end identifier. Next, the parameter set information is obtained, which is the sequence of key-value pairs alternately marked by parameter key identifiers and parameter value identifiers. Then, the generated missing parameter key information is obtained, which is the sequence of missing parameter keys marked by missing parameter identifiers. A concatenation operation can be performed in the order of intent category information, then parameter set information, and finally missing parameter key information to form a complete structured instruction sequence. If a parameter key appears in both the parameter set and is marked as a missing parameter key, it indicates that the parameter key has been obtained but needs to be re-provided by the user in the current round due to validation failure. This step generates a self-contained, standardized structured instruction output, which fully records all currently obtained parameters and any required parameters that have not yet been obtained. This design allows for the output of a complete instruction object even with missing parameters. Subsequent data processing can accurately locate information gaps based on the missing parameter identifiers and generate targeted follow-up questions, thus supporting the continuous progress of multi-round dialogues until all required parameters are complete.
[0066] The transient absorption spectral data processing method of this application embodiment determines the current dialogue content by combining the previous round's content and the current round's input, ensuring the consistency of parameter accumulation and the rationality of conflict handling in multi-round interactions. The introduction of missing parameter identifiers directly encodes the information gaps into the structured instruction itself, so that subsequent data processing can locate all unacquired required parameters in a single structured object without the need to maintain an independent dialogue record. This allows for continuous clarification and follow-up questions until all requirements of the preset required parameter items are met.
[0067] As another implementation of this application, such as Figure 3 As shown, S114 may also include steps S114A1-S114A2.
[0068] S114A1, if the second data processing instruction does not change the intent category and / or parameter set, the parameter set is concatenated with the second data processing instruction through a context identifier to obtain the concatenated data processing instruction.
[0069] As an example, context identifiers are elements within a predefined set of control identifiers. Context identifiers are specifically used to mark the boundary between historical context and current user input in multi-turn dialogue scenarios.
[0070] Specifically, as an example, when the second data processing instruction does not change the intent category determined by the first data processing instruction, and does not change any parameter key or parameter value in the existing parameter set, the input in the current round is determined to be of the parameter supplementation type rather than the modification type. In this case, the determined parameter set and the second data processing instruction are concatenated using a context identifier. The concatenation method is as follows: the context identifier is placed between the parameter set and the second data processing instruction to form a complete sequence containing the historical context and the current user input. The concatenated sequence is represented as follows:
[0071] in, This represents the data processing instructions after concatenation in round t, where <|context_sep|> represents the context identifier. This represents the dialogue content that has been determined in round t-1, which records the set of all determined parameters up to the previous round. This represents the user input in the current t-th round, i.e., the second data processing instruction, and ⊕ represents the string sequence concatenation operation. In multi-turn dialogue scenarios for transient absorption spectroscopy data processing, users often only provide parameter values and omit parameter names when supplementing parameters, or use descriptive expressions. By concatenating the already determined set of parameters with the current input into a unified input sequence, the model can simultaneously obtain the existing parameter states and the current user-supplemented information when parsing the current round, thereby accurately understanding the object the user is referring to.
[0072] S114A2 performs semantic parsing on the concatenated data processing instructions to obtain the updated parameter set.
[0073] Specifically, as an example, the concatenated data processing instructions are input into an instruction recognition model. When processing this input, the model performs intent recognition and parameter extraction on the current user input following the context identifier, based on historical parameter state information prior to the context identifier. Since the model has already learned how to parse the current input with the aid of historical information through training samples containing context identifiers during the training phase, it can identify supplementary parameter values for existing parameter keys in the current user input during the inference phase. After extracting the new parameters from the current user input, the model merges them with the existing parameter set before concatenation to form an updated parameter set. This step, by incorporating historical parameter states as context information into the parsing process of the current round, can accurately understand the user's supplementary intent when the user only provides incremental information, and merges the newly extracted parameters with the existing parameter set, gradually approaching the complete task parameter configuration.
[0074] S103 may also include step S103C1: generating structured instructions based on the intent category and the updated parameter set.
[0075] Specifically, as an example, the generated intent category information is obtained, including the intent category string and intent start identifiers and intent end identifiers used to mark its start and end positions. Next, parameter set information generated based on the updated parameter set is obtained, which is a sequence of key-value pairs alternately marked by parameter key identifiers and parameter value identifiers. Then, following a preset standardized serialization format, the intent category information is concatenated at the beginning of the entire structured instruction, and the parameter set information is concatenated afterward, forming a complete structured instruction sequence. This step transforms the parameter set, which is gradually improved through multiple rounds of interaction, into a standardized instruction output with a clear structure, well-defined boundaries, and machine-resolvable characteristics. This output contains the intent category and all obtained parameter key-value pairs, allowing for direct checks on the completeness of required parameters and the boundary range of parameter values, providing standardized instruction input for subsequent calls to transient absorption spectral data processing operators.
[0076] The transient absorption spectral data processing method of this application embodiment concatenates a determined parameter set with a second data processing instruction using a context identifier to form a complete sequence containing historical context and current input. Semantic parsing is then performed on this concatenated sequence to extract newly added parameters and merge them into an updated parameter set. Finally, standardized structured instructions are generated based on the intent category and the updated parameter set. This allows the model to accurately understand the incremental parameter information provided by the user in the current round when processing parameter-supplemented inputs, using the existing parameter state as a reference context. This effectively overcomes the parsing ambiguity caused by users omitting parameter names or using instructions in multi-round dialogues. Simultaneously, this mechanism allows parameter configuration to be gradually accumulated and improved in multiple rounds of interaction, ensuring that the final generated standardized structured instructions contain all acquired parameter information.
[0077] As another implementation of this application, such as Figure 3 As shown, S114 may also include step S114B1.
[0078] S114B1, if the second data processing instruction changes the intent category and / or parameter set, the first data processing instruction is updated according to the second data processing instruction.
[0079] As an example, changing the intent category can refer to a difference between the type of intent expressed by the user in the second data processing instruction and the type of intent identified in the first data processing instruction. Changing the parameter set means that the parameter value provided for a certain parameter key in the second data processing instruction is different from the parameter value corresponding to that parameter key in the current parameter set, or that an existing parameter key is deleted in the second data processing instruction.
[0080] Specifically, as an example, upon receiving a second data processing instruction, semantic parsing is performed on the instruction and compared with the current dialogue content. If the second data processing instruction contains an intent category different from the first data processing instruction, or if any parameter value in the second data processing instruction is inconsistent with the existing parameter value of the corresponding parameter key in the current parameter set, it is determined that the current round's input belongs to the correction type rather than the parameter supplement type. In this case, the second data processing instruction as a whole is used as the updated first data processing instruction. This update operation essentially replaces the original user input with a new input containing correction information, using the user's latest round's expression to overwrite the information of previous rounds. During the training data construction phase, the dialogue update logic follows a preset conflict resolution rule, that is, when the latest round's user input conflicts with the intent category or parameter value of previous rounds, the latest round's input is used as the overwrite. This step, by using the user's latest expression as a new first data processing instruction, can completely re-understand the user's current data processing needs, avoiding the logical confusion that may result from accumulating corrections based on previous erroneous information. This ensures that the update of the dialogue content prioritizes the latest round's user input, guaranteeing that the direction of the response always aligns with the user's latest true intent.
[0081] S102, return to input the updated first data processing instruction into the instruction recognition model, and use the instruction recognition model to perform semantic parsing on the first data processing instruction to obtain the intent category and parameter set.
[0082] Taking weightlifting as an example, the updated first data processing instruction is passed to the instruction recognition model. This model uses the exact same processing logic as parsing the original first data processing instruction: based on its pre-trained weight parameters, it performs semantic parsing on the input and outputs the corresponding intent category and parameter set. This process does not rely on the intent or parameters parsed in previous rounds; instead, it independently parses the updated first data processing instruction as the sole input. This step handles scenarios where the user changes their intent or modifies parameters through complete re-parsing rather than incremental correction. By re-executing the complete intent recognition and parameter extraction process with the updated first data processing instruction as entirely new input, the user's needs can be understood anew from a clean starting point, discarding previous erroneous information. This ensures that the corrected parsing result is complete, consistent, and free of residual information from previous rounds, thereby reducing the risk of parsing errors caused by information accumulation.
[0083] The transient absorption spectral data processing method of this application replaces the second data processing instruction that changes the intent category or parameter set entirely with the updated first data processing instruction. Then, it re-inputs the updated first data processing instruction into the instruction recognition model to perform complete semantic parsing to re-obtain the intent category and parameter set. This ensures that in multi-turn dialogues, the user's latest expression is used to fully cover all information from previous turns, rather than making partial corrections based on existing parsing results. This processing method effectively reduces the cumulative bias caused by erroneous or outdated intent categories and parameter information from previous turns being mixed into subsequent parsing processes. It ensures that after the user changes their data processing needs or corrects parameters, the user's intent can be re-understood based on clean information, thereby obtaining a complete, consistent, and fully reflective parsing result that reflects the user's latest needs.
[0084] As another implementation of this application, the method may also include step S121 before S103.
[0085] S121, determine that the intent category and / or parameter set meet preset conditions; wherein, the preset conditions include at least one of the following: the intent category belongs to a preset intent category set, the parameter key in the parameter set belongs to a preset parameter key set, and the parameter value in the parameter set is within a preset valid value range.
[0086] As an example, the preset intent category set can be a predefined set of all intent tags covering the entire transient absorption spectroscopy data processing workflow, where each intent tag corresponds to a data processing objective. The preset parameter key set is a predefined set of all parameter key types associated with each intent category. The preset valid value range is a pre-defined reasonable value range for each parameter with numerical attributes; the lower limit of this range is denoted as... The upper limit is denoted as These correspond to the physical or instrumental boundaries of the parameter in transient absorption spectroscopy data processing, respectively.
[0087] Specifically, as an example, the following three checks can be performed sequentially. The first check targets the intent category: determining whether the output intent category string completely matches a specific intent tag in the preset intent category set. The second check targets the parameter key: iterating through each parameter key in the parameter set and determining if the parameter key exists in the preset parameter key set. The third check targets the parameter value: for parameter values with numerical attributes in the parameter set, determining whether the value falls within a preset valid value range. For a single parameter value… ,like If the intent category belongs to the preset intent category set, all parameter keys belong to the preset parameter key set, and all parameter values are within their respective preset valid value ranges, then the current intent category and parameter set are determined to meet the preset conditions. If any one of these conditions is not met, the system determines that the verification fails.
[0088] In transient absorption spectroscopy data processing, different types of parameters have clear physical meanings and instrument limitations. For example, the polynomial order in baseline correction is a non-negative integer and usually no greater than 5; the lifetime range in exponential fitting is limited by the experimental time window; and the wavelength range in data clipping is limited by the detector response range. By adding a validity check, abnormal outputs that clearly do not conform to the physical principles of transient absorption spectroscopy or the instrument measurement boundaries are filtered out. The validity check provides a final line of defense for the model output, thereby ensuring the physical rationality of the parameter output.
[0089] The transient absorption spectral data processing method of this application integrates the checks of intent category, parameter key and parameter value into a unified legality check. The three checks are independent of each other but work together on the same output object. If any one of them is not satisfied, the system will reject the output and generate a prompt message. This ensures that the results output by the model at the statistical learning level need to be confirmed at the deterministic rule level before entering the subsequent data processing, thus ensuring the physical rationality of the parameter output.
[0090] As another implementation of this application, the method may further include step S131.
[0091] S131, if any of the intent category and / or parameter set does not meet the preset conditions, generate and output a prompt message indicating that the preset conditions are not met.
[0092] As an example, the prompt message can be natural language feedback generated when the intent category or parameter set is detected as not meeting the preset conditions. Its content should at least include which preset condition was not met and the corresponding parameter name or parameter value, so as to guide the user to correct the intent category or parameter information entered in the previous rounds when it does not meet the system's preset range.
[0093] Specifically, as an example, if the intent category does not belong to the preset intent category set, the prompt message indicates that the current intent category cannot be recognized by the system, and optionally provides similar intent tags from the preset intent category set for the user's reference. If a parameter key in the parameter set does not belong to the preset parameter key set, the prompt message indicates that the parameter name is not defined, and optionally provides valid parameter keys from the preset parameter key set that are similar to the parameter name. If a parameter value in the parameter set does not meet the preset valid value range, the prompt message indicates that the parameter value exceeds the valid range, and may include the lower and upper limits of the preset valid value range corresponding to the parameter. For example, when a parameter value is detected to be less than the lower limit or greater than the upper limit, a prompt statement containing the current value of the parameter, the preset lower limit, and the preset upper limit is generated, clearly informing the user that the current value deviates from the physical or instrumental boundaries in transient absorption spectroscopy data processing. This prompt message is output to the user interface, awaiting the user's next input.
[0094] The transient absorption spectral data processing method of this application converts three types of failure scenarios—intent category not in a preset set, parameter key not in a preset set, and parameter value exceeding the valid range—into explicit natural language prompts. This not only informs the user of the problem with the current input but also provides optional correction directions within the system's preset range. This immediate and specific feedback mechanism allows the user to specifically correct the intent category or parameter value in the next round of input, driving the multi-round dialogue from a verification failure state to a verification success state. Simultaneously, the prompt information output in this step complements the prompt information based on missing parameter keys. The former prompts for non-compliant formats or exceeding preset boundaries, while the latter prompts for missing items. Together, these two types of prompts cover all abnormal scenarios before the generation of structured instructions.
[0095] As another implementation of this application, such as Figure 4 As shown, the method may further include steps S141-S144.
[0096] S141, acquire multiple training samples; the training samples include the first data processing instruction sample and its corresponding structured data label; the structured data label includes intent boundary identifier, parameter key identifier and parameter value identifier.
[0097] As an example, training samples are data used to train the instruction recognition model. Each training sample contains a first data processing instruction sample and its corresponding structured data label. The first data processing instruction sample can be a transient absorption spectral data processing requirement text expressed in natural language, such as a description of performing time zero-point correction or kinetic fitting on a certain transient absorption spectral data. The structured data label is the standard answer corresponding to the instruction sample, recording the intent category and parameter key-value pair information that the instruction should be parsed out in a serialized form. The structured data label may contain intent boundary identifiers, parameter key identifiers, and parameter value identifiers.
[0098] Specifically, as an example, intent boundary identifiers are used to mark the start and end positions of the intent category string, specifically including start and end identifiers. Parameter key identifiers are used to mark the start position of the parameter name field, and parameter value identifiers are used to mark the start position of the parameter value field. When constructing training samples, for any single-round instruction data, its structured data label follows a preset standardized serialization format. This step, by pairing natural language instructions with structured data labels, allows the model to obtain a clear mapping target during the learning process, namely, a conversion paradigm from unstructured text to structured sequences. The control identifiers in the structured data labels enable the model to simultaneously learn the usage rules and output format constraints of control identifiers while learning the text-to-sequence mapping.
[0099] S142, the training samples are input into the instruction recognition model, and the instruction recognition model performs semantic parsing on the first data processing instruction samples to obtain the sample intent category and the sample parameter set; wherein, the instruction recognition model includes a low-rank adaptive module and a pre-trained subject model; the sample intent category is used to characterize the data processing type of the training samples; the sample parameter set is used to characterize at least one processing parameter required for the data processing type.
[0100] As an example, the instruction recognition model consists of two parts: a pre-trained main model and a low-rank adaptive module. The pre-trained main model refers to a large language model that has been pre-trained on a large-scale general corpus; its original weights are frozen and do not participate in gradient updates during training. The low-rank adaptive module is a trainable parameter module introduced into the network layers of the main model. Its number of parameters is far less than the total number of parameters in the main model, and it is responsible for learning task-specific information in the field of transient absorption spectroscopy data processing. During training, gradient updates are performed only on the parameters of the low-rank adaptive module, while all original weights of the base model are frozen.
[0101] Specifically, as an example, a first data processing instruction sample is passed as an input sequence to the instruction recognition model. The model first encodes the input sequence using a pre-trained subject model to extract the semantic representation of the text; then, a low-rank adaptive module performs domain adaptation mapping on this semantic representation. After the complete sequence generation process, the model outputs a predicted parsing result for the instruction sample. This predicted parsing result includes the sample intent category and the sample parameter set. The sample intent category is the data processing type corresponding to the instruction predicted by the model. The sample parameter set is the set of parameter keys and parameter values required by the model to execute this data processing type. By inputting training samples into the model and obtaining the prediction result, this step allows comparison of the model's predicted output with the acquired structured data labels, thereby measuring the model's parsing accuracy under the current parameter configuration and providing error signals for subsequent parameter updates.
[0102] S143 generates a sample structured instruction based on the sample intent category and sample parameter set.
[0103] As an example, sample structured instructions are complete sequences constructed based on the sample intent category and sample parameter set output by the instruction recognition model, following the same standardized serialization format as structured data labels.
[0104] Specifically, as an example, the sample intent category string is obtained. Then, all key-value pairs in the sample parameter set are obtained, and sample structured instructions are generated according to the serialization format. This generation process is consistent in format with the structured instruction generation process in the inference stage of step S103, ensuring format uniformity between the training and inference stages. By adopting the same serialization format, this step ensures that the generated sample structured instructions and the obtained structured data labels are structurally comparable, enabling subsequent steps to calculate the precise difference between the prediction and the label at each sequence position and at each semantic unit level.
[0105] S144. Based on the differences between sample structured instructions and structured data labels, the parameters of the low-rank adaptive module are trained to obtain the instruction recognition model.
[0106] As an example, the core objective of training is to minimize the difference between the model's predicted sample structured instructions and the true structured data labels. This difference is quantified by a loss function, from which gradients are computed and backpropagated to the low-rank adaptive module to update its parameters.
[0107] Specifically, as an example, during training, the complete dataset is divided into training, validation, and test sets according to a preset ratio. Gradient backpropagation is performed on the training set to update the parameters of the low-rank adaptive module, and the convergence of the joint loss function is monitored on the validation set. Based on this, an early stopping strategy is implemented to prevent overfitting. This step enables the low-rank adaptive module to learn the parsing rules for transient absorption spectral data processing instructions from the training data. After training, the pre-trained main model and the updated low-rank adaptive module together constitute the instruction recognition model, used to process subsequent user input instructions.
[0108] The transient absorption spectral data processing method of this application provides precise sequence position constraints for the training target by using control identifiers in the structured data tags, enabling cross-entropy loss to measure the deviation between the prediction and the true value at each character level. The consistency of the sample structured instructions and structured data tags in terms of format is a prerequisite for difference calculation and gradient backpropagation, ensuring the direct transmission of training signals. The weights of the pre-trained main model are frozen, and only the low-rank adaptive module participates in the update, realizing domain adaptation for the transient absorption spectral data processing instruction parsing task with minimal computational overhead. This allows the model after training convergence to gain a specialized understanding of the professional terminology and parameter expression methods in the transient absorption spectral data processing field.
[0109] As another implementation of this application, S144 includes steps S1441-S1442.
[0110] S1441, the first loss function value is obtained by calculating the difference between the sample structured instructions and the structured data labels.
[0111] As an example, this first loss function is used to measure the difference between the sample structured instructions and the structured data labels.
[0112] Specifically, as an example, the first loss function can be the cross-entropy loss function. For each position in the output sequence, the probability distribution of the model's output content at that position is compared with the actual content of the structured data label at that position, and the cross-entropy is calculated. The average of the cross-entropies of all positions is then taken to obtain the value of the first loss function. The larger the value of this loss function, the greater the deviation between the model's predicted output and the supervision label; the smaller the value of this loss function, the closer the model's predicted output is to the supervision label. The purpose of this step is to quantify the gap between the model's current output and the expected target, providing a gradient direction that reflects the accuracy of sequence generation for subsequent parameter updates, enabling the model to gradually learn the mapping relationship from natural language instructions to structured output during training.
[0113] S1442, by calculating the difference between the parameter values of each sample in the sample structuring instruction and their corresponding preset valid value range, the second loss function value is obtained.
[0114] As an example, the sample parameter value refers to the numerical content corresponding to each parameter in the sample parameter set within the sample structured instruction, such as the lower wavelength limit, upper wavelength limit, and fitting order. The preset effective value range refers to a predefined reasonable range of values for each type of numerical parameter in the field of transient absorption spectroscopy data processing. This range is determined by the physical meaning or instrument measurement boundary of the parameter, with the minimum parameter value as the lower limit and the maximum parameter value as the upper limit. The second loss function is used to constrain the sample parameter values in the sample parameter set to be within the preset effective value range. It guides the model output to conform to physical boundary constraints by penalizing parameter values that exceed the range. This step forces the low-rank adaptive module to converge within a physically meaningful region of the parameter space through a boundary penalty mechanism, ensuring that the numerical parameters output by the model satisfy the physical constraints of the transient absorption spectroscopy data processing task and improving the rationality of the analytical results.
[0115] S1443, Based on the first loss function value and the second loss function value, the parameters of the low-rank adaptive module are trained to obtain the instruction recognition model.
[0116] As an example, the parameters of the low-rank adaptive module refer to the trainable weight matrix introduced in the module. These parameters are iteratively updated during training using the gradient descent algorithm, and their number is much smaller than the total number of parameters in the pre-trained main model. The original weights of the pre-trained main model are frozen during training and do not participate in gradient updates.
[0117] Specifically, as an example, the first loss function value and the second loss function value can be weighted and summed to form the joint loss function value. The joint loss function is: ; in, The first loss function value is used to measure the difference between the sample's structured instructions and the structured data labels; The second loss function value is used to constrain the sample parameter values in the sample parameter set to be within a preset valid value range; if the output of the current sample does not contain any constrained numerical parameters, then the second loss function value... The value is zero on this sample, and the joint loss function automatically degenerates into a function consisting only of the first loss function value. Provide guidance and training. , Hyperparameters that balance the contribution ratio of the first loss function value or the second loss function value.
[0118] After obtaining the joint loss function value, calculate the joint loss function value. The gradient of each trainable parameter in the low-rank adaptive module reflects the direction and magnitude of the loss function value relative to the parameter change. This gradient is then backpropagated along the network to each layer of the low-rank adaptive module. Finally, based on a preset optimizer update rule and a preset learning rate, the parameters of the low-rank adaptive module are updated, causing the joint loss function value to gradually decrease. In each iteration, a batch of data is sampled from the training set, and the complete process of forward propagation, loss calculation, backpropagation, and parameter update is repeated. During training, the system monitors the joint loss function value on the validation set. The convergence status is analyzed, and an early stopping strategy is implemented. Training stops when the joint loss function value on the validation set shows no improvement for several consecutive rounds to prevent overfitting. After training, the pre-trained main model and the updated low-rank adaptive module together constitute the instruction recognition model.
[0119] Through the joint loss function value Guided by this principle, the parameters of the low-rank adaptive module are gradually adjusted during training, making the model's output sample structured instructions approximate the structured data labels. This training strategy updates only a small number of parameters of the low-rank adaptive module while freezing all the original weights of the pre-trained main model, significantly reducing computational resource consumption and GPU memory usage. Simultaneously, it utilizes a second loss function... The applied physical boundary constraints ensure that the model parameters converge within the physically meaningful region of transient absorption spectral data processing after training convergence.
[0120] The transient absorption spectral data processing method of this application quantifies the difference between sample structured instructions and structured data labels into a loss function value through a joint loss function. The gradient is then backpropagated based on this loss function value to update the parameters of the low-rank adaptive module, enabling the training process to converge to the optimal weight combination through data-driven parameter optimization. By training the parameters of the low-rank adaptive module based on this joint loss function value, only a very small proportion of the total model parameters are trained, allowing domain adaptation to be achieved while freezing all the original weights of the pre-trained main model. This achieves learning and convergence of the transient absorption spectral data processing instruction parsing task with low computational resource consumption.
[0121] As another implementation of this application, the method further includes steps S171-S172 before S144.
[0122] S171, Calculate the penalty value corresponding to each sample parameter value in the sample parameter set according to the following formula.
[0123] As an example, the preset valid value range is a reasonable range of values pre-defined for each parameter with numerical attributes, and its lower limit is denoted as... The upper limit is denoted as These correspond to the physical or instrumental boundaries of the parameter in transient absorption spectroscopy data processing, respectively. Preset positive constants. This is a very small value used to ensure the numerical stability of logarithmic operations. The penalty value is a scalar value defined for a single sample parameter value, used to quantify the degree to which the parameter value deviates from a preset valid range.
[0124] The penalty value is specifically expressed as:
[0125] in, This is a preset positive constant used to ensure the numerical stability of logarithmic operations; These are sample parameter values; To preset the valid value range, This is the preset minimum value for the sample parameters; This is the preset maximum value for the sample parameters. When the parameters are within the valid range, the penalty value is zero; when the parameters deviate from the valid range, the further they are from the valid range, the closer the value of the fraction is to zero, and the larger its negative logarithm is, thus providing a gradient signal pointing to the valid range.
[0126] This step applies a smooth penalty in the form of a logarithmic barrier function to each sample parameter value. During training, it applies a non-zero penalty to parameters that exceed the limit, while leaving parameters within the limit unpenalized. This penalty function has a smoothing property, and its gradient always points towards the effective interval when parameters exceed the limit. This allows the parameters of the low-rank adaptive module to gradually converge in the direction that constrains the parameter values within the physical boundary of transient absorption spectral data processing during gradient descent.
[0127] S172, fuse all penalty values of the sample parameter set to obtain the second loss function value.
[0128] As an example, the second loss function value is used to impose physical boundary constraints on the model during the training phase, ensuring that the sample parameter values output by the model are contained within a preset valid range. The fusion operation refers to combining the penalty values of all individual sample parameter values into a single scalar value representing the overall deviation of the current sample from the boundary.
[0129] Specifically, as an example, firstly, the penalty value corresponding to each constrained parameter value in the calculated sample parameter set is summarized. If the output of the current sample contains K constrained numerical parameters, then the second loss function value... Defined as the arithmetic mean of the penalty values of all constrained parameters in the current sample:
[0130] Where K represents the total number of constrained numerical parameters in the current sample. These are sample parameter values.
[0131] By using an arithmetic mean fusion method, regardless of the number of constrained parameters contained in the current sample, the second loss function value... All parameters provide standardized scalar feedback, reducing the difference in loss scale caused by varying numbers of parameters. During backpropagation, the fusion result simultaneously applies gradient update signals to the low-rank adaptive module parameters corresponding to all out-of-bounds parameters, enabling the model to optimize parameters under the constraints of knowledge from the transient absorption spectroscopy data processing domain.
[0132] The transient absorption spectral data processing method of this application quantifies the deviation of each sample parameter value in the sample parameter set through a segmented penalty value formula, and merges all penalty values into the function value of the second loss function by arithmetic averaging, thus constructing a complete computational link from individual parameter boundary checks to overall physical constraint loss. This second loss function, together with the first loss function, forms a joint loss function. During training, backpropagation simultaneously applies supervision signals regarding both sequence generation accuracy and parameter physical rationality to the low-rank adaptive module, enabling the model to optimize parameters under the constraints of knowledge in the transient absorption spectral data processing domain, forcing the low-rank adaptive module to converge within physically meaningful regions of the parameter space.
[0133] Based on the transient absorption spectral data processing method provided in the above embodiments, this application also provides specific implementation methods of the transient absorption spectral data processing apparatus. Please refer to the following embodiments.
[0134] First see Figure 5 The transient absorption spectral data processing device 50 provided in this application embodiment includes the following modules: The instruction acquisition module 501 is used to acquire the first data processing instruction for processing transient absorption spectral data; The semantic parsing module 502 is used to input the first data processing instruction into the instruction recognition model, and perform semantic parsing on the first data processing instruction through the instruction recognition model to obtain the intent category and parameter set; wherein, the intent category is used to characterize the data processing type of data processing of transient absorption spectral data; the parameter set is used to characterize at least one processing parameter required for the data processing type. The structured instruction module 503 is used to generate structured instructions based on intent categories and parameter sets; The data processing module 504 is used to process transient absorption spectral data according to structured instructions to obtain the processing results.
[0135] In some embodiments, the parameter set includes at least one pair of parameter keys and parameter values, and the structure instruction module is specifically used for: The start and end positions of the intent category are identified by a preset intent boundary identifier, thus obtaining intent category information; The parameter set information is obtained by marking the parameter key and parameter value with preset parameter key identifiers and parameter value identifiers respectively; Based on the intent category information and parameter set information, structured instructions are obtained.
[0136] In some embodiments, the device may further include the following modules: The missing parameter determination module is used to compare the preset required parameter items corresponding to the intent category with the parameter set, and determine the parameter keys that are not included in the parameter set among the preset required parameter items as missing parameter keys; The missing parameter key prompt module is used to output missing parameter key prompt information; the missing parameter key prompt information is used to suggest supplementing the parameter value corresponding to the missing parameter key; The instruction receiving module is used to receive the second data processing instruction in response to the missing parameter key prompt message; The instruction update module is used to update the intent category and parameter set based on the second data processing instruction; The structured instruction module is specifically used to: identify missing parameter keys according to preset missing parameter identifiers to obtain missing parameter key information; and obtain structured instructions based on intent category information, parameter set information, and missing parameter key information.
[0137] In some embodiments, the instruction update module is specifically used for: If the second data processing instruction does not change the intent category and / or parameter set, the parameter set is concatenated with the second data processing instruction through a context identifier to obtain the concatenated data processing instruction; Semantic parsing is performed on the concatenated data processing instructions to obtain the updated parameter set; The structured instruction module is specifically used to generate structured instructions based on the intent category and the updated parameter set.
[0138] In some embodiments, the instruction update module is further specifically used for: If the second data processing instruction changes the intent category and / or parameter set, the first data processing instruction is updated according to the second data processing instruction; Return to inputting the first data processing instruction into the instruction recognition model. The instruction recognition model performs semantic parsing on the first data processing instruction to obtain the intent category and parameter set.
[0139] In some embodiments, the device further includes the following modules: The condition judgment module is used to determine whether the intent category and / or parameter set meet preset conditions; The preset conditions include at least one of the following: the intent category belongs to the preset intent category set, the parameter key in the parameter set belongs to the preset parameter key set, and the parameter value in the parameter set is within the preset valid value range.
[0140] In some embodiments, the device further includes: The conditional prompt module is used to generate and output a prompt message indicating that the preset conditions are not met if any of the intent category and / or parameter set conditions are not met.
[0141] In some embodiments, the device further includes: The sample acquisition module is used to acquire multiple training samples; the training samples include a first data processing instruction sample and its corresponding structured data label; the structured data label includes an intent boundary identifier, a parameter key identifier, and a parameter value identifier; The sample parsing module is used to input training samples into the instruction recognition model. The instruction recognition model performs semantic parsing on the first data processing instruction sample to obtain the sample intent category and sample parameter set. The instruction recognition model includes a low-rank adaptive module and a pre-trained subject model. The sample intent category is used to characterize the data processing type of the training sample. The sample parameter set is used to characterize at least one processing parameter required for the data processing type. The sample structure instruction module is used to generate structured instructions for samples based on the sample intent category and the sample parameter set. The training module is used to train the parameters of the low-rank adaptive module based on the differences between the sample structured instructions and structured data labels, so as to obtain the instruction recognition model.
[0142] In some embodiments, the training module is specifically used to: obtain a first loss function value by calculating the difference between the sample structured instructions and the structured data labels; obtain a second loss function value by calculating the difference between the parameter values of each sample in the sample structured instructions and their corresponding preset valid value ranges; and train the parameters of the low-rank adaptive module based on the first loss function value and the second loss function value to obtain an instruction recognition model.
[0143] In some embodiments, the device further includes: The penalty calculation module is used to calculate the penalty value corresponding to each sample parameter value in the sample parameter set according to the following formula; The penalty fusion module is used to fuse all penalty values of the sample parameter set to obtain the second loss function value; The penalty value is:
[0144] in, This is a preset positive constant used to ensure the numerical stability of logarithmic operations; These are sample parameter values; To preset the valid value range, This is the preset minimum value for the sample parameters; This is the preset maximum value for the sample parameters.
[0145] Figure 6 A schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application is shown.
[0146] The electronic device may include a processor 601 and a memory 602 storing computer program instructions.
[0147] Specifically, the processor 601 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0148] Memory 602 may include mass storage for data or instructions. For example, and not limitingly, memory 602 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 602 may include removable or non-removable (or fixed) media. Where appropriate, memory 602 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 602 is non-volatile solid-state memory.
[0149] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the methods according to one aspect of this disclosure.
[0150] The processor 601 reads and executes computer program instructions stored in the memory 602 to implement any of the transient absorption spectral data processing methods in the above embodiments.
[0151] In one example, the electronic device may also include a communication interface 603 and a bus 610. For example, Figure 6As shown, the processor 601, memory 602, and communication interface 603 are connected through bus 610 and complete communication with each other.
[0152] The communication interface 603 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0153] Bus 610 includes hardware, software, or both, that couples components of an electronic device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 610 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.
[0154] Furthermore, in conjunction with the transient absorption spectral data processing methods in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the transient absorption spectral data processing methods in the above embodiments.
[0155] This application also provides a computer program product, including a computer program that, when executed by a processor, implements any of the transient absorption spectral data processing methods described in the above embodiments.
[0156] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0157] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0158] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0159] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0160] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A method for processing transient absorption spectral data, characterized in that, include: Obtain the first data processing instruction for processing transient absorption spectral data; The first data processing instruction is input into the instruction recognition model, and the instruction recognition model performs semantic parsing on the first data processing instruction to obtain the intent category and parameter set; wherein, the intent category is used to characterize the data processing type of the transient absorption spectral data; the parameter set is used to characterize at least one processing parameter required to perform the data processing type. Based on the intent category and the parameter set, a structured instruction is generated; The transient absorption spectrum data is processed according to the structured instructions to obtain the processing result.
2. The method according to claim 1, characterized in that, The parameter set includes at least one pair of parameter keys and parameter values; the generation of structured instructions based on the intent category and the parameter set includes: The intention category information is obtained by identifying the start and end positions of the intention category using a preset intention boundary identifier; The parameter set information is obtained by marking the parameter key and the parameter value respectively with preset parameter key identifier and parameter value identifier; The structured instruction is obtained based on the intent category information and the parameter set information.
3. The method according to claim 2, characterized in that, Before generating structured instructions based on the intent category and the parameter set, the method further includes: The preset required parameter items corresponding to the intent category are compared with the parameter set, and the parameter keys in the preset required parameter items that are not included in the parameter set are determined as missing parameter keys; Output parameter key missing prompt information containing the missing parameter key; wherein, the parameter key missing prompt information is used to prompt for the parameter value corresponding to the missing parameter key; Receive a second data processing instruction in response to the missing parameter key prompt message; Based on the second data processing instruction, update the intent category and parameter set; The generation of structured instructions based on the intent category and the parameter set includes: The missing parameter key is identified by a preset missing parameter identifier to obtain the missing parameter key information; The structured instruction is obtained based on the intent category information, the parameter set information, and the missing parameter key information.
4. The method according to claim 3, characterized in that, The step of updating the intent category and parameter set based on the second data processing instruction includes: If the second data processing instruction does not change the intent category and / or the parameter set, the parameter set is concatenated with the second data processing instruction through a context identifier to obtain the concatenated data processing instruction; The concatenated data processing instructions are semantically parsed to obtain an updated parameter set; The generation of structured instructions based on the intent category and the parameter set includes: Based on the intent category and the updated parameter set, a structured instruction is generated.
5. The method according to any one of claims 3-4, characterized in that, The step of updating the intent category and parameter set based on the second data processing instruction includes: If the second data processing instruction changes the intent category and / or the parameter set, the first data processing instruction is updated according to the second data processing instruction. Returning to the step of inputting the first data processing instruction into the instruction recognition model, the instruction recognition model performs semantic parsing on the first data processing instruction to obtain the intent category and parameter set.
6. The method according to any one of claims 1-4, characterized in that, Before generating structured instructions based on the intent category and the parameter set, the method further includes: Determine that the intent category and / or the parameter set meet preset conditions; If any of the intent category and / or the parameter set does not meet the preset conditions, a prompt message indicating that the preset conditions are not met will be generated and output. The preset conditions include at least one of the following: the intent category belongs to a preset intent category set; the parameter key in the parameter set belongs to a preset parameter key set; and the parameter value in the parameter set is within a preset valid value range.
7. The method according to any one of claims 1-4, characterized in that, The method further includes: Multiple training samples are acquired; the training samples include a first data processing instruction sample and its corresponding structured data label; the structured data label includes an intent boundary identifier, a parameter key identifier, and a parameter value identifier; The training samples are input into the instruction recognition model, which performs semantic parsing on the first data processing instruction samples to obtain the sample intent category and sample parameter set. The instruction recognition model includes a low-rank adaptive module and a pre-trained subject model. The sample intent category is used to characterize the data processing type of the training samples. The sample parameter set is used to characterize at least one processing parameter required to perform the data processing type. Based on the sample intent category and sample parameter set, generate sample structured instructions; Based on the differences between the sample structured instructions and the structured data labels, the parameters of the low-rank adaptive module are trained to obtain the instruction recognition model.
8. The method according to claim 7, characterized in that, The step of training the parameters of the low-rank adaptive module based on the difference between the sample structured instructions and the structured data labels to obtain the target instruction recognition model includes: The first loss function value is obtained by calculating the difference between the sample structured instructions and the structured data labels; The second loss function value is obtained by calculating the difference between the parameter values of each sample in the sample structuring instruction and their corresponding preset valid value ranges; The parameters of the low-rank adaptive module are trained based on the first loss function value and the second loss function value to obtain the instruction recognition model.
9. The method according to claim 7, characterized in that, Before training the parameters of the low-rank adaptive module based on the difference between the sample structured instructions and the structured data labels to obtain the target instruction recognition model, the method further includes: The penalty value corresponding to each sample parameter value in the sample parameter set is calculated according to the following formula; The second loss function value is obtained by fusing all the penalty values of the sample parameter set; The penalty value is: , in, This is a preset positive constant used to ensure the numerical stability of logarithmic operations; The sample parameter value; The preset valid value range, This is the preset minimum value of the sample parameters; This is the preset maximum value of the sample parameters.
10. A processing device for transient absorption spectral data, characterized in that, The device includes: The instruction acquisition module is used to acquire the first data processing instruction for processing transient absorption spectral data; A semantic parsing module is used to input the first data processing instruction into an instruction recognition model, and to perform semantic parsing on the first data processing instruction through the instruction recognition model to obtain an intent category and a parameter set; wherein, the intent category is used to characterize the data processing type of the transient absorption spectral data; and the parameter set is used to characterize at least one processing parameter required to perform the data processing type. The structured instruction module is used to generate structured instructions based on the intent category and the parameter set; The data processing module is used to process the transient absorption spectrum data according to the structured instructions to obtain the processing results.
11. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the transient absorption spectral data processing method as described in any one of claims 1-9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the method for processing transient absorption spectral data as described in any one of claims 1-9.