CN116681081A - Semantic generalization method, system, electronic device, storage medium and vehicle - Google Patents

Semantic generalization method, system, electronic device, storage medium and vehicle Download PDF

Info

Publication number
CN116681081A
CN116681081A CN202310545826.5A CN202310545826A CN116681081A CN 116681081 A CN116681081 A CN 116681081A CN 202310545826 A CN202310545826 A CN 202310545826A CN 116681081 A CN116681081 A CN 116681081A
Authority
CN
China
Prior art keywords
semantic
generalization
data
model
weight
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310545826.5A
Other languages
Chinese (zh)
Inventor
张伦齐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Faw Beijing Software Technology Co ltd
FAW Group Corp
Original Assignee
Faw Beijing Software Technology Co ltd
FAW Group Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Faw Beijing Software Technology Co ltd, FAW Group Corp filed Critical Faw Beijing Software Technology Co ltd
Priority to CN202310545826.5A priority Critical patent/CN116681081A/en
Publication of CN116681081A publication Critical patent/CN116681081A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Machine Translation (AREA)

Abstract

The application discloses a semantic generalization method, a semantic generalization system, electronic equipment, a storage medium and a vehicle, which comprise the steps of generating semantic data required by semantic model training based on a semantic template; training the semantic model according to the semantic template and the semantic data; calculating a generalization value based on the clustering weight and the prediction weight of the on-line semantic data; when the generalization value is larger than a preset generalization threshold, the online semantic data is generalization of similar semantics; the prediction weight of the online semantic data is generated through a semantic model. By the method, the generalization data under the same intention can be rapidly screened, and generalization of similar semantics under the same intention can be accurately found.

Description

Semantic generalization method, system, electronic device, storage medium and vehicle
Technical Field
The present application relates to the field of semantic processing technologies, and in particular, to a semantic generalization method, a semantic generalization system, an electronic device, a storage medium, and a vehicle.
Background
In recent years, with the development of artificial intelligence and chip technology, the new innovation of the automobile industry, namely intelligent automobiles, is driven to be more and more popular. The intelligent automobile consists of three parts, namely an internet of vehicles, an intelligent cabin and automatic driving. The intelligent cabin is provided with intelligent and networking vehicle-mounted software, can perform intelligent interaction with people, roads and vehicles, and is an important tie and key node for the evolution of the people-vehicle relationship from a tool to a partner. The intelligent cockpit releases people from boring driving operation, and the operation to the automobile function can be accomplished through the pronunciation dialogue to reduce the safety problem that the both hands break away from the steering wheel and cause, make intelligent cockpit become people's driving, rest, amusement, place of work. Voice interaction is one of the most central functions in the intelligent cockpit.
In the field of vehicle-mounted voice interaction, how to quickly and accurately screen out data effective for model generalization from the vast on-line data, so that the model can understand the language of more and more extensive human beings, and the model becomes more and more intelligent, namely, the generalization capability of the model is improved, which is a troublesome problem.
Therefore, how to quickly screen the generalization data under the same intention and accurately find the generalization of the similar semantics under the same intention is a technical problem to be solved by the person skilled in the art.
Disclosure of Invention
The application provides a semantic generalization method, a system, electronic equipment, a storage medium and a vehicle, which are used for solving the technical problems that generalization data under the same intention cannot be rapidly screened out and generalization of similar semantics under the same intention cannot be accurately found out in the vehicle-mounted voice interaction field in the prior art.
The method for semantic generalization provided by the application for realizing the purpose comprises the following steps:
generating semantic data required by semantic model training based on the semantic template;
training the semantic model according to the semantic template and the semantic data;
calculating a generalization value based on the clustering weight and the prediction weight of the on-line semantic data;
when the generalization value is larger than a preset generalization threshold, the online semantic data is generalization of similar semantics;
the prediction weight of the online semantic data is generated through a semantic model.
In some embodiments, the semantic templates specifically include:
based on the application scene, a semantic template is created in combination with sentence rules.
In some specific embodiments, when the generalization value is greater than a preset generalization threshold, before generalizing the online semantic data into the same type of semantic, the method further includes:
and judging whether the on-line semantic data is the generalization of the similar semantic based on the clustering result of the on-line semantic data according to the semantic model.
In some embodiments, the training of the semantic model according to the semantic templates and the semantic data specifically includes:
generating common parlance according to the semantic template as a first semantic model to perform preliminary training on semantic data;
and performing deep training by adopting a second semantic model according to the semantic data after the preliminary training.
In some embodiments, the computing the generalization value based on the clustering weight and the predictive weight of the on-line semantic data specifically includes:
clustering the online semantic data, and giving weight to each piece of data according to the size of the cluster;
predicting the data according to the semantic model, and converting the score value of the prediction result into weight;
and carrying out fusion calculation on the clustering weight and the prediction weight to obtain a generalization value.
In some embodiments, determining whether the on-line semantic data is a generalization of the homogeneous semantics specifically includes:
when the semantic model has the same classification result on the online semantic data and clusters the same cluster, the semantic model is directly considered as a generalized expression;
when the semantic model has different classification results on the online semantic data and the clusters are not the same cluster, the semantic model is directly considered to be mutually non-generalization speaking.
Based on the same conception, the application also provides a semantic generalization system, which comprises:
the semantic data generation module is used for generating semantic data required by semantic model training based on the semantic template;
the semantic model training module is used for training the semantic model according to the semantic template and the semantic data;
the generalization value calculation module is used for calculating a generalization value based on the clustering weight and the prediction weight of the online semantic data;
the semantic generalization judging module is used for generalizing similar semantic of on-line semantic data when the generalization value is larger than a preset generalization threshold;
the prediction weight of the online semantic data is generated through a semantic model.
Based on the same conception, the application also provides an electronic device comprising: the device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; the memory has stored therein a computer program which, when executed by the processor, causes the processor to perform the steps of the above-described semantically generalizing method.
Based on the same idea, the present application also provides a computer-readable storage medium storing a computer program executable by an electronic device, which when run on the electronic device causes the electronic device to perform the steps of the above-described method of semantic generalization.
Based on the same conception, the application also provides a vehicle, which is loaded with the semantic generalization system.
Compared with the prior art, the application has the following beneficial effects:
the application discloses a semantic generalization method, a semantic generalization system, electronic equipment, a storage medium and a vehicle, which comprise the steps of generating semantic data required by semantic model training based on a semantic template; training the semantic model according to the semantic template and the semantic data; calculating a generalization value based on the clustering weight and the prediction weight of the on-line semantic data; when the generalization value is larger than a preset generalization threshold, the online semantic data is generalization of similar semantics; the prediction weight of the online semantic data is generated through a semantic model. By the method, the generalization data under the same intention can be rapidly screened, and generalization of similar semantics under the same intention can be accurately found.
Drawings
FIG. 1 is a schematic diagram of the structure of a semantic generalization method of the present application in some embodiments;
FIG. 2 is a flow chart of a method of semantic generalization of the present application in some applications;
FIG. 3 is a schematic illustration of the clustering result of FIG. 2;
FIG. 4 is a schematic diagram of the architecture of a semantic generalization system of the present application in some embodiments;
fig. 5 is a schematic structural diagram of an electronic device according to some embodiments of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described in further detail below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terminology used in the embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, the "plurality" generally includes at least two.
It should be understood that the term "and/or" as used herein is merely one relationship describing the association of the associated objects, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used in embodiments of the present application, these descriptions should not be limited to these terms. These terms are only used to distinguish one from another. For example, a first may also be referred to as a second, and similarly, a second may also be referred to as a first, without departing from the scope of embodiments of the application.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrase "if determined" or "if detected (stated condition or event)" may be interpreted as "when determined" or "in response to determination" or "when detected (stated condition or event)" or "in response to detection (stated condition or event), depending on the context.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a product or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such product or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a commodity or device comprising such element.
In particular, the symbols and/or numerals present in the description, if not marked in the description of the figures, are not numbered.
Referring to fig. 1, 2 and 3, a method of semantic generalization includes:
s101, generating semantic data required by semantic model training based on a semantic template;
specifically, the step generates semantic data required by semantic model training based on a semantic template;
in some applications, a semantic template can be created in combination with the actual need, semantic data is generated through the semantic template, and finally the semantic template is expanded.
S102, training a semantic model according to a semantic template and semantic data;
specifically, training a semantic model according to the semantic template and semantic data generated by the semantic template;
in some of these applications, common parlance can be generated through semantic templates, which are trained in connection with semantic data.
In some of the applications, generating common parlance as a first semantic model according to a semantic template to perform preliminary training on semantic data;
and performing deep training by adopting a second semantic model according to the semantic data after the preliminary training.
S103, calculating a generalization value based on the clustering weight and the prediction weight of the online semantic data;
specifically, the step calculates a generalization value based on the clustering weight and the prediction weight of the on-line semantic data;
in some of these applications, on-line semantic data is first predicted by a semantic model, then the semantic data is clustered, and a generalization value is calculated based on the sum of the clustering weight and the prediction weight of the on-line semantic data.
In some of these applications, on-line semantic data are clustered, and each piece of data is given a weight according to the size of the cluster;
predicting the data according to the semantic model, and converting the score value of the prediction result into weight;
and carrying out fusion calculation on the clustering weight and the prediction weight to obtain a generalization value.
S104, when the generalization value is larger than a preset generalization threshold, the online semantic data is generalization of similar semantics;
in some applications, a generalization threshold is preset, and when the calculated generalization value is greater than the preset generalization threshold according to the sum of the clustering weight and the prediction weight of the on-line semantic data, the on-line semantic data is the generalization of the similar semantics.
In some embodiments of the present application, in order to accurately obtain semantic data required for training a semantic model, the semantic template specifically includes:
based on the application scene, a semantic template is created in combination with sentence rules.
In some applications, the application scenario may be a task field to be completed and related application scenario, and the sentence rules may be sentence patterns and grammar rules.
In some embodiments of the present application, in order to determine that the on-line semantic data is a generalization of similar semantics, when the generalization value is greater than a preset generalization threshold, before the generalization of the on-line semantic data to the similar semantics, the method further includes:
and judging whether the on-line semantic data is the generalization of the similar semantic based on the clustering result of the on-line semantic data according to the semantic model.
In some applications, firstly, a semantic model and a clustering result of on-line semantic data are combined, and whether the on-line semantic data are generalization of similar semantics is judged.
In some applications, when the semantic model has the same classification result on the online semantic data and clusters the same cluster, the semantic model is directly considered as a generalization expression;
when the semantic model has different classification results on the online semantic data and the clusters are not the same cluster, the semantic model is directly considered to be mutually non-generalization speaking.
The following illustrates an embodiment of a semantic generalization method of the present application in some applications:
1. the syntactic grammar rule is researched, a semantic template is manufactured according to a task target and a research result, data required by semantic model training are rapidly generated in batches by using the semantic template, and the quality of the semantic data can be ensured;
1. determining task areas and related application scenarios
2. Determining common speaking according to application scene
3. The summarized syntactic grammar structure is studied from common parlance, such as: leading main guests, only moving guests, only predicates, questions, verbs, nouns and the like with similar meanings;
4 sentence pattern extraction method for generating sentence pattern
5 expanding different expressions of slot positions in templates
Examples:
input: query set: the temperature of the air conditioner is regulated to be higher a little, and the temperature of the air conditioner is reduced by asking me
And (3) outputting: pattern: [ D: pre ] [ D: ac_control ] [ D: set ] [ D: level ]
term: [ D: pre ]: step C, help me, please give me;
[ D: set ]: heightening, lowering, increasing and reducing;
[ level ]: some, a little, many;
2. generating common speaks as initial model training data by using semantic templates
1. Loading prepared patterns and term
2. Generating semantic data
Examples:
input: pattern, term in the first step;
and (3) outputting: data set, examples: the temperature of the air conditioner is reduced, and the air conditioner is raised by 3 degrees.
3. The fastText model is used here to train the initial deep learning model, because fastText (shallow network) tends to achieve comparable accuracy to deep networks in text classification tasks, but is many orders of magnitude faster in training time than deep networks. The model has a simple structure, and only has a hidden layer and an output layer, so that the training speed is very high, and the fastttext can train by itself. And optimization of softmax and n-gram will be performed.
1. Preparing a training set and a testing set;
2. adopting a fastText model and constructing;
3. training and parameter adjustment;
4. and (5) model preservation.
Examples:
input: the data set of the first step;
and (3) outputting: and training the model after finishing.
4. Clustering the online semantic data, fusing a Bayesian optimization algorithm, and giving weight to each piece of data according to the cluster size of the clusters
1. And clustering the online semantic data by using a repeated binary clustering algorithm. Because the algorithm is an enhanced version of the K-means clustering algorithm, the accuracy is higher, the speed is higher, the number of clusters can be automatically determined, and the number does not need to be specified in advance. And the algorithm can also solve the problem that one or more points disappear in the iterative process due to the extreme position when initializing K random centroid points.
An important index for measuring the quality of the clustering algorithm is SSE (Sum ofSquared Error), namely the sum of square errors, and the smaller SSE indicates that the closer the data point is to the cluster centroid, the better the clustering effect is.
This algorithm is in fact very similar to the algorithm of a decision tree. In the process of dividing the decision tree node into child nodes by a father node, the Reinium is used for judging whether division is needed or not, and the characteristic with the largest difference of the Reinium is selected for division. Similarly here, the final goal is to minimize SSE, so for each family, we can get how much SSE is reduced in the overall after dividing into 2 families, all we need to do is to keep the other families unchanged, and choose the family that can reduce SSE to the greatest extent for Kmeans two classification.
The difference of SSEs after division is recorded for each family calculation for later direct use.
The clustering process is integrated into a Bayesian optimization algorithm:
bayesian optimization algorithm mainly comprises the following steps: given an optimized objective function (generalized function, only input and output are required to be specified, the internal structure and mathematical properties are not required to be known), the posterior distribution of the objective function is updated by continuously adding sample points (Gaussian process until the posterior distribution basically fits to the real distribution, so that the information of the last parameter is simply considered, and the current parameter is better adjusted.
The core process comprises the following steps: the prior function (PriorFunction, PF) and the collection function (Acquisition Function, AC), which may also be referred to as a performance function (availability function), but is also commonly referred to as a collection function. The PF uses mainly Gaussian process regression (other PF functions are also possible, but more for Gaussian process regression); the AC mainly comprises EI, PI and UCB methods, and the balance of the expression and the expression is also completed through the AC.
Exploration (expression): in short, the points far from the known points are selected as far as possible as the reference points for the next iteration, i.e. the unknown regions are explored as far as possible, and the distribution of the points is as even as possible.
Utilization (explloition): in short, the point close to the known point is selected as far as possible to be the reference point for the next iteration, namely, the points around the known point are mined as far as possible, a dense area appears in the distribution of the points, and local maximum is easy to enter.
Bayesian optimization is a very effective global optimization algorithm, and aims to find a global optimal solution. In fact, the method is a super-parameter optimization mode.
The bayesian optimization framework mainly comprises two core parts, namely a probability proxy model (probabilistic surrogate model) and an acquisition function (acquisition function).
The probability proxy model comprises a priori probability model and an observation model: a priori probability model, P (f); the observation model describes the observation data generation mechanism, namely likelihood distribution P (D1: t|f), and updating the probability proxy model means obtaining a posterior probability distribution P (f|D1: t) containing more data information according to a formula. The probability proxy model is used for proxy unknown objective function, and from the assumption of priori, the more accurate proxy model is obtained by iteratively increasing information quantity and correcting the priori.
The acquisition function is constructed from posterior probability distributions, and the next most "potential" evaluation point is selected by maximizing the acquisition function. At the same time, an efficient acquisition function can ensure that the selected evaluation point sequence minimizes the total loss (loss).
2. Weights are given by the size of the cluster in which each piece of data is located. Because the larger the cluster, the more data that is considered to be more similar to the piece of data, the greater the likelihood of generalizing each other;
examples:
input: raising the wine to a little, lowering the wine for me, getting too hot, getting cold, getting too cool, raising the wine to a little
And (3) outputting: [ heighten a bit: 0.8, turn up some: 0.8, turn up a lot: 0.8], [ good cold o: 0.75, too cool: 0.75], [ too hot: 0.5]; the clustering result is shown in fig. 3;
5. predicting the data by using the initial model, and converting the score value of the prediction result into weight
1, loading a trained model
2, predicting the online semantic data set by using the model
Examples:
input: online semantic data set
And (3) outputting: height adjustment is carried out a little: temperature_up:0.95, turn down some: temperature_down:0.92
6. Fusing the weight values of the clustering and model prediction to obtain a total score
In case 1, the model classification results are the same, and the same cluster is clustered, then the method is directly regarded as generalization speaking
In case 2, the model classification results are the same, but not the same cluster, the clustering score is halved and then added with the model score to obtain the total score
In case 3, the model classification results are different, but the model score is halved and added with the cluster score to obtain the total score
In case 4, the model classification results are different and not the same cluster, and are directly considered not to be generalized
Examples:
input: the temperature is raised a little: clustering: 0.8, model: temperature_up:0.95;
the temperature rises somewhat: clustering: 0.8, model: temperature_up:0.92;
and (3) outputting: the temperature rise is a little bit and the temperature rise is a little to be generalized.
7. Setting a generalization threshold, and taking the highest total score larger than the generalization threshold as generalization of the similar expression.
For the purposes of simplicity of explanation, the method steps disclosed in the above embodiments are depicted as a series of acts in a combination, but it should be understood by those skilled in the art that the embodiments of the present application are not limited by the order of acts described, as some steps may occur in other order or concurrently in accordance with the embodiments of the present application. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the application.
Any process or method description that is flow chart or otherwise described may be understood as: means, segments, or portions of code representing executable instructions including one or more steps of a particular logic function or procedure are illustrated, and the scope of the preferred embodiment of the present application includes additional implementations in which functions may be executed out of order from that shown or discussed, including performing the functions in a substantially simultaneous manner or in an inverse order, or executing computer instructions in a loop, branch, etc. program structure and implementing the corresponding functions, depending on the function involved, as would be understood by those skilled in the art in practicing the embodiments of the present application.
As shown in fig. 4, the present application further provides a semantic generalization system, which includes:
a semantic data generating module 201, configured to generate semantic data required for training a semantic model based on a semantic template;
a semantic model training module 202, configured to train a semantic model according to the semantic template and the semantic data;
the generalization value calculation module 203 is configured to calculate a generalization value based on the clustering weight and the prediction weight of the online semantic data;
the semantic generalization judging module 204 is configured to, when the generalization value is greater than a preset generalization threshold, generalize the online semantic data into similar semantics;
the prediction weight of the online semantic data is generated through a semantic model.
Specifically, the semantic generalization system in this embodiment includes a semantic data generating module 201, a semantic model training module 202, a generalization value calculating module 203, and a semantic generalization judging module 204, where the semantic data generating module 201 is configured to generate semantic data required for semantic model training based on a semantic template; a semantic model training module 202, configured to train a semantic model according to the semantic template and the semantic data; the generalization value calculation module 203 is configured to calculate a generalization value based on the clustering weight and the prediction weight of the online semantic data; the semantic generalization judging module 204 is configured to, when the generalization value is greater than a preset generalization threshold, generalize the online semantic data into similar semantics.
It should be noted that, although only some basic functional modules are disclosed in the embodiment of the present application, the composition of the present system is not meant to be limited to the above basic functional modules, but rather, the present embodiment is meant to express: one skilled in the art can add one or more functional modules to the basic functional module to form an infinite number of embodiments or technical solutions, that is, the system is open rather than closed, and the scope of protection of the claims is not limited to the disclosed basic functional module because the present embodiment only discloses individual basic functional modules. Meanwhile, for convenience of description, the above devices are described as being functionally divided into various units and modules, respectively. Of course, the functions of the units, modules may be implemented in one or more pieces of software and/or hardware when implementing the application.
The embodiments of the system described above are merely illustrative, for example: wherein each functional module, unit, subsystem, etc. in the system may or may not be physically separate, or may not be a physical unit, i.e. may be located in the same place, or may be distributed over a plurality of different systems and subsystems or modules thereof. Those skilled in the art may select some or all of the functional modules, units or subsystems according to actual needs to achieve the purposes of the embodiments of the present application, and in this case, those skilled in the art may understand and implement the present application without any inventive effort.
As shown in fig. 5, the present application further provides an electronic device, including: the device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; the memory has stored therein a computer program which, when executed by the processor, causes the processor to perform the steps of the above-described semantically generalizing method.
Specifically, fig. 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present application, and fig. 5 shows a block diagram of an exemplary electronic device suitable for implementing an embodiment of the present application. The electronic device shown in fig. 5 is only an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present application. As shown in fig. 5, the electronic device 500 is embodied in the form of a general purpose computing device. The components of electronic device 500 may include, but are not limited to: one or more processing units or processors 516, a memory 528, a bus 518 that connects the various system components (including the memory 528 and the processor 516). Bus 518 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus. Electronic device 500 typically includes many types of computer system readable media. Such media can be any available media that is accessible by electronic device 500 and includes both volatile and nonvolatile media, removable and non-removable media. Memory 528 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 530 and/or cache memory 532. Electronic device 500 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 534 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in the figures, commonly referred to as a "hard disk drive"). Although not shown, the storage system 534 can provide a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., floppy disk, removable hard disk, hot-swappable storage media), and an optical disk drive for reading from and writing to a removable non-volatile optical disk (e.g., CD-ROM, DVD-ROM, or other optical media). In such cases, each drive may be coupled to bus 518 through one or more data media interfaces. Memory 528 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the application. A program/utility 540 having a set (at least one) of program modules 542 may be stored in, for example, memory 528, such program modules 542 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 542 generally perform the functions and/or methods in the embodiments described herein. The electronic device 500 may also communicate with one or more external devices 514 (e.g., keyboard, pointing device, display 524, etc.), one or more devices that enable a user to interact with the electronic device 500, and/or any devices (e.g., network card, modem, etc.) that enable the electronic device 500 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 522. Also, the electronic device 500 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through a network adapter 520. As shown in fig. 5, the network adapter 520 communicates with other modules of the electronic device 500 over the bus 518. It should be appreciated that although not shown, those skilled in the art may use other hardware and/or software modules in connection with electronic device 500, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like. Processor 516 executes programs stored in memory 528 to perform various functional applications and data processing, such as methods provided by any one or more embodiments of the present application.
The application also provides a computer readable storage medium storing a computer program executable by an electronic device, which when run on the electronic device causes the electronic device to perform the steps of the above-described method of semantic generalization.
In particular, the computer storage media of embodiments of the present application may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this embodiment, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The application also provides a vehicle which is loaded with the semantic generalization system.
By applying the technical scheme, the semantic generalization method, the semantic generalization system, the electronic equipment, the storage medium and the vehicle comprise the steps of generating semantic data required by semantic model training based on a semantic template; training the semantic model according to the semantic template and the semantic data; calculating a generalization value based on the clustering weight and the prediction weight of the on-line semantic data; when the generalization value is larger than a preset generalization threshold, the online semantic data is generalization of similar semantics; the prediction weight of the online semantic data is generated through a semantic model. By the method, the generalization data under the same intention can be rapidly screened, and generalization of similar semantics under the same intention can be accurately found.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the application and form different embodiments. For example: any of the embodiments claimed in the claims may be used in any combination of the embodiments of the application.
In the description of the present specification, the descriptions of the terms "one embodiment," "example," "specific example," and the like, mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
In addition, the technical solutions of the embodiments of the present application may be combined with each other, but it is necessary to be based on the fact that those skilled in the art can implement the technical solutions, and when the technical solutions are contradictory or cannot be implemented, the combination of the technical solutions should be considered as not existing, and not falling within the scope of protection claimed by the present application.
All of the features disclosed in this specification, or all of the steps in a method or process disclosed, may be combined in any combination, except for mutually exclusive features and/or steps. Any feature disclosed in this specification may be replaced by alternative features serving the same or equivalent purpose, unless expressly stated otherwise. That is, each feature is one example only of a generic series of equivalent or similar features, unless expressly stated otherwise. Like reference numerals refer to like elements throughout the specification.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including the corresponding claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including the corresponding claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application.

Claims (10)

1. A method of semantic generalization, comprising:
generating semantic data required by semantic model training based on the semantic template;
training the semantic model according to the semantic template and the semantic data;
calculating a generalization value based on the clustering weight and the prediction weight of the on-line semantic data;
when the generalization value is larger than a preset generalization threshold, the online semantic data is generalization of similar semantics;
the prediction weight of the online semantic data is generated through a semantic model.
2. The method of semantic generalization according to claim 1, characterized in that the semantic template specifically comprises:
based on the application scene, a semantic template is created in combination with sentence rules.
3. The method of semantic generalization according to claim 1, wherein when the generalization value is greater than a preset generalization threshold, then before generalizing the on-line semantic data into homogeneous semantics, the method further comprises:
and judging whether the on-line semantic data is the generalization of the similar semantic based on the clustering result of the on-line semantic data according to the semantic model.
4. The method of semantic generalization according to claim 1, characterized in that the training of the semantic model according to the semantic templates and the semantic data comprises in particular:
generating common parlance according to the semantic template as a first semantic model to perform preliminary training on semantic data;
and performing deep training by adopting a second semantic model according to the semantic data after the preliminary training.
5. The method of semantic generalization according to claim 1, characterized in that the calculation of the generalization value is based on the clustering weight and the predictive weight of the on-line semantic data, in particular comprising:
clustering the online semantic data, and giving weight to each piece of data according to the size of the cluster;
predicting the data according to the semantic model, and converting the score value of the prediction result into weight;
and carrying out fusion calculation on the clustering weight and the prediction weight to obtain a generalization value.
6. A method of semantic generalization according to claim 3, wherein determining whether the on-line semantic data is a generalization of the same class of semantics comprises:
when the semantic model has the same classification result on the online semantic data and clusters the same cluster, the semantic model is directly considered as a generalized expression;
when the semantic model has different classification results on the online semantic data and the clusters are not the same cluster, the semantic model is directly considered to be mutually non-generalization speaking.
7. A system for semantic generalization, comprising:
the semantic data generation module is used for generating semantic data required by semantic model training based on the semantic template;
the semantic model training module is used for training the semantic model according to the semantic template and the semantic data;
the generalization value calculation module is used for calculating a generalization value based on the clustering weight and the prediction weight of the online semantic data;
the semantic generalization judging module is used for generalizing similar semantic of on-line semantic data when the generalization value is larger than a preset generalization threshold;
the prediction weight of the online semantic data is generated through a semantic model.
8. An electronic device, comprising: the device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; the memory has stored therein a computer program which, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1 to 6.
9. A computer readable storage medium, characterized in that it stores a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of the method of any one of claims 1 to 6.
10. A vehicle, characterized in that it is equipped with a system for semantic generalization according to claim 7.
CN202310545826.5A 2023-05-15 2023-05-15 Semantic generalization method, system, electronic device, storage medium and vehicle Pending CN116681081A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310545826.5A CN116681081A (en) 2023-05-15 2023-05-15 Semantic generalization method, system, electronic device, storage medium and vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310545826.5A CN116681081A (en) 2023-05-15 2023-05-15 Semantic generalization method, system, electronic device, storage medium and vehicle

Publications (1)

Publication Number Publication Date
CN116681081A true CN116681081A (en) 2023-09-01

Family

ID=87780064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310545826.5A Pending CN116681081A (en) 2023-05-15 2023-05-15 Semantic generalization method, system, electronic device, storage medium and vehicle

Country Status (1)

Country Link
CN (1) CN116681081A (en)

Similar Documents

Publication Publication Date Title
CN111159416B (en) Language task model training method and device, electronic equipment and storage medium
US11403345B2 (en) Method and system for processing unclear intent query in conversation system
CN110245348B (en) Intention recognition method and system
CN111444320B (en) Text retrieval method and device, computer equipment and storage medium
CN107797985B (en) Method and device for establishing synonymous identification model and identifying synonymous text
CN108630197B (en) Training method and device for speech recognition
US8359204B2 (en) Free-speech command classification for car navigation system
US20170228639A1 (en) Efficient determination of optimized learning settings of neural networks
US20170308790A1 (en) Text classification by ranking with convolutional neural networks
US20200151374A1 (en) Predicting target characteristic data
Barahona et al. Exploiting sentence and context representations in deep neural models for spoken language understanding
CN112861522B (en) Aspect-level emotion analysis method, system and model based on dual-attention mechanism
CN106339368A (en) Text emotional tendency acquiring method and device
CA3050202A1 (en) Visualization interface for voice input
WO2022042297A1 (en) Text clustering method, apparatus, electronic device, and storage medium
US20240028897A1 (en) Interpreting convolutional sequence model by learning local and resolution-controllable prototypes
CN113761868B (en) Text processing method, text processing device, electronic equipment and readable storage medium
CN111177392A (en) Data processing method and device
US20190294969A1 (en) Generation of neural network containing middle layer background
US11880755B2 (en) Semi-supervised learning with group constraints
US20180113939A1 (en) Response generation
US20220366143A1 (en) Self-learning framework of zero-shot cross-lingual transfer with uncertainty estimation
CN113761942B (en) Semantic analysis method, device and storage medium based on deep learning model
US11176327B2 (en) Information processing device, learning method, and storage medium
CN116681081A (en) Semantic generalization method, system, electronic device, storage medium and vehicle

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination