Text label determination method and device, medium and electronic equipment
By combining the unstructured text information input by the user and the preset structured text information, the label determination model is used to adjust the input vector, which solves the manual subjectivity error in the classification of non-structured text information, and achieves more accurate label determination.
Patent Information
- Application Number
- CN202510530378.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-04-25
AI Technical Summary
In the prior art, the classification processing of non-structural text information is highly dependent on manual judgment and is susceptible to knowledge limitations and subjective emotions, resulting in inaccurate labels.
By obtaining the first candidate tag of the non-structural text information input by the user, determining the model in combination with the preset structural text information and labels, adjusting the input vector to determine the target tag, and adjusting the model input using the non-structural weight and structural weight to reduce the influence of artificial subjectivity.
It improves the accuracy and objectivity of non-structural text information labels, avoids subjective errors in pure manual input, and ensures that the label is more in line with the text content entered by the user.
Smart Images

Figure CN120448541A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a method, device, medium, and electronic device for determining text tags. Background Art
[0002] In today's era of digital information explosion, a massive amount of unstructured text information is emerging. Unstructured text information, such as user comments on social media, email content, and online forum posts, lacks a specific data format and is difficult to efficiently analyze using traditional structured data processing methods.
[0003] Currently, a significant problem with classifying unstructured text is its heavy reliance on subjective human judgment of the categories of the input text. This judgment process is susceptible to interference from a variety of factors. For one thing, human knowledge is limited. When faced with text in specialized fields or on unfamiliar topics, a lack of relevant knowledge can lead to incorrect categorization. Furthermore, subjective emotions and cognitive biases can also influence judgments. If individuals have inherent biases or negative views about a topic, the classification labels for the relevant text may deviate from objective criteria. Summary of the Invention
[0004] In response to the above technical problems, the present application provides a text label determination method, device, medium and electronic device, which at least partially solve the problems existing in the prior art.
[0005] In a first aspect of the present application, a method for determining a text label is provided, the method comprising:
[0006] S100, obtaining unstructured text information input by a user and a first candidate tag corresponding to the unstructured text information; wherein the first candidate tag is one of several preset candidate tags;
[0007] S200, obtaining a second candidate tag based on the unstructured text information, the preset structured text information, and the tag determination model; wherein the second candidate tag is one of a plurality of preset candidate tags; the preset structured text information is used to describe attribute information of the user;
[0008] S300, if the first candidate label is different from the second candidate label, obtaining a non-structural weight of the non-structural text information and a structural weight of the preset structural text information;
[0009] S400 , determining a model based on the unstructured text information, the preset structured text information, the unstructured weight, the structured weight and the label to obtain a target label for the unstructured text information input by the user.
[0010] In a second aspect of the present application, a text label determination device is provided, the device comprising:
[0011] A first label acquisition unit is configured to acquire the unstructured text information input by the user and a first candidate label corresponding to the unstructured text information; wherein the first candidate label is one of several preset candidate labels;
[0012] A second label acquisition unit is configured to obtain a second candidate label based on the unstructured text information, the preset structured text information, and the label determination model; wherein the second candidate label is one of a plurality of preset candidate labels; the preset structured text information is used to describe the attribute information of the user;
[0013] a weight determination unit, configured to obtain a non-structural weight of the non-structural text information and a structural weight of the preset structural text information if the first candidate label is different from the second candidate label;
[0014] The label determination unit is used to obtain the target label of the non-structured text information input by the user according to the non-structured text information, the preset structured text information, the non-structured weight, the structured weight and the label determination model.
[0015] In a third aspect of the present application, a non-transitory computer-readable storage medium is provided, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded and executed by a processor to implement the aforementioned text label determination method.
[0016] In a fourth aspect of the present application, an electronic device is provided, comprising a processor and the above-mentioned non-transitory computer-readable storage medium.
[0017] This application has at least the following beneficial effects:
[0018] The text label determination method provided by the present application first obtains the non-structured text information input by the user and the first candidate label corresponding to the non-structured text information, that is, the user first determines the label of the input non-structured text information by himself; then, based on the non-structured text information, the preset structured text information and the label determination model, the second candidate label is obtained. Here, the second candidate label is determined according to the label determination model. Here, when the second candidate label is obtained by using the label determination model, the preset structured text information is also used to assist in the determination. The preset structured text information is used to describe the user's attribute information and can provide the model with richer information when determining the second candidate label. If the first candidate label is different from the second candidate label, it may be that the first candidate label input by the user is inaccurate, or the second candidate label obtained by the label determination model is inaccurate. At this time, the non-structured weight of the non-structured text information and the structural weight of the preset structured text information are obtained, that is, the input vector of the label determination model is adjusted. The adjusted input vector is then used to obtain the final target label. This avoids label inaccuracies caused by the subjectivity of purely manual input. And based on the similarities and differences between the manually input labels and the labels initially obtained by the model, it is determined whether the input vector of the label determination model needs to be adjusted, so that the final target label is more in line with the unstructured text input by the user, rather than simply relying on manual input or model output. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0020] Figure 1 A flowchart of a method for determining a text label provided in an embodiment of the present application;
[0021] Figure 2 This is a structural block diagram of the text label determination device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0024] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on this application, it should be understood by those skilled in the art that an aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects described herein can be used to implement an apparatus and / or practice a method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this apparatus and / or practice this method.
[0025] Please refer to Figure 1 As shown, an embodiment of the present application provides a text label determination method, the method comprising:
[0026] Step S100 : obtaining unstructured text information input by a user and a first candidate tag corresponding to the unstructured text information; wherein the first candidate tag is one of several preset candidate tags.
[0027] Specifically, unstructured text information refers to text data that has no fixed format or organizational form and cannot be directly represented and stored using a traditional database table structure or fixed pattern. In this embodiment, the unstructured text information is input by the user independently. Here, the unstructured text information can be evaluation information, message information, feedback information, etc., and the first candidate label corresponding to the unstructured text information is a label selected by the user from several preset candidate labels for the unstructured text information input by the user. It should be noted that the purpose of the text label determination method in this application to determine a suitable label for the unstructured text information input by the user is to enable the unstructured text information input by the user to be processed promptly and properly. As an example: if the unstructured text information input by the user is a feedback information, its corresponding label can determine a processing object for the feedback information to process the feedback information.
[0028] Step S200 , obtaining a second candidate tag based on the unstructured text information, the preset structured text information and the tag determination model; wherein the second candidate tag is one of several preset candidate tags; the preset structured text information is used to describe the attribute information of the user.
[0029] Specifically, the preset structured text information can be some personal information of the user, or other user information related to the unstructured text information. As an example: if the current unstructured text information is a message left by the user on the hospital's message system, the preset structured text information is the user's medical record information, the first candidate label is the label selected by the user from several preset candidate labels based on his or her message, and the preset candidate label can be a medical service label, a medical process label, etc. The second candidate label is any label from several preset candidate labels output by the label determination model. Or, as an example: if the current unstructured text information is an introduction to the software released by the user, the first candidate label is the selected software category; the software category here can be used to classify and manage the software. The preset structured text information is the parameter information corresponding to the software, etc. The preset candidate label can be instant messaging software or office software, etc.
[0030] S300: If the first candidate tag is different from the second candidate tag, obtain a non-structural weight of the non-structural text information and a structural weight of the preset structural text information.
[0031] Specifically, if the first candidate label differs from the second candidate label, this may indicate that the first candidate label input by the user is inaccurate, or that the second candidate label obtained by the label determination model is inaccurate. In this case, the unstructured weight of the unstructured text information and the structured weight of the preset structured text information are obtained. The weights here are used to adjust the degree of influence of the unstructured text information and the preset structured text information on the output second candidate label.
[0032] S400 , determining a model based on the unstructured text information, the preset structured text information, the unstructured weight, the structured weight and the label to obtain a target label for the unstructured text information input by the user.
[0033] Specifically, after obtaining the corresponding weights, the weight of the unstructured text information in the vector of the final input label determination model is adjusted based on the non-structure weight, and the weight of the preset structured text information in the vector of the final input label determination model is adjusted based on the structure weight, so that the obtained target label is closer to the unstructured text information input by the user.
[0034] The text label determination method provided by the present application first obtains the non-structured text information input by the user and the first candidate label corresponding to the non-structured text information, that is, the user first determines the label of the input non-structured text information by himself; then, based on the non-structured text information, the preset structured text information and the label determination model, the second candidate label is obtained. Here, the second candidate label is determined according to the label determination model. Here, when the second candidate label is obtained by using the label determination model, the preset structured text information is also used to assist in the determination. The preset structured text information is used to describe the user's attribute information and can provide the model with richer information when determining the second candidate label. If the first candidate label is different from the second candidate label, it may be that the first candidate label input by the user is inaccurate, or the second candidate label obtained by the label determination model is inaccurate. At this time, the non-structured weight of the non-structured text information and the structural weight of the preset structured text information are obtained, that is, the input vector of the label determination model is adjusted. The adjusted input vector is then used to obtain the final target label. This avoids label inaccuracies caused by the subjectivity of purely manual input. And based on the similarities and differences between the manually input labels and the labels initially obtained by the model, it is determined whether the input vector of the label determination model needs to be adjusted, so that the final target label is more in line with the unstructured text input by the user, rather than simply relying on manual input or model output.
[0035] In an exemplary embodiment of the present application, after step S200, the method further includes:
[0036] S500: If the first candidate tag is the same as the second candidate tag, the first candidate tag or the second candidate tag is determined as the target tag.
[0037] Specifically, if the first candidate tag is the same as the second candidate tag, it means that the first candidate tag input by the user is relatively objective and accurate. In this case, the first candidate tag or the second candidate tag is determined as the target tag.
[0038] In this embodiment, if the first and second candidate labels are identical, the subsequent weighting steps are unnecessary, reducing computer resource usage and improving processing efficiency. Furthermore, rather than relying solely on manual input, the output of the label determination model is used to verify the manually input label, improving the objectivity and accuracy of the final target label.
[0039] In an exemplary embodiment of the present application, step S300 includes:
[0040] S310: If the first candidate tag is different from the second candidate tag, obtain the correlation between the unstructured text information and the preset structured text information.
[0041] Specifically, if the first candidate label is different from the second candidate label, it means that the first candidate label input by the user may be inaccurate, or the second candidate label obtained by the label determination model may be inaccurate. At this time, the correlation between the unstructured text information and the preset structured text information is obtained. If the correlation is high, it means that the correlation between the preset structured text information and the unstructured text information is high. The higher the correlation, the higher the accuracy of the target label obtained by using the preset structured text information as the auxiliary input of the unstructured text information. Conversely, if the correlation is low, it means that the correlation between the preset structured text information and the unstructured text information is low. The lower the correlation, the lower the accuracy of the target label obtained by using the preset structured text information as the auxiliary input of the unstructured text information. That is, the preset structured text information may play a negative role in the determination of the target label.
[0042] S320, obtaining a non-structure weight and a structure weight according to the correlation between the non-structure text information and the preset structure text information; wherein the difference between the non-structure weight and the structure weight is inversely proportional to the correlation between the non-structure text information and the preset structure text information.
[0043] Specifically, the difference between the non-structural weight and the structural weight is inversely proportional to the correlation between the non-structural text information and the preset structural text information. The higher the correlation, the higher the accuracy of the target label obtained by using the preset structural text information as an auxiliary input of the non-structural text information. Therefore, the closer the non-structural weight and the structural weight values are, the smaller the difference between the non-structural weight and the structural weight is. Conversely, if the correlation is lower, the non-structural weight is larger and the structural weight is smaller, that is, the difference between the non-structural weight and the structural weight is larger.
[0044] This embodiment measures the importance of the preset structured text information for determining the target label of the unstructured text information based on the correlation between the unstructured text information and the preset structured text information. If the correlation between the preset structured text information and the unstructured text information is higher, the correlation between the content of the preset structured text information and the unstructured text information is higher. In this case, the preset structured text information is used as a supplementary description of the unstructured text information, making the obtained target label more accurate. Conversely, if the correlation between the preset structured text information and the unstructured text information is lower, the correlation between the content of the preset structured text information and the unstructured text information is lower. In this case, using the preset structured text information as a supplementary description of the unstructured text information may have a smaller or negative effect. In this case, the non-structured weight is larger and the structured weight is smaller, that is, the difference between the non-structured weight and the structured weight is increased. This weakens the influence of the preset structured text information on the target label determination to avoid reducing the accuracy of the target label determination.
[0045] In an exemplary embodiment of the present application, the correlation G between the unstructured text information and the preset structured text information meets the following characteristics:
[0046] G = a / (m+na);
[0047] Wherein, m is the number of entities contained in the unstructured text information; n is the number of entities contained in the preset structured text information; and a is the number of identical entities contained in the unstructured text information and the preset structured text information.
[0048] This embodiment performs entity extraction on unstructured text information and preset structured text information respectively, and obtains the proportion of identical entities in the total number of entities after deduplication. If G is larger, it means that the unstructured text information and the structured text information contain more identical entities, and the correlation between the two is higher; conversely, if G is smaller, it means that the unstructured text information and the structured text information contain fewer identical entities, that is, the correlation between the two is lower.
[0049] It should be noted that the above entity extraction method can be any entity extraction method known to those skilled in the art and will not be described in detail here.
[0050] In addition, the degree of association between the unstructured text information and the preset structured text information can also be determined through a semantic analysis model.
[0051] In an exemplary embodiment of the present application, step S400 includes:
[0052] S410: Obtain a text vector T based on the unstructured text information, the preset structured text information, the unstructured weight, and the structured weight; wherein T meets the following characteristics:
[0053] T = (αC, βD);
[0054] Among them, α is the non-structural weight; C is the feature vector corresponding to the non-structural text information; β is the structural weight; and D is the feature vector corresponding to the preset structured text information.
[0055] S420: Input the text vector into a label determination model to obtain a target label for the unstructured text information input by the user.
[0056] In this embodiment, after obtaining the non-structural weight and the structural weight, a text vector is derived based on the non-structural weight and the feature vector corresponding to the non-structural text information, and the structural weight and the feature vector corresponding to the preset structured text information. The non-structural weight and the structural weight respectively determine the importance of the non-structural text information and the preset structured text information in the text vector. Adjusting the text vector based on the weights is more flexible, resulting in a more accurate target label.
[0057] In an exemplary embodiment of the present application, after step S310, the method further includes:
[0058] S330: If the correlation is less than a preset correlation threshold, the preset structured text information is deleted to obtain an updated text vector W.
[0059] S340: Input W into a label determination model to obtain a target label for the unstructured text information input by the user.
[0060] In this embodiment, if the correlation is less than the preset correlation threshold, that is, the correlation between the preset structured text information and the preset structured text information is very low, then the preset structured text information is likely to have a negative effect on the determination of the target label. Therefore, the preset structured text information is deleted, and the eigenvalue corresponding to the preset structured text information portion in W can be filled with 0. Finally, W is input into the label determination model to obtain the target label of the unstructured text information input by the user. This avoids the accuracy of the target label determination by the preset structured text information. As an example: if the current unstructured text information is a message left by the user on the hospital's message system, the specific content of the message is feedback that the hospital's toilet is not clean, and the preset structured text information is the user's medical record information, then it can be seen that the medical record information basically has no effect on the process of determining the label of the unstructured text information, and if the eigenvector composed of the above message content and medical record information is input into the label determination model, the target label obtained may still be inaccurate due to the influence of the medical record information.
[0061] Please refer to Figure 2 As shown, an embodiment of the present application provides a text label determination device 100, the device comprising:
[0062] The first label acquisition unit 110 is configured to acquire the unstructured text information input by the user and a first candidate label corresponding to the unstructured text information; wherein the first candidate label is one of several preset candidate labels.
[0063] The second label acquisition unit 120 is used to obtain a second candidate label according to the unstructured text information, the preset structured text information and the label determination model; wherein the second candidate label is one of several preset candidate labels; the preset structured text information is used to describe the user's attribute information.
[0064] The weight determination unit 130 is configured to obtain a non-structural weight of the non-structural text information and a structural weight of the preset structural text information if the first candidate label is different from the second candidate label.
[0065] The label determination unit 140 is configured to obtain a target label for the non-structured text information input by the user based on the non-structured text information, the preset structured text information, the non-structured weight, the structured weight and the label determination model.
[0066] An embodiment of the present application further provides a computer program product, which includes program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method according to various exemplary embodiments of the present application described above in this specification.
[0067] Furthermore, although the steps of the method of the present application are described in a particular order in the accompanying drawings, this does not require or imply that the steps must be performed in this particular order, or that all steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0068] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
[0069] In an exemplary embodiment of the present application, an electronic device capable of implementing the above method is also provided.
[0070] Those skilled in the art will appreciate that various aspects of the present application can be implemented as systems, methods, or program products. Therefore, various aspects of the present application can be specifically implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation that combines hardware and software aspects, which may be collectively referred to herein as a "circuit," "module," or "system."
[0071] The electronic device according to this embodiment of the present application is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0072] The electronic device is implemented as a general-purpose computing device. Components of the electronic device may include, but are not limited to, the aforementioned at least one processor, the aforementioned at least one storage, and a bus connecting different system components (including the storage and the processor).
[0073] The storage stores program codes, which can be executed by the processor, so that the processor executes the steps described in the above “Exemplary Method” section of this specification according to various exemplary embodiments of the present application.
[0074] The memory may include readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory, and may further include read only memory (ROM).
[0075] The storage may also include a program / utility having a set (at least one) of program modules, such program modules including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0076] The bus may represent 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.
[0077] The electronic device may also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may communicate with one or more devices that enable a user to interact with the electronic device, and / or may communicate with any device that enables the electronic device to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface. Furthermore, the electronic device may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter. As shown, the network adapter communicates with other modules of the electronic device via a bus. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0078] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present application.
[0079] In exemplary embodiments of the present application, a computer-readable storage medium is also provided, on which is stored a program product capable of implementing the aforementioned methods of this specification. In some possible implementations, various aspects of the present application may also be implemented in the form of a program product, which includes program code. When the program product is executed on a terminal device, the program code is used to cause the terminal device to execute the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present application.
[0080] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0081] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0082] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0083] The program code for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0084] Furthermore, the above-mentioned figures are merely illustrative of the processes included in the methods according to exemplary embodiments of the present application and are not intended to be limiting. It is readily understood that the processes illustrated in the above-mentioned figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0085] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiment of the application, the features and functions of two or more modules or units described above can be concretized in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.
[0086] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A method for determining a text label, characterized in that: The method comprises: S100, obtaining unstructured text information input by a user and a first candidate tag corresponding to the unstructured text information; wherein the first candidate tag is one of several preset candidate tags; S200, obtaining a second candidate tag based on the unstructured text information, the preset structured text information, and the tag determination model; wherein the second candidate tag is one of a plurality of preset candidate tags; the preset structured text information is used to describe attribute information of the user; S300, if the first candidate label is different from the second candidate label, obtaining a non-structural weight of the non-structural text information and a structural weight of the preset structural text information; S400 , determining a model based on the unstructured text information, the preset structured text information, the unstructured weight, the structured weight and the label to obtain a target label for the unstructured text information input by the user.
2. The text label determination method according to claim 1, characterized in that: After step S200, the method further includes: S500: If the first candidate tag is the same as the second candidate tag, the first candidate tag or the second candidate tag is determined as the target tag.
3. The text label determination method according to claim 1, characterized in that: Step S300 includes: S310, if the first candidate tag is different from the second candidate tag, obtaining the correlation between the unstructured text information and the preset structured text information; S320, obtaining a non-structure weight and a structure weight according to the correlation between the non-structure text information and the preset structure text information; wherein the difference between the non-structure weight and the structure weight is inversely proportional to the correlation between the non-structure text information and the preset structure text information.
4. The text label determination method according to claim 3, characterized in that: The correlation G between unstructured text information and pre-set structured text information meets the following characteristics: G = a / (m+na); Wherein, m is the number of entities contained in the unstructured text information; n is the number of entities contained in the preset structured text information; and a is the number of identical entities contained in the unstructured text information and the preset structured text information.
5. The text label determination method according to claim 1, characterized in that: Step S400 includes: S410: Obtain a text vector T based on the unstructured text information, the preset structured text information, the unstructured weight, and the structured weight; wherein T meets the following characteristics: T = (αC, βD); Among them, α is the non-structural weight; C is the feature vector corresponding to the non-structural text information; β is the structural weight; D is the feature vector corresponding to the preset structured text information; S420: Input the text vector into a label determination model to obtain a target label for the unstructured text information input by the user.
6. The text label determination method according to claim 1, characterized in that: After step S310, the method further includes: S330, if the correlation is less than a preset correlation threshold, deleting the preset structured text information to obtain an updated text vector W; S340: Input W into a label determination model to obtain a target label for the unstructured text information input by the user.
7. A text label determination device, characterized in that: The device comprises: A first label acquisition unit is configured to acquire the unstructured text information input by the user and a first candidate label corresponding to the unstructured text information; wherein the first candidate label is one of several preset candidate labels; A second label acquisition unit is configured to obtain a second candidate label based on the unstructured text information, the preset structured text information, and the label determination model; wherein the second candidate label is one of a plurality of preset candidate labels; the preset structured text information is used to describe the attribute information of the user; a weight determination unit, configured to obtain a non-structural weight of the non-structural text information and a structural weight of the preset structural text information if the first candidate label is different from the second candidate label; The label determination unit is used to obtain the target label of the non-structured text information input by the user according to the non-structured text information, the preset structured text information, the non-structured weight, the structured weight and the label determination model.
8. A non-transitory computer-readable storage medium, characterized in that The storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the method according to any one of claims 1 to 6.
9. An electronic device, characterized in that: The device comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 8.
Citation Information
Patent Citations
Method for labeling customer service system log and customer service system
CN109033356A
Labeling method, recommendation method and recording medium
CN110147499A
Label determination method and device, computer equipment and storage medium
CN110674319A
User label weight evaluation method
CN111768213A
Text error correction method and device, electronic equipment and computer readable storage medium
CN113807973A