Training method, device and equipment of deep learning model
By introducing geographic location information as an optimization objective into a deep learning model, a model capable of representing both text and spatial information is trained, solving the problem that existing technologies cannot effectively represent text spatial information and improving the accuracy and practicality of text representation.
Patent Information
- Application Number
- CN202110668562.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-16
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2041-06-16
AI Technical Summary
Existing text representation learning methods cannot effectively represent spatial information in text, resulting in insufficient accuracy in text representation and limiting their application and development.
By acquiring a training text set and using the relationship between geographic location information as the optimization objective, a deep learning model is trained to generate a vector representation model that can represent both textual and spatial information.
It improves the accuracy and usability of text representation, enabling better application to address text location and delivery tasks, and enhancing the efficiency of emergency rescue and delivery operations.
Smart Images

Figure CN115481241B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of model training technology, and in particular to a method, apparatus, and device for training a deep learning model. Background Technology
[0002] With the rapid development of science and technology, the application scope of text representation learning technology is becoming increasingly wide. Among them, text representation learning technology does not treat text as a string, but as a vector that is more convenient to process mathematically (that is, text feature extraction). And how to transform a string into a vector is the core problem of text representation learning technology.
[0003] Traditional text representation learning methods include word2vec, BERT models, and so on. Word2vec represents a word with a vector, while BERT stands for Bidirectional Encoder Representations from Transformers. It is a pre-trained model that aims to obtain deep bidirectional representations by considering bilateral contextual information in all layers.
[0004] However, the aforementioned text representation learning methods can only learn text representations by predicting context using text vectors, and cannot represent the spatial information contained in the text or the corresponding spatial information, thus reducing the accuracy of text representation. This is detrimental to the development and application of text representation technology. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a training method, apparatus, and device for a deep learning model, which can represent the spatial information included in or corresponding to text information, thereby improving the accuracy of text representation, which is beneficial to the development and application of text representation technology.
[0006] In a first aspect, embodiments of the present invention provide a method for training a deep learning model, comprising:
[0007] Obtain a training text set, which includes multiple address clusters, each address cluster including multiple address texts and their corresponding geographic location information;
[0008] The geographical location information relationship between multiple address texts in each address cluster is taken as the first optimization objective, and the geographical location information relationship between any two address clusters is taken as the second optimization objective. The deep learning model is trained using the training text set to obtain a deep learning model that satisfies the first optimization objective and the second optimization objective.
[0009] Secondly, embodiments of the present invention provide a training apparatus for a deep learning model, comprising:
[0010] The first acquisition module is used to acquire a training text set, which includes multiple address clusters, and each address cluster includes multiple address texts and their corresponding geographical location information.
[0011] The first processing module is used to take the geographic location information relationship between multiple address texts in each address cluster as the first optimization objective, and the geographic location information relationship between any two address clusters as the second optimization objective, and use the training text set to train the deep learning model to obtain a deep learning model that satisfies the first optimization objective and the second optimization objective.
[0012] Thirdly, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the training method of the deep learning model in the first aspect described above.
[0013] Fourthly, embodiments of the present invention provide a computer storage medium for storing a computer program that enables a computer to implement the training method for the deep learning model described in the first aspect.
[0014] Fifthly, embodiments of the present invention provide a text clustering method, including:
[0015] The text to be processed and multiple reference address texts for analysis and processing of the text to be processed are obtained. The text to be processed corresponds to geographical information, and each reference address text corresponds to a point of interest.
[0016] The text to be processed is analyzed and processed based on a deep learning model to obtain vector representation information corresponding to the text to be processed, and the vector representation information includes geographical information;
[0017] Based on the vector representation information, calculate the text similarity and address similarity between the text to be processed and the multiple reference address texts;
[0018] The clustering result of the text to be processed is determined based on the text similarity and the address similarity.
[0019] Sixthly, embodiments of the present invention provide a text clustering apparatus, comprising:
[0020] The second acquisition module is used to acquire the text to be processed and multiple reference address texts for analyzing and processing the text to be processed. The text to be processed corresponds to geographical information, and each reference address text corresponds to a point of interest.
[0021] The second processing module is used to analyze and process the text to be processed based on a deep learning model to obtain vector representation information corresponding to the text to be processed, wherein the vector representation information includes geographical information.
[0022] The second calculation module is used to calculate the text similarity and address similarity between the text to be processed and the multiple reference address texts based on the vector representation information;
[0023] The second determining module is used to determine the clustering result of the text to be processed based on the text similarity and the address similarity.
[0024] In a seventh aspect, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the text clustering method in the fifth aspect described above.
[0025] Eighthly, embodiments of the present invention provide a computer storage medium for storing a computer program that, when executed by a computer, implements the text clustering method described in the fifth aspect above.
[0026] The deep learning model training method, apparatus, and device provided in this embodiment acquire a training text set, wherein the training text set includes multiple address clusters, each address cluster includes multiple address texts and their corresponding geographic location information, the geographic location information relationship between multiple address texts in each address cluster is used as a first optimization objective, and the geographic location information relationship between any two address clusters is used as a second optimization objective. The deep learning model is trained using the training text set, thereby effectively realizing the ability to learn and train by combining the training text set with spatial information, generating a deep learning model that satisfies the first optimization objective and the second optimization objective, thus ensuring the quality and efficiency of deep learning model generation. Then, the deep learning model can be used for text processing, generating vector representation information corresponding to address texts and spatial information, further improving the practicality of the deep learning model and facilitating its market promotion and application. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0028] Figure 1A flowchart illustrating a training method for a deep learning model provided in an embodiment of the present invention;
[0029] Figure 2 A flowchart illustrating a training method for a deep learning model provided in an embodiment of the present invention;
[0030] Figure 3 This is a schematic diagram of the process for obtaining a training text set according to an embodiment of the present invention;
[0031] Figure 4 This is a schematic diagram of an address cluster provided in an embodiment of the present invention;
[0032] Figure 5 This is a flowchart illustrating the process of performing reverse address parsing on all address texts within a set range based on the grid points to obtain address clusters corresponding to the same geographical location information, as provided in an embodiment of the present invention.
[0033] Figure 6 This is a schematic diagram illustrating the process of dividing the map data into grids according to an embodiment of the present invention;
[0034] Figure 7 A flowchart illustrating another method for training a deep learning model provided in an embodiment of the present invention;
[0035] Figure 8 A flowchart illustrating another method for training a deep learning model provided in an embodiment of the present invention;
[0036] Figure 9 A schematic diagram of the spherical loss function provided for an application embodiment of the present invention. Figure 1 ;
[0037] Figure 10 A schematic diagram of the spherical loss function provided for an application embodiment of the present invention. Figure 2 ;
[0038] Figure 11 This is a flowchart illustrating a text clustering method provided in an embodiment of the present invention;
[0039] Figure 12 A schematic diagram of the structure of a training device for a deep learning model provided in an embodiment of the present invention;
[0040] Figure 13 To and Figure 12 A schematic diagram of the electronic device corresponding to the training device for the deep learning model provided in the embodiment shown.
[0041] Figure 14 This is a schematic diagram of the structure of a text clustering device provided in an embodiment of the present invention;
[0042] Figure 15 To and Figure 14 The illustrated embodiment provides a schematic diagram of the electronic device corresponding to the text clustering device. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0044] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” used in the embodiments of this invention and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. “Multiple” generally includes at least two, but does not exclude the inclusion of at least one.
[0045] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0046] Depending on the context, the words “if” or “suppose” as used here can be interpreted as “when” or “in response to determination” or “in response to identification.” Similarly, depending on the context, the phrases “if determination” or “if identification (of the condition or event of the statement)” can be interpreted as “when determination” or “in response to determination” or “when identification (of the condition or event of the statement)” or “in response to identification (of the condition or event of the statement).”
[0047] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a product or system comprising a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a product or system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the product or system that includes said element.
[0048] Terminology definition:
[0049] A loss function, or cost function, maps the values of a random event or its related random variables to non-negative real numbers, representing the "risk" or "loss" of that random event. In applications, the loss function is often used as a learning criterion in relation to optimization problems; that is, the model is solved and evaluated by minimizing the loss function.
[0050] Furthermore, the timing of the steps in the following method embodiments is merely an example and not a strict limitation.
[0051] Figure 1 A flowchart illustrating a training method for a deep learning model provided in an embodiment of the present invention; Figure 2 A flowchart illustrating a training method for a deep learning model provided in an embodiment of the present invention; see attached diagram. Figures 1-2 As shown, this embodiment provides a method for training a deep learning model. The main body executing this method is a training device for the deep learning model. It can be understood that the training device can be implemented as software, or a combination of software and hardware. Specifically, the method may include:
[0052] Step S201: Obtain a training text set, which includes multiple address clusters, each of which contains multiple address texts and their corresponding geographical location information.
[0053] Step S202: Take the geographic location information relationship between multiple address texts in each address cluster as the first optimization objective, and take the geographic location information relationship between any two address clusters as the second optimization objective. Use the training text set to train the deep learning model to obtain a deep learning model that satisfies the first and second optimization objectives.
[0054] The specific implementation process of each of the above steps is explained in detail below:
[0055] Step S201: Obtain a training text set, which includes multiple address clusters, each of which contains multiple address texts and their corresponding geographical location information.
[0056] The training text set can include multiple training texts, which are used to train a deep learning model. Additionally, the training text set includes multiple address clusters, where each address cluster contains multiple address texts and their corresponding location information. Different address texts can correspond to the same or different geographical locations, and multiple address texts corresponding to the same geographical location can correspond to the same point of interest. The address texts and geographical location information can be identified using vector information. Therefore, when training based on the aforementioned training text set, the generated deep learning model can represent address texts as vectors.
[0057] Furthermore, this embodiment does not limit the specific method of obtaining the training text set. Those skilled in the art can set it according to specific application scenarios and application requirements. For example, the training text set can be stored in a preset area. When a user has a request to generate a deep learning model, the preset area can be accessed based on the generation request, thereby obtaining the training text set. Alternatively, the training text set can be stored in a third device. When a user has a request to generate a deep learning model, a generation request can be sent to the third device. The third device can send the training text set to the training device of the deep learning model based on the generation request, thereby enabling the training device to stably obtain the training text set.
[0058] Step S202: Take the geographic location information relationship between multiple address texts in each address cluster as the first optimization objective, and take the geographic location information relationship between any two address clusters as the second optimization objective. Use the training text set to train the deep learning model to obtain a deep learning model that satisfies the first optimization objective and the second optimization objective.
[0059] Since the training text set includes multiple address clusters, and each address cluster contains multiple address texts and their corresponding address location information, and different address clusters correspond to different address location information, in order to ensure the quality and efficiency of training the deep learning model, the address location information relationships between multiple address texts in each address cluster and the address location information relationships between any two address clusters can be determined. Then, the address location information relationships between multiple address texts in each address cluster are used as the first optimization objective, and the address location information relationships between any two address clusters are used as the second optimization objective. After determining the first and second optimization objectives, the deep learning model can be trained using the training text set, thereby obtaining a deep learning model that satisfies both the first and second optimization objectives.
[0060] In some instances, the first optimization objective is a loss function within the region, and the second optimization objective is a loss function outside the region. In this case, training the deep learning model using the training text set to obtain a deep learning model that satisfies both the first and second optimization objectives may include: training the deep learning model using the training text set, and performing a weighted summation of the loss function within the region and the loss function outside the region to obtain a deep learning model that satisfies the weighted summation loss function.
[0061] When using a training text set to train a deep learning model, to ensure the quality and efficiency of the training, a pre-configured region is defined for analyzing and processing multiple training texts. Understandably, different application scenarios and requirements may correspond to different regions; for example, the region can be circular, square, rectangular, elliptical, etc. When the region is circular, a spherical or circular region can be used to describe multiple geographical information points in the training text, thus allowing a spherical loss function to be determined based on the region. Conversely, when the region is square, a square region can be used to describe the multiple geographical information points in the training text, allowing a square loss function to be determined based on the region.
[0062] Of course, those skilled in the art can also use other methods to determine other types of loss functions for generating deep learning models, as long as the accuracy and reliability of learning and training deep learning models can be guaranteed, which will not be elaborated here.
[0063] Furthermore, for the training text set within a region, the first and second optimization objectives can be different types of loss functions. For example, the first optimization objective can be an intra-regional loss function, and the second optimization objective can be an extra-regional loss function; or, the first optimization objective can be an extra-regional loss function, and the second optimization objective can be an intra-regional loss function. Specifically, the intra-regional loss function is used to limit the distance between the geographical information of the training text within the region and the center point of the region to be less than a first predetermined distance. In some instances, when the region is circular, and the loss function is a spherical loss function, the first predetermined distance is the radius of the circular region. The extra-regional loss function is used to limit the distance between the geographical information of the training text within a region and the center point of other regions to be greater than a second predetermined distance, wherein the second predetermined distance is greater than the first predetermined distance, and the first and second predetermined distances are related to the region. In some instances, when the loss function is a spherical loss function, the second predetermined distance is three times the radius of the circular region.
[0064] After obtaining the intra-region and extra-region loss functions, a weighted sum can be performed on the intra-region and extra-region loss functions to obtain the weighted summed loss function corresponding to the deep learning model. For example, the intra-region loss function can be L... in The out-of-region loss function can be L out , and the loss function L within the region in The corresponding weight coefficient is α, and then the weighted summation loss function L = αL corresponding to the deep learning model can be obtained. in +L out .
[0065] After obtaining the weighted loss function, the first and second optimization objectives can be combined, and the deep learning model can be trained based on the training text set to obtain the trained deep learning model. It is important to note that the model parameters of the trained deep learning model are related to the region used to analyze and process the training text set. Different regions can correspond to different model parameters; for example, when the region is circular, the model parameters can be the radius corresponding to the circle; when the region is square, the model parameters can be the side length corresponding to the square, and so on.
[0066] After obtaining the model parameters, a deep learning model can be obtained based on the model parameters. This deep learning model is used to perform vector representation of address text. That is, after obtaining the deep learning model, the address text to be analyzed can be processed using the deep learning model, thereby obtaining vector representation information corresponding to the address text. This vector representation information includes the textual information and geographic information of the address text.
[0067] Furthermore, after generating and training a deep learning model, it can be used to analyze and process address text to determine the accurate location information corresponding to the address text. For example, upon receiving an emergency call, ambulance call, or fire call, the model can analyze the fuzzy address information corresponding to these calls using a deep learning model. This analysis yields a vector representation of the fuzzy address information, which is then used to determine the precise location information. Obtaining this precise location information allows police officers, emergency responders, and rescue personnel to provide faster and more effective first aid, emergency rescue, or firefighting, thus significantly improving the safety and reliability of the deep learning model.
[0068] Example 2: In the field of delivery technology, when a delivery person has multiple delivery tasks, address clusters belonging to the same area can be determined based on the different delivery tasks. That is, a deep learning model is used to analyze and process the address text corresponding to all delivery tasks, thereby obtaining a set of tasks belonging to the same area or the same geographical location. This set of tasks may include one or more delivery tasks. Then, delivery suggestions can be generated based on the mapping relationship between the above geographical location and the task set. These delivery suggestions are used for delivery personnel to carry out delivery operations, that is, to carry out delivery operations according to the task set corresponding to the address information. This can improve the quality and efficiency of delivery operations and further ensure the practicality of the deep learning model.
[0069] The deep learning model training method provided in this embodiment obtains a training text set, uses the geographic location information relationship between multiple address texts in each address cluster as the first optimization objective, and uses the geographic location information relationship between any two address clusters as the second optimization objective. The deep learning model is trained using the training text set, effectively enabling learning and training by combining the training text set with spatial information. The deep learning model is generated by combining the first and second optimization objectives, thus ensuring the quality and efficiency of the generated deep learning model. The deep learning model can then be used for text processing, generating vector representation information corresponding to the text and spatial information, further improving the practicality of the deep learning model and facilitating its market promotion and application.
[0070] Figure 3 This is a schematic diagram of the process for obtaining a training text set according to an embodiment of the present invention; based on the above embodiments, refer to the appendix. Figure 3 As shown, this embodiment provides a method for obtaining a training text set. Specifically, obtaining the training text set in this embodiment may include:
[0071] Step S301: Obtain multiple address texts, where each address text corresponds to geographical location information.
[0072] In order to accurately obtain the training text set, multiple address texts can be obtained through a preset server. Each address text can correspond to a geographical location information. It can be understood that the geographical location information corresponding to different address texts can be the same or different.
[0073] Step S302: Perform reverse address parsing on multiple address texts based on the geographic location information corresponding to each address text to obtain address clusters corresponding to the same geographic location information.
[0074] After obtaining multiple address texts, reverse address parsing can be performed on the multiple address texts based on the geographical location information corresponding to each address text to obtain address clusters corresponding to the same geographical location information. It can be understood that an address cluster can include one or more address texts located within a defined range, such as... Figure 4 As shown.
[0075] Step S303: Obtain the training text set based on the address cluster.
[0076] After obtaining the address clusters, they can be analyzed and processed to obtain a training text set. In some instances, obtaining a training text set based on address clusters may include: determining the address similarity between any two address texts in the address cluster; and filtering the address texts included in the address cluster based on address similarity to obtain a training text set corresponding to the same geographical location information.
[0077] For example, see attached document. Figure 4 As shown, an address cluster is generated for each geographic location. This address cluster can include multiple address texts, such as address text A, address text B, and address text C. After obtaining the multiple address texts included in the address cluster, the address similarity between any two address texts in the address cluster can be obtained. For example, the address similarity can include: address similarity 'a' between address text A and address text B, address similarity 'b' between address text A and address text C, and address similarity 'c' between address text B and address text C. c .
[0078] After obtaining the address similarity between any two address texts, the address texts included in the address cluster can be filtered based on address similarity to obtain a training text set corresponding to the same geographic location information. In some instances, filtering the address texts included in the address cluster based on address similarity to obtain a training text set corresponding to a geographic information may include: when the address similarity is greater than or equal to a preset threshold, obtaining the address text pairs corresponding to the address similarity; and determining all address text pairs corresponding to the same geographic location information as the training text set corresponding to the geographic location information.
[0079] Specifically, a preset threshold is set in advance for analyzing and processing address similarity. After obtaining the address similarity between any two address texts, the address similarity can be analyzed and compared with the preset threshold. When the address similarity is greater than or equal to the preset threshold, the address text pair corresponding to the address similarity can be obtained. Then, all address text pairs corresponding to the same geographical location information can be determined as the training text set corresponding to the geographical location information.
[0080] For example, when address similarity includes address similarity a, address similarity b, and address similarity c, address similarity a, address similarity b, and address similarity c can be analyzed and compared with preset thresholds. When address similarity a and address similarity b are greater than or equal to the preset thresholds, address text pairs corresponding to address similarity a (address text A and address text B) and address text pairs corresponding to address similarity b (address text A and address text C) can be obtained. Then, all address text pairs corresponding to the above geographical location information can be determined as the training text set corresponding to the geographical location information, thereby effectively achieving the accuracy and reliability of determining the training text set.
[0081] In this embodiment, multiple address texts are obtained, and address inverse parsing is performed on the multiple address texts based on the geographical location information corresponding to each address text to obtain address clusters corresponding to the same geographical location information. Then, a training text set is obtained based on the address clusters, thereby effectively ensuring the accuracy and reliability of obtaining the training text set and further ensuring the generation quality and efficiency of the deep learning model.
[0082] Figure 5 This invention provides a flowchart illustrating the process of performing inverse address parsing on all address text within a defined range based on the grid points to obtain address clusters corresponding to the same geographical location information, as provided in this embodiment. Based on the above embodiment, refer to the appendix... Figure 5 As shown, this embodiment provides a method for obtaining address clusters corresponding to the same geographical location information. Specifically, in this embodiment, the method of performing inverse address parsing on all address texts within a set range based on grid points to obtain address clusters corresponding to the same geographical location information may include:
[0083] Step S501: Obtain map data for analyzing and processing address text.
[0084] Step S502: Divide the map data into grids to obtain multiple grid points corresponding to the map data, wherein any two grid points are used to identify different points of interest.
[0085] Step S503: Perform reverse address parsing on all address texts within a set range based on grid points to obtain address clusters corresponding to the same geographical location information. Each address cluster includes one or more address texts.
[0086] To accurately obtain address clusters, map data for analyzing and processing the address text can be acquired. Specifically, the map data can be stored in a preset area, and accessing this area allows access to the map data used for address text analysis. It can be understood that the map data can correspond to multiple areas, or the address data can correspond to a specific area. After acquiring the map data, it can be divided into grids, such as... Figure 6 As shown, this allows us to obtain multiple grid points corresponding to the map data, where any two grid points can be used to identify different points of interest.
[0087] In some instances, dividing map data into grids to obtain multiple grid points corresponding to the map data may include: obtaining a gridding distance for dividing the map data into grids, the gridding distance being related to at least one of the following: the area of a point of interest, the diameter of a point of interest; and dividing the map data into grids based on the gridding distance to obtain multiple grid points corresponding to the map data, wherein the distance between any two grid points is greater than the gridding distance.
[0088] Specifically, for different map data, multiple points of interest (POIs) can be configured based on application and setting requirements. Different POIs can correspond to different area or diameter parameters. To accurately divide the map data into grids, a grid division distance can be obtained. This distance can be related to the area and / or diameter of the POIs. In some instances, the division distance can be 1.5 km, 2 km, 2.5 km, or 3 km, etc. After obtaining the division distance, the map data can be gridded based on the division distance to obtain multiple grid points corresponding to the map data. The distance between any two POIs in the map data can be greater than the division distance, which effectively distinguishes different POIs.
[0089] After dividing the map data into grids and obtaining multiple grid points corresponding to the map data, inverse address parsing can be performed on all address texts within a set range based on the grid points. The set range can be 100 meters, 150 meters, or 200 meters. Those skilled in the art can set the set range according to specific application scenarios or application requirements. In this way, address clusters corresponding to the same geographical location information can be obtained. It is understood that the address cluster can include one or more address texts.
[0090] In this embodiment, map data for analyzing and processing address text is acquired, and then the map data is divided into grids to obtain multiple grid points corresponding to the map data. Based on the grid points, address inverse parsing is performed on all address text within a set range to obtain address clusters corresponding to the same geographical location information. This effectively ensures the quality and effect of acquiring address clusters, and further ensures the quality and effect of generating deep learning models.
[0091] Figure 7 A flowchart illustrating another deep learning model training method provided in this embodiment of the invention; based on the above embodiments, refer to the appendix. Figure 7 As shown, after obtaining a deep learning model that satisfies the first optimization objective and the second optimization objective, the method in this embodiment may further include:
[0092] Step S801: Obtain the text to be processed, which corresponds to geographical location information.
[0093] Step S802: Analyze and process the text to be processed based on a deep learning model to obtain vector representation information corresponding to the text to be processed. The vector representation information includes geographical location information.
[0094] After obtaining the deep learning model, text processing can be performed using the deep learning model. Specifically, the text to be processed can be obtained, and the obtained text may correspond to geographical location information. Then, the text to be processed can be input into the deep learning model, and the text to be processed can be analyzed and processed based on the deep learning model, thereby obtaining vector representation information corresponding to the text to be processed. The vector representation information may include geographical location information.
[0095] In this embodiment, the text to be processed is acquired, and then analyzed and processed based on a deep learning model to obtain vector representation information corresponding to the text to be processed. This effectively realizes the quality and efficiency of vector representation of the text to be processed using a deep learning model, further improving the practicality of the deep learning model.
[0096] Figure 8 This is a flowchart illustrating another method for training a deep learning model according to an embodiment of the present invention; based on the above embodiments, please refer to the appendix. Figure 8 As shown, after obtaining the vector representation information corresponding to the text to be processed, the method in this embodiment may further include:
[0097] Step S901: Obtain multiple reference address texts for analyzing and processing the text to be processed.
[0098] Step S902: Calculate the text similarity and address similarity between the text to be processed and multiple reference address texts based on vector representation information.
[0099] Step S903: Determine the clustering result of the text to be processed based on text similarity and address similarity.
[0100] After obtaining the vector representation information corresponding to the text to be processed, text clustering can be performed based on this information. Specifically, multiple reference address texts can be obtained for analysis, with each reference address text corresponding to a point of interest. After obtaining the vector representation information, the text similarity and address similarity between the text to be processed and the multiple reference address texts can be calculated. Then, text clustering can be performed based on these similarities to determine the clustering results. Specifically, reference address texts with both text similarity and address similarity greater than a set threshold are identified as the clustering results for the text to be processed, thus effectively improving the quality and effectiveness of address text clustering.
[0101] In practical applications, taking a spherical loss function as an example, this application embodiment provides an address text representation learning method based on a spherical loss function. This text representation learning method can incorporate spatial information into the address text representation learning. Specifically, the address text identifier learning method provided in this application embodiment may include:
[0102] Step 1: Obtain a large amount of address text with geographical information (i.e., latitude and longitude).
[0103] In network operation scenarios, a massive amount of address text with geographical information (latitude and longitude) will be generated. The address text can be stored in a database, and the address text with geographical information can be obtained by accessing the database.
[0104] Step 2: Determine the map data to be used for analyzing and processing the address text, divide the map data into grids, and obtain multiple grid points corresponding to the map data. The grid points in the map data are used to identify different points of interest.
[0105] Specifically, map data covering a defined area is acquired, and then the map data can be divided into grids. The grid distance used for dividing the map data into grids is related to the area and / or diameter of the points of interest. During the grid division process, it is necessary to ensure that the distance between any two points in the grid is greater than a set distance, such as 2 kilometers, 2.5 kilometers, or 3 kilometers, etc.
[0106] Step 3: Perform reverse address parsing on all address texts within the set range based on grid points to obtain address clusters corresponding to the same geographic information. Each address cluster includes one or more address texts.
[0107] The training text can correspond to geographical information. When analyzing and processing map data, the address inverse parsing process can be performed on all address texts within a set range (e.g., 100 meters, 150 meters, 200 meters, or 300 meters, etc.) based on grid points and geographical information, thereby obtaining address clusters corresponding to the same geographical information. These address clusters can include one or more address texts.
[0108] Step 4: Determine the address similarity between any two address texts in the address cluster, and filter the address texts included in the address cluster based on the address similarity to obtain a training text set corresponding to a geographic information.
[0109] In other instances, after obtaining the address cluster, all address texts in the address cluster can be filtered using set rules and filtering conditions to obtain a training text set corresponding to a geographic information. The historical address texts included in the training text set correspond to the same point of interest (POI).
[0110] Step 5: Obtain multiple training text sets corresponding to multiple geographic information. Each training text set includes multiple training texts and multiple geographic information corresponding to the multiple training texts, and the multiple training texts corresponding to the same geographic information correspond to the same point of interest.
[0111] Step 6: Determine the loss function corresponding to the deep learning model.
[0112] When the region used to analyze and process multiple training texts is circular, the loss function corresponding to the deep learning model can be determined as a spherical loss function. In some instances, determining the loss function corresponding to the deep learning model may include the following steps:
[0113] Step 6.1: Determine the loss function within the region and the loss function outside the region based on the region scope.
[0114] Step 6.2: Perform a weighted summation of the loss functions within the region and the loss functions outside the region to obtain the loss function corresponding to the deep learning model.
[0115] For example, the loss function within the region can be L. in The out-of-region loss function can be L out , and the loss function L within the region in The corresponding weight coefficient is α, and then the loss function L = αL corresponding to the deep learning model can be obtained.in +L out .
[0116] Step 7: Train the model based on the training text set and optimize the trained model using the loss function to obtain the model parameters corresponding to the deep learning model.
[0117] The purpose of training on address texts with spatial information in the training text set is to generate a deep learning model that can represent different address texts as vectors. Then, text address analysis can be performed based on the vector representation information, so that address texts with similar semantics or spatial proximity can form an address cluster, making the address text representation distance within this cluster as close as possible, and making the distance between different address clusters as large as possible.
[0118] Specifically, due to the inherent topological properties of spatial information, circular regions with radius r can be used to describe address clusters. In this case, during the optimization of the trained model using a spherical loss function, the maximum distance between address pairs within the same circular region does not exceed 2r. Figure 9 As shown, the intra-region loss function is used to limit the distance from the address text within the circular region to the center point to be less than r. Specifically, the intra-region loss function can be expressed as:
[0119]
[0120] Where, x ik It is the address text within the circular area, f i It is the vector representation information corresponding to the address text (specifically, it can be obtained using various text encoders such as Convolutional Neural Networks (CNN), Long Short-Term Memory (LSTM), and Transformer models), μ k The center point of the circular region is the learning effect of the loss function, which is to make the distance from each address in each region of the circle to its center less than r.
[0121] Furthermore, for address pairs located within different circular regions, to ensure complete differentiation of address text corresponding to different points of interest, their distance must be greater than 3r. This ensures that address text within different circular regions will not be mixed up. Figure 10 As shown, the out-of-region loss function is used to limit the distance from each address text within a circular region to the center point of other circular regions to be greater than 3r. Specifically, the out-of-region loss function can be expressed as:
[0122]
[0123] After obtaining the loss functions within and outside the regions mentioned above, a weighted sum of the loss functions within and outside the regions can be performed to obtain a spherical loss function for optimizing the trained model.
[0124] After obtaining the spherical loss function and the training text set, learning and training can be performed based on the training text set, and the loss function can be used to optimize the trained model to obtain the model parameters corresponding to the deep learning model. At this time, the model parameters can include the radius r of the circular region.
[0125] Step 8: After obtaining the model parameters, a deep learning model can be obtained based on the model parameters. The deep learning model is used to represent address text as vectors.
[0126] Step 9: Obtain the text to be processed, which contains geographical information. Then, based on a deep learning model, analyze and process the text to obtain vector representation information corresponding to the text to be processed. The vector representation information includes geographical information.
[0127] Step 10: After obtaining the vector representation information corresponding to the text to be processed, multiple reference address texts can be obtained for analysis and processing of the text to be processed, and each reference address text corresponds to an interest point; then, based on the vector representation information, the text similarity and address similarity between the text to be processed and the multiple reference address texts are calculated; and the clustering result of the text to be processed is determined based on the text similarity and address similarity.
[0128] The address text representation learning method provided in this application embodiment performs unsupervised generation training by combining address text with spatial information, and uses a spherical loss function to simulate the topological structure of space during training. This effectively ensures the quality and efficiency of the trained deep learning model, which can then be used to simultaneously learn representations of address text and spatial information. Furthermore, when using the deep learning model for text processing, semantically similar address texts can be clustered, and spatially adjacent address texts can also be clustered. This effectively ensures the quality and efficiency of text clustering, further improving the practicality of the deep learning model and facilitating its market promotion and application.
[0129] Figure 11 This is a flowchart illustrating a text clustering method provided in an embodiment of the present invention; see attached diagram. Figure 11As shown, this embodiment provides a text clustering method. The execution subject of this text clustering method is a text clustering device. It can be understood that the text clustering device can be implemented as software, or a combination of software and hardware. Specifically, the method may include:
[0130] Step S1201: Obtain the text to be processed and multiple reference address texts for analyzing the text to be processed. The text to be processed corresponds to geographical information, and each reference address text corresponds to a point of interest.
[0131] The text to be processed refers to the address text that needs to be clustered. There can be one or more address texts. Specifically, this embodiment does not limit the specific method of obtaining the text to be processed. Those skilled in the art can use different implementation methods to obtain it according to different application scenarios and application requirements. For example, the text to be processed can be stored in a preset area, and the text to be processed can be obtained by accessing the preset area; or, the text clustering device is equipped with a detection device, which is used to detect the execution operation input by the user to the text clustering device and generate the text to be processed based on the execution operation; or, the text to be processed is stored in a third device, which is communicatively connected to the text clustering device. When the user has a clustering processing requirement, the text clustering device can generate a text processing request and send the text processing request to the third device, so that the third device can send the text to be processed to the text clustering device based on the text processing request, thereby enabling the text clustering device to stably obtain the text to be processed.
[0132] Of course, those skilled in the art can also use other methods to obtain the text to be processed, as long as the accuracy and reliability of obtaining the text to be processed can be guaranteed, which will not be elaborated here.
[0133] In addition, after obtaining the text to be processed, multiple reference address texts can be determined for analysis and processing of the text. Different reference address texts correspond to a point of interest. Specifically, this embodiment does not limit the specific implementation method for determining multiple reference address texts. Those skilled in the art can set it according to specific application scenarios and application requirements. For example, multiple reference address texts can be stored in a preset area, and multiple reference address texts can be obtained by accessing the preset area; or, multiple reference address texts can be stored in a third device, and multiple reference address texts can be obtained by communicating with the third device.
[0134] Of course, those skilled in the art can also use other methods to obtain multiple reference address texts for the analysis and processing of the text to be processed, as long as the accuracy and reliability of obtaining multiple reference address texts for the analysis and processing of the text to be processed can be guaranteed, which will not be elaborated here.
[0135] Step S1202: Analyze and process the text to be processed based on a deep learning model to obtain vector representation information corresponding to the text to be processed. The vector representation information includes geographical information.
[0136] After obtaining the text to be processed, a deep learning model can be used to analyze and process the text, thereby obtaining vector representation information corresponding to the text to be processed, which may include geographical information.
[0137] Step S1203: Calculate the text similarity and address similarity between the text to be processed and multiple reference address texts based on vector representation information.
[0138] Step S1204: Determine the clustering result of the text to be processed based on text similarity and address similarity.
[0139] The specific implementation method and effect of the above steps in this embodiment are similar to the specific implementation method and effect of steps S902-S903 in the above embodiment. For details, please refer to the above description, and it will not be repeated here.
[0140] The text clustering method provided in this embodiment obtains the text to be processed and multiple reference address texts for analysis and processing. Based on a deep learning model, it analyzes and processes the text to be processed to obtain vector representation information corresponding to the text to be processed. Then, based on the vector representation information, it calculates the text similarity and address similarity between the text to be processed and the multiple reference address texts, and determines the clustering result of the text to be processed based on the text similarity and address similarity. This effectively enables streaming analysis and processing of address texts. It not only has a small amount of data computation, making it suitable for data processing tasks of hundreds of millions, but also has high accuracy in analyzing and processing address texts, thereby improving the practicality of the method and facilitating its market promotion and application.
[0141] Figure 12 This is a schematic diagram of the structure of a training device for a deep learning model provided in an embodiment of the present invention; see attached diagram. Figure 12 As shown, this embodiment provides a training device for a deep learning model, which can be used to perform the above-described... Figure 2 The training method for the deep learning model is shown. Specifically, the training apparatus for this deep learning model may include: a first acquisition module 11 and a first processing module 12.
[0142] The first acquisition module 11 is used to acquire a training text set, which includes multiple address clusters, and each address cluster includes multiple address texts and their corresponding geographical location information.
[0143] The first processing module 12 is used to take the geographical location information relationship between multiple address texts in each address cluster as the first optimization objective, and the geographical location information relationship between any two address clusters as the second optimization objective, and use the training text set to train the deep learning model to obtain a deep learning model that satisfies the first optimization objective and the second optimization objective.
[0144] In some instances, when the first acquisition module 11 acquires the training text set, the first acquisition module 11 is used to perform the following: acquire multiple address texts, wherein each address text corresponds to geographical location information; perform address inverse parsing processing on the multiple address texts based on the geographical location information corresponding to each address text to obtain address clusters corresponding to the same geographical location information; and obtain the training text set according to the address clusters.
[0145] In some instances, when the first acquisition module 11 obtains a training text set based on the address cluster, the first acquisition module 11 is used to perform the following: determine the address similarity between any two address texts in the address cluster; filter the address texts included in the address cluster based on the address similarity to obtain a training text set corresponding to the same geographical location information.
[0146] In some instances, when the first acquisition module 11 performs reverse address parsing on the multiple address texts based on the geographic location information corresponding to each address text to obtain address clusters corresponding to the same geographic location information, the first acquisition module 11 is used to perform: acquiring map data for analyzing and processing the address texts; dividing the map data into grids to obtain multiple grid points corresponding to the map data; and performing reverse address parsing on all address texts within a set range based on the grid points to obtain address clusters corresponding to the same geographic location information, wherein the address clusters include one or more address texts.
[0147] In some instances, when the first acquisition module 11 performs grid division on the map data to obtain multiple grid points corresponding to the map data, the first acquisition module 11 is used to perform: acquiring the division distance for grid division of the map data, the division distance being related to at least one of the following: the area of the point of interest, the diameter of the point of interest; performing grid division on the map data based on the division distance to obtain multiple grid points corresponding to the map data, wherein the distance between any two grid points is greater than the division distance.
[0148] In some instances, when the first acquisition module 11 filters the address texts included in the address cluster based on the address similarity to obtain a training text set corresponding to the same geographical location information, the first acquisition module 11 is used to perform the following: when the address similarity is greater than or equal to a preset threshold, acquire the address text pairs corresponding to the address similarity; and determine all address text pairs corresponding to the same geographical location information as the training text set corresponding to the geographical location information.
[0149] In some instances, the first optimization objective is a loss function within the region, and the second optimization objective is a loss function outside the region. When the first processing module 12 uses the training text set to train the deep learning model to obtain a deep learning model that satisfies both the first and second optimization objectives, the first processing module 12 is used to perform the following: train the deep learning model using the training text set, and perform a weighted summation of the loss function within the region and the loss function outside the region to obtain a deep learning model that satisfies the loss function after weighted summation.
[0150] In some instances, when the region is circular, the loss function is a spherical loss function; when the region is square, the loss function is a square loss function.
[0151] In some instances, the intra-regional loss function is used to limit the distance between the geographic information of the training text and the center point of the region to less than a first predetermined distance.
[0152] In some instances, when the loss function is a spherical loss function, the first set distance is the radius of the circular region.
[0153] In some instances, the out-of-region loss function is used to limit the distance between the geographic information of the training text within a region and the center point of other regions to a second predetermined distance, wherein the second predetermined distance is greater than the first predetermined distance, and the first predetermined distance and the second predetermined distance are related to the region.
[0154] In some instances, when the loss function is a spherical loss function, the second set distance is the radius of the circular region, which is three times the radius of the circular region.
[0155] In some instances, after obtaining a deep learning model that satisfies the first optimization objective and the second optimization objective, the first acquisition module 11 and the first processing module 12 in this embodiment are used to perform the following steps:
[0156] The first acquisition module 11 is used to acquire the text to be processed, which corresponds to geographical information.
[0157] The first processing module 12 is used to analyze and process the text to be processed based on a deep learning model to obtain vector representation information corresponding to the text to be processed, and the vector representation information includes geographical location information.
[0158] In some instances, after obtaining the vector representation information corresponding to the text to be processed, the first acquisition module 11 and the first processing module 12 in this embodiment are used to perform the following steps:
[0159] The first acquisition module 11 is used to acquire multiple reference address texts for analyzing and processing the text to be processed;
[0160] The first processing module 12 is used to calculate the text similarity and address similarity between the text to be processed and multiple reference address texts based on vector representation information; and to determine the clustering result of the text to be processed based on the text similarity and address similarity.
[0161] Figure 12 The device shown can perform Figures 1 to 10 For the methods in the embodiments shown, the parts not described in detail in this embodiment can be referred to the [examples / descriptions]. Figures 1 to 10 The relevant descriptions of the embodiments shown are provided below. For the implementation process and technical effects of this technical solution, please refer to... Figures 1 to 10 The descriptions in the illustrated embodiments will not be repeated here.
[0162] In one possible design, Figure 12 The training device for the deep learning model shown can be implemented as an electronic device, such as a mobile phone, tablet, server, or other similar device. Figure 13 As shown, the electronic device may include a first processor 21 and a first memory 22. The first memory 22 is used to store data supporting the electronic device in performing the above-described actions. Figures 1-10 In at least some of the embodiments shown, a program for training a deep learning model is provided, wherein a first processor 21 is configured to execute a program stored in a first memory 22.
[0163] The program includes one or more computer instructions, wherein when executed by the first processor 21, the one or more computer instructions can perform the following steps:
[0164] Obtain a training text set, which includes multiple address clusters, each address cluster including multiple address texts and their corresponding geographic location information;
[0165] The geographical location information relationship between multiple address texts in each address cluster is taken as the first optimization objective, and the geographical location information relationship between any two address clusters is taken as the second optimization objective. The deep learning model is trained using the training text set to obtain a deep learning model that satisfies the first optimization objective and the second optimization objective.
[0166] Optionally, the first processor 21 is also used to perform the aforementioned Figures 1-10 All or part of the steps in at least some of the embodiments shown.
[0167] The structure of the electronic device may also include a first communication interface 23 for communication between the electronic device and other devices or communication networks.
[0168] In addition, embodiments of the present invention provide a computer storage medium for storing computer software instructions used by an electronic device, which includes instructions for executing the above-described... Figures 1-10 The procedures involved in the training methods of deep learning models in at least some of the embodiments shown.
[0169] Figure 14 This is a schematic diagram of a text clustering device provided in an embodiment of the present invention; see attached diagram. Figure 14 As shown, this embodiment provides a text clustering device, which can be used to perform the above-described... Figure 11 The text clustering method shown. Specifically, the text clustering device may include: a second acquisition module 31, a second processing module 32, a second calculation module 33, and a second determination module 34.
[0170] The second acquisition module 31 is used to acquire the text to be processed and multiple reference address texts for analyzing and processing the text to be processed. The text to be processed corresponds to geographical information, and each reference address text corresponds to a point of interest.
[0171] The second processing module 32 is used to analyze and process the text to be processed based on a deep learning model, and obtain vector representation information corresponding to the text to be processed, which includes geographic information.
[0172] The second calculation module 33 is used to calculate the text similarity and address similarity between the text to be processed and multiple reference address texts based on vector representation information;
[0173] The second determining module 34 is used to determine the clustering result of the text to be processed based on text similarity and address similarity.
[0174] Figure 14 The device shown can perform Figure 11 For the methods in the embodiments shown, the parts not described in detail in this embodiment can be referred to the [examples / descriptions]. Figure 11The relevant descriptions of the embodiments shown are provided below. For the implementation process and technical effects of this technical solution, please refer to... Figure 11 The descriptions in the illustrated embodiments will not be repeated here.
[0175] In one possible design, Figure 14 The structure of the text clustering device shown can be implemented as an electronic device, which can be various devices such as mobile phones, tablets, and servers. Figure 15 As shown, the electronic device may include a second processor 41 and a second memory 42. The second memory 42 is used to store data supporting the electronic device in performing the above-described actions. Figure 11 In at least some of the embodiments shown, the program for the text clustering method is provided, and the second processor 41 is configured to execute the program stored in the second memory 42.
[0176] The program includes one or more computer instructions, wherein the one or more computer instructions, when executed by the second processor 41, can perform the following steps:
[0177] The text to be processed and multiple reference address texts for analysis and processing of the text to be processed are obtained. The text to be processed corresponds to geographical information, and each reference address text corresponds to a point of interest.
[0178] The deep learning model is used to analyze and process the text to be processed, and obtain vector representation information corresponding to the text to be processed. The vector representation information includes geographical information.
[0179] The text similarity and address similarity between the text to be processed and multiple reference address texts are calculated based on vector representation information.
[0180] The clustering results of the text to be processed are determined based on text similarity and address similarity.
[0181] Optionally, the second processor 41 is also used to perform the aforementioned Figure 11 All or part of the steps in at least some of the embodiments shown.
[0182] The structure of the electronic device may also include a second communication interface 43 for communication between the electronic device and other devices or communication networks.
[0183] In addition, embodiments of the present invention provide a computer storage medium for storing computer software instructions used by an electronic device, which includes instructions for executing the above-described... Figure 11 The procedures involved in the text clustering method in at least some of the embodiments shown.
[0184] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0185] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of a necessary general-purpose hardware platform, or by a combination of hardware and software. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a computer product. The present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0186] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0187] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0188] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0189] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0190] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0191] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0192] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for training a deep learning model, comprising: Obtain a training text set, which includes multiple address clusters. Each address cluster includes multiple address texts and their corresponding geographic location information, wherein the geographic location information is the latitude and longitude information corresponding to the multiple address texts. The first optimization objective is to use the geographic location information relationship between multiple address texts in each address cluster as the first optimization objective, and the second optimization objective is to use the geographic location information relationship between any two address clusters as the second optimization objective. The deep learning model is trained using the training text set to obtain a deep learning model that satisfies the first optimization objective and the second optimization objective. The first optimization objective is an intra-regional loss function, which limits the distance between the geographic information of the training text and the center point of the region to be less than a first set distance. The second optimization objective is an extra-regional loss function, which limits the distance between the geographic information of the training text and the center point of other regions to be greater than a second set distance, which is greater than the first set distance.
2. The method according to claim 1, wherein, Obtain the training text set, including: Retrieve multiple address texts, where each address text corresponds to a geographical location. Based on the geographic location information corresponding to each address text, reverse address parsing is performed on the multiple address texts to obtain address clusters corresponding to the same geographic location information; The training text set is obtained based on the address cluster.
3. The method according to claim 2, wherein, Based on the address clusters, the training text set is obtained, including: Determine the address similarity between any two address texts in the address cluster; Based on the address similarity, the address texts included in the address cluster are filtered to obtain a training text set corresponding to the same geographical location information.
4. The method according to claim 2, wherein, The step of performing reverse address parsing on the multiple address texts based on the geographic location information corresponding to each address text to obtain address clusters corresponding to the same geographic location information includes: Obtain map data for analyzing and processing the address text; The map data is divided into grids to obtain multiple grid points corresponding to the map data; Based on the grid points, reverse address parsing is performed on all address texts within the set range to obtain address clusters corresponding to the same geographical location information. The address clusters include one or more address texts.
5. The method according to claim 3, wherein, Based on the address similarity, the address texts included in the address cluster are filtered to obtain a training text set corresponding to the same geographical location information, including: When the address similarity is greater than or equal to a preset threshold, the address text pair corresponding to the address similarity is obtained; All address text pairs corresponding to the same geographic location information are identified as the training text set corresponding to the geographic location information.
6. The method according to claim 1, wherein training the deep learning model using the training text set to obtain a deep learning model that satisfies the first optimization objective and the second optimization objective comprises: The deep learning model is trained using the training text set, and the loss function within the region and the loss function outside the region are weighted and summed to obtain a deep learning model that satisfies the weighted summation loss function.
7. The method according to any one of claims 1-6, wherein, After obtaining a deep learning model that satisfies the first optimization objective and the second optimization objective, the method further includes: Obtain the text to be processed, which corresponds to geographical location information; The deep learning model is used to analyze and process the text to be processed, and vector representation information corresponding to the text to be processed is obtained. The vector representation information includes geographical location information.
8. The method according to claim 7, wherein, After obtaining the vector representation information corresponding to the text to be processed, the method further includes: Obtain multiple reference address texts for analyzing and processing the text to be processed; Based on the vector representation information, calculate the text similarity and address similarity between the text to be processed and the multiple reference address texts; The clustering result of the text to be processed is determined based on the text similarity and the address similarity.
9. A training device for a deep learning model, comprising: The first acquisition module is used to acquire a training text set, which includes multiple address clusters, each address cluster including multiple address texts and their corresponding geographic location information, wherein the geographic location information is the latitude and longitude information corresponding to the multiple address texts; The first processing module is used to take the geographic location information relationship between multiple address texts in each address cluster as a first optimization objective, and the geographic location information relationship between any two address clusters as a second optimization objective, and to train the deep learning model using the training text set to obtain a deep learning model that satisfies the first optimization objective and the second optimization objective. The first optimization objective is an intra-regional loss function, which is used to limit the distance between the geographic information of the training text and the center point of the region to be less than a first set distance. The second optimization objective is an extra-regional loss function, which is used to limit the distance between the geographic information of the training text and the center point of other regions to be greater than a second set distance, and the second set distance is greater than the first set distance.
10. An electronic device, comprising: Memory, processor; among which, The memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the training method of the deep learning model as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Cluster matching method and system of hotel information
CN107291939A
Training method and device for depth learning model
CN109034365A
Address fuzzy matching method and system and computer equipment
CN111291099A
Training method of address text recognition model and prediction method and device of addresses
CN112052668A
