Method and system for generating object abbreviation, storage medium and program product
Generate enterprise abbreviation through semantic graph and vector correction technology, which solves the problem of dependence on feature templates and limitations in the existing technology, improves the accuracy and effectiveness of enterprise abbreviation, realizes the utilization of other attribute information of the enterprise, and enhances the information Real-time and richness.
Patent Information
- Application Number
- CN202111119143.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-23
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2041-09-23
AI Technical Summary
The prior art has dependence on feature templates and limitations when generating enterprise abbreviation, and is based only on the full name information of the enterprise, and cannot effectively utilize other attribute information of the enterprise, resulting in the generated abbreviation being inaccurate and effective.
By establishing a semantic graph, setting the full name of the enterprise as the central node, using semantic vector initialization and correction technology to generate correction vectors and fusion vectors, combining nodes and relationship information in the graph, and as input to the decoder, the enterprise abbreviation is generated.
It improves the accuracy and effectiveness of the generation of enterprise abbreviations, can automatically obtain relevant information of enterprises on the Internet, overcomes the limitations of relying solely on full-name information, and enhances the real-time and richness of information.
Smart Images

Figure CN114282545B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of determining object abbreviations, and in particular, to a method for generating object abbreviations, a system for generating object abbreviations, a computer-readable storage medium, and a computer program product. Background Art
[0002] There is a method in the prior art that generates a corporate abbreviation through rules and traditional conditional random fields. This method has a strong dependence on feature templates, and the rules also have certain limitations. There is also a method in the prior art that extracts features through a bidirectional neural network, and then uses CRF decoding and annotation to mark the corresponding corporate abbreviation from the full name of the company. The limitation of this method is that the corporate abbreviation defaults to the full name of the company and has the same word order as the full name of the company. There is also a method in the prior art that extracts features from the full name of the company and then generates the corporate abbreviation through a decoder. This method has the limitation of feature extraction, that is, only letting the generation model know the full name information of the company, and then generating the corporate abbreviation. However, the corporate abbreviation does not only depend on the full name information. Summary of the invention
[0003] The embodiments of the present application provide a method for generating object abbreviations, a system for generating object abbreviations, a computer-readable storage medium, and a computer program product, which are used to automatically generate abbreviations for objects such as enterprises based on the features of graph technology. The accuracy and effectiveness of the generated abbreviations are higher than those of traditional solutions.
[0004] According to one aspect of the present application, there is provided a method for generating an abbreviation of an object, comprising: establishing a semantic graph including data of an object, wherein the semantic graph takes the "full name" of the object as a central node; initializing semantic vectors of the central node, other nodes except the central node, and the relationship between the two in the semantic graph to obtain respective original vectors; correcting the original vectors of the central node, the other nodes, and the relationship between the two to generate respective correction vectors, so that the central node and the other nodes having a relationship satisfy: the calculation result of the correction vector of the central node via the correction vector of the relationship is as statistically close as possible to the correction vectors of the other nodes; semantically fusing the other nodes to the central node via the correction vector to obtain the fusion vector of the central node; and determining the abbreviation of the object using at least the correction vector and the fusion vector of the central node as inputs to the decoder.
[0005] In some embodiments of the present application, optionally, the object is an enterprise and the central node is the "full name of the enterprise", and the other nodes include at least one of the following: a "business scope" node with which the central node has an "operation" relationship, a "key personnel" node with which the central node has an "employment" relationship, a "enterprise address" node with which the central node has an "location" relationship, and an "industry category" node with which the central node has an "attribution" relationship.
[0006] In some embodiments of the present application, optionally, the semantic vector is initialized according to BERT, XLnet or GPT-3.
[0007] In some embodiments of the present application, optionally, the step of generating the correction vector includes: constructing a positive sample set S according to the head node and the tail node having a relationship in the semantic graph, and constructing a negative sample set S′ according to the head node and the tail node having no relationship; and based on the optimization function:
[0008]
[0009] Determine the correction vector of the central node, the other nodes and the relationship between them, where h and t represent the head node and the tail node in the positive sample set S respectively, and r represents the relationship from h to t; h′ and t′ represent the head node and the tail node in the negative sample set S′ respectively, and r′ represents a relationship independent of h′ and t′; Dist is the L2 norm; and γ is the adjustment coefficient.
[0010] In some embodiments of the present application, optionally, Dist(h+r, t)=(h+r, t) 2 .
[0011] In some embodiments of the present application, optionally, participating in determining the optimization function The smallest vectors are used to construct correction vectors of the central node, the other nodes and the relationship between them.
[0012] In some embodiments of the present application, optionally, the operation is a vector addition operation.
[0013] In some embodiments of the present application, optionally, the fusion vector of the central node is determined by the following formula:
[0014] E a ′=E a +∑E i
[0015] Among them, E a ′ represents the fusion vector, E a represents the correction vector of the central node, E i Represents the correction vector of any other node that has a relationship with the central node.
[0016] In some embodiments of the present application, optionally, semantically fusing the other nodes to the central node via the correction vector to obtain a fusion vector of the central node includes: determining a transfer weight from each of the other nodes having a relationship with the central node to the central node; and determining the fusion vector of the central node by the following formula:
[0017] E a ′=E a +∑α a,i E i
[0018] Among them, E a ′ represents the fusion vector, E a represents the correction vector of the central node, α a,i 、E i They respectively represent the transfer weight and correction vector of any other node having a relationship with the central node to the central node.
[0019] In some embodiments of the present application, optionally, the transfer weights from k nodes having a relationship with the central node to the central node are determined by the following formula:
[0020]
[0021] Among them, α a,k 、E k They respectively represent the transfer weights and correction vectors of the k nodes having a relationship with the central node to the central node.
[0022] In some embodiments of the present application, optionally, the decoder is an LSTM network including multiple stages.
[0023] According to another aspect of the present application, a method for generating an abbreviation of an object is provided, comprising: establishing a semantic graph including data of the object, wherein the semantic graph takes the "full name" of the object as a central node; performing semantic vector initialization on the central node and other nodes except the central node in the semantic graph to obtain their respective original vectors, and performing semantic initialization on the relationship between the two to obtain their original feature matrices; correcting the original vectors of the central node, the other nodes and the original feature matrix of the relationship between the two to generate a correction vector and a correction feature matrix respectively, so that the central node and the other nodes having a relationship satisfy: the calculation result of the correction vector of the central node via the correction feature matrix of the relationship is as statistically close as possible to the correction vectors of the other nodes; semantically fusing the other nodes to the central node via the correction vector to obtain the fusion vector of the central node; and determining the abbreviation of the object using at least the correction vector and the fusion vector of the central node as inputs to the decoder.
[0024] In some embodiments of the present application, optionally, the operation is a multiplication operation of a vector and a matrix.
[0025] According to another aspect of the present application, a system for generating abbreviations of objects is provided, comprising: a graph unit, configured to establish a semantic graph including data of an object, wherein the semantic graph takes the "full name" of the object as a central node; an initialization unit, configured to respectively initialize semantic vectors of the central node, other nodes and the relationship therebetween to obtain respective original vectors; a correction unit, configured to correct the original vectors of the central node, other nodes and the relationship to generate respective correction vectors, so that the central node and the other nodes having a relationship satisfy: the calculation result of the correction vector of the central node via the correction vector of the relationship is as statistically close as possible to the correction vectors of the other nodes; a fusion unit, configured to semantically fuse the other nodes to the central node via the correction vector to obtain a fusion vector of the central node; and a determination unit, configured to determine the abbreviation of the object using at least the correction vector and the fusion vector of the central node as inputs to a decoder.
[0026] According to another aspect of the present application, a system for generating abbreviations of objects is provided, comprising: a graph unit, configured to establish a semantic graph including data of an object, wherein the semantic graph takes the "full name" of the object as a central node; an initialization unit, configured to perform semantic vector initialization on the central node and other nodes except the central node in the semantic graph to obtain their respective original vectors, and to perform semantic initialization on the relationship between the two to obtain their original feature matrices; a correction unit, configured to correct the original vectors of the central node, the other nodes and the original feature matrix of the relationship between the two to respectively generate a correction vector and a correction feature matrix, so that the central node and the other nodes having a relationship satisfy: the operation result of the correction vector of the central node via the correction feature matrix of the relationship is as statistically close as possible to the correction vectors of the other nodes; a fusion unit, configured to semantically fuse the other nodes to the central node via the correction vector to obtain a fusion vector of the central node; and a determination unit, configured to determine the abbreviation of the object using at least the correction vector and the fusion vector of the central node as inputs to the decoder.
[0027] According to another aspect of the present application, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and wherein when the instructions are executed by a processor, the processor is caused to execute any one of the methods described above.
[0028] According to another aspect of the present application, a computer program product comprising instructions is provided, wherein when the instructions are executed by a computer, the computer is caused to perform any one of the methods described above. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The above and other objects and advantages of the present application will become more fully apparent from the following detailed description in conjunction with the accompanying drawings, wherein the same or similar elements are represented by the same reference numerals.
[0030] Figure 1 A method for generating an object abbreviation according to an embodiment of the present application is shown.
[0031] Figure 2 A system for generating object abbreviations according to an embodiment of the present application is shown.
[0032] Figure 3 A semantic graph according to an embodiment of the present application is shown.
[0033] Figure 4 The diagram shows a semantic initialization process according to an embodiment of the present application.
[0034] Figure 5A correction vector according to one embodiment of the present application is shown.
[0035] Figure 6 The working principle of a decoder according to an embodiment of the present application is shown.
[0036] Figure 7 A method for generating an object abbreviation according to an embodiment of the present application is shown.
[0037] Figure 8 A system for generating object abbreviations according to an embodiment of the present application is shown.
[0038] Fig. 9 The working principle of a decoder according to an embodiment of the present application is shown.
[0039] Fig.10 The working principle of a decoder according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0040] For brevity and illustrative purposes, the principles of the present application are described herein mainly with reference to its exemplary embodiments. However, those skilled in the art will readily recognize that the same principles are equally applicable to all types of methods for generating object abbreviations, systems for generating object abbreviations, computer-readable storage media, and computer program products, and these same or similar principles may be implemented therein, and any such changes do not deviate from the true spirit and scope of the present application.
[0041] Basic attribute information of objects such as enterprises, the relationship between enterprises, and the related events of enterprises can be used to build a relatively complete enterprise portrait, which has long-term practical prospects in payment risk control, credit assessment, risk chain discovery and other aspects related to enterprises. However, there are great limitations to portraying enterprise portraits based solely on structured industrial and commercial department data. For example, the real-time performance may be poor. However, text corpora such as news with strong real-time performance on the Internet contain a large amount of information related to enterprises, and have strong real-time performance, which can be used as an important way to further enrich enterprise portraits. However, enterprises in news texts often appear in the form of various abbreviations, and the structure of the abbreviations does not have a strong regularity, which creates great difficulties for automatically obtaining relevant information about enterprises on the Internet. Therefore, in order to realize applications such as payment risk control, credit assessment, and risk chain discovery related to enterprises, the first thing to solve is the problem of automatically obtaining enterprise abbreviations.
[0042] This paper proposes a mechanism for generating corporate abbreviations based on corporate graphs. This mechanism is not limited to obtaining corporate abbreviations through corporate full names, but also expands the input information source for obtaining corporate abbreviations by constructing corporate graphs. For example, the industry category of the enterprise, the business scope of the enterprise, etc. are all closely related to the corporate abbreviations, and can therefore also be used as information sources. Then, the information of each node in the graph can be automatically captured and fused through graph processing technology. Finally, corporate abbreviations can also be generated by sampling the decoder sequence. The corporate abbreviation generation mechanism proposed in this paper can overcome the defects of the method of obtaining corporate abbreviations based solely on corporate full name information, improve the accuracy of corporate abbreviation generation and the effectiveness of generated corporate abbreviations, and is of great significance for realizing the automatic acquisition of rich corporate information on the Internet.
[0043] One aspect of the present application provides a method for generating an object abbreviation. Figure 1 The method 10 for generating an object abbreviation (hereinafter referred to as method 10) shown in the figure includes the following steps. In step S102, the method 10 establishes a semantic graph including data of the object; in step S104, the semantic vectors of the central node, other nodes except the central node, and the relationship between the two are respectively initialized to obtain respective original vectors; in step S106, the original vectors of the central node, other nodes, and the relationship between the two are corrected to generate respective corrected vectors; in step S108, the other nodes are semantically fused to the central node via the correction vector to obtain the fused vector of the central node; and in step S110, the abbreviation of the object is determined using at least the correction vector and the fused vector of the central node as inputs of the decoder.
[0044] Method 10 establishes a semantic graph of data including objects in step S102, wherein the semantic graph takes the "full name" of the object as the central node. The data including the object may be processed in a structured manner in advance, and its original source may be industrial and commercial data and data obtained from other channels. Taking enterprise objects as an example, Figure 3 A constructed enterprise graph G(V, E) is shown.
[0045] like Figure 3As shown, the enterprise graph G contains 5 nodes: a ("full name of the enterprise"), b ("business scope"), c ("main personnel"), d ("enterprise address"), and e ("industry category"); it also contains 4 edges: e1 (a, b, "operation"), e2 (a, c, "position"), e3 (a, d, "location"), and e4 (a, e, "attribution"). That is, V = {a, b, c, d, e}, E = {e1, e2, e3, e4}. Among them, the "full name of the enterprise" node a is the central node of the enterprise graph G, and each "edge" represents the relationship between the nodes at both ends of the "edge". For example, the constructed enterprise graph G can include such a set of data: among them, a = "Shenzhen Futu Network Technology Co., Ltd.", b = "Securities, etc.", c = "Li Hua", d = "Nanshan District, Shenzhen, China", and e = "Financial Industry". At this time, e1 = "operation", e2 = "position", e3 = "location", and e4 = "attribution".
[0046] Figure 3 The semantic graph shown in the figure is for illustrative purposes only. In other examples, except for the central node, the number and meaning of the nodes in the graph may be partially the same or completely different, and the relationships between the nodes may also be partially the same or completely different.
[0047] In step S104, method 10 performs semantic vector initialization on the central node, other nodes except the central node, and the relationship between the central node and the other nodes in the semantic graph to obtain their respective original vectors. Figure 4 The process of vector initialization is shown, and the various text information obtained in step S102 is used as the input of the initialization operation, and the text information is processed by BERT (Pre-training of Deep Bidirectional Transformers for Language Understanding, a deep bidirectional transformer pre-training model for natural language understanding), thereby obtaining the original vectors about the text information. These vectors are referred to as "original vectors" in this article to distinguish them from the deep-processed vectors described below. The original vectors and the vectors obtained by the deep processing below may be the same in form and may not be directly distinguished by numerical values alone.
[0048] For example, in step S104, the text of each node (a ("full name of the company"), b ("business scope"), c ("main personnel"), d ("company address"), and e ("industry category")) in the graph G can be processed by the pre-trained model BERT to obtain the semantic vector initialization representation of each node in the graph. a , O b , O c , O d , O eIn addition, BERT can also be used to process the text of each edge in the graph G (e1(a, b, "management"), e2(a, c, "employment"), e3(a, d, "location"), e4(a, e, "belonging")) to obtain the semantic vector initialization representation O of each edge of the graph. e1 , O e2 , O e3 , O e4 , where the semantic vector obtained by BERT can satisfy: x∈{a,b,c,d,e,e1,e2,e3,e4}. For example, continuing the above example, the original vectors of each node processed by BERT can be:
[0049] O a =O "深圳市富途网络科技有限公司” = [0.23, -0.51, 0.34, ...];
[0050] O D =O "证券等” = [0.12, 0.41, 0.22, ...];
[0051] O c =O "李华” = [0.33, -0.22, 0.41, ...];
[0052] O d =O "中国深圳市南山区” = [0.34, 0.25, -0.11, ...];
[0053] O e =O "金融业” =[-0.32, 0.41, 0.27, ...].
[0054] And, the original vector of the relationship between each node processed by BERT can be:
[0055] O e1 =O ″经营″ = [-0.12, -0.31, 0.52, ...];
[0056] O e2 =O ″任职″ = [0.29, 0.23, -0.31, ...];
[0057] O e3 =O ″坐落″ = [-0.01, 0.32, 0.44, ...];
[0058] O e4 =O ″归属″=[0.24, 0.35, 0.11, ...].
[0059] In other examples, semantic vector initialization can also be performed through XLnet (larger-scale pre-trained model) or GPT-3 (super-large-scale pre-trained model).
[0060] Method 10 further enriches the semantic representation of the node by adding relationship information in step S106. Among them, the original vectors of the central node, other nodes and the relationship between the two are corrected to generate their own correction vectors, so that the central node with a relationship and other nodes satisfy: the calculation result of the correction vector of the central node through the correction vector of the relationship is as close as possible to the correction vectors of other nodes in statistics. In other words, after correction, the head node (semantically represented as h) and the tail node (semantically represented as t) of the relationship (semantically represented as r) in the graph G should satisfy h+r=t as much as possible. "Statistically" in this article means that each vector involved in the operation statistically reaches the optimal solution, that is, each vector as a whole makes the calculation result achieve the "close" effect described above. A specific example of statistics can be the ∑ operation that will be described in detail in the afternoon.
[0061] In some embodiments of the present application, step S106 also specifically includes the following steps: constructing a positive sample set S according to the head node and tail node with a relationship in the semantic graph, and constructing a negative sample set S′ according to the head node and tail node without a relationship. Then, construct an optimization function based on h+r=t:
[0062]
[0063] And the correction vectors of the central node, other nodes and the relationship between the two are determined according to the optimization function, where h and t represent the head node and tail node in the positive sample set S respectively, and r represents the relationship from h to t; h′ and t′ represent the head node and tail node in the negative sample set S′ respectively, and r′ represents a relationship that is independent of h′ and t′; Dist is the L2 norm. γ is the adjustment coefficient, which can be 1.0. In some embodiments of the present application, Dist(h+r, t)=(h+r, t) 2 Here, we set the default h+r=t based on the existence of the graph, and construct the negative samples (arbitrarily replace h and t) to train for 100 epochs, h, r, This step further enriches the semantic representation of nodes by entering relationship information into the independent node representation. For example:
[0064] h=O a =O "深圳市富途网络科技有限公司” = [0.23, -0.51, 0.34, ...];
[0065] t=O b =O "证券等” = [0.12, 0.41, 0.22, ...]; and
[0066] r=O e1 =O "经营” =[-0.12, -0.31, 0.52, ...] can constitute a positive sample.
[0067] h′=O a =O "深圳市富途网络科技有限公司” = [0.23, -0.51, 0.34, ...];
[0068] t′=O b =O "证券等” = [0.12, 0.41, 0.22, ...]; and
[0069] r′=O e4 =O ″归属″ =[0.24, 0.35, 0.11, ...] can constitute a negative sample (in this case, the head entity h′ and the tail entity t′ do not satisfy the relationship r′).
[0070] In some embodiments of the present application, the optimization function The smallest vectors are used to construct the correction vectors of the central node, other nodes and the relationship between them. Figure 5 ] shows a correction vector according to an embodiment of the present application. Before correction, the O constituting the positive sample a With O e1 The result of the operation is the same as O b There is a large gap. After correction, the vectors E a With E e1 The result of the operation is the same as E b The gap will be greatly reduced, so that the semantic association characteristics can be more accurately reflected. In some embodiments of the present application, the operation between vectors in the above examples is a vector addition operation.
[0071] In step S108 , method 10 semantically fuses other nodes to the central node via the correction vector to obtain a fusion vector of the central node.
[0072] In some embodiments of the present application, the fusion vector of the central node may be determined by the following formula:
[0073] E a ′=E a +ΣE i
[0074] Among them, E a ′ represents the fusion vector, E arepresents the correction vector of the central node, E i Represents the correction vector of any other node that has a relationship with the central node. This method directly participates in the fusion with the corrected vector, which can improve the efficiency of training.
[0075] In some embodiments of the present application, step S108 specifically includes the steps of: determining the transfer weights of each other node having a relationship with the central node to the central node; and determining the fusion vector of the central node by the following formula:
[0076] E a ′=E a +Σα a,i E i
[0077] Among them, E a ′ represents the fusion vector, E a represents the correction vector of the central node, α a,i 、E i They represent the transfer weights and correction vectors of any other nodes that have a relationship with the central node to the central node. This method takes into account the transfer weights of each node to the central node during the fusion process, so the fusion accuracy will be higher.
[0078] In some embodiments of the present application, the transfer weights from k nodes having a relationship with the central node to the central node are determined by the following formula:
[0079]
[0080] Among them, α a,k 、E k They represent the transfer weights and correction vectors of the k nodes that have a relationship with the central node to the central node. Continuing with the above example, if there are five nodes a, b, c, d and e participating in the calculation, and a is the central node, then:
[0081]
[0082] Among them, Cos is the cosine function, e in the formula is a natural constant, and e as a parameter represents the industry category. a ′=E a +α a,b E b +α a,c E c +α a,d E d +α a,e E e After calculation, the comprehensive information of the enterprise full name node and other nodes is expressed as:
[0083] E a′=[0.29, 0.37, 0.41, ...].
[0084] In step S110 of method 10, at least the correction vector and the fusion vector of the central node are used as the input of the decoder to determine the abbreviation of the object. a is the hidden variable h_0, and E calculated in step S108 a ′ is the hidden variable c_0, <start>The corresponding character code is E <start>< / start> is x_0, which is decoded by LSTM (Long Short-Term Memory Network) decoder, and then the enterprise abbreviation text is generated through sequence decoding and sampling. a , E a ' can satisfy Specifically, the decoder input includes:
[0085] h_0=E a ;
[0086] c_0=E a ′;
[0087] x_0=E <start>< / start> (optional).
[0088] For a more detailed description of how the decoder works, see the attached Fig. 9 and 10 In the attached Fig. 9 In this example, A represents an LSTM unit, and Figure 6 and Fig.10 The LSTM unit shown in is equivalent to . Where:
[0089] h_0=E a ;
[0090] c_0=E a ′;
[0091] x_0=E <start>< / start> ,
[0092] is the initialization vector of the LSTM model.
[0093] Fig.10 In the figure, an LSTM unit 1000 is disassembled into multiple parts for explanation, so as to explain in detail the working principle of LSTM. Among them, the "forget gate layer" (shown as 1100 in the figure) of the LSTM unit 1000 satisfies the following constraints:
[0094] f t =σ(W f ·[h t-1 , x t ]+b f ).
[0095] Among them, f t is the output of the "forget gate layer" as the forgetting coefficient; σ can be a sigmoid function; W f is the network parameter of the forget gate layer; b f The bias adjustment of the network is also part of the network parameters. t =h t-1 .
[0096] The "input gate layer" and "current memory" (shown as 1200 in the figure) of the LSTM unit 1000 satisfy the following constraints:
[0097] i t =σ(W i ·[h t-1 , x t ]+b i );
[0098]
[0099] Among them, i t It is called the "input gate layer" output, which serves as input information; σ is the sigmoid function; W i is the input gate layer network parameter; b i The bias adjustment of the network is also part of the network parameters. Tanh is an activation function, similar to sigmoid. is the candidate vector generated by the tanh function, which can also be called "current memory". t =h t-1 .
[0100] The "long term memory" of the LSTM unit 1000 (shown as 1300 in the figure) satisfies the following constraints:
[0101]
[0102] is the "current memory", i t For "input information", C t-1 is the "early memory", and f t is the "forget gate coefficient", and the "current memory" C is updated t .* is the bitwise multiplication of vectors.
[0103] The "output gate layer" (shown as 1400 in the figure) of the LSTM unit 1000 satisfies the following constraints:
[0104] o t =σ(W o ·[h t-1 , x t ]+b o );
[0105] h t =o t *tanh(C t ).
[0106] Among them, the above process expresses the process of model output, o t is the output of the "output gate layer", σ is the sigmoid function, W o is the network parameter of the "output gate layer", b o is the bias adjustment of the network and is also part of the network parameters. In this solution, x t = h t-1 . h t is the output of the module. C t is the updated model memory. * is the bitwise multiplication of vectors.
[0107] When Figure 6 the decoder shown starts to work, t = {1, 2,......}, until the sampling stops. h t = [-0.32, -0.45, 0.35,...] is mapped to the sampling space, and then the enterprise short name is generated by sampling. The sampling space is a predefined word space, including but not limited to the dictionary of BERT. For example, "Fu", "Tu", "Zheng", "Quan" can be generated in sequence. That is, the short name of "Shenzhen Futu Network Technology Co., Ltd." corresponds to "Futu Securities".
[0108] In some embodiments of the present application, as Figure 6 shown, the decoder is an LSTM network including multiple levels (illustrated as including M levels of L-1,......, L-M). Its input includes h_0 and c_0, and the input / output of each level can satisfy
[0109] In some embodiments of the present application, in addition to the above description E a , E a ' can satisfy and the rest of each vector can also satisfy
[0110] One aspect of the present application provides a method for generating the short name of an object. As Figure 1 The method 70 for generating the abbreviation of an object (hereinafter referred to as method 70) shown in the figure includes the following steps. In step S702, the method 70 establishes a semantic graph including data of the object, wherein the semantic graph takes the "full name" of the object as the central node; in step S704, the semantic vectors of the central node and other nodes except the central node in the semantic graph are initialized to obtain their respective original vectors, and the relationship between the two is semantically initialized to obtain their original feature matrices; in step S706, the original vectors of the central node, other nodes and the original feature matrix of the relationship between the two are corrected to generate a correction vector and a correction feature matrix respectively, so that the central node with a relationship and other nodes satisfy: the calculation result of the correction vector of the central node through the correction feature matrix of the relationship is as close as possible to the correction vectors of other nodes in statistics; in step S708, the other nodes are semantically fused to the central node through the correction vector to obtain the fusion vector of the central node; and in step S710, at least the correction vector and fusion vector of the central node are used as inputs of the decoder to determine the abbreviation of the object.
[0111] Different from the method 10 described above, the relationship between nodes in the method 70 is expressed in the form of a feature matrix. For this reason, in some embodiments of the present application, the operation is a multiplication operation of a vector and a matrix. In addition, unless it is incompatible with the matrix calculation, other features in the method 10 are also cited here. Due to space limitations, they are not repeated here.
[0112] One aspect of the present application provides a system for generating an object abbreviation. Figure 2 As shown, the system 20 for generating object abbreviations (hereinafter referred to as system 20) includes a graph unit 202, an initialization unit 204, a correction unit 206, a fusion unit 208 and a determination unit 210.
[0113] The graph unit 202 of the system 20 is configured to establish a semantic graph of data including objects, wherein the semantic graph takes the "full name" of the object as the central node. The data including the object may be processed in a structured manner in advance, and its original source may be industrial and commercial data and data obtained from other channels. Taking an enterprise object as an example, Figure 3 A constructed enterprise graph G(V, E) is shown.
[0114] The initialization unit 204 of the system 20 is configured to respectively initialize the semantic vectors of the central node, other nodes and the relationship between them to obtain their respective original vectors. Figure 4 The process of vector initialization is shown, and various text information obtained by the atlas unit 202 is used as the input of the initialization operation, and the text information is processed by BERT, thereby obtaining the original vectors about the text information. These vectors are referred to as "original vectors" in this article to distinguish them from the deep-processed vectors described below. The original vectors and the vectors obtained by the deep processing below may be the same in form and may not be directly distinguished by numerical values alone.
[0115] The correction unit 206 of the system 20 is configured to correct the original vectors of the central node, other nodes and the relationship to generate respective correction vectors, so that the central node with a relationship and other nodes satisfy: the correction vector of the central node is as close as possible to the correction vectors of other nodes in statistics through the calculation result of the correction vector of the relationship. In other words, after correction, the head node (semantically represented as h) and the tail node (semantically represented as t) of the relationship (semantically represented as r) in the graph G should satisfy h+r=t as much as possible.
[0116] The fusion unit 208 of the system 20 is configured to semantically fuse other nodes to the central node via the correction vector to obtain a fusion vector of the central node.
[0117] The determination unit 210 of the system 20 is configured to use at least the correction vector and the fusion vector of the central node as inputs of the decoder to determine the abbreviation of the object. a is the latent variable h_0, and E is calculated by the fusion unit 208 a ′ is the hidden variable c_0, <start>The corresponding character code is E <start>< / start> is x_0, which is decoded by LSTM decoder, and then the enterprise abbreviation text is generated through sequence decoding and sampling. a , E a ' can satisfy Specifically, the decoder input includes:
[0118] h_0=E a ;
[0119] c_0=E a ′;
[0120] x_0=E <start>< / start> (optional).
[0121] For a more detailed description of how the decoder works, see the attached Fig. 9 and 10 In the attached Fig. 9 In this example, A represents an LSTM unit, and Figure 6 and Fig.10 The LSTM unit shown in is equivalent to . Where:
[0122] h_0=E a ;
[0123] c_0=E a ′;
[0124] x_0=E <start>< / start> ,
[0125] is the initialization vector of the LSTM model.
[0126] Fig.10 In the figure, an LSTM unit 1000 is disassembled into multiple parts for explanation, so as to explain in detail the working principle of LSTM. Among them, the "forget gate layer" (shown as 1100 in the figure) of the LSTM unit 1000 satisfies the following constraints:
[0127] f t =σ(W f ·[h t-1 , x t ]+b f ).
[0128] Among them, f t is the output of the "forget gate layer" as the forgetting coefficient; σ can be a sigmoid function; W f is the network parameter of the forget gate layer; b f The bias adjustment of the network is also part of the network parameters. t =h t-1 .
[0129] The "input gate layer" and "current memory" (shown as 1200 in the figure) of the LSTM unit 1000 satisfy the following constraints:
[0130] i t =σ(W i ·[h t-1 , x t ]+b i );
[0131]
[0132] Among them, i t It is called the "input gate layer" output, which serves as input information; σ is the sigmoid function; W i is the input gate layer network parameter; b i The bias adjustment of the network is also part of the network parameters. Tanh is an activation function, similar to sigmoid. is the candidate vector generated by the tanh function, which can also be called "current memory". t =h t-1 .
[0133] The "long term memory" of the LSTM unit 1000 (shown as 1300 in the figure) satisfies the following constraints:
[0134]
[0135] is the "current memory", i t For "input information", C t-1 is the "early memory", and f t is the "forget gate coefficient", and the "current memory" C is updated t .* is the bitwise multiplication of vectors.
[0136] The "output gate layer" (shown as 1400 in the figure) of the LSTM unit 1000 satisfies the following constraints:
[0137] o t =σ(W o ·[h t-1 , x t ]+b o );
[0138] h t =o t *tanh(C t ).
[0139] Among them, the above process expresses the process of model output, o t is the output of the "output gate layer", σ is the sigmoid function, W o is the network parameter of the "output gate layer", b o is the bias adjustment of the network and is also part of the network parameters. In this solution, x t = h t-1 。h t is the output of the module. C t is the updated model memory. * is the bitwise multiplication of vectors.
[0140] When Figure 6 the decoder shown starts to work, t = {1, 2,......}, until sampling stops. h t = [-0.32, -0.45, 0.35,...] is mapped to the sampling space, and then the enterprise short name is generated by sampling. The sampling space is a predefined word space, including but not limited to the dictionary of BERT. For example, "Fu", "Tu", "Zheng", "Quan" can be generated in sequence. That is, the short name of "Shenzhen Futu Network Technology Co., Ltd." corresponds to "Futu Securities".
[0141] It should be noted that system 20 works on the same principle as method 10 shown above. For this reason, the specific features of each step of method 10 above are incorporated herein by reference. The corresponding unit modules of system 20 can perform the same operations and achieve the same functions. Due to space limitations, it will not be elaborated here.
[0142] One aspect of the present application provides a system for generating an object short name. As Figure 8 shown, the system 80 for generating an object short name (hereinafter referred to as system 80) includes a graph unit 802, an initialization unit 804, a correction unit 806, a fusion unit 808, and a determination unit 810.
[0143] The graph unit 802 of system 80 is configured to establish a semantic graph including the data of the object, where the semantic graph takes the "full name" of the object as the central node.
[0144] The initialization unit 804 of system 80 is configured to perform semantic vector initialization on the central node and other nodes except the central node in the semantic graph to obtain their respective original vectors, and perform semantic initialization on the relationships between the two to obtain their original feature matrices.
[0145] The correction unit 806 of system 80 is configured to correct the original vectors of the central node, other nodes, and the original feature matrix of the relationship between the two to generate corrected vectors and corrected feature matrices respectively, so that the central node and other nodes with a relationship satisfy: the operation result of the corrected vector of the central node through the corrected feature matrix of the relationship is statistically as close as possible to the corrected vectors of other nodes.
[0146] The fusion unit 808 of the system 80 is configured to semantically fuse other nodes to the central node via the correction vector to obtain a fusion vector of the central node.
[0147] The determination unit 810 of the system 80 is configured to determine the abbreviation of the object by taking at least the correction vector and the fusion vector of the central node as inputs of the decoder.
[0148] It should be noted that the system 80 works on the same principle as the method 70 shown above. Therefore, the specific features of each step of the method 70 are also used here, and the corresponding unit modules of the system 80 can perform the same operation and achieve the same function. Due to space limitations, they will not be repeated here.
[0149] One aspect of the present application provides a computer-readable storage medium, which stores instructions. When the instructions are executed by a processor, the processor executes any one of the methods for generating an object abbreviation as described above. The computer-readable medium referred to in the present application includes various types of computer storage media, which can be any available medium that can be accessed by a general or special-purpose computer. For example, the computer-readable medium can include RAM, ROM, EPROM, EEPROM, etc. 2 PROM, register, hard disk, removable disk, CD-ROM or other optical disk storage, disk storage or other magnetic storage device, or can be used to carry or store the desired program code unit in the form of instruction or data structure and can be accessed by general or special computer, or general or special processor. As used herein, the disk usually copies data magnetically, while the dish uses laser to optically copy data. The above combination should also be included in the protection scope of computer-readable medium. Exemplary storage medium is coupled to the processor so that the processor can read and write information from / to the storage medium. In an alternative solution, the storage medium can be integrated into the processor. The processor and the storage medium can reside in the ASIC. The ASIC can reside in the user terminal. In an alternative solution, the processor and the storage medium can reside in the user terminal as discrete components.
[0150] One aspect of the present application provides a computer program product comprising instructions, which when executed by a computer causes the computer to perform any of the methods for generating object abbreviations as described above. The computer program product may be a non-temporary storage medium on or in which instructions are stored that can be used to control or cause a computer to perform any program of the exemplary embodiments of the present invention. The storage medium may include (but is not limited to) a floppy disk, a mini-disc, an optical disk, a Blu-ray disk, a DVD, a CD or CD-ROM, a microdrive, a magneto-optical disk, a RAM, a ROM, an EPROM, an EEPROM, a 32-bit EPROM, a 64 ... 2 pROM, DRAM, VRAM, flash memory, flash cards, magnetic cards, optical cards, nanosystems, molecular memory integrated circuits, RAID, remote data storage devices / archives / warehouses and / or any other type of device suitable for storing instructions and / or data.
[0151] Experimental verification: We obtained 6,000 full names and abbreviations through a combination of Internet crawling and manual annotation, and constructed the corresponding enterprise map by combining the full name of the enterprise with the data of the State Administration for Industry and Commerce. Finally, we obtained a total of 6,000 enterprise maps and enterprise abbreviation records. 5,000 of them were used for training and 1,000 for verification. We randomly selected 100 data and used the verification set data to judge the correctness of the generated results. The accuracy rate reached 91.6%, which was 30.3% lower than the method of generating enterprise abbreviations only by the full name of the enterprise.
[0152] In some examples, this paper proposes a mechanism for generating object abbreviations based on the automatic feature extraction and fusion method of graph technology, which can solve the inexhaustible and cumbersome problems of relying on manual summary rules, and can automatically obtain appropriate features through the model and apply them. In addition, in some examples, this paper proposes a mechanism for generating object abbreviations that can get rid of the strong sequential dependency between the enterprise abbreviations and the full name of the enterprise obtained by the annotation method, and can generate sequential automatic enterprise abbreviations without being constrained by the full name of the enterprise. In some examples, this paper proposes a mechanism for generating object abbreviations that is not limited to the full name of the enterprise, but can include more information such as the business scope of the enterprise, the industry category of the enterprise, etc. to determine the generation of the enterprise abbreviation, thereby improving the accuracy of the generated enterprise abbreviations and the effectiveness of the generated enterprise abbreviations.
[0153] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Those skilled in the art can think of other feasible changes or substitutions based on the technical scope disclosed in the present application, and such changes or substitutions are all included in the protection scope of the present application. In the absence of conflict, the implementation modes of the present application and the features in the implementation modes can also be combined with each other. The protection scope of the present application shall be subject to the description of the claims.< / start> < / start>
Claims
1. A method for generating an object abbreviation, characterized in that: The method comprises: Establishing a semantic graph including the data of the object, wherein the semantic graph has the "full name" of the object as a central node; Initializing semantic vectors of the central node, other nodes except the central node, and the relationship between the central node and the other nodes in the semantic graph to obtain their respective original vectors; Correcting the original vectors of the central node, the other nodes and the relationship between the two to generate respective correction vectors, so that the central node and the other nodes having the relationship satisfy: the correction vector of the central node is statistically close to the correction vector of the other nodes through the calculation result of the correction vector of the relationship; semantically fusing the other nodes to the central node via the correction vector to obtain a fusion vector of the central node; and At least the correction vector and the fusion vector of the central node are used as inputs of a decoder to determine the abbreviation of the object.
2. The method according to claim 1, characterized in that The object is an enterprise and the central node is the "full name of the enterprise", and the other nodes include at least one of the following: a "business scope" node with which the central node has an "operation" relationship, a "key personnel" node with which the central node has an "employment" relationship, a "enterprise address" node with which the central node has a "location" relationship, and an "industry category" node with which the central node has an "attribution" relationship.
3. The method according to claim 1, characterized in that The semantic vector is initialized according to BERT, XLnet or GPT-3.
4. The method according to claim 1, characterized in that: The step of generating the correction vector comprises: Constructing a positive sample set S according to the head nodes and tail nodes with relationships in the semantic graph, and constructing a negative sample set S' according to the head nodes and tail nodes with no relationships; and Based on the optimization function: Determine the correction vector of the central node, the other nodes and the relationship between them, where h and t represent the head node and the tail node in the positive sample set S respectively, and r represents the relationship from h to t; h' and t' represent the head node and the tail node in the negative sample set S' respectively, and r' represents a relationship independent of h' and t'; Dist is the L2 norm; and γ is the adjustment coefficient.
5. The method according to claim 4, characterized in that Dist(h+r,t)=(h+r,t) 2 。 6. The method according to claim 4, characterized in that Participate in determining the optimization function The smallest vectors are used to construct correction vectors of the central node, the other nodes and the relationship between them.
7. The method according to claim 1, characterized in that The operation of the correction vector of the central node via the correction vector of the relationship is a vector addition operation.
8. The method according to claim 1, characterized in that The fusion vector of the central node is determined by the following formula: AND a ′=And a +∑E i Among them, E a ′ represents the fusion vector, E a represents the correction vector of the central node, E i Represents the correction vector of any other node that has a relationship with the central node.
9. The method according to claim 1, characterized in that: The step of semantically fusing the other nodes to the central node via the correction vector to obtain a fusion vector of the central node includes: Determine the transfer weight of each of the other nodes having a relationship with the central node to the central node; and The fusion vector of the central node is determined by the following formula: AND a ′=And a +∑α a,i AND i Among them, E a ′ represents the fusion vector, E a represents the correction vector of the central node, α a,i 、E i They respectively represent the transfer weight and correction vector from any other node having a relationship with the central node to the central node.
10. The method according to claim 9, characterized in that The transfer weights of the k nodes that have a relationship with the central node to the central node are determined by the following formula: Among them, α a,k 、E k They represent the transfer weight from k node to the central node and its correction vector respectively.
11. The method according to claim 1, characterized in that: The decoder is a LSTM network comprising multiple stages.
12. A method for generating an object abbreviation, characterized in that: The method comprises: Establishing a semantic graph including the data of the object, wherein the semantic graph has the "full name" of the object as a central node; Initializing semantic vectors of the central node and other nodes except the central node in the semantic graph to obtain their respective original vectors, and performing semantic initialization on the relationship between the two to obtain their original feature matrices; Correcting the original vectors of the central node, the other nodes, and the original characteristic matrix of the relationship between the two to generate a correction vector and a correction characteristic matrix respectively, so that the central node and the other nodes that have a relationship satisfy: the correction vector of the central node is statistically close to the correction vector of the other nodes through the calculation result of the correction characteristic matrix of the relationship; semantically fusing the other nodes to the central node via the correction vector to obtain a fusion vector of the central node; and At least the correction vector and the fusion vector of the central node are used as inputs of a decoder to determine the abbreviation of the object.
13. The method according to claim 12, characterized in that The operation of the correction vector of the central node via the correction characteristic matrix of the relationship is a multiplication operation of a vector and a matrix.
14. A system for generating a short name of an object, characterized in that: The system comprises: A graph unit configured to establish a semantic graph of data including an object, wherein the semantic graph takes the "full name" of the object as a central node; An initialization unit, configured to respectively initialize the semantic vectors of the central node, other nodes except the central node, and the relationship between the two to obtain respective original vectors; a correction unit configured to correct the central node, the other nodes and the original vectors of the relationship to generate respective correction vectors, so that the central node and the other nodes having the relationship satisfy: the correction vector of the central node is statistically close to the correction vector of the other nodes through the calculation result of the correction vector of the relationship; a fusion unit configured to semantically fuse the other nodes to the central node via the correction vector to obtain a fusion vector of the central node; and A determination unit is configured to determine the abbreviation of the object by taking at least the correction vector and the fusion vector of the central node as inputs of a decoder.
15. A system for generating a short name of an object, characterized in that: The system comprises: A graph unit configured to establish a semantic graph of data including an object, wherein the semantic graph takes the "full name" of the object as a central node; An initialization unit, configured to perform semantic vector initialization on the central node and other nodes except the central node in the semantic graph to obtain respective original vectors, and to perform semantic initialization on the relationship between the two nodes to obtain their original feature matrices; A correction unit, configured to correct the original vectors of the central node, the other nodes, and the original characteristic matrix of the relationship between the two to generate a correction vector and a correction characteristic matrix respectively, so that the central node and the other nodes having a relationship satisfy: the correction vector of the central node is statistically close to the correction vector of the other nodes through the calculation result of the correction characteristic matrix of the relationship; a fusion unit configured to semantically fuse the other nodes to the central node via the correction vector to obtain a fusion vector of the central node; and A determination unit is configured to determine the abbreviation of the object by taking at least the correction vector and the fusion vector of the central node as inputs of a decoder.
16. A computer-readable storage medium having instructions stored therein, characterized in that: When the instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 13.
17. A computer program product comprising instructions, characterized in that When the instructions are executed by a computer, the computer is caused to perform the method according to any one of claims 1-13.
