Method for identifying procurement category, computer device and computer readable storage medium
By segmenting and vectorizing the text of medical consumable procurement requirements using deep learning technology, and then using a pre-trained model to achieve automated category identification, the problem of low efficiency and inconsistent results in medical consumable category identification has been solved, thus improving identification efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-25
- Publication Date
- 2026-04-10
AI Technical Summary
The identification and classification of medical consumables mainly rely on manual labor, resulting in low identification efficiency, inconsistent results, and difficulty in ensuring data quality.
Using deep learning technology, the procurement requirement text is obtained, segmented, stop words are removed, and vectorized before being input into a pre-trained target category recognition model to automatically complete category recognition.
It improves the efficiency and accuracy of medical consumables category identification, reduces manual intervention, and ensures the consistency and accuracy of identification results.
Smart Images

Figure CN116610982B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of deep learning, in particular to a method for identifying a purchase category, a computer device and a computer readable storage medium. BACKGROUND
[0002] Medical consumables refer to substances that are converted into costs in the process of providing medical services to patients. Medical consumables are an important part of medical devices and account for a large proportion of medical devices. The quality of medical consumables is directly related to the physical and mental health of consumers, and the development level of the medical industry is directly related to the national economy and people's livelihood, which is an industry that the whole country and the whole people pay close attention to. Therefore, it is necessary to manage the procurement of medical consumables.
[0003] Due to the complex types of medical consumables, it is difficult to identify and classify the purchase categories. At present, the identification and classification of medical consumables are mainly performed manually, which not only consumes a lot of time, but also cannot permanently solve most data quality problems. Therefore, it is necessary to use deep learning technology to automatically, intelligently and in large quantities replace people to complete the identification of the categories of medical consumables, improve the efficiency of the identification of the categories of medical consumables and the accuracy of the identification results of the categories of medical consumables without relying on subjective judgment. SUMMARY
[0004] The present application provides a method for identifying a purchase category, a computer device and a computer readable storage medium, which aims to identify a purchase demand text based on a target category identification model to obtain an identification result with high accuracy. In particular, for the identification of the categories of medical consumables in the procurement process, the efficiency of the identification of the categories of medical consumables and the accuracy of the identification results of the categories of medical consumables can be improved.
[0005] To achieve the above-mentioned purpose, the present application provides a method for identifying a purchase category, which comprises:
[0006] obtaining a first purchase demand text and a purchase proper noun set;
[0007] obtaining a corresponding stop word set based on the first purchase demand text;
[0008] performing a word segmentation operation on the first purchase demand text based on the purchase proper noun set and the stop word set to obtain a first keyword set;
[0009] vectorizing the first keyword set, and inputting the vectorized first keyword set into a pre-trained target category identification model to obtain a category identification result.
[0010] To achieve the above object, the application further provides a computer device, comprising a memory and a processor; the memory is used for storing a computer program; the processor is used for executing the computer program and realizing the purchase category identification method provided by any one of the embodiments of the application when the computer program is executed.
[0011] In addition, to achieve the above object, the application further provides a computer readable storage medium, which stores a computer program, and the computer program makes the processor realize the purchase category identification method provided by any one of the embodiments of the application when the processor executes the computer program.
[0012] The purchase category identification method, the computer device and the computer readable storage medium disclosed by the embodiments of the application can perform word segmentation operation on the purchase demand text to obtain a keyword set when the purchase demand text is obtained. Further, the keyword set can be represented by vector, so that the trained category identification model can be applied to identify the purchase demand text, so as to obtain an identification result. With the help of the category identification model, the purchase category data identification work can be automatically and intelligently completed in large quantities, and the category identification efficiency and the accuracy of the category identification result can be improved without relying on subjective judgment of people. Especially for the category identification of medical consumables in the purchase process, the category identification efficiency and the accuracy of the category identification result of the medical consumables can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0013] In order to more clearly illustrate the technical solutions of the embodiments of the application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0014] Figure 1 is a scene schematic diagram of a purchase category identification method provided by an embodiment of the application;
[0015] Figure 2 is a step schematic diagram of a purchase category identification method provided by an embodiment of the application;
[0016] Figure 3 is a flow schematic diagram of training a target category identification model provided by an embodiment of the application;
[0017] Figure 4 is a schematic block diagram of a computer device provided by an embodiment of the application. DETAILED DESCRIPTION
[0018] With reference to the drawings and the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described. Obviously, the described embodiments are some of the embodiments of the present application, but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of the present application.
[0019] The flowcharts shown in the drawings are only exemplary, and do not necessarily include all the contents and operations / steps, nor are they necessarily executed in the order described. For example, some operations / steps can be further decomposed, combined or partially merged, so the actual execution order may be changed according to the actual situation. In addition, although the division of the functional modules is made in the device schematic diagram, in some cases, the division of the modules can be different from that in the device schematic diagram.
[0020] The term "and / or" used in the present application and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0021] Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The following embodiments and features in the embodiments can be combined with each other without conflict.
[0022] As shown in the Figure 1 The identification method of the procurement category provided by the embodiments of the present application can be applied to, for example, Figure 1The application environment shown. The application environment includes a terminal device 110 and a server 120, wherein the terminal device 110 can communicate with the server 120 through a network. Specifically, the server 120 obtains a first procurement demand text and a procurement proper noun set, and obtains a corresponding stop word set based on the first procurement demand text; further, the server 120 performs a word segmentation operation on the first procurement demand text based on the procurement proper noun set and the stop word set, obtains a first keyword set, and performs vectorization representation on the first keyword set. The first keyword set is input into a pre-trained target category identification model to obtain a category identification result, and finally the category identification result is sent to the terminal device 110. The server 120 can be an independent server, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content distribution networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. Basic cloud computing services such as platform. The terminal device 110 can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server can be directly or indirectly connected through wired or wireless communication, and the present application does not limit this.
[0023] In order to facilitate the understanding of the present application, the background art related to the present application is first explained.
[0024] Generally, category refers to the category or type of object. For procurement management of medical consumables, it is usually necessary to identify and classify the procurement category of procurement demand text, and then procure and manage different goods or services. However, due to the complex categories of medical consumables procurement, it is easy to have the problem of difficulty in identifying and classifying medical consumables procurement categories.
[0025] Since the current identification and classification of medical consumables procurement categories mainly rely on manual work, different staff may have difficulty in reaching a consensus on the classification rules, and therefore inconsistent identification results may occur. In addition, the procurement knowledge limitation of the staff themselves may lead to a lack of professional ability to control the quality of category data entry. This method of identifying categories by manual work not only consumes time and effort, but also is prone to errors.
[0026] Therefore, the present application proposes a procurement category identification method, computer device and computer readable storage medium, which can identify procurement demand text through a target category identification model, thereby obtaining an identification result with high accuracy.
[0027] Please refer toFigure 2 , Figure 2 is a step schematic diagram of a procurement category identification method provided by an embodiment of the present application. The procurement category identification method can be applied in a computer device, so that the procurement demand text can be identified based on a target category identification model, thereby obtaining a recognition result with high accuracy. As shown in Figure 2 , the procurement category identification method comprises steps S11 to S14.
[0028] Step S11: obtaining a first procurement demand text and a procurement proper noun set.
[0029] The first procurement demand text, i.e., the procurement demand text of the medical consumables to be identified, includes but is not limited to the demand name, demand background, demand content, key performance indicators, and selected supplier name of the medical consumables, etc., which are usually submitted by business parties. In addition, the first procurement demand text can also be a procurement demand text to be identified in other fields, which is not limited by the present application.
[0030] Further, the procurement proper noun set is obtained by collating the unique nouns appearing in a plurality of procurement demand texts of medical consumables, including but not limited to product-specific nouns, service-specific nouns, supplier names, technical specification names, etc., which are not limited by the present application.
[0031] Step S12: obtaining a corresponding stop word set based on the first procurement demand text.
[0032] The stop word set includes a plurality of stop words, which are words that have no actual meaning but often appear, such as but, and, the, also, etc. In the category identification process, deleting stop words can save storage space and thus improve identification efficiency. Therefore, a plurality of stop words can be collected based on the procurement demand text of medical consumables, thereby obtaining a stop word set.
[0033] Optionally, obtaining a corresponding stop word set based on the first procurement demand text comprises: performing a data cleaning operation on the first procurement demand text, wherein the data cleaning operation includes but is not limited to removing the valueless data and invalid characters of the first procurement demand text.
[0034] The data cleaning operation is a preprocessing operation on the data. By performing data cleaning operations such as removing valueless data and invalid characters on the procurement demand text of medical consumables, not only can the interference of irrelevant information on the recognition result be greatly reduced, but also the subsequent category identification efficiency of medical consumables can be ensured, and the accuracy of the category identification result of medical consumables is achieved.
[0035] It should be noted that the present application does not limit the above-mentioned worthless data and invalid characters, for example, the worthless data can be repeated data, error data, etc.; the invalid characters can be tab characters, operators, etc.
[0036] Therefore, on the basis of the above-mentioned embodiments, the corresponding stop word set can also be obtained based on the purchase text of the medical consumables after data cleaning, so that the stop word set can be obtained with high efficiency, thereby saving storage space and improving the efficiency of the category identification of medical consumables.
[0037] Step S13: performing a word segmentation operation on the first purchase demand text based on the purchase proper noun set and the stop word set to obtain a first keyword set.
[0038] The word segmentation operation is an operation of dividing a text into a sequence of words that can represent accurate semantics based on a predetermined standard. In a natural language processing task, the word segmentation effect will affect the results of entity recognition, semantic analysis, machine translation, information retrieval, etc. in subsequent processing tasks. Further, the first keyword set is a keyword set corresponding to the first purchase demand text, which can represent the comprehensive semantics of the purchase demand text of the medical consumables.
[0039] It should be noted that the technical means for implementing the word segmentation operation is not limited by the present application, for example, it can be obtained based on a machine learning algorithm or a deep learning algorithm through a base classifier or a dictionary design. The above methods all convert the word segmentation task into a word labeling task, thereby realizing the word segmentation operation.
[0040] Since the purchase demand text of the medical consumables contains many purchase proper nouns, the direct classification effect using the traditional base classifier is not ideal, therefore, the bidirectional maximum matching method (Bi-MM method) based on the dictionary can be used to perform the word segmentation operation on the purchase demand text of the medical consumables, compare the word segmentation results obtained by the forward maximum matching method and the results obtained by the reverse maximum matching method, then select the one with the least number of words as the result according to the maximum matching principle, so as to obtain the word segmentation result with high accuracy.
[0041] Optionally, the word segmentation operation on the first purchase demand text based on the purchase proper noun set and the stop word set to obtain the first keyword set comprises: performing a stop word removal operation on the first purchase demand text based on the stop word set; performing a word segmentation operation on the first purchase demand text after the stop word removal based on the purchase proper noun set to obtain the first purchase demand text after the word segmentation; and performing keyword extraction on the first purchase demand text after the word segmentation to obtain the first keyword set.
[0042] Specifically, the stop words in the medical consumable procurement demand text can be removed based on the stop word set, and then the medical consumable procurement demand text after removing the stop words can be segmented by the procurement proper noun set to obtain the segmented medical consumable procurement demand text. It can be understood that, since the items and service categories of the medical consumable procurement demand text are complex, the segmentation of the medical consumable procurement demand text based on the procurement proper noun can more accurately realize the segmentation of the unique terms in the medical consumable procurement demand text, such as the segmentation of product-specific terms or service-specific terms, supplier names, technical specification names, etc., to avoid errors caused by the segmentation of procurement-specific terms.
[0043] In the embodiment of the present application, the medical consumable procurement demand text can be segmented based on the procurement proper noun set and the stop word set to obtain a first keyword set that can represent the comprehensive semantics of the medical consumable procurement demand text. Furthermore, the segmentation of the first procurement demand text based on the procurement proper noun set and the stop word set corresponding to the medical consumable can not only obtain a higher-accuracy segmentation result, but also save storage space in the entire process of identifying the category of the medical consumable and improve the efficiency of identifying the category of the medical consumable.
[0044] Step S14: The first keyword set is vectorized and represented, and the vectorized first keyword set is input into a pre-trained target category identification model to obtain a category identification result.
[0045] The vectorization can represent the important information of the text and obtain the importance of the word in the text to reduce the dimension of the text and improve the efficiency of data mining, text classification, etc.
[0046] The embodiment of the present application can vectorize the first keyword set by natural language processing technology to obtain the vectorized first keyword set, i.e., the importance of each keyword in the medical consumable procurement demand text, to realize the identification of the category of the medical consumable based on the vectorized first keyword set.
[0047] It should be noted that the present application does not limit the method for realizing vectorization representation, for example, the natural language processing technology such as TF-IDF (Term Frequency-Inverse Document Frequency), word2vec (word to vector), fastText, BERT (Bidirectional Encoder Representations from Transformers), XLNet, etc. can be used to realize vectorization representation of the first keyword set, and the present application takes TF-IDF as an example for description.
[0048] TF-IDF is a statistical method for evaluating the importance of a word to a document or a file in a corpus. The main idea is that if a word or phrase appears frequently in an article (i.e., high TF) and rarely appears in other articles (i.e., high IDF), it is considered to have good class discrimination ability and is suitable for classification and identification.
[0049] Optionally, the first keyword set includes a plurality of first keywords, and the vectorization representation of the first keyword set includes: determining the term frequency corresponding to each first keyword based on the first procurement demand text; calculating the inverse document frequency index corresponding to each first keyword based on a preset inverse document frequency index algorithm; and multiplying the term frequency and the inverse document frequency index corresponding to each first keyword to obtain a plurality of first keyword feature value vectors.
[0050] The term frequency is the frequency of the first keyword in the medical consumable procurement demand text; and the inverse document frequency index can be obtained by the preset inverse document frequency index algorithm, and the present application does not limit the inverse document frequency index algorithm.
[0051] Optionally, the inverse document frequency index corresponding to each first keyword is calculated based on the preset inverse document frequency index algorithm, including: determining a target text set to which the first procurement demand text belongs, the target text set including a plurality of texts; counting the number of texts containing each first keyword in the target text set; and calculating the inverse document frequency index corresponding to each first keyword based on the number of texts containing each first keyword and the total number of texts in the target text set.
[0052] Specifically, after obtaining the number of texts containing each first keyword and the total number of texts in the target text set, the inverse document frequency index corresponding to each first keyword can be calculated by the following formula:
[0053]
[0054] wherein, the isf is an inverse text frequency index; the S is a total number of texts of a target text set; the t i is a first keyword; the s j is a text containing the first keyword; the |j:t i ∈s j is a number of texts containing each first keyword t i .
[0055] Further, after obtaining the inverse text frequency index corresponding to each first keyword, the term frequency corresponding to each first keyword and the inverse text frequency index can be multiplied to obtain a first keyword feature value vector corresponding to the first keyword. The first keyword feature vector can represent the importance of the first keyword in the medical consumable procurement demand text and can be used to identify the category information of the medical consumable procurement demand text.
[0056] Optionally, referring to Figure 3 , Figure 3 is a flowchart of a process for training a target category identification model according to an embodiment of the present application. As shown in the figure, before the vectorized first keyword set is input into the pre-trained target category identification model to obtain the category identification result, the process further includes: Figure 3
[0057] Step S21: training a machine learning model using a training set to obtain an initial category identification model.
[0058] wherein, the training set can be used to train the model and determine the parameters; the machine learning model includes but is not limited to a vector machine model, a random forest model, and a naive Bayes model, etc., which are not limited in the present application.
[0059] Optionally, training the machine learning model using the training set to obtain the initial category identification model includes: obtaining a second procurement demand text set, wherein the second procurement demand text set includes a plurality of second procurement demand texts; performing a word segmentation operation on the second procurement demand text set to obtain a second keyword set; vectorizing the second keyword set to obtain a second keyword feature value vector set; and using the second keyword feature value vector set as a training set to train the machine learning model to obtain the initial category identification model.
[0060] wherein, the second keyword set is a keyword set corresponding to the second procurement demand text set; and the second keyword feature value vector set is a feature value vector set corresponding to the second keyword set.
[0061] Specifically, the second purchase demand text set, the purchase-specific term set and the stopword set can be acquired, and then the second purchase demand text set is subjected to a word segmentation operation and vectorization representation based on the purchase-specific term set and the stopword set, so as to obtain a second keyword feature value vector set. Further, the second keyword feature value vector set can be input to the machine learning model as a training set, so that the machine learning model can be trained to obtain an initial category identification model.
[0062] It should be noted that the above description of the word segmentation operation and vectorization representation of the second purchase demand text set can refer to steps S12 to S14 to avoid repetition, which will not be described here.
[0063] Step S22: verifying the initial category identification model using the verification set to obtain a target category identification model.
[0064] Alternatively, the second purchase demand text further includes a category label corresponding to each second purchase demand text, and the initial category identification model is verified using the verification set to obtain a target category identification model, including: inputting a plurality of category labels to the initial category identification model as a verification set; and selecting the initial category identification model based on a preset condition to obtain a target category identification model.
[0065] The plurality of category labels refer to the category labels manually labeled by the medical consumables on the purchase demand text.
[0066] The embodiments of the present application can use a plurality of category labels of medical consumables as a verification set, and then input the purchase demand text of medical consumables containing a plurality of category labels to the initial category identification model to obtain a prediction result, i.e., a predicted category label. It can be understood that the accuracy and recall rate of the model can be obtained by judging whether the prediction result is consistent with the verification set. Further, the initial category identification model can be selected based on a preset condition to obtain a target category identification model.
[0067] It should be noted that the present application does not limit the preset condition, for example, the accuracy and recall rate of the model can be more than 95%.
[0068] The accuracy and recall are described in detail below. TP represents predicting a positive class as a positive class, FN represents predicting a positive class as a negative class, FP represents predicting a negative class as a positive class, and TN represents predicting a negative class as a negative class. The accuracy is for the prediction result, which indicates how many of the samples predicted as positive are true positive samples. Then there are two possibilities for predicting positive, one is to predict the positive class as a positive class (TP), and the other is to predict the negative class as a positive class (FP). If the correct rate is represented by P, then P = TP / (TP+FP). The recall is for the original sample, which indicates how many of the positive examples in the sample are predicted correctly. There are also two possibilities, one is to predict the original positive class as a positive class (TP), and the other is to predict the original positive class as a negative class (FN). If the recall is represented by R, then R = TP / (TP+FN).
[0069] Therefore, if the accuracy and recall of the prediction result exceed 95%, it indicates that the target category identification model has good effect, and if the accuracy and recall of the prediction result are less than 95%, it indicates that the target sequence labeling model has poor effect, and then the target sequence labeling model needs to be optimized by the corresponding method.
[0070] It should be noted that the optimization method of the model is not limited in the present application, for example, it can be gradient descent method, momentum method and RMSprop (Root Mean Square prop, root mean square transmission) method, etc.
[0071] The embodiment of the present application can take the second keyword feature value vector set as a training set to train the machine learning model to obtain an initial category identification model. Further, a plurality of category labels can be input into the initial category identification model as a verification set to obtain a target category identification model with higher accuracy and recall. Based on the obtained target category identification model, different medical consumable purchase demand texts can be identified by the target category identification model instead of manually, and the efficiency of medical consumable category identification is improved.
[0072] The purchase category identification method, computer device and computer readable storage medium disclosed in the embodiment of the present application can perform word segmentation operation on the purchase demand text to obtain a keyword set when the purchase demand text is obtained. Further, the keyword set can be represented by vector to enable the trained category identification model to identify the purchase demand text, so as to obtain an identification result. With the help of the category identification model, the purchase category data identification work can be automatically and intelligently completed in large quantities instead of by people, the category identification efficiency and the accuracy of the category identification result are improved without relying on subjective judgment of people. Especially for the category identification of medical consumables in the purchase process, the category identification efficiency and the accuracy of the category identification result of the medical consumables are improved.
[0073] The methods of this application can be implemented in a number of computing system environments or configurations. For example, personal computers, server computers, hand-held or laptop devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
[0074] By way of example, the methods, apparatuses described above can be implemented in the form of a computer program that can be run on a computer device as shown in Figure 4 .
[0075] Referring now to the Figure 4 , Figure 4 is a schematic diagram of a computer device provided by an embodiment of the present application. The computer device can be a server.
[0076] As shown in Figure 4 , the computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory can include a volatile storage medium, a non-volatile storage medium and an internal storage.
[0077] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions which, when executed, can cause the processor to perform any one of the identification methods of purchase categories.
[0078] The processor is configured to provide computing and control capabilities to support the operation of the entire computer device.
[0079] The internal storage provides an environment for the execution of the computer program in the non-volatile storage medium, which, when executed by the processor, can cause the processor to perform any one of the identification methods of purchase categories.
[0080] The network interface is configured to perform network communication, such as sending assigned tasks, etc. Those skilled in the art can understand that the structure of the computer device is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0081] It should be appreciated that the processor can be a central processing unit (CPU), the processor can also be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0082] In some embodiments, the processor is configured to run a computer program stored in the memory to perform the following steps: obtaining a first procurement demand text and a procurement-specific term set; obtaining a stopword set corresponding to the first procurement demand text based on the first procurement demand text; performing a word segmentation operation on the first procurement demand text based on the procurement-specific term set and the stopword set to obtain a first keyword set; performing vectorization representation on the first keyword set, and inputting the vectorized first keyword set into a pre-trained target category identification model to obtain a category identification result.
[0083] In some embodiments, the processor is further configured to perform a data cleaning operation on the first procurement demand text, wherein the data cleaning operation includes but is not limited to removing non-value data and invalid characters of the first procurement demand text; obtaining a stopword set corresponding to the first procurement text based on the data cleaning.
[0084] In some embodiments, the processor is further configured to perform a stopword removal operation on the first procurement demand text based on the stopword set; performing a word segmentation operation on the first procurement demand text after removing the stopword based on the procurement-specific term set to obtain the first procurement demand text after word segmentation; performing keyword extraction on the first procurement demand text after word segmentation to obtain the first keyword set.
[0085] In some embodiments, the processor is further configured to determine a term frequency corresponding to each of the first keywords based on the first procurement demand text; calculate an inverse text frequency index corresponding to each of the first keywords based on the preset inverse text frequency index algorithm; and multiply the term frequency and the inverse text frequency index corresponding to each of the first keywords to obtain a plurality of first keyword feature value vectors.
[0086] In some embodiments, the processor is further configured to determine a target text set to which the first procurement demand text belongs, the target text set comprising a plurality of texts; count the number of texts comprising each of the first keywords in the target text set; and calculate an inverse text frequency index corresponding to each of the first keywords based on the number of texts comprising each of the first keywords and the total number of texts in the target text set.
[0087] In some embodiments, the processor is further configured to train a machine learning model using a training set to obtain an initial product category identification model; and perform a verification operation on the initial product category identification model using a verification set to screen the target product category identification model.
[0088] In some embodiments, the processor is further configured to obtain a second set of procurement demand texts, wherein the second set of procurement demand texts comprises a plurality of second procurement demand texts; perform a word segmentation operation on the second set of procurement demand texts to obtain a second set of keywords; perform a vectorization representation on the second set of keywords to obtain a second set of keyword feature value vectors; and train a machine learning model using the second set of keyword feature value vectors as a training set to obtain the initial product category identification model.
[0089] In some embodiments, the processor is further configured to input a plurality of the product category labels as a verification set into the initial product category identification model; and perform a screening on the initial product category identification model based on a preset condition to obtain the target product category identification model.
[0090] Embodiments of the present application also provide a computer readable storage medium having a computer program stored thereon, the computer program comprising program instructions, the program instructions being executed to implement any of the product category identification methods provided by embodiments of the present application.
[0091] The computer readable storage medium can be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. The computer readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc.
[0092] Further, the computer readable storage medium can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required by a function, etc.; and the data storage area can store data created according to the use of the blockchain node, etc.
[0093] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method of identifying a procurement category, characterized by, The method comprises: obtaining a first procurement demand text and a procurement proper noun set; wherein the procurement proper noun set is obtained based on a plurality of procurement demand texts and comprises a domain dictionary of at least one of product proper nouns, service proper nouns, supplier names and technical specification names; obtaining a corresponding stop word set based on the first procurement demand text; performing a word segmentation operation on the first procurement demand text based on the procurement proper noun set and the stop word set by using a bidirectional maximum matching method to obtain a first keyword set; vectorizing the first keyword set and inputting the vectorized first keyword set into a pre-trained target category identification model to obtain a category identification result.
2. The method of claim 1, wherein, Before the step of obtaining a corresponding stop word set based on the first procurement demand text, the method comprises: performing a data cleaning operation on the first procurement demand text, wherein the data cleaning operation comprises but is not limited to removing worthless data and invalid characters in the first procurement demand text; the step of obtaining a corresponding stop word set based on the first procurement demand text, comprises: obtaining a corresponding stop word set based on the first procurement demand text after data cleaning.
3. The method of claim 1, wherein, The step of performing a word segmentation operation on the first procurement demand text based on the procurement proper noun set and the stop word set to obtain a first keyword set, comprises: performing a stop word removal operation on the first procurement demand text based on the stop word set; performing a word segmentation operation on the first procurement demand text after stop word removal based on the procurement proper noun set to obtain the first procurement demand text after word segmentation; performing keyword extraction on the first procurement demand text after word segmentation to obtain the first keyword set.
4. The method of claim 1, wherein, The first keyword set comprises a plurality of first keywords, and the step of vectorizing the first keyword set comprises: determining a term frequency corresponding to each first keyword based on the first procurement demand text; calculating an inverse document frequency index corresponding to each first keyword based on a preset inverse document frequency index algorithm; multiplying the term frequency and the inverse document frequency index corresponding to each first keyword to obtain a plurality of first keyword feature value vectors.
5. The method of claim 4, wherein, The step of calculating an inverse document frequency index corresponding to each first keyword based on the preset inverse document frequency index algorithm comprises: determining a target text set to which the first procurement demand text belongs, wherein the target text set comprises a plurality of texts; counting the number of texts containing each first keyword in the target text set; calculating an inverse document frequency index corresponding to each first keyword based on the number of texts containing each first keyword and the total number of texts in the target text set.
6. The method of claim 1, wherein, Before the step of inputting the vectorized first keyword set into a pre-trained target category identification model to obtain a category identification result, the method further comprises: training a machine learning model using a training set to obtain an initial category identification model; verifying the initial category identification model using a verification set to screen the target category identification model.
7. The method of claim 6, wherein, The training set is used to train the machine learning model to obtain an initial category identification model, and the method comprises the following steps: obtaining a second set of procurement demand texts, wherein the second set of procurement demand texts comprises a plurality of second procurement demand texts; performing a word segmentation operation on the second set of procurement demand texts to obtain a second set of keywords; vectorizing the second set of keywords to obtain a second set of keyword feature value vectors; training a machine learning model using the second set of keyword feature value vectors as a training set to obtain the initial category identification model.
8. The method of claim 7, wherein, The second procurement demand text further comprises a category label corresponding to each second procurement demand text, and the initial category identification model is verified using a verification set to obtain the target category identification model, and the method comprises the following steps: inputting a plurality of category labels into the initial category identification model as a verification set; filtering the initial category identification model based on a preset condition to obtain the target category identification model.
9. A computer device, comprising: The computer device comprises a memory and a processor; The memory is configured to store a computer program; The processor is configured to execute the computer program and implement the steps of the procurement category identification method according to any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to enable the processor to implement the steps of the procurement category identification method according to any one of claims 1-8.
Citation Information
Patent Citations
Text classification method and device, computer equipment and storage medium
CN113011533A