Processing policy determination method and apparatus, and device and computer-readable storage medium
By constructing a proprietary terminology model for the rail transit field, we can identify and understand rail transit-related text, thus solving the problem of insufficient accuracy of open-source large models in rail transit data analysis and achieving more precise data analysis.
Patent Information
- Application Number
- PCT/CN2025/093447
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2026-11-12
AI Technical Summary
Existing open-source large models have low accuracy when processing rail transit data, resulting in insufficient accuracy in data analysis.
By training with specialized terms in the field of rail transit, a rail transit model is constructed to identify and understand specialized terms in rail transit problem texts, and to output targeted processing strategies based on intent parameters.
It improves the accuracy of data analysis in the rail transit field and accurately outputs the processing strategies expected by users.
Smart Images

Figure CN2025093447_12112026_PF_FP_ABST
Abstract
Description
Processing strategy determination method, apparatus, equipment and computer-readable storage medium Technical Field
[0001] This application belongs to the field of rail transit technology, and particularly relates to a method, apparatus, device, and computer-readable storage medium for determining a processing strategy. Background Technology
[0002] With the rapid development of rail transit, the scale of rail transit systems has expanded rapidly, and the increase in data volume and complexity has made the analysis of system data crucial.
[0003] In the exemplary technology, data is analyzed through an open-source large model. For example, the data is organized into a question-and-answer document, which is then input into the open-source large model. The open-source large model outputs a solution strategy to complete the analysis of the data.
[0004] However, the data contains technical terms related to rail transit, which results in lower accuracy of the solutions provided by the open-source large model when processing questions and answers related to rail transit, meaning that the accuracy of the data analysis is also lower. Summary of the Invention
[0005] This application provides a method, apparatus, device, and computer-readable storage medium for determining processing strategies, which addresses the problem of low accuracy in data analysis.
[0006] In a first aspect, embodiments of this application provide a method for determining a processing strategy, the method comprising:
[0007] Obtain the text of the rail transit question input by the user;
[0008] The user's first intent parameter is determined based on the rail transit problem text, and the first intent parameter is used to indicate the user's urgency to obtain a processing strategy;
[0009] Based on the rail transit problem text, the first intent parameter, and the rail transit model, the target processing strategy output by the rail transit model is obtained, wherein the rail transit model is trained based on specialized terms in the rail transit field, and the version of the target processing strategy matches the first intent parameter.
[0010] In some possible implementations of the first aspect, determining the user's first intent parameter based on the rail transit problem text includes:
[0011] Determine target information, which includes at least one of the user's identity information and environmental information corresponding to the environment in which the user is located;
[0012] The emotional statements are obtained from the rail transit problem text, and the user's current target emotion is determined based on the emotional statements and the target information.
[0013] The user's first intent parameter is determined based on the target emotion.
[0014] In some possible implementations of the first aspect, before the target processing strategy of obtaining the output of the rail transit model based on the rail transit problem text, the first intent parameter, and the rail transit model, the method further includes:
[0015] Obtain specialized terms in the field of rail transit, and construct multiple example processing strategies based on each of the specialized terms;
[0016] Configure multiple versions of intermediate processing strategies based on the example processing strategy, and determine the second intent parameter corresponding to each version;
[0017] Training samples are constructed based on the second intent parameter, the version corresponding to the second intent parameter, and the intermediate processing strategy corresponding to the version.
[0018] Based on the training samples, the preset model is trained to obtain the rail transit model.
[0019] In some possible implementations of the first aspect, constructing training samples based on the second intent parameter, the version corresponding to the second intent parameter, and the intermediate processing strategy corresponding to the version includes:
[0020] Determine the emotion that matches the second intention parameter;
[0021] Training samples are constructed based on the second intent parameter, the version corresponding to the second intent parameter, the intermediate processing strategy corresponding to the version, and the emotion matched by the second intent parameter.
[0022] In some possible implementations of the first aspect, the acquisition of proprietary terms in the field of rail transit includes:
[0023] Obtain each first corpus containing terms related to rail transit, and determine the relevance parameters of each first corpus in the rail transit domain;
[0024] Based on the correlation parameter, a second corpus is determined in each of the first corpora, and the second corpus is used to indicate the first corpus whose correlation parameter is greater than a set threshold;
[0025] The second corpus is deduplicated to obtain multiple target corpora, and the specialized terms in the field of rail transit are determined based on each target corpus.
[0026] In some possible implementations of the first aspect, obtaining the various first corpora containing terms related to rail transit includes:
[0027] Obtain corpus containing words related to rail transit as intermediate corpus, and determine the target topic of the text containing the intermediate corpus;
[0028] When the target topic is a rail transit topic, determine the distribution ratio of the target topic within each rail transit topic in the rail transit field;
[0029] Among the intermediate corpora belonging to the same target topic, the target number of intermediate corpora matching the distribution ratio is obtained and used as the first corpus.
[0030] In some possible implementations of the first aspect, the deduplication of each of the second corpora includes:
[0031] Determine the hash value of each of the second corpora, and determine the first similarity between every two of the second corpora based on the hash value;
[0032] A first target similarity is determined among each of the first similarities, and the first target similarity is used to indicate the first similarity that is greater than a first preset similarity;
[0033] Remove one of the two second corpora corresponding to each first target similarity, and determine the target corpus based on the remaining second corpora.
[0034] In some possible implementations of the first aspect, determining the target corpus based on the remaining second corpora includes:
[0035] Determine the text vector for each third corpus, which is used to indicate the remaining individual second corpora;
[0036] Based on the text vectors, a second similarity is determined between every two of the third corpora;
[0037] A second target similarity is determined among each of the second similarities, the second target similarity being used to indicate the second similarity that is greater than a second preset similarity;
[0038] Remove one of the three third corpora from the two third corpora corresponding to each second target similarity, and determine the target corpus based on the remaining third corpora.
[0039] In some possible implementations of the first aspect, determining the second corpus in each of the first corpora based on the relevance parameter includes:
[0040] Based on the correlation parameter, intermediate corpora are determined in each of the first corpora, and the intermediate corpora are used to indicate the first corpora whose correlation parameter is greater than a set threshold.
[0041] Determine the text perplexity of each of the intermediate corpora;
[0042] Based on the text perplexity, a second corpus is determined from each of the intermediate corpora, wherein the text perplexity of the second corpus is greater than a preset threshold.
[0043] In some possible implementations of the first aspect, determining the specialized terms in the rail transit field based on each of the target corpora includes:
[0044] The target corpus is segmented to obtain multiple words;
[0045] The words are combined to obtain multiple first phrases, and the frequency of occurrence of each first phrase in the field of rail transit is determined.
[0046] Based on the frequency of occurrence, specialized terms in the field of rail transit are determined in each of the first phrases, wherein the frequency of occurrence of the specialized terms is greater than a preset frequency.
[0047] In some possible implementations of the first aspect, determining the specialized terms in the field of rail transit within each of the first phrases based on the frequency of occurrence includes:
[0048] Based on the frequency of occurrence, an intermediate word group is determined in each of the first word groups, wherein the frequency of occurrence of the intermediate word group is greater than a preset frequency;
[0049] Determine the intersection between the first set and the second set, which are composed of the various intermediate phrases, and identify the phrases in the intersection as proprietary terms in the field of rail transit. The second set includes various second phrases in the general field.
[0050] In some possible implementations of the first aspect, the construction of multiple example processing strategies based on each of the proper nouns includes:
[0051] Obtain the question-and-answer text matched with the proprietary terms, and determine the writing information of the question-and-answer text, including the writing format and writing requirements;
[0052] Based on the information provided, develop example processing strategies for the question and answer text.
[0053] In some possible implementations of the first aspect, during the training process of the preset model, noise is added to the output of the embedding layer of the preset model to obtain the input parameters of the next layer of the embedding layer.
[0054] Secondly, embodiments of this application provide a processing strategy determination apparatus, comprising:
[0055] The first acquisition module is used to acquire the text of rail transit questions input by the user;
[0056] The determination module is used to determine the user's first intent parameter based on the rail transit problem text, wherein the first intent parameter is used to indicate the user's urgency to obtain a processing strategy;
[0057] The second acquisition module is used to acquire the target processing strategy output by the rail transit model based on the rail transit problem text, the first intent parameter, and the rail transit model, wherein the rail transit model is trained based on proprietary terms in the rail transit field, and the version of the target processing strategy matches the first intent parameter.
[0058] In some possible implementations of the second aspect, the determining module includes:
[0059] The first determining unit is used to determine target information, the target information including at least one of the user's identity information and environmental information corresponding to the environment in which the user is located;
[0060] The first acquisition unit is used to acquire emotional statements from the rail transit problem text, and determine the user's current target emotion based on the emotional statements and the target information;
[0061] The second determining unit is used to determine the user's first intent parameter based on the target emotion.
[0062] Among the possible implementations of the second aspect are:
[0063] The third acquisition module is used to acquire proprietary terms in the field of rail transit and to construct multiple example processing strategies based on each proprietary term.
[0064] The configuration module is used to configure multiple versions of intermediate processing strategies of the example processing strategy according to the example processing strategy, and to determine the second intent parameter corresponding to the version;
[0065] The construction module is used to construct training samples based on the second intent parameter, the version corresponding to the second intent parameter, and the intermediate processing strategy corresponding to the version;
[0066] The training module is used to train the preset model based on each of the training samples to obtain the rail transit model.
[0067] In some possible implementations of the second aspect, the building module includes:
[0068] The third determining unit is used to determine the emotion matched by the second intention parameter;
[0069] The construction unit is used to construct training samples based on the second intent parameter, the version corresponding to the second intent parameter, the intermediate processing strategy corresponding to the version, and the emotion matched by the second intent parameter.
[0070] In some possible implementations of the second aspect, the third acquisition module includes:
[0071] The second acquisition unit is used to acquire each first corpus containing words related to rail transit, and to determine the relevance parameters of each first corpus in the rail transit field.
[0072] The fourth determining unit is used to determine a second corpus in each of the first corpora according to the correlation parameter, wherein the second corpus is used to indicate the first corpus whose correlation parameter is greater than a set threshold;
[0073] The deduplication unit is used to deduplicat each of the second corpora to obtain multiple target corpora, and to determine the proprietary terms in the field of rail transit based on each of the target corpora.
[0074] In some possible implementations of the second aspect, the second acquisition unit includes:
[0075] The first acquisition subunit is used to acquire corpus containing words related to rail transit as intermediate corpus, and to determine the target topic of the text containing the intermediate corpus.
[0076] The first determining subunit is used to determine the distribution ratio of the target topic within each rail transit topic in the rail transit field when the target topic is a rail transit topic;
[0077] The second acquisition subunit is used to acquire, from among the intermediate corpora belonging to the same target topic, a target number of intermediate corpora matching the distribution ratio, as the first corpus.
[0078] In some possible implementations of the second aspect, the deduplication unit includes:
[0079] The second determining subunit is used to determine the hash value of each of the second corpora and to determine the first similarity between every two of the second corpora based on the hash value;
[0080] The third determining subunit is used to determine a first target similarity among each of the first similarities, wherein the first target similarity is used to indicate the first similarity that is greater than a first preset similarity;
[0081] The removal subunit is used to remove one of the two second corpora corresponding to each first target similarity, and to determine the target corpus based on the remaining second corpora.
[0082] In some possible implementations of the second aspect, the removal of the sub-unit includes:
[0083] A first determining module is used to determine the text vector of each third corpus, the third corpus being used to indicate the remaining individual second corpora;
[0084] The second determining module is used to determine a second similarity between every two of the third corpora based on the text vectors;
[0085] A third determining module is used to determine a second target similarity among each of the second similarities, wherein the second target similarity is used to indicate the second similarity that is greater than a second preset similarity;
[0086] The removal module is used to remove one of the three corpora from the two three corpora corresponding to each second target similarity, and to determine the target corpus based on the remaining three corpora.
[0087] In some possible implementations of the second aspect, the fourth determining unit includes:
[0088] The fourth determining module is used to determine intermediate corpora in each of the first corpora according to the correlation parameters, wherein the intermediate corpora are used to indicate the first corpora whose correlation parameters are greater than a set threshold.
[0089] The fifth module is used to determine the text perplexity of each of the intermediate corpora;
[0090] The sixth determining module is used to determine a second corpus from each of the intermediate corpora based on the text perplexity, wherein the text perplexity of the second corpus is greater than a preset threshold.
[0091] In some possible implementations of the second aspect, the deduplication unit includes:
[0092] A processing module is used to perform word segmentation on the target corpus to obtain multiple words;
[0093] A combination module is used to combine the various words to obtain multiple first word groups, and to determine the frequency of occurrence of each first word group in the field of rail transit.
[0094] The seventh determination module is used to determine the proprietary terms in the field of rail transit in each of the first phrases based on the frequency of occurrence, wherein the frequency of occurrence of the proprietary terms is greater than a preset frequency.
[0095] In some possible implementations of the second aspect, the seventh determining module includes:
[0096] The first determining sub-module is used to determine an intermediate word group in each of the first word groups based on the occurrence frequency, wherein the occurrence frequency of the intermediate word group is greater than a preset frequency;
[0097] The second determining sub-module is used to determine the intersection between the first set and the second set formed by the various intermediate word groups, and to determine the word groups in the intersection as proprietary terms in the field of rail transit, wherein the second set includes various second word groups in the general field.
[0098] In some possible implementations of the second aspect, the building module includes:
[0099] The third acquisition unit is used to acquire the question and answer text matched by the proper words and determine the writing information of the question and answer text, the writing information including the writing format and writing requirements;
[0100] The writing unit is used to write example processing strategies corresponding to the question and answer text based on the writing information.
[0101] In some possible implementations of the second aspect, during the training process of the preset model, noise is added to the output of the embedding layer of the preset model to obtain the input parameters of the next layer of the embedding layer.
[0102] Thirdly, this application provides a processing strategy determination device, the device comprising: a processor and a memory storing computer program instructions; the processor, when executing the computer program instructions, implements the processing strategy determination method described in the first aspect or any implementable embodiment of the first aspect.
[0103] Fourthly, this application provides a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the processing strategy determination method described in the first aspect or any implementable mode of the first aspect.
[0104] The processing strategy determination method, apparatus, device, and computer-readable storage medium of this application embodiment train a rail transit model using specialized terms in the rail transit field, identify and understand specialized terms in rail transit problem text, and determine intent parameters representing the user's urgency to obtain a processing strategy based on the rail transit problem text. Thus, based on the intent parameters and specialized terms, the processing strategy for rail transit problems is output in a targeted manner, that is, the processing strategy for rail transit problems expected by the user is accurately output, thereby improving the accuracy of data analysis in the rail transit field. Attached Figure Description
[0105] 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.
[0106] Figure 1 is a flowchart illustrating one of the processing strategy determination methods provided in an embodiment of this application;
[0107] Figure 2 is a second schematic flowchart of a processing strategy determination method provided in an embodiment of this application;
[0108] Figure 3 is a third flowchart illustrating a method for determining a processing strategy according to an embodiment of this application;
[0109] Figure 4 is a flowchart of a method for determining a processing strategy provided in an embodiment of this application;
[0110] Figure 5 is a fifth flowchart illustrating a method for determining a processing strategy according to an embodiment of this application;
[0111] Figure 6 is a flowchart of a method for determining a processing strategy provided in an embodiment of this application;
[0112] Figure 7 is a schematic diagram of training a model provided in an embodiment of this application;
[0113] Figure 8 is a schematic diagram of a processing strategy determination device provided in an embodiment of this application;
[0114] Figure 9 is a schematic diagram of a processing strategy determination device provided in an embodiment of this application. Detailed Implementation
[0115] 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.
[0116] 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 said element.
[0117] With the rapid development of rail transit, the scale of rail transit systems has expanded rapidly, and the increase in data volume and complexity has made the analysis of system data crucial.
[0118] In the exemplary technology, data is analyzed through an open-source large model. For example, the data is organized into a question-and-answer document, which is then input into the open-source large model. The open-source large model outputs a solution strategy to complete the analysis of the data.
[0119] However, the data contains technical terms related to rail transit, which results in lower accuracy of the solutions provided by the open-source large model when processing questions and answers related to rail transit, meaning that the accuracy of the data analysis is also lower.
[0120] To address the problems mentioned in the background art, this application provides a method, apparatus, device, and computer-readable storage medium for determining a processing strategy.
[0121] By training a rail transit model using specialized terms in the rail transit field, the model can identify and understand specialized terms in rail transit problem texts. Based on the rail transit problem texts, the model can determine intent parameters that represent the urgency of users in obtaining processing strategies. Based on the intent parameters and specialized terms, the model can output targeted processing strategies for rail transit problems, that is, accurately output the processing strategies for rail transit problems that users expect, thereby improving the accuracy of data analysis in the rail transit field.
[0122] The processing strategy determination method provided in the embodiments of this application will be described below. Figure 1 shows one of the flowcharts of the processing strategy determination method provided in an embodiment of this application. As shown in Figure 1, the processing strategy determination method includes:
[0123] Step S101: Obtain the text of the rail transit question input by the user.
[0124] In this embodiment, the executing entity is a processing strategy determination device. For ease of description, the term "device" will be used to refer to the processing strategy determination device below. The device can be a terminal device with a rail transit question-and-answer function. For example, an engineer can input the current operating condition information of a turnout into the device to inquire whether the turnout needs maintenance. The current operating condition information may include parameters such as the current, voltage, and power of the turnout.
[0125] When a solution for rail transit issues is needed, the user inputs a textual rail transit question into the device. This text contains the rail transit question, such as "Please explain the principle of a switch machine." In one example, the user can input the question into the device, which then captures the input and generates the textual rail transit question. In another example, the user can speak the question aloud, and the device converts the speech into text to obtain the textual rail transit question.
[0126] It should be noted that rail transit refers to a type of transportation vehicle or system in which operating vehicles need to run on specific tracks. Rail transit includes, but is not limited to, subways, light rail, trams, maglev trains, and monorail systems.
[0127] Step S102: Determine the user's first intent parameter based on the rail transit problem text. The first intent parameter is used to indicate the user's urgency in obtaining the processing strategy.
[0128] In this embodiment, the device can determine the urgency of a user's desire to obtain a processing strategy based on the text of a rail transit issue. The urgency is represented by an intent parameter. For example, the intent parameter can be 1 or 0, where 1 indicates that the user urgently wants to obtain the processing strategy, while 0 indicates that the user is not in a hurry to obtain the processing strategy.
[0129] In one example, the device acquires the speech associated with the text of a rail transit question. The speech is the voice of the rail transit question input by the user into the device; that is, the speech refers to the speech converted into text of the rail transit question. The device extracts speech parameters such as pitch and velocity from the speech. If the speech parameters are greater than preset parameters, or if the pitch is greater than a preset pitch and the velocity is greater than a preset velocity, it can be determined that the user urgently wants to obtain a processing strategy, and the first intent parameter is set to 1; if the speech parameters are less than or equal to the preset parameters, the first intent parameter is set to 0.
[0130] In another example, the device extracts keywords from the text of a rail transit problem. These keywords include main keywords and descriptive keywords. The main keywords refer to the object; for example, in a rail transit problem like "Please describe the principle of a switch machine," the switch machine is the main keyword, and the principle is the descriptive keyword. The main keywords and descriptive keywords are scored to obtain a total score. If the total score is greater than a preset score, the first intent parameter is set to 1; if the total score is less than or equal to the preset score, the first intent parameter is set to 0.
[0131] Furthermore, the total score can be the sum of the scores for descriptive keywords and main keywords, or it can be a weighted average of the scores for descriptive keywords and main keywords. The weight of descriptive keywords is set greater than that of main keywords because descriptive keywords can determine whether a track problem is an inquiry into the underlying principle or a fault solution. Fault solutions indicate a problem in the rail transit system that needs to be addressed promptly; therefore, the weight of descriptive keywords is set higher than that of main keywords. It should be noted that the greater the importance of the object involved in the main keywords within the rail transit system, the higher the score of the main keywords; this importance is configured manually. Conversely, the more severe the problem described by the descriptive keywords, the higher the score corresponding to the descriptive keywords; the severity of the descriptive keywords is also set manually, i.e., the score of the descriptive keywords is determined by a severity parameter that matches the descriptive keywords.
[0132] Step S103: Based on the rail transit problem text, the first intent parameter, and the rail transit model, obtain the target processing strategy output by the rail transit model. The rail transit model is trained based on specialized terms in the rail transit field, and the version of the target processing strategy matches the first intent parameter.
[0133] The device includes a rail transit model. This model was developed using specialized terminology within the rail transit field. This specialized terminology refers to technical and professional terms used in rail transit, enabling the model to answer any rail transit question.
[0134] After obtaining the rail transit problem text and the first intent parameter, the device inputs the first intent parameter and the rail transit problem text into the rail transit model.
[0135] In one example, the rail transit model develops multiple versions of processing strategies based on the problem in the rail transit problem text, and then determines the processing strategy that matches the first intent parameter from each version of the processing strategy as the target processing strategy.
[0136] In another example, the rail transit model provides the problem in the rail transit problem text and directly writes a processing strategy that matches the first intent parameter as the target processing strategy.
[0137] For example, the rail transit model can write detailed processing strategies and brief processing strategies based on the problem in the rail transit problem text. If the first intent parameter indicates that the user urgently needs to obtain the processing strategy, the rail transit model outputs the brief processing strategy as the target processing strategy; if the first intent parameter indicates that the user does not urgently need to obtain the processing strategy, the rail transit model outputs the detailed processing strategy as the target processing strategy.
[0138] After obtaining the text of the rail transit problem, the device inputs the text into the rail transit model and obtains the output results.
[0139] Furthermore, the processing strategy has a certain display format. The device converts the text in the output of the rail transit model to make the converted text conform to the display format. The converted text is the target processing strategy.
[0140] After obtaining the target processing strategy, the device can display the target processing strategy or broadcast it in voice.
[0141] In this embodiment, a rail transit model is trained using specialized terms in the rail transit field. This model identifies and understands specialized terms in rail transit problem texts and determines intent parameters that characterize the urgency of users seeking processing strategies based on the rail transit problem texts. Thus, based on the intent parameters and specialized terms, targeted processing strategies for rail transit problems are output, which accurately outputs the processing strategies for rail transit problems that users expect, thereby improving the accuracy of data analysis in the rail transit field.
[0142] Referring to Figure 2, which illustrates a second flowchart of a processing strategy determination method according to an embodiment of this application, based on the embodiment shown in Figure 1, step S102 includes:
[0143] Step S201: Determine the target information, which includes at least one of the user's identity information and environmental information corresponding to the user's environment.
[0144] In this embodiment, the device determines target information, which may be at least one of the user's identity information and environmental information corresponding to the user's environment. Identity information may be, for example, the user's job title, and environmental information may be, for example, the user's current environment.
[0145] Step S202: Obtain emotional statements from the rail transit problem text, and determine the user's current target emotion based on the emotional statements and target information.
[0146] The device extracts emotional phrases from text related to rail transit issues. For example, emotional phrases might include words like "fast" or "rapid," which indicate urgency or calmness.
[0147] The device determines the user's current target emotion through emotional statements and target information. For example, if the target information indicates the user's job title is a maintenance engineer, and the emotional statement indicates the user is in a state of urgency, then it can be determined that the maintenance engineer needs to quickly understand the handling strategy and address the rail transit problem in a timely manner; therefore, urgency is taken as the user's current target emotion. If the emotional statement indicates the user is in a state of urgency or calmness, but the user's identity cannot be identified based on the identity information, it can be determined that the user is not a personnel related to the rail transit field but wants to understand relevant issues related to rail transit; therefore, calmness can be taken as the user's current target emotion. If the emotional statement indicates the user is in a state of urgency or calmness, and the target information is environmental information, specifically an image of the user's environment, and if the image indicates the user is at a maintenance site, then it can be determined that the user needs to understand the solution strategy for rail transit problems for maintenance; therefore, urgency can be identified as the user's current emotion.
[0148] Step S203: Determine the user's first intent parameter based on the target emotion.
[0149] After determining the user's current target emotion, the device can determine the user's first intention parameter based on the target emotion. For example, if the target emotion is urgency, the first intention parameter is set to 1; if the target emotion is calm, the first intention parameter is set to 0.
[0150] In this embodiment, the device accurately determines the user's current target emotion based on the user's identity information, environmental information, and emotional statements, thereby accurately determining the user's first intention parameter based on the target emotion, and thus enabling the device to accurately output the target processing strategy.
[0151] Referring to Figure 3, which illustrates a third flowchart of a processing strategy determination method according to an embodiment of this application, based on the embodiment shown in Figure 1 or Figure 2, before step S103, the method further includes:
[0152] Step S301: Obtain specialized terms in the field of rail transit, and construct multiple example processing strategies based on each specialized term.
[0153] In this embodiment, the device can be used to train a rail transit model. The device acquires specialized terminology in the rail transit field. In one example, the device retrieves specialized terminology in the rail transit field from a database. In another example, to ensure the diversity and broad coverage of specialized terminology, the device retrieves text about the rail transit field from multiple data sources and then extracts specialized terminology from the text.
[0154] Once the device obtains the proper nouns, it can construct example processing strategies based on each proper noun.
[0155] In one example, the device expands relevant proper nouns to obtain terms, constructs a rail transit problem based on these terms, and then writes an example processing strategy for the rail transit problem. For example, the proper noun is "rail," and expanding "rail" yields the term: "One 25m rail per kilometer for mainline tracks, two 12.5m rails per kilometer; one 25m rail per kilometer for station tracks, one 12.5m rail per kilometer; for curves with shortened rails, two shortened rails are prepared per kilometer of total length." The constructed rail transit problem is: "Given a 10km long mainline using 25m rails and a 5km long ordinary mainline using 12.5m rails, what is the total number of rails required?" The example processing strategy is as follows: "The number of spare rails for a normal ordinary line is calculated as follows: 1 25m rail is needed per kilometer, and the line length is 10 kilometers, so the calculation method is: 10 kilometers × 1 rail / kilometer = 10 rails; 2 12.5m rails are needed per kilometer, and the line length is 5 kilometers, so the calculation method is: 5 kilometers × 2 rails / kilometer = 10 rails; In total, 10 25m rails and 10 12.5m rails are needed, and the total number of spare rails = 10 rails (25 meters) + 10 rails (12.5 meters) = 20 rails."
[0156] In another example, the trained model needs to be fine-tuned to suit rail transit problems in the rail transit field. Specifically, the device acquires question-and-answer text with proper noun matching, which is text formed from commonly used rail transit questions in the rail transit field. The device then determines the writing information of the question-and-answer text, including the writing format and writing requirements, and thus writes an example processing strategy corresponding to the question-and-answer text based on the writing information.
[0157] In another example, the device can fine-tune the training samples from deep learning data using existing techniques for optimizing deep learning models. Specifically, a processing strategy is obtained through the above method, and then the example processing strategy is obtained by fine-tuning the written processing strategy using existing techniques for optimizing deep learning models.
[0158] Step S302: Configure multiple versions of intermediate processing strategies for the example processing strategy according to the example processing strategy, and determine the second intent parameter corresponding to each version.
[0159] After obtaining the example processing strategy, the device simplifies and elaborates the example processing strategy. The simplified and elaborated processing strategies are intermediate processing strategies for multiple versions of the example processing strategy. That is, the simplified version corresponds to the abbreviated processing strategy, and the elaborated version corresponds to the elaborated processing strategy.
[0160] After determining the intermediate processing strategies, configure the second intent parameters corresponding to the version. For example, the second intent parameter for the detailed version is configured as 1, and the second intent parameter for the brief version is configured as 0.
[0161] Step S303: Construct training samples based on the second intent parameter, the version corresponding to the second intent parameter, and the intermediate processing strategy corresponding to the version.
[0162] After obtaining the second intent parameter, training samples are constructed based on the second intent parameter, the corresponding version, and the intermediate processing strategy for that version. In one example, the second intent parameter and the version are used as labels for the intermediate processing strategy to obtain the training samples.
[0163] In another example, the intent parameter is determined based on emotion. The device needs to determine the emotion corresponding to the second intent parameter, that is, configure the emotion corresponding to the second intent parameter. Then, based on the second intent parameter, the version corresponding to the second intent parameter, the intermediate processing strategy corresponding to the version, and the version matched by the second intent parameter, a training sample is constructed. That is, the version, the second intent parameter, and the emotion are used as labels for the intermediate processing strategy to obtain the training sample.
[0164] Step S304: Train the preset model based on each training sample to obtain the rail transit model.
[0165] The device obtains various training samples and then trains the preset model using these training samples. The model after training is the rail transit model.
[0166] In this embodiment, the device acquires specialized terms in the field of rail transit, constructs training samples based on the specialized terms, and then trains a rail transit model that can provide solutions to rail transit problems through the training samples.
[0167] Referring to Figure 4, which illustrates a fourth flowchart of a processing strategy determination method according to an embodiment of this application, based on the embodiment shown in Figure 3, step S301 includes:
[0168] Step S401: Obtain each first corpus containing words related to rail transit, and determine the relevance parameters of each first corpus in the rail transit domain.
[0169] In this embodiment, the device acquires text related to rail transit from multiple data sources as the first corpus. The first corpus refers to text containing terms related to rail transit. In one example, after acquiring the text, the device determines its source and its authority. For example, text from official institutions, well-known academic publications, and industry leaders is considered more authoritative. Authority can also be quantified by the number of citations; the more citations, the greater the authority. Texts with authority parameters exceeding a preset threshold are identified as the first corpus. In another example, the device determines the text's quality parameters based on comments and ratings. Positive reviews and ratings are converted into scores as quality parameters; higher scores indicate higher text quality. In yet another example, after obtaining the text, the device determines its publication time and identifies texts from publication events within the current time period as the first corpus, i.e., extracting rail transit-specific terms from current cutting-edge technologies. In yet another example, if the publication time is not within the current time period, the device determines whether the text pertains to fundamental theories or important documents in the rail transit field. If so, the text is included as the first corpus. In one example, the development of rail transit varies due to differences in geographical location and culture, as each text needs to cover rail transit texts published in different regions.
[0170] The first corpus is relatively large, ensuring its diversity. However, some first corpora obtained from multiple data sources may contain terms related to rail transit but not specifically describing rail transit. Such corpora are irrelevant to rail transit and need to be removed by the device. To address this, the device uses a text classifier to detect whether the first corpus is relevant to the rail transit domain. The confidence score of the first corpus output by the text classifier indicates its relevance to the rail transit domain; a higher confidence score indicates a stronger correlation. Therefore, the confidence score is used as a relevance parameter for the first corpus in the rail transit domain. The text classifier is trained using labeled text, with labels indicating whether the text pertains to the rail transit domain.
[0171] Furthermore, the device acquires a keyword list in the field of rail transit, which includes professional terms, common phrases, and other keywords. The collected text is matched with the keywords in the keyword list. If the text contains the keywords, it is identified as the first corpus, thereby ensuring that the content of the first corpus is highly relevant to the field of rail transit.
[0172] Furthermore, the device acquires corpora containing terms related to rail transit as intermediate corpora, and determines the topic of the text containing these intermediate corpora as the target topic. If the target topic is rail transit, the device determines the distribution ratio of the target topic within each rail transit topic in the rail transit domain. Then, from each intermediate corpus belonging to the same target topic, the device acquires a target number of intermediate corpora matching the distribution ratio, which serves as the first corpus. For example, the device employs topic modeling technology to analyze the distribution of various rail transit topics in the rail transit domain, thereby determining the distribution ratio of each rail transit topic based on its distribution. The target number refers to the product of the number of training samples to be acquired and the distribution ratio of the target topic.
[0173] Step S402: Based on the correlation parameter, determine the second corpus in each first corpus. The second corpus is used to indicate the first corpus whose correlation parameter is greater than a set threshold.
[0174] After obtaining the relevance parameters, the device determines the second corpus from each first corpus based on the relevance parameters. The second corpus refers to the first corpus whose relevance parameters are greater than a set threshold. In one example, the device determines the first corpus corresponding to the relevance parameters greater than the set threshold and uses the determined first corpus as the second corpus.
[0175] In another example, the device determines intermediate corpora from each first corpus based on correlation parameters. Intermediate corpora are the first corpora whose correlation is greater than a set threshold; that is, the first corpora corresponding to correlation parameters greater than the set threshold are used as intermediate corpora. The device then determines the text perplexity of each intermediate corpus. The lower the text perplexity, the more natural and reasonable the language use in the text of the intermediate corpus; that is, text perplexity represents the fluency of phrases in the intermediate corpus. The device determines second corpora from each intermediate corpus based on text perplexity. The text perplexity of the second corpus is greater than a preset threshold; that is, the intermediate corpora corresponding to text perplexity greater than the preset threshold are used as the second corpus.
[0176] Step S403: Deduplication is performed on each second corpus to obtain multiple target corpora, and specialized terms in the field of rail transit are determined based on each target corpus.
[0177] After obtaining each second corpus, since each second corpus is obtained from different data sources, there are identical corpora in each second corpus. The device then removes the duplicate corpora in each second corpus, and uses the remaining second corpora as target corpora. The device can then extract the proprietary terms in the field of rail transit from the target corpus, that is, the terms in the target corpus that belong to the field of rail transit as proprietary terms.
[0178] In this embodiment, the device acquires each first corpus containing words related to rail transit, determines the relevance parameters of the first corpus in the rail transit field, determines the second corpus in each first corpus based on the relevance parameters, and then deduplicates each second corpus to obtain multiple target corpora, thereby accurately acquiring proprietary words in the rail transit field based on the target corpora.
[0179] Referring to Figure 5, which shows a flowchart of a processing strategy determination method according to an embodiment of this application, based on the embodiment shown in Figure 4, step S403 includes:
[0180] Step S501: Determine the hash value of each second corpus and determine the first similarity between every two second corpora based on the hash value.
[0181] In this embodiment, each second corpus contains corpora with high similarity. The device needs to remove duplicate corpora with high similarity to reduce the computational workload of obtaining proper words.
[0182] The device first calculates the hash value of each second corpus, and then determines the first similarity between any two second corpora based on the hash value. That is, it calculates the Hamming distance between two second corpora using their hash values. For example, the hash values of two second corpora are converted into vectors, and then the Hamming distance between the two vectors is calculated. The first similarity is determined based on the Hamming distance, and the smaller the Hamming distance, the greater the first similarity.
[0183] Step S502: Determine a first target similarity among the various first similarities. The first target similarity is used to indicate the first similarity that is greater than the first preset similarity.
[0184] After determining the first similarity between each pair of second corpora, the device determines the first target similarity among each first similarity. The first target similarity refers to the first similarity that is greater than the first preset similarity, that is, the first similarity that is greater than the first preset similarity is determined as the first target similarity.
[0185] Step S503: Remove one second corpus from the two second corpora corresponding to each first target similarity, and determine the target corpus based on the remaining second corpora.
[0186] After determining the first target similarity, the device removes one of the two second corpora corresponding to each first target similarity, and the remaining second corpora are the target corpora. For example, the first target similarity corresponds to second corpus 1 and second corpus 2, and either second corpus 1 or second corpus 2 can be removed.
[0187] Furthermore, the device can further deduplicate the corpus. After obtaining the remaining second corpora, the device uses these remaining second corpora as third corpora and determines the text vector for each third corpus, that is, encoding the third corpus as a text feature vector. The device determines the second similarity between every two third corpora based on the text vectors, that is, calculating the distance between the text vectors of two third corpora; the smaller the distance, the greater the second similarity. The device determines a second target similarity among the various second similarities; the second target similarity is the second similarity greater than a second preset similarity, that is, the second similarity greater than the second preset similarity is determined as the second target similarity. The device then removes one third corpus from the two third corpora corresponding to each second target similarity, and determines the target corpus based on the remaining third corpora, that is, using the remaining third corpora as the target corpus.
[0188] In this embodiment, the device uses the hash value of the second corpus to deduplicate highly similar corpora, reducing the workload of the device in obtaining proprietary words.
[0189] Referring to Figure 6, which illustrates a flowchart of a processing strategy determination method according to an embodiment of this application, based on the embodiment shown in Figure 4 or Figure 5, step S403 includes:
[0190] Step S601: The target corpus is segmented to obtain multiple words.
[0191] In this embodiment, the device first removes whitespace characters and special characters, such as commas and [], from the target corpus. The device then performs word segmentation on the target corpus after character removal. For example, the corpus can be split into multiple words.
[0192] Step S602: Combine the individual words to obtain multiple first phrases, and determine the frequency of each first phrase in the field of rail transit.
[0193] The device combines individual words in the target corpus to form phrases, which are defined as the first phrase. Each phrase has a corresponding frequency of occurrence in the rail transit field. For example, the device determines the number of times the first phrase appears in each target corpus and uses this number of occurrences as the frequency of occurrence of the first phrase.
[0194] Step S603: Based on the frequency of occurrence, identify specialized terms in the field of rail transit in each first phrase, where the frequency of occurrence of the specialized terms is greater than the preset frequency.
[0195] The device identifies specialized terms in the rail transit field from each first phrase based on their frequency of occurrence. Terms whose frequency of occurrence is greater than a preset frequency are designated as specialized terms. These specialized terms constitute a specialized terminology list for the rail transit field.
[0196] Furthermore, the base model can also answer questions. During training, the base model has a corresponding vocabulary, which includes various second-order terms from a general domain, including but not limited to the rail transit field. The device expands upon this general-domain vocabulary and the rail transit-domain vocabulary. For example, the device determines intermediate terms from each first-order term based on frequency of occurrence; these intermediate terms are those with a frequency greater than a preset frequency. The device determines the intersection between a first set and a second set of intermediate terms, where the second set includes the various second-order terms from the general domain. These second-order terms are the vocabulary used to train the base model. The device identifies the terms in the intersection as proprietary terms from the rail transit field.
[0197] In this embodiment, the device performs word segmentation on the target corpus to obtain multiple words, combines the words to obtain multiple first word groups, and determines the frequency of occurrence of each first word group in the field of rail transit, thereby accurately determining the proprietary words in the field of rail transit based on the frequency of occurrence.
[0198] In one embodiment, the preset model is a large-scale base model, which is trained on massive amounts of data. The device trains the large-scale base model based on individual training samples, essentially fine-tuning it. However, the number of specialized terms in the rail transit field is relatively small, resulting in a limited number of training samples for fine-tuning. This makes the large-scale base model prone to overfitting during training, causing it to easily memorize the policy formats in the training samples instead of learning broad, generalized features. To prevent overfitting, uniform noise is added to the embedding layer of the preset model. Combined with the accuracy of the input vector, this introduces a certain degree of uncertainty, allowing the preset model to learn a wider range of patterns and structures in the data, rather than simply based on specific inputs and outputs.
[0199] Understandably, during the training process of the preset model, noise is added to the output of the embedding layer of the preset model to obtain the input parameters of the next layer. Specifically, referring to Figure 7, the training sample "Please introduce the principle of the switch machine" is input into the embedding layer of the preset model, and uniform noise is added to the output of the embedding layer to obtain the input parameters of the next layer.
[0200] Figure 8 is a schematic diagram of a processing strategy determination device provided in an embodiment of this application. As shown in Figure 8, the processing strategy determination device 800 may include:
[0201] The first acquisition module 810 is used to acquire the text of the rail transit question input by the user;
[0202] The determination module 820 is used to determine the user's first intent parameter based on the rail transit problem text. The first intent parameter is used to indicate the user's urgency to obtain a processing strategy.
[0203] The second acquisition module 830 is used to acquire the target processing strategy output by the rail transit model based on the rail transit problem text, the first intent parameter and the rail transit model. The rail transit model is trained based on specialized terms in the rail transit field, and the version of the target processing strategy matches the first intent parameter.
[0204] In one feasible approach, the module is defined, including:
[0205] The first determining unit is used to determine target information, which includes at least one of the user's identity information and environmental information corresponding to the environment in which the user is located.
[0206] The first acquisition unit is used to acquire emotional statements from rail transit problem texts and determine the user's current target emotion based on the emotional statements and target information.
[0207] The second determining unit is used to determine the user's first intent parameter based on the target emotion.
[0208] One possible approach also includes:
[0209] The third acquisition module is used to acquire specialized terms in the field of rail transit and to construct multiple example processing strategies based on each specialized term.
[0210] The configuration module is used to configure intermediate processing strategies for multiple versions of the example processing strategy according to the example processing strategy, and to determine the second intent parameter corresponding to the version.
[0211] The building module is used to construct training samples based on the second intent parameters, the version corresponding to the second intent parameters, and the intermediate processing strategy corresponding to the version.
[0212] The training module is used to train the preset model based on each training sample to obtain the rail transit model.
[0213] In one feasible approach, the building module includes:
[0214] The third determining unit is used to determine the emotion matched by the second intention parameter;
[0215] The construction unit is used to construct training samples based on the second intent parameter, the version corresponding to the second intent parameter, the intermediate processing strategy corresponding to the version, and the sentiment matched by the second intent parameter.
[0216] In one feasible implementation, the third acquisition module includes:
[0217] The second acquisition unit is used to acquire each first corpus containing words related to rail transit and to determine the relevance parameters of each first corpus in the rail transit field.
[0218] The fourth determining unit is used to determine the second corpus in each first corpus according to the relevance parameter. The second corpus is used to indicate the first corpus whose relevance parameter is greater than a set threshold.
[0219] The deduplication unit is used to remove duplicates from each second corpus, resulting in multiple target corpora, and to identify specialized terms in the field of rail transit based on each target corpus.
[0220] In one possible implementation, the second acquisition unit includes:
[0221] The first acquisition subunit is used to acquire corpus containing words related to rail transit as intermediate corpus and to determine the target topic of the text containing the intermediate corpus.
[0222] The first determining sub-unit is used to determine the distribution ratio of the target topic within each rail transit topic in the rail transit field when the target topic is rail transit.
[0223] The second acquisition subunit is used to acquire, from among the intermediate corpora belonging to the same target topic, the target number of intermediate corpora matching the distribution ratio, as the first corpus.
[0224] In one feasible approach, the deduplication unit includes:
[0225] The second determining subunit is used to determine the hash value of each second corpus and, based on the hash value, the first similarity between every two second corpora;
[0226] The third determining subunit is used to determine the first target similarity among the various first similarities, and the first target similarity is used to indicate the first similarity that is greater than the first preset similarity;
[0227] The sub-unit removal is used to remove one second corpus from the two second corpora corresponding to each first target similarity, and to determine the target corpus based on the remaining second corpora.
[0228] In one feasible approach, removing the sub-unit includes:
[0229] The first determining module is used to determine the text vector of each third corpus, which is used to indicate the remaining individual second corpora;
[0230] The second determination module is used to determine the second similarity between every two third corpora based on the text vectors;
[0231] The third determining module is used to determine the second target similarity among the various second similarities, and the second target similarity is used to indicate the second similarity that is greater than the second preset similarity;
[0232] The removal module is used to remove one third corpus from the two third corpora corresponding to each second target similarity, and to determine the target corpus based on the remaining third corpora.
[0233] In one feasible embodiment, the fourth determining unit includes:
[0234] The fourth determination module is used to determine intermediate corpora in each first corpus based on the relevance parameter. The intermediate corpora are used to indicate the first corpora whose relevance parameter is greater than a set threshold.
[0235] The fifth module is used to determine the text perplexity of each intermediate corpus.
[0236] The sixth determination module is used to determine the second corpus from each intermediate corpus based on the text perplexity. The text perplexity of the second corpus is greater than a preset threshold.
[0237] In one feasible approach, the deduplication unit includes:
[0238] The processing module is used to segment the target corpus into multiple words;
[0239] The combination module is used to combine individual words to obtain multiple first phrases and determine the frequency of each first phrase in the field of rail transit.
[0240] The seventh module is used to determine proprietary terms in the field of rail transit in each first term group based on their frequency of occurrence. The frequency of occurrence of proprietary terms is greater than the preset frequency.
[0241] In one feasible approach, the seventh determined module includes:
[0242] The first determination sub-module is used to determine the middle word group in each first word group based on the frequency of occurrence, wherein the frequency of occurrence of the middle word group is greater than the preset frequency;
[0243] The second determining sub-module is used to determine the intersection between the first set and the second set, which are composed of various intermediate phrases, and to determine the phrases in the intersection as proprietary terms in the field of rail transit. The second set includes various second phrases in the general field.
[0244] In one feasible approach, the building module includes:
[0245] The third acquisition unit is used to acquire the question and answer text matched with proper nouns and to determine the writing information of the question and answer text, including the writing format and writing requirements.
[0246] The writing unit is used to write example processing strategies for question-and-answer texts based on the writing information.
[0247] In one feasible approach, during the training of a pre-defined model, noise is added to the output of the embedding layer of the pre-defined model to obtain the input parameters for the next layer of the embedding layer.
[0248] It is understood that the processing strategy determination device 800 in this application embodiment can correspond to the execution subject of the processing strategy determination method described in this application embodiment. The specific details of the operation and / or function of each module / unit of the processing strategy determination device 800 can be found in the description of the corresponding part of the processing strategy determination method provided in the above application embodiment. For the sake of brevity, it will not be repeated here.
[0249] Figure 9 shows a schematic diagram of a processing strategy determination device according to an embodiment of this application. As shown in Figure 9, the device may include a processor 901 and a memory 902 storing computer program instructions.
[0250] Specifically, the processor 901 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.
[0251] Memory 902 may include mass storage for information or instructions. For example, and not limitingly, memory 902 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. In one instance, memory 902 may include removable or non-removable (or fixed) media, or memory 902 may be non-volatile solid-state memory. Memory 902 may be internal or external to the device, depending on the processing strategy.
[0252] In one instance, memory 902 may be read-only memory (ROM). In one instance, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0253] The processor 901 reads and executes the computer program instructions stored in the memory 902 to implement the method described in the embodiments of this application and achieve the corresponding technical effects achieved by executing the method in the embodiments of this application. For the sake of brevity, it will not be described in detail here.
[0254] In one example, the processing strategy determines that the device may also include a communication interface 903 and a bus 910. As shown in Figure 9, the processor 901, memory 902, and communication interface 903 are connected via bus 910 and communicate with each other.
[0255] The communication interface 903 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0256] Bus 910 includes hardware, software, or both, that couples components of an online information flow metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (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 910 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.
[0257] The processing strategy determination device can execute the processing strategy determination method in the embodiments of this application, thereby achieving the corresponding technical effects of the processing strategy determination method described in the embodiments of this application.
[0258] Furthermore, in conjunction with the processing strategy determination method in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the processing strategy determination methods in the above embodiments. Examples of readable storage media can be non-transitory machine-readable media, such as electronic circuits, semiconductor memory devices, read-only memory (ROM), floppy disks, compact disc read-only memory (CD-ROM), optical discs, hard disks, etc.
[0259] 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.
[0260] 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, read-only memory (ROM), flash memory, erasable read-only memory (EROM), floppy disks, compact disc read-only memory (CD-ROM), 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.
[0261] 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.
[0262] 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.
[0263] 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 determining a processing strategy, comprising: Obtain the text of the rail transit question input by the user; The user's first intent parameter is determined based on the rail transit problem text, and the first intent parameter is used to indicate the user's urgency to obtain a processing strategy; Based on the rail transit problem text, the first intent parameter, and the rail transit model, the target processing strategy output by the rail transit model is obtained, wherein the rail transit model is trained based on specialized terms in the rail transit field, and the version of the target processing strategy matches the first intent parameter.
2. The method according to claim 1, wherein determining the user's first intent parameter based on the rail transit question text includes: Determine target information, which includes at least one of the user's identity information and environmental information corresponding to the environment in which the user is located; The emotional statements are obtained from the rail transit problem text, and the user's current target emotion is determined based on the emotional statements and the target information. The user's first intent parameter is determined based on the target emotion.
3. The method according to claim 1, before obtaining the target processing strategy output by the rail transit model based on the rail transit problem text, the first intent parameter, and the rail transit model, further includes: Obtain specialized terms in the field of rail transit, and construct multiple example processing strategies based on each of the specialized terms; Configure multiple versions of intermediate processing strategies based on the example processing strategy, and determine the second intent parameter corresponding to each version; Training samples are constructed based on the second intent parameter, the version corresponding to the second intent parameter, and the intermediate processing strategy corresponding to the version. Based on the training samples, the preset model is trained to obtain the rail transit model.
4. The method according to claim 3, wherein constructing training samples based on the second intent parameter, the version corresponding to the second intent parameter, and the intermediate processing strategy corresponding to the version includes: Determine the emotion that matches the second intention parameter; Training samples are constructed based on the second intent parameter, the version corresponding to the second intent parameter, the intermediate processing strategy corresponding to the version, and the emotion matched by the second intent parameter.
5. The method according to claim 3, wherein obtaining proprietary terms in the field of rail transit includes: Obtain each first corpus containing terms related to rail transit, and determine the relevance parameters of each first corpus in the rail transit domain; Based on the correlation parameter, a second corpus is determined in each of the first corpora, and the second corpus is used to indicate the first corpus whose correlation parameter is greater than a set threshold; The second corpus is deduplicated to obtain multiple target corpora, and the specialized terms in the field of rail transit are determined based on each target corpus.
6. The method according to claim 5, wherein obtaining the first corpus containing terms related to rail transit includes: Obtain corpus containing words related to rail transit as intermediate corpus, and determine the target topic of the text containing the intermediate corpus; When the target topic is a rail transit topic, determine the distribution ratio of the target topic within each rail transit topic in the rail transit field; Among the intermediate corpora belonging to the same target topic, the target number of intermediate corpora matching the distribution ratio is obtained and used as the first corpus.
7. The method according to claim 5, wherein deduplication of each of the second corpora comprises: Determine the hash value of each of the second corpora, and determine the first similarity between every two of the second corpora based on the hash value; A first target similarity is determined among each of the first similarities, and the first target similarity is used to indicate the first similarity that is greater than a first preset similarity; Remove one of the two second corpora corresponding to each first target similarity, and determine the target corpus based on the remaining second corpora.
8. The method according to claim 7, wherein determining the target corpus based on the remaining second corpora comprises: Determine the text vector for each third corpus, which is used to indicate the remaining individual second corpora; Based on the text vectors, a second similarity is determined between every two of the third corpora; A second target similarity is determined among each of the second similarities, the second target similarity being used to indicate the second similarity that is greater than a second preset similarity; Remove one of the three third corpora from the two third corpora corresponding to each second target similarity, and determine the target corpus based on the remaining third corpora.
9. The method according to claim 5, wherein determining the second corpus in each of the first corpora based on the correlation parameter comprises: Based on the correlation parameter, intermediate corpora are determined in each of the first corpora, and the intermediate corpora are used to indicate the first corpora whose correlation parameter is greater than a set threshold. Determine the text perplexity of each of the intermediate corpora; Based on the text perplexity, a second corpus is determined from each of the intermediate corpora, wherein the text perplexity of the second corpus is greater than a preset threshold.
10. The method according to claim 5, wherein determining the specialized terms in the rail transit field based on each of the target corpora includes: The target corpus is segmented to obtain multiple words; The words are combined to obtain multiple first phrases, and the frequency of occurrence of each first phrase in the field of rail transit is determined. Based on the frequency of occurrence, specialized terms in the field of rail transit are determined in each of the first phrases, wherein the frequency of occurrence of the specialized terms is greater than a preset frequency.
11. The method according to claim 10, wherein determining the specialized terms in the field of rail transit in each of the first phrases based on the frequency of occurrence includes: Based on the frequency of occurrence, an intermediate word group is determined in each of the first word groups, wherein the frequency of occurrence of the intermediate word group is greater than a preset frequency; Determine the intersection between the first set and the second set, which are composed of the various intermediate phrases, and identify the phrases in the intersection as proprietary terms in the field of rail transit. The second set includes various second phrases in the general field.
12. The method according to claim 3, wherein constructing multiple example processing strategies based on each of the proper nouns includes: Obtain the question-and-answer text matched with the proprietary terms, and determine the writing information of the question-and-answer text, including the writing format and writing requirements; Based on the information provided, develop example processing strategies for the question and answer text.
13. The method according to any one of claims 3-12, wherein during the training process of the preset model, noise is added to the output of the embedding layer of the preset model to obtain the input parameters of the next layer of the embedding layer.
14. A processing strategy determination apparatus, comprising: The first acquisition module is used to acquire the text of rail transit questions input by the user; The determination module is used to determine the user's first intent parameter based on the rail transit problem text, wherein the first intent parameter is used to indicate the user's urgency to obtain a processing strategy; The second acquisition module is used to acquire the target processing strategy output by the rail transit model based on the rail transit problem text, the first intent parameter, and the rail transit model, wherein the rail transit model is trained based on proprietary terms in the rail transit field, and the version of the target processing strategy matches the first intent parameter.
15. The apparatus according to claim 14, wherein the determining module comprises: The first determining unit is used to determine target information, the target information including at least one of the user's identity information and environmental information corresponding to the environment in which the user is located; The first acquisition unit is used to acquire emotional statements from the rail transit problem text, and determine the user's current target emotion based on the emotional statements and the target information; The second determining unit is used to determine the user's first intent parameter based on the target emotion.
16. The apparatus according to claim 14, further comprising: The third acquisition module is used to acquire proprietary terms in the field of rail transit and to construct multiple example processing strategies based on each proprietary term. The configuration module is used to configure multiple versions of intermediate processing strategies of the example processing strategy according to the example processing strategy, and to determine the second intent parameter corresponding to the version; The construction module is used to construct training samples based on the second intent parameter, the version corresponding to the second intent parameter, and the intermediate processing strategy corresponding to the version; The training module is used to train the preset model based on each of the training samples to obtain the rail transit model.
17. The apparatus of claim 16, wherein the building module comprises: The third determining unit is used to determine the emotion matched by the second intention parameter; The construction unit is used to construct training samples based on the second intent parameter, the version corresponding to the second intent parameter, the intermediate processing strategy corresponding to the version, and the emotion matched by the second intent parameter.
18. The apparatus according to claim 16, wherein the third acquisition module comprises: The second acquisition unit is used to acquire each first corpus containing words related to rail transit, and to determine the relevance parameters of each first corpus in the rail transit field. The fourth determining unit is used to determine a second corpus in each of the first corpora according to the correlation parameter, wherein the second corpus is used to indicate the first corpus whose correlation parameter is greater than a set threshold; The deduplication unit is used to deduplicat each of the second corpora to obtain multiple target corpora, and to determine the proprietary terms in the field of rail transit based on each of the target corpora.
19. The apparatus of claim 18, wherein the second acquiring unit comprises: The first acquisition subunit is used to acquire corpus containing words related to rail transit as intermediate corpus, and to determine the target topic of the text containing the intermediate corpus. The first determining subunit is used to determine the distribution ratio of the target topic within each rail transit topic in the rail transit field when the target topic is a rail transit topic; The second acquisition subunit is used to acquire, from among the intermediate corpora belonging to the same target topic, a target number of intermediate corpora matching the distribution ratio, as the first corpus.
20. The apparatus according to claim 18, wherein the de-duplication unit comprises: The second determining subunit is used to determine the hash value of each of the second corpora and to determine the first similarity between every two of the second corpora based on the hash value; The third determining subunit is used to determine a first target similarity among each of the first similarities, wherein the first target similarity is used to indicate the first similarity that is greater than a first preset similarity; The removal subunit is used to remove one of the two second corpora corresponding to each first target similarity, and to determine the target corpus based on the remaining second corpora.
21. The apparatus of claim 20, wherein the removal subunit comprises: A first determining module is used to determine the text vector of each third corpus, the third corpus being used to indicate the remaining individual second corpora; The second determining module is used to determine a second similarity between every two of the third corpora based on the text vectors; A third determining module is used to determine a second target similarity among each of the second similarities, wherein the second target similarity is used to indicate the second similarity that is greater than a second preset similarity; The removal module is used to remove one of the three corpora from the two three corpora corresponding to each second target similarity, and to determine the target corpus based on the remaining three corpora.
22. The apparatus according to claim 18, wherein the fourth determining unit comprises: The fourth determining module is used to determine intermediate corpora in each of the first corpora according to the correlation parameters, wherein the intermediate corpora are used to indicate the first corpora whose correlation parameters are greater than a set threshold. The fifth module is used to determine the text perplexity of each of the intermediate corpora; The sixth determining module is used to determine a second corpus from each of the intermediate corpora based on the text perplexity, wherein the text perplexity of the second corpus is greater than a preset threshold.
23. The apparatus according to claim 18, wherein the de-duplication unit comprises: A processing module is used to perform word segmentation on the target corpus to obtain multiple words; A combination module is used to combine the various words to obtain multiple first word groups, and to determine the frequency of occurrence of each first word group in the field of rail transit. The seventh determination module is used to determine the proprietary terms in the field of rail transit in each of the first phrases based on the frequency of occurrence, wherein the frequency of occurrence of the proprietary terms is greater than a preset frequency.
24. The apparatus according to claim 23, wherein the seventh determining module comprises: The first determining sub-module is used to determine an intermediate word group in each of the first word groups based on the occurrence frequency, wherein the occurrence frequency of the intermediate word group is greater than a preset frequency; The second determining sub-module is used to determine the intersection between the first set and the second set formed by the various intermediate word groups, and to determine the word groups in the intersection as proprietary terms in the field of rail transit, wherein the second set includes various second word groups in the general field.
25. The apparatus of claim 16, wherein the building module comprises: The third acquisition unit is used to acquire the question and answer text matched by the proper words and determine the writing information of the question and answer text, the writing information including the writing format and writing requirements; The writing unit is used to write example processing strategies corresponding to the question and answer text based on the writing information.
26. The apparatus according to any one of claims 16-25, wherein during the training process of the preset model, noise is added to the output of the embedding layer of the preset model to obtain the input parameters of the next layer of the embedding layer.
27. A processing strategy determination device, comprising: Processor, and memory storing computer program instructions; The processor reads and executes the computer program instructions to implement the processing strategy determination method as described in any one of claims 1-13.
28. A computer-readable storage medium storing computer program instructions that, when executed by a processor, implement the processing strategy determination method as described in any one of claims 1-13.
