Method and device for determining labels of enterprise user portraits based on transaction data
By performing word segmentation, part-of-speech tagging and named entity recognition on historical transaction data, combined with keyword and high-frequency word extraction, the tags of enterprise user portraits are extracted, which solves the problem of incomplete dimensions of enterprise portraits in the existing technology and achieves accurate supply. Cargo capacity assessment and procurement strategy formulation.
Patent Information
- Application Number
- CN202011416409.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-07
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2040-12-07
AI Technical Summary
The existing corporate portrait dimensions are not comprehensive, and it is impossible to accurately know the company's supply capabilities, which affects the formulation of product procurement strategies.
By obtaining historical transaction data, perform word segmentation, part-of-speech tagging, and named entity recognition, and use keyword extraction and high-frequency word extraction methods to extract labels for corporate user portraits to reflect the company's supply capabilities.
Effectively determine the labels of corporate user portraits, help you understand the company's supply capabilities when purchasing products, formulate the best purchasing strategy, and improve the accuracy and efficiency of purchasing decisions.
Smart Images

Figure CN112528632B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to a method, device, electronic device and readable storage medium for determining a label of an enterprise user portrait based on transaction data. Background Art
[0002] In the relevant technical solutions, the dimensions used to describe the enterprise portrait mainly include three dimensions: the enterprise's basic attributes, the enterprise's operating conditions, and the enterprise's risk information.
[0003] Technical personnel in this field have discovered that the dimensions reflected in existing corporate portraits are not comprehensive, and when suppliers purchase products, it is impossible to know the company's commodity supply capacity. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art or related art.
[0005] To this end, a first aspect of the present invention is to provide a method for determining labels for enterprise user portraits based on transaction data.
[0006] A second aspect of the present invention is to provide a device for determining labels of enterprise user portraits based on transaction data.
[0007] A third aspect of the present invention provides an electronic device.
[0008] A fourth aspect of the present invention provides a readable storage medium.
[0009] In view of this, according to a first aspect of the present invention, the present invention provides a method for determining labels for enterprise user portraits based on transaction data, including: obtaining historical transaction data; segmenting the historical transaction data; performing part-of-speech tagging on the data obtained by the word segmentation, and counting the data with the part of speech being nouns to obtain a first data set; performing named entity recognition on the data obtained by the word segmentation to obtain a second data set; determining a third data set based on the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set; and determining labels for enterprise user portraits based on transaction data from the third data set by extracting keywords and high-frequency words.
[0010] The technical solution of the present invention proposes a method for determining labels of enterprise user portraits based on transaction data. Through this method, labels of enterprise user portraits determined according to historical transaction data can be obtained, so that when purchasing products, the supply capacity of the enterprise can be known according to the label, thereby facilitating the determination of the best procurement strategy.
[0011] Specifically, the product itself has a noun attribute. Based on this feature, the historical transaction data can be segmented, and the data obtained by the segmentation can be tagged with parts of speech. The data with the part of speech being nouns can be counted to obtain a first data set, and the data obtained by the segmentation can be subjected to named entity recognition to obtain a second data set. Named entity recognition can be understood as comparing the previously stored product names with the data obtained by the segmentation, screening out the data with the same product name as the previously stored product name, and constructing the second data set based on the data.
[0012] In addition, the historical transaction data itself has a time attribute. Therefore, the third data set determined by the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set can reflect the supply situation of the company's goods in the previous period of time.
[0013] It is worth pointing out that, usually, the data in the third data set may be relatively large. If they are displayed at the same time, there will be too many labels, and it will be impossible to reflect the main selling products of the enterprise. In order to reduce the occurrence of the above situation, keyword extraction and high-frequency word extraction are used to extract data from the third data set. The popular products in the historical transaction data of the enterprise are screened out by keyword extraction and high-frequency word extraction, so that when purchasing products, the supply capacity of the enterprise can be known according to the label, which makes it easier to determine the best purchasing strategy.
[0014] In any of the above technical solutions, before the step of determining the third data set based on the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set, it also includes: receiving an input operation on the historical transaction data to obtain a fourth data set; determining the similarity based on the first data set, the weight value corresponding to the first data set, the second data set, the weight value corresponding to the second data set, and the fourth data set; and determining the weight value corresponding to the first data set and the weight value corresponding to the second data set based on the similarity by using the least squares method.
[0015] In this technical solution, an input operation of historical transaction data is received so that the historical transaction data can be manually labeled to form a fourth data set, wherein the fourth data set can be understood as a business label. By pre-constructing the fourth data set, after determining the first data set and the second data set, the weight value corresponding to the first data set and the weight value corresponding to the second data set can be determined according to the similarity.
[0016] In this process, since the weight values corresponding to the first data set and the weight values corresponding to the second data set are not set arbitrarily but determined by similarity comparison based on historical transaction data, the rationality of the weight values corresponding to the first data set and the weight values corresponding to the second data set are improved, and the credibility of the labels of the enterprise user portraits determined based on historical transaction data is improved.
[0017] In any of the above technical solutions, the step of determining the third data set based on the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set specifically includes: determining the fifth data set based on the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set; determining the time data in the historical transaction data; determining the time coefficient of the fifth data set based on the comparison result between the time data and the set time data; and taking the product of the fifth data set and the time coefficient of the fifth data set as the third data set.
[0018] In this technical solution, considering that the main products sold by the company in each period are different, if the products are not distinguished in the time dimension, the company's historical main products will become labels, while in actual production, the products have been discontinued. In order to avoid the above situation, the technical solution of the present application obtains the time data in the historical transaction data, and compares the time data with the set time data to obtain the time coefficient, and determines the fifth data set based on the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set according to the time coefficient to add the time weight.
[0019] In the above technical solution, the label of the enterprise user portrait determined based on the historical transaction data can reflect the enterprise's historical main products, reducing the impact of time factors on the label of the enterprise user portrait determined based on the historical transaction data.
[0020] In any of the above technical solutions, the step of determining the third data set based on the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set also includes: using a word vector training method to perform data mining on the data in the third data set to obtain a similarity coefficient; and correcting the third data set based on the similarity coefficient.
[0021] In this technical solution, considering that the third data set can only reflect the transaction status of a part of the goods but cannot reflect the transaction status of a category of goods, in order to reduce the occurrence of the above situation, the method of training word vectors will be used to perform data mining on the data in the third data set to obtain the similarity coefficient. The third data set will be corrected by the similarity coefficient to expand the data contained in the third data set, so that the label of the enterprise user portrait determined based on the historical transaction data can reflect the transaction status of a category of goods, so that when purchasing products, the supply capacity of the enterprise can be known according to the label, which is conducive to determining the best procurement strategy.
[0022] In any of the above technical solutions, the labels of the enterprise user portrait based on transaction data include first-category labels and second-category labels; the step of determining the labels of the enterprise user portrait based on transaction data from the third data set by using keyword extraction and high-frequency word extraction specifically includes: determining the sixth data set from the third data set by using keyword extraction; determining the seventh data set from the third data set by using high-frequency word extraction; using the data in the intersection of the sixth data set and the seventh data set as the first-category labels, and using the data in the union of the sixth data set and the seventh data set as the second-category labels.
[0023] In this technical solution, the first type of label is the data in the intersection of the sixth data set and the seventh data set, that is, it is determined by the above two methods. Compared with the second type of label, it contains less data, and therefore, it can represent the main products of the enterprise, while the second type of label contains more data, so it can represent all the products of the enterprise. By outputting one or two types of products above, when purchasing products, the supply capacity of the enterprise can be known according to the label, which makes it easier to determine the best purchasing strategy.
[0024] According to a second aspect of the present invention, the present invention provides a device for determining labels of enterprise user portraits based on transaction data, comprising: an acquisition unit for acquiring historical transaction data; a division unit for segmenting the historical transaction data; an identification unit for performing part-of-speech tagging on the data obtained by the word segmentation, and counting the data with the part of speech being nouns to obtain a first data set; and performing named entity recognition on the data obtained by the word segmentation to obtain a second data set; a determination unit for determining a third data set based on the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set; and determining labels of enterprise user portraits based on transaction data from the third data set by extracting keywords and high-frequency words.
[0025] The technical solution of the present application proposes a label determination device for enterprise user portraits based on transaction data, which includes an acquisition unit, an identification unit and a determination unit.
[0026] Specifically, through this device, a label of the enterprise user portrait determined based on historical transaction data can be obtained, so that when purchasing products, the enterprise's supply capacity can be known based on the label, which makes it easier to determine the best purchasing strategy.
[0027] Specifically, the product itself has a noun attribute. Based on this feature, the historical transaction data can be segmented, and the data obtained by the segmentation can be tagged with parts of speech. The data with the part of speech being nouns can be counted to obtain a first data set, and the data obtained by the segmentation can be subjected to named entity recognition to obtain a second data set. Named entity recognition can be understood as comparing the previously stored product names with the data obtained by the segmentation, screening out the data with the same product name as the previously stored product name, and constructing the second data set based on the data.
[0028] In addition, the historical transaction data itself has a time attribute. Therefore, the third data set determined by the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set can reflect the supply situation of the company's goods in the previous period of time.
[0029] It is worth pointing out that, usually, the data in the third data set may be relatively large. If they are displayed at the same time, there will be too many labels, and it will be impossible to reflect the main selling products of the enterprise. In order to reduce the occurrence of the above situation, keyword extraction and high-frequency word extraction are used to extract data from the third data set. The popular products in the historical transaction data of the enterprise are screened out by keyword extraction and high-frequency word extraction, so that when purchasing products, the supply capacity of the enterprise can be known according to the label, which makes it easier to determine the best purchasing strategy.
[0030] In addition, the label determination device based on the enterprise user portrait of transaction data in the above technical solution provided by the present invention may also have the following additional technical features:
[0031] In any of the above technical solutions, the determination unit is also used to: receive input operations on historical transaction data to obtain a fourth data set; determine the similarity based on the first data set, the weight value corresponding to the first data set, the second data set, the weight value corresponding to the second data set, and the fourth data set; and determine the weight value corresponding to the first data set and the weight value corresponding to the second data set based on the similarity by using the least squares method.
[0032] In this technical solution, an input operation of historical transaction data is received so that the historical transaction data can be manually labeled to form a fourth data set, wherein the fourth data set can be understood as a business label. By pre-constructing the fourth data set, after determining the first data set and the second data set, the weight value corresponding to the first data set and the weight value corresponding to the second data set can be determined according to the similarity.
[0033] In this process, since the weight values corresponding to the first data set and the weight values corresponding to the second data set are not set arbitrarily but determined by similarity comparison based on historical transaction data, the rationality of the weight values corresponding to the first data set and the weight values corresponding to the second data set are improved, and the credibility of the labels of the enterprise user portraits determined based on historical transaction data is improved.
[0034] In any of the above technical solutions, the determination unit is specifically used to: determine the fifth data set based on the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set; determine the time data in the historical transaction data; determine the time coefficient of the fifth data set based on the comparison result between the time data and the set time data; and use the product of the fifth data set and the time coefficient of the fifth data set as the third data set.
[0035] In this technical solution, considering that the main products sold by the company in each period are different, if the products are not distinguished in the time dimension, the company's historical main products will become labels, while in actual production, the products have been discontinued. In order to avoid the above situation, the technical solution of the present application obtains the time data in the historical transaction data, and compares the time data with the set time data to obtain the time coefficient, and determines the fifth data set based on the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set according to the time coefficient to add the time weight.
[0036] In the above technical solution, the label of the enterprise user portrait determined based on the historical transaction data can reflect the enterprise's historical main products, reducing the impact of time factors on the label of the enterprise user portrait determined based on the historical transaction data.
[0037] In any of the above technical solutions, the determination unit is further used to: use a method of training word vectors to perform data mining on the data in the third data set to obtain a similarity coefficient; and modify the third data set according to the similarity coefficient.
[0038] In this technical solution, considering that the third data set can only reflect the transaction status of a part of the goods but cannot reflect the transaction status of a category of goods, in order to reduce the occurrence of the above situation, the method of training word vectors will be used to perform data mining on the data in the third data set to obtain the similarity coefficient. The third data set will be corrected by the similarity coefficient to expand the data contained in the third data set, so that the label of the enterprise user portrait determined based on the historical transaction data can reflect the transaction status of a category of goods, so that when purchasing products, the supply capacity of the enterprise can be known according to the label, which is conducive to determining the best procurement strategy.
[0039] In any of the above technical solutions, the labels of the enterprise user portraits based on transaction data include first-category labels and second-category labels; the determination unit is specifically used to: determine the sixth data set from the third data set by keyword extraction; determine the seventh data set from the third data set by high-frequency word extraction; use the data in the intersection of the sixth data set and the seventh data set as the first-category label, and use the data in the union of the sixth data set and the seventh data set as the second-category label.
[0040] In this technical solution, the first type of label is the data in the intersection of the sixth data set and the seventh data set, that is, it is determined by the above two methods. Compared with the second type of label, it contains less data, and therefore, it can represent the main products of the enterprise, while the second type of label contains more data, so it can represent all the products of the enterprise. By outputting one or two types of products above, when purchasing products, the supply capacity of the enterprise can be known according to the label, which makes it easier to determine the best purchasing strategy.
[0041] According to the third aspect of the present invention, the present invention provides an electronic device, comprising: a memory, a computer program stored on the memory; a controller, the controller executing the computer program to implement the steps of the method for determining a label based on enterprise user portraits based on transaction data as in any one of the first aspect, and having all the beneficial technical effects of the method for determining a label based on enterprise user portraits based on transaction data provided by any one of the embodiments of the first aspect. Therefore, the electronic device provided by the embodiments of the present invention has all the beneficial effects of the method for determining a label based on enterprise user portraits based on transaction data provided by any one of the embodiments of the first aspect, which are not listed one by one here.
[0042] According to the fourth aspect of the present invention, the present invention provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, it implements: the steps of the method for determining a label of an enterprise user portrait based on transaction data as in any one of the first aspect. It has all the beneficial technical effects of the method for determining a label of an enterprise user portrait based on transaction data provided by any embodiment of the first aspect, therefore, the readable storage medium provided by the embodiment of the present invention has all the beneficial effects of the method for determining a label of an enterprise user portrait based on transaction data provided by any embodiment of the first aspect, which are not listed one by one here.
[0043] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0045] Figure 1 A schematic flow chart of a method for determining a label based on a corporate user portrait of transaction data according to an embodiment of the present invention is shown;
[0046] Figure 2 A schematic diagram of a process for determining a weight value corresponding to a first data set and a weight value corresponding to a second data set according to an embodiment of the present invention is shown;
[0047] Figure 3 A schematic diagram of a process for determining a third data set according to an embodiment of the present invention is shown;
[0048] Figure 4 A schematic diagram of a process of correcting a third data set according to an embodiment of the present invention is shown;
[0049] Figure 5 A schematic diagram of a process of determining a label of an enterprise user portrait based on transaction data from a third data set by extracting keywords and high-frequency words according to an embodiment of the present invention is shown;
[0050] Figure 6 A schematic block diagram of a device for determining a label based on a corporate user portrait of transaction data according to an embodiment of the present invention is shown;
[0051] Figure 7 A schematic block diagram showing a label of an enterprise user portrait based on transaction data according to an embodiment of the present invention;
[0052] Figure 8A schematic block diagram of a function for determining a tag weight according to an embodiment of the present invention is shown;
[0053] Fig. 9 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0054] In order to more clearly understand the above aspects, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0055] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0056] Embodiment 1
[0057] According to a first aspect of the present invention, Figure 1 As shown, the present invention provides a method for determining a label of an enterprise user portrait based on transaction data, which specifically includes:
[0058] Step 102, obtaining historical transaction data;
[0059] Step 104, segment the historical transaction data;
[0060] Step 106, performing part-of-speech tagging on the data obtained by word segmentation, counting the data whose part of speech is noun to obtain a first data set; performing named entity recognition on the data obtained by word segmentation to obtain a second data set;
[0061] Step 108, determining a third data set according to the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set;
[0062] Step 110 , determine the label of the enterprise user portrait based on the transaction data from the third data set by extracting keywords and high-frequency words.
[0063] An embodiment of the present invention proposes a method for determining labels of enterprise user portraits based on transaction data. Through this method, labels of enterprise user portraits determined according to historical transaction data can be obtained, so that when purchasing products, the supply capacity of the enterprise can be known based on the labels, thereby facilitating the determination of the best purchasing strategy.
[0064] Specifically, the product itself has a noun attribute. Based on this feature, the historical transaction data can be segmented, and the data obtained by the segmentation can be tagged with parts of speech. The data with the part of speech being nouns can be counted to obtain a first data set, and the data obtained by the segmentation can be subjected to named entity recognition to obtain a second data set. Named entity recognition can be understood as comparing the previously stored product names with the data obtained by the segmentation, screening out the data with the same product name as the previously stored product name, and constructing the second data set based on the data.
[0065] In addition, the historical transaction data itself has a time attribute. Therefore, the third data set determined by the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set can reflect the supply situation of the company's goods in the previous period of time.
[0066] It is worth pointing out that, usually, the data in the third data set may be relatively large. If they are displayed at the same time, there will be too many labels, and it will be impossible to reflect the main selling products of the enterprise. In order to reduce the occurrence of the above situation, keyword extraction and high-frequency word extraction are used to extract data from the third data set. The popular products in the historical transaction data of the enterprise are screened out by keyword extraction and high-frequency word extraction, so that when purchasing products, the supply capacity of the enterprise can be known according to the label, which makes it easier to determine the best purchasing strategy.
[0067] In any of the above embodiments, if Figure 2 As shown, before the step of determining the third data set according to the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set, the step further includes:
[0068] Step 202, receiving an input operation on historical transaction data to obtain a fourth data set;
[0069] Step 204, determining similarity according to the first data set, the weight value corresponding to the first data set, the second data set, the weight value corresponding to the second data set, and the fourth data set;
[0070] Step 206: Determine the weight value corresponding to the first data set and the weight value corresponding to the second data set by using the least square method according to the similarity.
[0071] In this embodiment, an input operation of historical transaction data is received so that the historical transaction data can be manually labeled to form a fourth data set, wherein the fourth data set can be understood as a business label. By pre-constructing the fourth data set, after determining the first data set and the second data set, the weight value corresponding to the first data set and the weight value corresponding to the second data set can be determined according to the similarity.
[0072] In this process, since the weight values corresponding to the first data set and the weight values corresponding to the second data set are not set arbitrarily but determined by similarity comparison based on historical transaction data, the rationality of the weight values corresponding to the first data set and the weight values corresponding to the second data set are improved, and the credibility of the labels of the enterprise user portraits determined based on historical transaction data is improved.
[0073] In any of the above embodiments, if Figure 3 As shown, the step of determining the third data set according to the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set specifically includes:
[0074] Step 302, determining a fifth data set according to the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set;
[0075] Step 304, determining time data in the historical transaction data;
[0076] Step 306, determining a time coefficient of the fifth data set according to a comparison result between the time data and the set time data;
[0077] Step 308: The product of the fifth data set and the time coefficient of the fifth data set is used as the third data set.
[0078] In this embodiment, taking into account that the main products sold by the company in each period are different, if the products are not differentiated in the time dimension, the company's historical main products will become labels, while in actual production, the products have been discontinued. In order to avoid the above situation, the embodiment of the present application obtains time data in historical transaction data, and compares the time data with the set time data to obtain a time coefficient, and determines the fifth data set based on the time coefficient, which is composed of the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set. The time weight is added.
[0079] In the above embodiment, the label of the enterprise user portrait determined based on the historical transaction data can reflect the enterprise's historical main products, reducing the impact of time factors on the label of the enterprise user portrait determined based on the historical transaction data.
[0080] In any of the above embodiments, if Figure 4 As shown, the step of determining the third data set according to the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set also includes:
[0081] Step 402, using a word vector training method to perform data mining on the data in the third data set to obtain a similarity coefficient;
[0082] Step 404: modify the third data set according to the similarity coefficient.
[0083] In this embodiment, considering that the third data set can only reflect the transaction status of a part of the commodities but cannot reflect the transaction status of a category of commodities, in order to reduce the occurrence of the above situation, the method of training word vectors will be used to perform data mining on the data in the third data set to obtain a similarity coefficient. The third data set will be corrected by the similarity coefficient to expand the data contained in the third data set, so that the label of the enterprise user portrait determined based on the historical transaction data can reflect the transaction status of a category of commodities, so that when purchasing products, the supply capacity of the enterprise can be known according to the label, which makes it easier to determine the best procurement strategy.
[0084] In any of the above embodiments, the labels of the enterprise user portrait based on the transaction data include first-category labels and second-category labels; Figure 5 As shown, the steps of determining the labels of the enterprise user portrait based on the transaction data from the third data set by extracting keywords and high-frequency words specifically include:
[0085] Step 502, determining a sixth data set from the third data set by extracting keywords;
[0086] Step 504, determining a seventh data set from the third data set by extracting high-frequency words;
[0087] Step 506: Use the data in the intersection of the sixth data set and the seventh data set as the first type of label, and use the data in the union of the sixth data set and the seventh data set as the second type of label.
[0088] In this embodiment, the first type of label is the data in the intersection of the sixth data set and the seventh data set, that is, it is determined by the above two methods. Compared with the second type of label, it contains less data, and therefore, it can represent the main products of the enterprise, while the second type of label contains more data, so it can represent all the products of the enterprise. By outputting one or two categories of products above, when purchasing products, the supply capacity of the enterprise can be known according to the label, which makes it easier to determine the best procurement strategy.
[0089] According to a second aspect of the present invention, Figure 6 As shown, the present invention provides a device 600 for determining labels of enterprise user portraits based on transaction data, including: an acquisition unit 602, used to acquire historical transaction data; a division unit 604, used to segment the historical transaction data; an identification unit 606, used to perform part-of-speech tagging on the data obtained by word segmentation, and count the data with noun parts of speech to obtain a first data set; and perform named entity recognition on the data obtained by word segmentation to obtain a second data set; a determination unit 608, used to determine a third data set based on the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set; and determine the labels of the enterprise user portraits based on the transaction data from the third data set by extracting keywords and high-frequency words.
[0090] An embodiment of the present application proposes a label determination device 600 for enterprise user portraits based on transaction data, which includes an acquisition unit 602 , an identification unit 606 and a determination unit 608 .
[0091] Specifically, through this device, a label of the enterprise user portrait determined based on historical transaction data can be obtained, so that when purchasing products, the enterprise's supply capacity can be known based on the label, which makes it easier to determine the best purchasing strategy.
[0092] Specifically, the product itself has a noun attribute. Based on this feature, the historical transaction data can be segmented, and the data obtained by the segmentation can be tagged with parts of speech. The data with the part of speech being nouns can be counted to obtain a first data set, and the data obtained by the segmentation can be subjected to named entity recognition to obtain a second data set. Named entity recognition can be understood as comparing the previously stored product names with the data obtained by the segmentation, screening out the data with the same product name as the previously stored product name, and constructing the second data set based on the data.
[0093] In addition, the historical transaction data itself has a time attribute. Therefore, the third data set determined by the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set can reflect the supply situation of the company's goods in the previous period of time.
[0094] It is worth pointing out that, usually, the data in the third data set may be relatively large. If they are displayed at the same time, there will be too many labels, and it will be impossible to reflect the main selling products of the enterprise. In order to reduce the occurrence of the above situation, keyword extraction and high-frequency word extraction are used to extract data from the third data set. The popular products in the historical transaction data of the enterprise are screened out by keyword extraction and high-frequency word extraction, so that when purchasing products, the supply capacity of the enterprise can be known according to the label, which makes it easier to determine the best purchasing strategy.
[0095] In addition, the label determination device 600 based on the enterprise user portrait of transaction data in the above embodiment provided by the present invention may also have the following additional technical features:
[0096] In any of the above embodiments, the determination unit 608 is also used to: receive an input operation on historical transaction data to obtain a fourth data set; determine the similarity based on the first data set, the weight value corresponding to the first data set, the second data set, the weight value corresponding to the second data set, and the fourth data set; and determine the weight value corresponding to the first data set and the weight value corresponding to the second data set based on the similarity using the least squares method.
[0097] In this embodiment, an input operation of historical transaction data is received so that the historical transaction data can be manually labeled to form a fourth data set, wherein the fourth data set can be understood as a business label. By pre-constructing the fourth data set, after determining the first data set and the second data set, the weight value corresponding to the first data set and the weight value corresponding to the second data set can be determined according to the similarity.
[0098] In this process, since the weight values corresponding to the first data set and the weight values corresponding to the second data set are not set arbitrarily but determined by similarity comparison based on historical transaction data, the rationality of the weight values corresponding to the first data set and the weight values corresponding to the second data set are improved, and the credibility of the labels of the enterprise user portraits determined based on historical transaction data is improved.
[0099] In any of the above embodiments, the determination unit 608 is specifically used to: determine the fifth data set based on the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set; determine the time data in the historical transaction data; determine the time coefficient of the fifth data set based on the comparison result between the time data and the set time data; and use the product of the fifth data set and the time coefficient of the fifth data set as the third data set.
[0100] In this embodiment, taking into account that the main products sold by the company in each period are different, if the products are not differentiated in the time dimension, the company's historical main products will become labels, while in actual production, the products have been discontinued. In order to avoid the above situation, the embodiment of the present application obtains time data in historical transaction data, and compares the time data with the set time data to obtain a time coefficient, and determines the fifth data set based on the time coefficient, which is composed of the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set. The time weight is added.
[0101] In the above embodiment, the label of the enterprise user portrait determined based on the historical transaction data can reflect the enterprise's historical main products, reducing the impact of time factors on the label of the enterprise user portrait determined based on the historical transaction data.
[0102] In any of the above embodiments, the determination unit 608 is further configured to: perform data mining on the data in the third data set by using a method of training word vectors to obtain a similarity coefficient; and modify the third data set according to the similarity coefficient.
[0103] In this embodiment, considering that the third data set can only reflect the transaction status of a part of the commodities but cannot reflect the transaction status of a category of commodities, in order to reduce the occurrence of the above situation, the method of training word vectors will be used to perform data mining on the data in the third data set to obtain a similarity coefficient. The third data set will be corrected by the similarity coefficient to expand the data contained in the third data set, so that the label of the enterprise user portrait determined based on the historical transaction data can reflect the transaction status of a category of commodities, so that when purchasing products, the supply capacity of the enterprise can be known according to the label, which makes it easier to determine the best procurement strategy.
[0104] In any of the above embodiments, the labels of the enterprise user portraits based on transaction data include first-category labels and second-category labels; the determination unit 608 is specifically used to: determine the sixth data set from the third data set by keyword extraction; determine the seventh data set from the third data set by high-frequency word extraction; use the data in the intersection of the sixth data set and the seventh data set as the first-category label, and use the data in the union of the sixth data set and the seventh data set as the second-category label.
[0105] In this embodiment, the first type of label is the data in the intersection of the sixth data set and the seventh data set, that is, it is determined by the above two methods. Compared with the second type of label, it contains less data, and therefore, it can represent the main products of the enterprise, while the second type of label contains more data, so it can represent all the products of the enterprise. By outputting one or two categories of products above, when purchasing products, the supply capacity of the enterprise can be known according to the label, which makes it easier to determine the best procurement strategy.
[0106] In one embodiment of the present invention, Figure 7 As shown, the label determination method of the enterprise user portrait based on transaction data includes:
[0107] (1) Perform word segmentation, part-of-speech tagging, and named entity recognition on the transaction history data. The word segments of all words separated by the word segmentation process are screened. For example, the transaction entity name J41H-25DN50 stop valve is segmented as follows:
[0108] [('J41H', 'eng'), ('-', 'x'), ('25', 'm'), (", 'x'), ('DN50', 'eng'), ('stop valve', 'n')], it is believed that only nouns in this list can represent the main entity of the transaction. We filter out the nouns (n) to form set A, which is the first data set in this application. The entities recognized by named entities form set B, which is the second data set in this application. The weight of set A is set to w1, which is the weight value of the first data set in this application, and the weight of set B is set to w2, which is the weight value of the second data set in this application. If it appears in both set A and set B, it is believed that the entity has a greater accuracy, and the resulting data set F, where F = w1×A+w2×B, is the fifth data set.
[0109] The method to calculate weights w1 and w2 is as follows:
[0110] (a) The business personnel manually label the transaction data to form a business label H, which is the fourth data set in this application.
[0111] (b) The method for calculating label similarity adopts a variation of Jaccard similarity, and introduces the label coefficient with weight into the Jaccard similarity formula. As shown below:
[0112]
[0113] (c) Obtain parameters w1 and w2 using the least squares method.
[0114] (2) Since suppliers may focus on different product types in different time dimensions, the closer to the current time, the greater the proportion of labels representing the current mainstream products, and the farther away from the current time, the smaller the proportion of labels representing the current mainstream products. Therefore, the influence factor of time is added to the label dimension, and the following label weight is set, that is, the time coefficient in this application.
[0115] Specifically, the label weight is set by the following function:
[0116]
[0117] Figure 8 The specific schematic diagram is shown, as Figure 8 As shown, t represents time. In one embodiment, time t is the time data set in this application, and 1 can be selected.
[0118] (3) For merchants with fewer transactions and fewer types on the platform, less data is generated. However, in reality, suppliers have good supply capabilities in related categories. In order to better recommend business opportunities, the method of training word vectors is adopted to mine semantic knowledge and expand labels. Each label has a similarity S with the original label. A certain number of relevant labels are selected according to the similarity from high to low.
[0119] (4) After the above steps, we obtain the cleaned, accurate, time-attributed, and expanded weighted label F, as shown below:
[0120] F = (w1 × A + w2 × B) × k (t) × S;
[0121] The final label of the enterprise user portrait based on transaction data is formed by extracting keywords and high-frequency words.
[0122] (a) About keyword extraction: The traditional method of extracting keywords is to organize domain experts to manually label them. Although the accuracy is high, the efficiency is low and the cost is high. It is completely unable to adapt to the current needs of processing massive data. The textRank keyword extraction algorithm based on the word graph model does not require prior learning and training of multiple documents, and is very suitable for user portraits based on historical data. The textRank algorithm is an undirected and unweighted graph, as shown below:
[0123]
[0124] Among them, In(V i ) is the node set pointing to node i, Out(V i ) is the set of all nodes connected to it from node j. d is the damping coefficient, S(V i ) is the label V i The importance of S(Vj ) is the label and V i Connected Label V j The importance of.
[0125] Based on the business system analysis, we have come up with labels with weights, and labels without weights cannot meet our needs. Therefore, we add the weight F of the two labels’ correlation to the original algorithm. This coefficient is represented by the multiplication of the weights of the labels that are related to each other. It means that when two labels are more important, if there is a connection between them, their correlation weight is greater, as shown below:
[0126] F ij =F(i)×F(j);
[0127] The overall label importance is as follows:
[0128]
[0129] In(V i ) is the node set pointing to node i, Out(V i ) is the node set pointed to by node j. d is the damping coefficient, FS(V i ) is the label V i Importance of FS(V j ) is the label and V i Connected Label V j The importance of ji Indicates V i To V j The weight value of .
[0130] (b) High-frequency word extraction: In the above algorithm, the focus is on keyword extraction based on co-occurrence. The high-frequency words of transactions can more intuitively reflect the importance of transactions. Therefore, the word frequency is counted, h i is the number of times word i appears, and the word frequency information is added to the attribute of the tag. The importance of the tag at this time is as follows:
[0131]
[0132] (5) Considering the above overall information, the keyword extraction and high-frequency word extraction are calculated:
[0133] (a) When the intersection of the two is taken, it represents the precise label of the enterprise, that is, the first type of label in this application.
[0134] (b) When the union of the two is taken, it represents the underlying label of the enterprise transaction, that is, the second type of label in this application.
[0135] Through the above process, two-dimensional labels are formed, which can be used in different scenarios, and each label has a weight value, which can help tasks such as business opportunity recommendation and search.
[0136] Specifically, after testing, a transaction user profile of the company with ID 703 was established:
[0137] (I) Transaction data for the past year is displayed by time:
[0138] D-type triangle belt D5588, anti-static triangle belt 100 pieces, trading 3V5V 9J15J 25J triangle belt 10 pieces, SPZJ / XPZJ triangle belt, Zhengzhou SPBJ triangle belt, SPCJ / XPCJ triangle belt XXX, V-belt B483--B15000, 6-level precision high-precision grinding gear, trading E308-16 stainless steel welding rod 2.5 / 3.2, TS-308A102 E308-16 welding rod, Z408 cast iron welding rod sold for 150 kg, supplied to XX company national standard HS221 copper-iron welding rod, 1.5mm standard steel wire, 10# steel wire (Cangzhou), supplied to Weifang XX steel wire cut shot 201 material, nickel-based welding rod, demand for stainless steel shaft elastic retaining ring GB894C type (spot 7 days), shaft elastic retaining ring 65 Meng GB894C type (deal, payment), stainless steel shaft retaining ring 304 elastic retaining ring bearing retaining spring shaft C type, 304 stainless steel shaft retaining ring GB894M26-M70 spot, M8 black zinc plated shaft retaining ring 20,000 pieces, M8 (0.01 yuan) 10,000 pieces (Hunan), supply HDXB high-pressure asbestos board (Cangzhou, Hebei) resistant to high temperature and wear.
[0139] (II) The above parameters are as follows:
[0140] w1=0.64, w2=0.36, d=0.85;
[0141] (III) Enterprise transaction tags:
[0142] First dimension portrait: V-belt (0.89), welding rod (0.87), retaining ring (0.75), steel wire (0.74), gear (0.72);
[0143] Second dimension portrait: V-belt (0.89), welding rod (0.87), retaining ring (0.75), steel wire (0.74), gear (0.72), asbestos sheet (0.64), welding wire (0.55), rubber V-belt (0.53), steel bar (0.52), gear (0.49).
[0144] In this embodiment, the following beneficial effects are achieved:
[0145] (1) A complete system has been established from the underlying transaction data to the formation of enterprise user portrait labels.
[0146] (2) After training and combining word segmentation and named entity recognition, accurate labels are extracted from the underlying labels.
[0147] (3) Embed the time dimension into the label extraction process.
[0148] (4) Improve the textrank algorithm and transform the extracted keywords into weighted attributes to conform to the objective process.
[0149] (5) Combine keywords and high-frequency words to extract high and low dimensional portraits, and use them to establish user portraits of suppliers based on historical transaction data in different scenarios to provide strong support for sourcing the best procurement decisions and providing the best business opportunities.
[0150] According to a third aspect of the present invention, Fig. 9 As shown, the present invention provides an electronic device 900, including: a memory 902, on which a computer program is stored; a controller 904, which executes the computer program to implement the steps of the method for determining a label of an enterprise user portrait based on transaction data as in any one of the first aspects, and has all the beneficial technical effects of the method for determining a label of an enterprise user portrait based on transaction data provided by any one of the embodiments of the first aspect. Therefore, the electronic device 900 provided by the embodiment of the present invention has all the beneficial effects of the method for determining a label of an enterprise user portrait based on transaction data provided by any one of the embodiments of the first aspect, which are not listed one by one here.
[0151] According to the fourth aspect of the present invention, the present invention provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, it implements: the steps of the method for determining a label of an enterprise user portrait based on transaction data as in any one of the first aspect. It has all the beneficial technical effects of the method for determining a label of an enterprise user portrait based on transaction data provided by any embodiment of the first aspect, therefore, the readable storage medium provided by the embodiment of the present invention has all the beneficial effects of the method for determining a label of an enterprise user portrait based on transaction data provided by any embodiment of the first aspect, which are not listed one by one here.
[0152] In the description of the present invention, the term "plurality" refers to two or more than two. Unless otherwise clearly defined, the orientation or positional relationship indicated by the terms "upper" and "lower" is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention. The terms "connection", "installation", "fixation", etc. should be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be directly connected or indirectly connected through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0153] In the description of the present invention, the description of the terms "one embodiment", "some embodiments", "specific embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In the present invention, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0154] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for determining labels of enterprise user portraits based on transaction data, characterized in that: include: Get historical transaction data; Segmenting the historical transaction data; Performing part-of-speech tagging on the data obtained by word segmentation, and counting the data whose part of speech is noun to obtain a first data set; Performing named entity recognition on the data obtained by word segmentation to obtain a second data set; Determine a third data set according to the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set; Determine a label of the enterprise user portrait based on the transaction data from the third data set by extracting keywords and high-frequency words; Before the step of determining the third data set according to the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set, the method further includes: receiving an input operation on the historical transaction data to obtain a fourth data set; Determine similarity based on the first data set, the weight value corresponding to the first data set, the second data set, the weight value corresponding to the second data set, and the fourth data set; According to the similarity, the weight value corresponding to the first data set and the weight value corresponding to the second data set are determined by the least square method; the step of determining the third data set according to the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set specifically includes: Determine a fifth data set according to the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set; Determining time data in the historical transaction data; Determine the time coefficient of the fifth data set according to the comparison result between the time data and the set time data; Taking the product of the fifth data set and the time coefficient of the fifth data set as the third data set; The tags of the enterprise user portrait based on transaction data include first-category tags and second-category tags; the step of determining the tags of the enterprise user portrait based on transaction data from the third data set by extracting keywords and high-frequency words specifically includes: Determine a sixth data set from the third data set by extracting keywords; Determine a seventh data set from the third data set by extracting high-frequency words; Using the data in the intersection of the sixth data set and the seventh data set as the first class label, The data in the union of the sixth data set and the seventh data set is used as the second type of label.
2. The method for determining labels of enterprise user portraits based on transaction data according to claim 1, characterized in that: The step of determining the third data set according to the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set also includes: Using a word vector training method, data mining is performed on the data in the third data set to obtain a similarity coefficient; The third data set is modified according to the similarity coefficient.
3. A label determination device for enterprise user portrait based on transaction data, characterized in that: include: An acquisition unit, used to acquire historical transaction data; A segmentation unit, used for segmenting the historical transaction data; A recognition unit, configured to perform part-of-speech tagging on the data obtained by word segmentation, and to count the data whose part of speech is noun to obtain a first data set; as well as Performing named entity recognition on the data obtained by word segmentation to obtain a second data set; a determining unit, configured to determine a third data set according to the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set; as well as Determine a label of the enterprise user portrait based on the transaction data from the third data set by extracting keywords and high-frequency words; The determining unit is further configured to: receiving an input operation on the historical transaction data to obtain a fourth data set; Determine similarity based on the first data set, the weight value corresponding to the first data set, the second data set, the weight value corresponding to the second data set, and the fourth data set; Determine, according to the similarity, a weight value corresponding to the first data set and a weight value corresponding to the second data set by using a least square method; The determining unit is specifically used for: Determine a fifth data set according to the first data set, the weight value corresponding to the first data set, the second data set, and the weight value corresponding to the second data set; Determining time data in the historical transaction data; Determine the time coefficient of the fifth data set according to the comparison result between the time data and the set time data; Taking the product of the fifth data set and the time coefficient of the fifth data set as the third data set; The labels of the enterprise user portrait based on the transaction data include first-category labels and second-category labels; the determining unit is specifically used for: Determine a sixth data set from the third data set by extracting keywords; Determine a seventh data set from the third data set by extracting high-frequency words; Using the data in the intersection of the sixth data set and the seventh data set as the first class label, The data in the union of the sixth data set and the seventh data set is used as the second type of label.
4. The device for determining a label of an enterprise user portrait based on transaction data according to claim 3, characterized in that: The determining unit is further configured to: Using a word vector training method, data mining is performed on the data in the third data set to obtain a similarity coefficient; The third data set is modified according to the similarity coefficient.
5. An electronic device, characterized in that: include: a memory having a computer program stored therein; A controller, wherein the controller executes the computer program to implement the steps of the method for determining a label of an enterprise user portrait based on transaction data as described in claim 1 or 2.
6. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, it implements: the steps of the label determination method based on the enterprise user portrait of transaction data as described in claim 1 or 2.
